To download NI software, including the products shown below, visit ni.com/downloads.
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
Steps to Implement or Execute Code
Additional Information or References
VI Snippet
**This document has been updated to meet the current required format for the NI Code Exchange.**
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.