Fig. 1 - PicoScope 7 with graph rulers applied, illustrating a delay measurement being taken

## What is delay?

Delay is the measure of time between equivalent reference points on 2 waveforms (usually rising or falling edges). This concept is closely related to phase, but the interval is measured in time, rather than an angle representing how much of the cycle has elapsed. Delay can be used to describe how long the waveform has taken to travel between these two points. To summarise, while they are related concepts, they represent different aspects of waveforms and are measured in different units.

An example can be seen in Fig.1. See Interpreting Results for further explanation.

Fig. 2 - Measurements options panel

Fig. 3 - Delay measurements edit settings popup

## Automated measurement

### Setup and configuration

Delay can be found under the Multi-Channel category and once added, the secondary channel will default to the first available channel (see Fig. 2). After adding the measurement, it can be further constrained to only measure between horizontal and/or signal rulers within the viewport specified by the ruler view setting. As with other measurements, hysteresis can be used to reduce measurement errors attributed to noise and jitter (see Fig.3).

Fig. 4 - Delay 250 µs example

### Interpreting results

Delay is measured on a per-cycle basis, on either a rising or falling pair of edges, and then averaged across all cycles in the current buffer. Similarly to other measurements, global statistics are displayed on the Measurements lozenge, which are calculated over all captured buffers. In the below example (Fig.4), the secondary data source is out of phase by roughly ¼ of a cycle with the primary data source, and given the current time window, this is calculated as 250 µs.

### Calculation and algorithm

1. Identify primary and secondary channel crossing points
2. Using the crossing points, capture the cycle boundaries for both channels, using either rising or falling crossing points. Rising and falling edge counts will be compared and the most numerous edges will be used for the rest of the calculation
3. Calculate the delay for each cycle, using the secondary channel corresponding edge, subtracted from the primary channel edge
4. Average each of the delay values

e.g. Using the scenario in Fig 4, we can calculate the delay for a single pair of rising edges, where the crossing points are marked by the rulers (3rd pair of rising edges). The delay can be calculated using the information in the ruler grid:
270.9 µs - 19.46 µs =251~ µs
As stated above this would be performed on all edge pairs, then averaged.

### Time delay maths channel

Time delay maths channels are set up similarly to the measurement, in that both a primary and secondary data source is required. As there are no hysteresis, ruler, or signal ruler constraints, the output is performed across the entire buffer, but on a per-cycle basis.  This is why the output can be seen as a series of plateaus, each spanning a cycle of the primary data source (illustrated in  Fig. 5). The time delay maths channel can be found within the maths channel wizard, nested under the scientific functions category (see Fig. 6).

Fig.6 - Maths wizard time delay function

Fig. 7 - Maths wizard output range

Note: In the event that the maths channel output appears to be consistently zero, reducing the range scale will typically remedy this, as delay values may be very small.