API Functions
57
Copyright © 2006–2022 Pico Technology Ltd. All rights reserved.
ps2000pg.en-12
PicoScope 2000 Series Programmer's Guide
5.32
ps2000_set_trigger2
int16_t ps2000_set_trigger2
(
int16_t handle,
int16_t source,
int16_t threshold,
int16_t direction,
float delay,
int16_t auto_trigger_ms
)
This function is used to enable or disable triggering and set its parameters. It has the same
behavior as
, except that the
delay
parameter is a floating-point
value.
For oscilloscopes that support advanced triggering, see
ps2000SetAdvTriggerChannelConditions
Applicability
Triggering is available in
only
Arguments
handle
: the handle of the required oscilloscope
source
: specifies where to look for a trigger. Use
PS2000_CHANNEL_A
(0)
,
PS2000_CHANNEL_B (1)
or
PS2000_NONE (5)
.
threshold
: the threshold for the trigger event. This is scaled in 16-bit ADC
counts at the currently selected range.
direction
: use
PS2000_RISING (0)
or
PS2000_FALLING (1)
delay
: specifies the delay, as a percentage of the requested number of
data points, between the trigger event and the start of the block. It should
be in the range -100% to +100%. Thus, 0% means that the trigger event
is at the first data value in the block, and -50% means that it is in the
middle of the block. If you wish to specify the delay as an integer, use
instead. Note that if
delay
= 0 and you call
before a trigger event occurs, the device will return no data.
auto_trigger_ms
: the delay in milliseconds after which the oscilloscope
will collect samples if no trigger event occurs. If this is set to zero the
oscilloscope will wait for a trigger indefinitely.
Returns
0: if one of the parameters is out of range
non-zero: if successful
Summary of Contents for PicoScope 2000 Series
Page 1: ...Programmer s Guide ps2000pg en 12 PC Oscilloscopes PicoScope 2000 Series ...
Page 2: ......
Page 67: ......