From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Data acquisition and File I/O on PDA - Buffer overflow

Hi!
 
I am using a NI CF-6004 card on a HP iPAQ PDA. Whenever I run my VI, I get the error -200361 (Buffer overflow error) after one minute of data acquisition. I don't know why this is occurring?? Initially the VI is supposed to acquire data from analog and digital signals, but I have modified it so that it will only acquire analog (for now). When I remove the file I/O the VI works fine, but I get the buffer error when I put the file I/O back into the VI.
 
I already used waveform graphs (not chart), made the scan rate as low as possible (the Task Configuration Utility won't let it go under 196 Hz), and made the Samples/Channel pretty high (500 samples/channel). I still get the error. Is there any way I can acquire data and save it into file??
 
Is it possible for the application to acquire data for one iteration, save it into file, then acquire again, then save it into file, and do this continuously? I know I will lose some samples, but it's better than having no File I/O. I tried using the Flat Sequence Structure to do this, but it did not seem to work out. Any ideas? I have posted my program below.
0 Kudos
Message 1 of 4
(3,448 Views)
sutjiptoc,

Thanks for posting to the NI forums.  From the sound of it, it seems that the write file vis are taking too long in your application.  You best approach may very well be to go to a configuration where you read a finite number of samples each iteration of the loop and stop acquistion before writting to file.  You can accomplish this by changing to a finite rather than continuous acquisition.  You will do a single read in the loop that will read a specified number of samples.  When it returns the acquisition will not continue and will allow the save to file occur without causing a buffer overflow.  You will definitely miss data when the file is being written but it will avoid this buffer overflow.
If you have questions about my suggestion please let me know.

Regards,

Neil S.
Applications Engineer
National Instruments

0 Kudos
Message 2 of 4
(3,421 Views)
Dear Neil,
 
Even when I did not have File I/O in my application, the program still runs into buffer overflow error when I left it to run overnight. What do you think is causing this? Should I upgrade the RAM of the PDA?
0 Kudos
Message 3 of 4
(3,394 Views)
Hi sutjiptoc,

You could also try on demand sampling.  Basically, you could read one sample each iteration of your loop, and then use a Wait (ms) vi somewhere inside the loop to control the rate that the loop operates at.  Your polymorphic read vi would be set to NChan 1Samp assuming you are reading more than one channel. 

Hope this helps!

Adam W
National Instruments
0 Kudos
Message 4 of 4
(3,352 Views)