DAQmxCfgDigEdgeRefTrig

NI-DAQmx C Functions

DAQmxCfgDigEdgeRefTrig

int32 DAQmxCfgDigEdgeRefTrig (TaskHandle taskHandle, const char triggerSource[], int32 triggerEdge, uInt32 pretriggerSamples);

Purpose

Configures the task to stop the acquisition when the device acquires all pretrigger samples, detects a rising or falling edge of a digital signal, and acquires all posttrigger samples.

Parameters

Input
Name Type Description
taskHandle TaskHandle The task used in this function.
triggerSource const char [] Specifies the name of a terminal where there is a digital signal to use as the source of the trigger.
triggerEdge int32 Specifies on which edge of the digital signal the Reference Trigger occurs.
Value Description
DAQmx_Val_Rising Rising edge(s).
DAQmx_Val_Falling Falling edge(s).
pretriggerSamples uInt32 The minimum number of samples per channel to acquire before recognizing the Reference Trigger. The number of posttrigger samples per channel is equal to number of samples per channel in the NI-DAQmx Timing functions minus pretriggerSamples.

Return Value

Name Type Description
status int32 The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.