05-07-2013 05:46 AM
I am running PXI-6251 at 500KS/s, 5000 smaples per iterations. I want to understand why do I get the following message if I run slower or acquire fewer samples per iteration? I would have thought the latter would have required less buffer size- a simpler thing to handle!?
Possible reason(s):
Attempted to read samples that are no longer available. The requested sample was previously available, but has since been overwritten.
Increasing the buffer size, reading the data more frequently, or specifying a fixed number of samples to read instead of reading all available samples might correct the problem.
Property: RelativeTo
Corresponding Value: Current Read Position
Property: Offset
Corresponding Value: 0
Task Name: _unnamedTask<1>
05-07-2013 07:58 AM
You are not reading fast enough. The DAQ card only has so much memory on it. When it reaches the end of the memory, it overwrites what was there previously. If you didn't get the data before it was overwritten, you get this error.
05-07-2013 10:10 AM
Great! Could you refer me to some white papers in this regard, please?
05-07-2013 10:19 AM - edited 05-07-2013 10:20 AM
The kb paper is based on the old Traditional DAQ, but the concepts are the same.
http://digital.ni.com/public.nsf/allkb/CEC4263BC5D02DA88625737D006FE5EE
EDIT: I should have checked the links on the bottom before posting. There's one on the DAQmx API
http://digital.ni.com/public.nsf/allkb/A224DA0551EEA073862574F60060AB6F?OpenDocument
05-07-2013 10:49 AM
If you are using LabVIEW 2012 then it comes with a really nice template for DAQmx continuous acquasition that I recommend learning about and using.
In general, these are good practices to follow:
* Let the DAQmx Read operation control the execution speed of a "DAQ loop". Set these appropriatly. I like my DAQ loops running every 100ms, so I setup my continuous DAQ's sample frequency is number of samples so that this loops runs at that speed. For example sample frequency = 1000Hz, number of samples= 100 will make my DAQ loop operate at about 100ms per itteration. Do not place "Wait (ms)" VIs in the DAQ loop.
* Dedicate a loop (or thread) to DAQ and perform processing in another "consumer" level loop. Transfer data with queues or notifiers. This is all in the template I reference above.