07-10-2007 12:09 PM - edited 07-10-2007 12:09 PM
This block of code was working perfectly fine until yesterday - now I'm getting an error code -200279 every time it runs. I don't believe I changed anything. Attached is the block of code.
From the hardware side, I have a shunt installed inline with a valve that is outputting a small voltage (~0.5V) when the valve is powered on. I have a relay (NI 9481 module) turning the valve on and off (the true/false cases) and I'm trying to measure the analog voltage out of the shunt (NI 9205 module). Basically I only want 2 seconds of data and the for loop waits 499 counts (0.5 seconds) before turning the valve on.
Can anyone tell me what I'm doing wrong here? I have independently verified that the AI module is working properly (in MAX) and that the shunt is outputting about 0.5V when the valve is powered on.
Thanks for the help!
Here are details from the error:
Error -200279 occurred at DAQmx Read (Analog DBL 1Chan 1Samp).vi:1
Possible reason(s):
Attempted to read samples that are no longer available. The requested sample was previously available, but has since been overwritten.
Increasing the buffer size, reading the data more frequently, or specifying a fixed number of samples to read instead of reading all available samples might correct the problem.
Property: RelativeTo
Corresponding Value: Current Read Position
Property: Offset
Corresponding Value:
Task Name: current_draw
Message Edited by Erik_1 on 07-10-2007 10:10 AM
07-10-2007 12:50 PM
07-10-2007 02:28 PM
07-10-2007 02:35 PM
07-10-2007 02:37 PM
ou did not put any delay in the loop to. Thats not good.
you use read one sample. you bether read multi sample and making an average.
Benoit Séguin
07-10-2007 06:08 PM
Upon further troubleshooting....
The card reads fine when I directly inject a voltage but when I cycle the valve on and off (and read the voltage drop across the shunt) the card appears to timeout and flatline to absolute 0 (without any noise) for approximately 6 seconds.
07-11-2007 07:52 PM