PicoScope 3000 Series User Guide
19
Copyright 2005 Pico Technology Limited. All rights reserved.
PS3000044 1.4
3.3.9
ps3000_set_trigger
short ps3000_set_trigger (
short
handle,
short
source,
short
threshold,
short
direction,
short
delay,
short
auto_trigger_ms)
This function is used to enable or disable triggering and its parameters. Triggering is not
available in streaming mode.
Arguments
handle
, the handle to the required device.
source
, specifies where to look for a trigger. Use
PS3000_CHANNEL_A
(
0
),
PS3000_CHANNEL_B
(
1
),
PS3000_CHANNEL_C
(
2
),
PS3000_CHANNEL_D
(
3
),
PS3000_EXTERNAL
(
4
) or
PS3000_NONE
(
5
).
Channels C, D and External are not available on all models.
threshold
, the threshold for the trigger event. This is scaled in 16-bit
ADC counts at the currently selected range. If an external trigger is
enabled the range is fixed at +/-20V.
direction
, use
PS3000_RISING
(
0
) or
PS3000_FALLING
(
1
).
delay
, This 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 first data value in the block, and -50% means that the trigger event
is in the middle of the block.
auto_trigger_ms
, the delay in ms 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 are out of range, otherwise
1
.