09-26-2016 12:26 AM
Hello,
We would like to generate a continuous pulse train from one of the counters of an NI PCIe 6612 card using C/C++ language, with the NIDAQmx interface.
Our software needs to be able to continuously go to sleep and wake up each time counter output changes from low level to high level (i.e. on the rising edge of the counter output).
In some scenarios, we need to wake up on the falling edge of the counter output.
Note that we do not want to poll in a busy-loop for counter output.
The pulse train frequency needs to be constant (e.g. 100 Hz).
Is there an example program that demonstrates how to do that?
Thank you,
Itai
09-26-2016 02:55 PM
Does your hardware support change detection? Seems like it would be pretty suitable in this situation. There's this example here, which sort of covers it.
http://www.ni.com/example/29947/en/
Here's another article which talks about change detection.