To download NI software, including the products shown below, visit ni.com/downloads.
This example shows how to do a buffered edge counting task using another counter on the same board to generate the sample clock.
This example was developed for the PCI-6602 but is applicable to all boards with two counters that support buffered acquisition.
The rate at which the count is sampled must be the same as the clock used in the counter input task. The onboard clocks cannot be used because they are too fast for this task. Instead of using an external clock to solve this problem, a second counter can be used to generate the clock at a specified sampling rate.
1. Generate a pulse train using a counter output task. Set the frequency of the pulse train equal to that at which you want to sample the edge count.
2. Create an edge counting counter task.
3. For the sample clock, choose the output of the counter used to generate the pulse train. Some cards allow you to route this internally. For others, an external wire may be required.
**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.
Thanks so much for this. I was having a heck of a time, but the example sorted things out for me on how to know when the counter was incremented.
Cheers,
Andre