Overview
This example program shows how to use counters to count an input signal and generate a trigger after a specified number of counts.
Description
This example program uses counters to count an input signal and generate a trigger after a specified number of counts. Each individual counter is capable of generating a trigger by setting the initial count equal to the requested number of pulses to skip before triggering. Once the counter counts down from the initial count to zero, the Counter Output Event will be exported, and this signal can be used as a trigger. Any number of counters can be used and set to any initial count value (as long as this value is less than the total size of the counter).
This particular example uses two counters; the first counter will create a start trigger after N pulses of the input signal, and the second counter will be used to create a reference (stop) trigger after X pulses, where X > N.
Requirements
- LabVIEW 2012 (or compatible)
- DAQmx 12.0 (or compatible)
Steps to Implement or Execute Code
- Specify the desired counter source
- Set the number of ticks
- Run the VI and get the counts
Additional Information or References
VI Snippet


**This document has been updated to meet the current required format for the NI Code Exchange.**
Daniel S.
National Instruments