PicoScope 2000 Series Programmer's Guide 41
Copyright © 2006–2016 Pico Technology Ltd. All rights reserved. ps2000pg.en r11
5.23
ps2000SetAdvTriggerDelay
int16_t ps2000SetAdvTriggerDelay
(
int16_t handle,
uint32_t delay,
float preTriggerDelay
)
This function sets the pre-trigger and post-trigger delays. The default action, when
both these delays are zero, is to start capturing data beginning with the trigger event
and to stop a specified time later. The start of capture can be delayed by using a non-
zero value of delay. Alternatively, the start of capture can be advanced to a time
before the trigger event by using a negative value of preTriggerDelay. If both
arguments are non-zero then their effects are added together.
Block mode only
PicoScope 2202, 2204, 2204A, 2205 and 2205A only
handle: the handle of the required oscilloscope
delay: the post-trigger delay, measured in sample periods. This is
the time between the trigger event and the sample at time t = 0.
For example, at a timebase of 50 MS/s, or 20 ns per sample, and
with delay = 100, the post-trigger delay would be 100 × 20 ns =
2 µ s.
Range: [0, 2
32
–1]
preTriggerDelay: the location of the sample at time t = 0 within
the data block, as a percentage of the data block length. 0% places
t = 0 at the start of the block, –50% places it in the middle, and –
100% places it at the end. Positive values can also be used to place
t = 0 before the beginning of the data block, but the delay
argument is more convenient for this purpose as it has a wider
range.
Range: [–100%, +100%]
0: if unsuccessful, or if one or more of the arguments are out of
range
non-zero: if successful
Example 1:
delay = 0,
preTriggerDelay = –50%
Example 2:
delay = 1 ms,
preTriggerDelay = –50%