Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

mxDAQ Buffer Dropout error (-200279)

Solved!
Go to solution

I have a code snippet using a multifunction DAQ to acquire two 4-20mA continuous current signals (temperature and pressure). The code reads and applies relevant scaling to these values to covert to Celsius and Pascal values, appending to a loop for subsequent averaging, and finally being stored to a queue for subsequent use. 

 

After a period of continuous acquisition, the signal will dropout and report an issue with buffer overflow (-200279). This can be delayed by slowing the sampling rate (I assume reducing the gradual size buildup of the buffer memory), but eventually results in error/no values read in from the sensors after eventual buffer timeout (>100, 1000, 10000s). I viewed the example VI for continuous capture in the help menu and tried timing delays as per Error -200279: Unable to Keep Up with Acquisition in DAQmx - NI but have not been able to resolve this issue. The issue appears to be related to a discrepancy between the sampling rate and reading rate of the mxDAQ itself somehow still contributing to buffer buildup. 

 

Faster acquisition (~>100Hz) is desirable from the installed sensors and should be within their rated means - any suggestions or obvious corrections in the initialization of the mxDAQ that could help resolve this? (In the event this is a continual issue,) Is there a clean way in the meantime to error trap and reset the mxDAQ buffer/operation within the loop when overflow happens without otherwise interrupting the code operation?    

Download All
0 Kudos
Message 1 of 3
(737 Views)
Solution
Accepted by topic author Eerl_Spec19

The first and most important thing is to call a version of DAQmx Read that can request *multiple* samples at a time.  A good rule of thumb is to request 1/10 sec worth (i.e., 1/10 the sample rate) at a time.

 

There will be some other things too (such as removing the Wait function b/c the DAQmx Read function will accomplish the same kind of thing once you're reading multiple samples per loop), but start there.

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 2 of 3
(714 Views)

Hi Kevin, 

 

Ah, I see my error. I was assuming to be reading multiple samples, whereas in reality I was sampling only a single point from each set of the transducer channels. This seems to be working now - I've modified the sample array to acquire the mean of each set to pass along to the averaging functionality/queue as intended. 

 

Thanks for the reply - for reference, the DAQmx read should be configured to read Analog<Multiple Channels<Multiple Sample<2D DBL (or otherwise) with the previous ~1/10 read-to-sampled, the dropout would have been due to excess accumulation of unread points from only reading a single value from each set sampled from the transducers. 

 

0 Kudos
Message 3 of 3
(692 Views)