Quantcast
Channel: Counter/Timer topics
Viewing all articles
Browse latest Browse all 1250

Polling counter value from a buffered counter

$
0
0

Hi

 

Is it possible to poll the value of a counter that has a sample clock configured?

 

I am still interested in getting the counter value both at the time of the sample clock (normal buffered counter task), but would also like to be able to poll the value at any other time!

 

Currently this is solved (and working) by sending the same input to two independant counters - one setup with a sample clock and one setup without a sample clock. But that requires strict control of starting both tasks at the same time to avoid an offset between them (implemented using a third counter to generate a trigger signal).

 

I am using the C api and setting up the counter using DAQmxCreateCILinEncoderChan, and for the buffered counter DAQmxCfgSampClkTiming is also called to define the sample clock source and parameters.

 

A PCI-6601 card is used.


Viewing all articles
Browse latest Browse all 1250


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>