
Writing your own software
18
Copyright © 2010-2011 Pico Technology Ltd. All rights reserved.
usbdrdaqpg.en
3.5.9
UsbDrDaqSetTrigger
PICO_STATUS UsbDrDaqSetTrigger(
short handle,
unsigned short enabled,
unsigned short auto_trigger,
unsigned short auto_ms,
unsigned short channel,
unsigned short dir,
unsigned short threshold,
unsigned short hysteresis,
float delay
)
This function sets up the trigger, which controls when the unit starts capturing data.
Arguments:
handle:
or
enabled:
whether to enable or disable the trigger:
0: disable the trigger
1: enable the trigger
auto_trigger:
whether or not to re-arm the trigger automatically
after each trigger event:
0: do not auto-trigger
1: auto-trigger
auto_ms:
time in milliseconds after which the unit will auto-trigger if
the trigger condition is not met
channel:
which channel to trigger on.
dir:
which edge to trigger on:
0: rising edge
1: falling edge
threshold:
trigger threshold (the level at which the trigger will
activate) in ADC counts
hysteresis:
trigger hysteresis in ADC counts. This is the difference
between the upper and lower thresholds. The signal must then pass
through both thresholds in the same direction in order to activate the
trigger, so that there are fewer unwanted trigger events caused by
noise. The minimum value allowed is 1.
delay:
delay between the trigger event and the start of the block as
a percentage of the block size. 0% means that the trigger event is the
first data value in the block, and -50% means that the trigger event
is in the middle of the block.
Returns:
11
23
37
37
37
37
37