12-22-2011 06:11 PM
I'm running a continuous DAQ timed-loop near the limits of my computer. (10k samples at 2.5MHz on a PCI-6115 with a hardware timed loop.) Most of the time it runs ok, but occasionally windows goes out for a while and the DAQmx Read loop gets behind. Over time the buffer gets full and eventually I'll get a -200279 error "Attempted to read samples that are no longer available.." I can throttle things down and avoid this error, but I'd really like to do things differently. If the loop gets behind I'd like to just drop unread data and pick up with the most recent data block. Is there a way to do this? Ideally, I was thinking for example about the following approaches:
1) Fixing the buffer size at the size of one of my read blocks and overwriting the buffer with each acquisition. Is this possible?
2) Detecting if the buffer is getting full and flushing old data. Is this possible?
Any other/better thoughts? I've experimented with the read property "Overwrite mode" but this hasn't worked for me.
Thanks and happy holidays!
12-26-2011 08:40 AM
Hi CraigP
I hope this link will help you :
http://digital.ni.com/public.nsf/allkb/AB7D4CA85967804586257380006F0E62?OpenDocument
Best Regards,
Vincent.O
National Instruments France
Été de LabVIEW 2014
12 présentations en ligne, du 30 juin au 18 juillet
12-28-2011 01:40 PM
Merci Vincent. I have read this KB previously. I ended up solving my problem by fixing the buffer size, setting it to overwrite and then ignoring the generated error. Sometimes the buffer gets overwritten and I lose some data, but my loop keeps running fast, which was what I wanted. Merci pour votre aide. Bonne année et bonne santé!
12-29-2011 01:48 AM
Thank you CraigP,
Have an happy new year
Bonne année !
Vincent.O
National Instruments France
Été de LabVIEW 2014
12 présentations en ligne, du 30 juin au 18 juillet