LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Day Long Continuous DAQ Occasionally Getting a 200279 Error

So I'm pretty new to LabVIEW but I am attempting to create a continuous data aquistion VI that will record data average it to display and record a data point once every second. 

 

The problem is that no matter what I change I cannot avoid getting a

 

Error -200279 occurred at DAQmx Read (Analog 1D Wfm NChan NSamp).vi

Possible reason(s):
Measurements: Attempted to read samples that are no longer available. The requested sample was previously available, but has since been overwritten.

 

Odd thing is that on some occasions, the VI can run for over a day and not return any error and sometimes the VI will only run for 8 hours and then stop due to the 200279 error. This is incredibly frustraiting. I'll attach my code; if anyone would want to look at it I'd be forever in your debt. 

0 Kudos
Message 1 of 2
(2,662 Views)

Just some thoughts.

 

1.  You do not need the seperate VI to configure the output buffer.  When you setup the timing, the Samples per Channel determines the buffer size when using Continuous Acquisition.  Set the Samples per Channel to the 30000.  Maybe the extra VI's effort is ignored for some reason and the buffer is really only 1000 samples (1 second's worth)?

 

2.  No need to use the property node to see how many samples are available.  Set the number of samples to read to -1 and it will read all of the available points.  Per the DAQmx Read VI help "If the task acquires samples continuously and you set this input to -1, this VI reads all the samples currently available in the buffer."

 

3.  If you want to grab data once every second, simply hard code the 1000 into the wait.

 

4.  Think about offloading the file write to another loop using a queue.  Look into the Producer-Consumer architecture for more details.  If the file write is taking a very long time, this could cause issues.  But 1 second is a long time, so this is likely not your problem.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 2
(2,656 Views)