Function usage – Measurement Computing Data Acquisition Systems rev.10.4 User Manual
Page 305

Programmer’s Manual
908594
Daq API Command Reference 4.6-27
Function Usage
Defining the Trigger Channel
The channel parameter selects the trigger channel. The trigger channel must be a configured channel in the scan
list (see daqAdcSetScan). The type of channel selected can be set by the channelType parameter. The
channel type will be used to properly interpret the value against which the device should be triggered (see the
“Setting the Trigger Level” and “Setting the Trigger Variance” sections below) in the context of the channel type
selected. For instance, if the channel is an thermocouple channel then the level and variance parameters will
be interpreted as values in degrees Celsius. The flags parameter defines the configured settings for the channel
and should match the flags setting for the trigger channel configured using the daqAdcSetScan function.
Likewise, the gainCode parameter should match the gain code setting when the channel was configured using the
daqAdcSetScan
function. If the same channel is in the scan multiple times, the 1
st
occurrence of the channel will
be used as the trigger channel.
Error Checking
It is important to note that only basic error checking in done when daqSetTriggerEvent is called. Full
verification against the scan list and acquisition mode will take place during the daqAdcArm function.
Selecting the Trigger Event
The event parameter selects the definition of the trigger event to be either a start trigger event
(DaqStartEvent) or a stop trigger event (DaqStopEvent). The start trigger event defines the conditions under
which post-trigger acquisition data collection should be initiated or triggered. Stop events are events which signal
the current data acquisition process to terminate.
Setting the Trigger Source
The trigSource parameter specifies the trigger source to use as the start or stop trigger event. The start and stop
trigger event sources are both programmed using selected definitions from the daqAdcTriggerSource data
type. As described below, start and stop trigger event definitions may differ from device to device, so it is important
to note which start and stop trigger events can be configured for your device.
Setting the Start Trigger Event Source
The start trigger event defines the conditions under which post-trigger acquisition data collection should be initiated
or triggered. The start trigger event can vary in complexity from starting immediately, to starting on complex
channel value definitions. See the table in the “Setting the Trigger Variance” section for a list of some valid start and
stop trigger event definitions.
Setting the Stop Event Source
Stop events are events which signal the current data acquisition process to terminate. Here again, the stop event can
be as simple as that of a scan count, or as complex as involving a channel value level condition. Generally, there
are fewer options with stop event definitions than start event definitions. However, the DaqBook/2000 Series and
DaqBoard/2000 series products do provide a rich set of stop event features based upon software channel value
definitions.