05-15-2012 02:02 AM
I'm reading counts off a PCIe6320 counter, in buffered mode, using another counter internalOutput as a clock signal, at 5kHz. My input signal is around 1Mhz, and I'm reading the counter inside a while loop, 1000 samples at a time. Also, inside the while loop, I'm writing the 1000 element vector to a TDMS file.
How can I make sure that I'm not missing counts? I tried to find a way to give timestamps to the counter readings using the hardware on the PCIe6320 board, but could not figure out anything from the manual.
I'm new to LAbView, and DAQmx. Any other performance suggestions would also come in handy!
05-15-2012
07:19 PM
- last edited on
03-28-2025
09:02 AM
by
Content Cleaner
It is possible that performing operations on your data within the same while loop as the actual acquisision of the data is causing you to miss data points. I would recommend that you implement a Producer/Consumer architecture in your code to separate the data generation from the data processing and file writes. Here is a tutorial on Producer/Consumer Loops:
Application Design Patterns: Producer/Consumer - Developer Zone
https://www.ni.com/en/support/documentation/supplemental/21/producer-consumer-architecture-in-labvie...
Good luck with your application.
05-17-2012 12:50 PM
Thanks very much, I will change my app to use the produced consumer pattern
At the hardware level, is there a way of timing the data aquisition with this card (PCIe6320)? i.e. , giving each read from the counter, a time tag which is produced from the board itself, and not by labview.
05-18-2012
05:18 PM
- last edited on
03-28-2025
09:03 AM
by
Content Cleaner
Hi tmeTech,
DAQ cards can not output timestamp data. Here is an article that discusses the accuracy of timestamps returned from DAQmx devices:
How Accurate is the Timestamp of the Waveform Returned by my NI-DAQmx Device?
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000P9Q9SAK&l=en-US