LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabView error 200279 and not writing to excel sheet.

Hello NI Community,

 

I am building a VI to measure Torque with a strain gage. I am have a re-occurring error message of 200279. I have been increasing the buffer size, adding a wait (ms) icon to the circuit, played around with numbers for my number of samples per DAQ read and the number DAQ reads per second, as well as using loop benchmark techniques to determine actual read time. When I try to push to record my data to write to an excel sheet, this error pops up a few moments after trying to collect this data. My graph stops moving as soon as I push to record to an excel sheet. I am using a NI 9237. 

Download All
0 Kudos
Message 1 of 2
(1,740 Views)

Note: I'm on LV 2016 and can only look at the screencap, not the actual code.

 

Long term: start to learn about the Producer / Consumer pattern using independent loops and a queue (or channel wire) to deliver data from producer to consumer.

 

Short term: one big part of the problem is (probably) that the simple "Write Delimited Spreadsheet" function opens and closes your file every loop iteration.  It turns out that opening and closing a file repeatedly can take non-trivial and variable amounts of time.  A better method is to open the file once before the loop and pass the file refnum in.  Then you can use Inside the loop you can use use "Array to Spreadsheet String" (from the String palette) and "Write to Text File (from the File palette) to stream the data to an already-open file.  And then don't close the file until after exiting the loop.  This approach is much *much* more efficient.

 

Another possible problem is that the 9237 has a minimum sample rate of about 1.6 kHz.  If you're asking for and counting on a slower rate, that could be a problem too.  For example, suppose you were asking for 100 Hz and reading 50 samples at a time.  You would expect a loop rate of 2 Hz, slow enough that the simple file writing scheme might have worked.  But you'd actually get a sample rate of 1600+ Hz and be trying to keep up with a loop rate of 32+ Hz.  At that speed, the simple file writing scheme is too slow.

 

 

-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 2
(1,711 Views)