キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

Help on Error Code -200279

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

0 件の賞賛
メッセージ1/7
3,627件の閲覧回数
Your buffer have 1000 sample and you read 2500 sample in the for loop.
The wai you programed it, is realy not a good practice.
You bether put it in a while loop.
instead of acquiring a definite number of sample, try using continuous read.
 
Benoit Séguin
Benoit Séguin
Software Designer
0 件の賞賛
メッセージ2/7
3,611件の閲覧回数
Switching to a while loop doesn't seem to help - this is baffling me because it worked perfectly yesterday. I've tried resetting the chasis and computer also...
0 件の賞賛
メッセージ3/7
3,596件の閲覧回数
I said, you make 2500 loop and read a sample each loop. and your buffer contain just 1000 sample. try with a higher number of sample.
Benoit Séguin
Software Designer
0 件の賞賛
メッセージ4/7
3,591件の閲覧回数

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

Benoit Séguin
Software Designer
0 件の賞賛
メッセージ5/7
3,590件の閲覧回数

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.

0 件の賞賛
メッセージ6/7
3,583件の閲覧回数
 Hi Erik,

 When you say you have independently verified that the AI module is working properly; does that mean you have started a test panel in MAX and watched the analog input voltage while powering
the valve on and off?

Can you put a handheld multimeter across the shunt and measure the output voltage while the NI-9205 is measuring as well?
  Try a different input channel with your NI-9205? or a different NI-9205 if you have one available.

Thank you,

 MatthewW
 Applications Engineer
 National Instruments

0 件の賞賛
メッセージ7/7
3,563件の閲覧回数