DAQmxCfgDigPatternRefTrig

NI-DAQmx C Functions

DAQmxCfgDigPatternRefTrig

int32 DAQmxCfgDigPatternRefTrig (TaskHandle taskHandle, const char triggerSource[], const char triggerPattern[], int32 triggerWhen, uInt32 pretriggerSamples);

Purpose

Configures the task to stop the acquisition when the device acquires all pretrigger samples, matches or does not match a digital pattern, and acquires all posttrigger samples.

Parameters

Input
Name Type Description
taskHandle TaskHandle The task used in this function.
triggerSource const char [] Specifies the physical channels to use for pattern matching. The order of the physical channels determines the order of the pattern. If a port is included, the order of the physical channels within the port is in ascending order.
triggerPattern const char [] Specifies the digital pattern that must be met for the trigger to occur.
triggerWhen int32 Specifies the conditions under which the trigger occurs.
Value Description
DAQmx_Val_PatternMatches Pattern matches
DAQmx_Val_PatternDoesNotMatch Pattern does not match
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.