03-24-2010 08:35 PM
03-26-2010 05:55 PM
Is it possible that at some point your program is reading values faster than they are being acquired? This would result in NaN.
Greg
03-26-2010 07:16 PM
Actually, I believe that the situation Greg describes results in a buffer underflow error message.
I've done a fair amount of work with the USB 6221 -- one of the programs I wrote for it runs continuously for days -- and have not seen this problem where the board appeared to be fine but had quit responding to the software. So, I'd have to guess that the problem is somewhere in your code. Do you have any kind of error handler that you check periodically? Is "automatic error handling" enabled or disabled? I ask these questions because perhaps the board IS throwing an error that you aren't catching.
Another question: does your code display this behavior if you run it with a simulated board instead of the actual hardware? Trying that would help to narrow down the source of the problem.
03-26-2010 08:44 PM
Diane, you're right. I looked back at a program of mine where I had a NaN issue from DAQ read and saw that the NaN was actually showing up in the result of the mean VI where I was averaging non-existent data from the read VI. Slowing the read fixed the problem, and that's all that I recalled and regurgitated here.
Whoops!
Greg
03-27-2010 09:56 AM
I suspect there's some error causing this problem.
Try wiring error cluster through VIs.
If you've a loop, read error status, and stop a loop, if there's an error.
At the end of the loop, use error handle to show error dialog.
If you don't know how to do this, refer to DAQmx example in example finder.
Then, post back what's an error you found.