12-04-2008 09:05 AM
I am having a problem with the first iteration of a while loop. I want to log all data from a DAQ over a period of time. In order to keep the single file "small", I make a VI that produce a new file every 10 min. or so. But the first file I want to make isn't due to the following problem:
The first time I use the DaqMX read in the loop, it returns a void. Why does it do that?
Solved! Go to Solution.
12-04-2008 09:09 AM
12-05-2008 01:19 AM
12-05-2008 05:28 AM
From the help of the 'Read analog 2D DBL NChan NSamp'
If the task acquires samples continuously and you set this input to -1, this
VI reads all the samples currently available in the buffer.
You don't set a number (I would advice you to set a number and don't use a wait 100 ms function) so the buffer is returned, on the first read the buffer is empty.
Ton
12-05-2008 05:36 AM
12-05-2008 06:15 AM
I'm not fully sure why, but I would just set the number of samples to a specific value so you don't need the wait 100 ms. function in the loop.
Ton