DI Reference Trigger Signal
- Updated2026-03-27
- 2 minute(s) read
Use a reference trigger signal to stop a measurement acquisition.
To use a reference trigger, specify a buffer of finite size and a number of pre-trigger samples (samples that occur before the reference trigger). The number of post-trigger samples (samples that occur after the reference trigger) desired is the buffer size minus the number of pre-trigger samples.
Once the acquisition begins, the CompactRIO controller writes samples to the buffer. After the CompactRIO controller captures the specified number of pre-trigger samples, the controller begins to look for the reference trigger condition. If the reference trigger condition occurs before the CompactRIO controller captures the specified number of pre-trigger samples, the controller ignores the condition.
If the buffer becomes full, the CompactRIO controller continuously discards the oldest samples in the buffer to make space for the next sample. This data can be accessed (with some limitations) before the CompactRIO controller discards it. Refer to the Can a Pretriggered Acquisition be Continuous? document for more information. To access this document, visit ni.com/r/rdcanq.
When the reference trigger occurs, the CompactRIO controller continues to write samples to the buffer until the buffer contains the number of post-trigger samples desired. The following figure shows the final buffer.
Using a Digital Source
To use DI Reference Trigger with a digital source, specify a source and a rising or falling edge. Either PFI or one of several internal signals on the CompactRIO controller can provide the source. Refer to Device Routing in MAX in the NI-DAQmx User Manual for more information.
Routing DI Reference Trigger Signal to an Output Terminal
You can route DI Reference Trigger to any output PFI terminal. Reference Trigger is active high by default.