NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


Reply
Member
tmeTech
Posts: 3
0 Kudos

How do I make sure counts are not missed?

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!

Member
JaredRo
Posts: 108
0 Kudos

Re: How do I make sure counts are not missed?

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
http://www.ni.com/white-paper/3023/en

 

Good luck with your application.

Jared R.
Precision DC Product Support Engineer
National Instruments
Member
tmeTech
Posts: 3
0 Kudos

Re: How do I make sure counts are not missed?

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.

 

 

Member
JaredRo
Posts: 108
0 Kudos

Re: How do I make sure counts are not missed?

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?
http://digital.ni.com/public.nsf/allkb/5D42CCB17A70A06686256DBA007C5EEA?OpenDocument

 

 

Jared R.
Precision DC Product Support Engineer
National Instruments
By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page