Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Losing analog input samples at high collection rates?

Solved!
Go to solution
We have a project for which I must collect at a 50kHz sample rate on several channels.  This is higher than we have ever attempted before.  I am running into some issues with dropped samples in my data files; I'm not getting as much data back as I expect.
The data is being collected on an RT system (PXI-1052 chassis with a PXI-8109 controller).  I am using a PXI-6259 M-Series card connected to a set of SCXI-1143 filters.  I am sampling below the maximum bandwidth of the filters (333 kS/s is their maximum, whereas I am sampling at an aggregate of up to 250 kS/s).
I'm doing a finite acquisition.  My task is started and then I am running a timed loop inside of which I read all available samples, push them to an RT FIFO (for viewing purposes) and then write them to an ASCII file on disk.  The loop iterates every 100ms.  Since it's a finite acquisition my understanding is that my data should be buffered fully and nothing should be lost.  The loop ends when the DAQmx task says that it is finished.
I don't get any errors back from NI-DAQmx, so it's hard for me to figure out where the data loss is happening.
0 Kudos
Message 1 of 2
(2,723 Views)
Solution
Accepted by topic author Tim_Maddux

I got it.  I changed to continuous acquisition.

 

I then modified code so that I was counting the samples collected in software and stopping when I had them all.  Previously I was monitoring the AI Voltage Task for completion with the DAQmx Is Task Done.vi.

0 Kudos
Message 2 of 2
(2,702 Views)