AI Reference Trigger Signal
You can use the AI Reference Trigger (ai/ReferenceTrigger) signal to stop a measurement acquisition. To use a reference trigger, specify a buffer of finite size and a number of pretrigger samples (samples that occur before the reference trigger). The number of posttrigger samples (samples that occur after the reference trigger) desired is the buffer size minus the number of pretrigger samples.
When the acquisition begins, the DAQ device writes samples to the buffer. After the DAQ device captures the specified number of pretrigger samples, the DAQ device begins to look for the reference trigger condition. If the reference trigger condition occurs before the DAQ device captures the specified number of pretrigger samples, the DAQ device ignores the condition.
If the buffer becomes full, the DAQ device continuously discards the oldest samples in the buffer to make space for the next sample. You can access this data (with some limitations) before the DAQ device discards it. Refer to the KnowledgeBase document, Can a Pretriggered Acquisition be Continuous?, for more information.
When the reference trigger occurs, the DAQ device continues to write samples to the buffer until the buffer contains the number of posttrigger samples desired. The following figure shows the final buffer.
Using a Digital Source
To use ai/ReferenceTrigger with a digital source, specify a source and an edge. The source can be an external signal connected to any PFI or RTSI <0..6> pin. The source can also be one of several internal signals on your DAQ device. Refer to Device Routing in MAX in the NI-DAQmx Help for more information.
Also, specify whether the measurement acquisition stops on the rising edge or falling edge of the ai/ReferenceTrigger signal.
The following figure shows the timing requirements of the ai/ReferenceTrigger source.
Using an Analog Source
When you use an analog trigger source, the acquisition stops on the first rising edge of the Analog Comparison Event signal.
Outputting the AI Reference Trigger Signal
You can configure the PFI 1/AI REF TRIG pin to output the ai/ReferenceTrigger signal. The output pin reflects the ai/ReferenceTrigger signal regardless of what signal you specify as its source.
The output is an active high pulse. The following figure shows the timing behavior of the PFI 1/AI REF TRIG pin when the pin is an output.
The PFI 1/AI REF TRIG pin is configured as an input by default.