Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Does PCI 6229 support DAQmxReadCtrFreq function?

You're right, stopping and restarting the task repeatedly would definitely hurt performance.  I used that approach just to help isolate the problem for the sake of troubleshooting.  My comment #3 was the beginning of an approach you could use *instead* of stopping and restarting the task.  Each time you read "all available samples", you'll get an array in order from oldest to most recent data.  Depending on your app's needs, you might decide to ignore all but the most recent values.

 

One thing to watch for is that you'll need to keep running track of how many samples you've read so you can keep track of the even/odd index distinction between low and high times.

 

Another possible approach might be to query the buffer in a special way where you only request the most recent samples in the first place.  However, it'll be more difficult to determine the even- and odd-ness of the indices.  If your duty cycles can approach or pass through 50%, this will be a problem.

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 11 of 11
(568 Views)