LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help!?

I have a cDAQ-9172 chasis with a NI 9205 16-bit analog input module.
 
I have a ~0.8 VDC source that I can read perfectly fine when using MAX. However, when I try to read this voltage within labview it's coming up as 1.4V. I have verified that the signal is indeed 0.8V with a multimeter.
 
The code isn't complicated - I've attached a screenshot of the VI and the plot (I have a probe on the DAQmx Read data out terminal). This is baffling me - physically I have 0.8 VDC wired into channel 7 of the NI 9205 module (again, verified in MAX and with a multimeter) but the plot within this code is telling me it's 1.4 VDC.
 
Does anyone have any clue what might be going on?
Download All
0 Kudos
Message 1 of 5
(3,340 Views)
And here is a MAX screenshot...
0 Kudos
Message 2 of 5
(3,336 Views)
Hi Eric,

I hooked the hardware up here and did not see the behavior.  Looking back at your code the test panel is going to be running a very simple operation.

The way you are using the queue though to output your data is going to be problematic.

You are using the Queue information, which means that you are pulling the entire array each time.  It would be better to dequeue the elements as they are queued.  This would have two benefits.  You would be reading into the chart a single reading at a time, and you will be avoiding making a huge queue, which could cause you to occupy all your system memory.

Please let me know if this is still an issue.  I have tested it out, so it is not a problem with the DAQmx driver, but I think if we look at how your LabVIEW architecture is being measured we will get the proper value.  If we put the probe just after the index array what behavior do we see?

Have a great day,

Michael D
Applications Engineering
National Instruments
0 Kudos
Message 3 of 5
(3,277 Views)

Thanks for the reply Mickey - I have updated the code to reflect your suggested changes (de-queueing the elements instead of just reading them). I've also included an additional loop that ensures all elements are de-queued before moving on. However, I'm still having the same problem - see attached for a picture of the updated code. This version of the code is behaving exactly like the last version - the chart is displaying approximately 1.4-1.5VDC where the multimeter and MAX are displaying 0.8VDC. The correct reading should be 0.8VDC...

 

Something interesting to note - when I configure the card for a single channel (using DAQmx Create Channel - just channel 2 in this case) and change the DAQmx Read to single channel, single sample, double it appears to work. It still gives me a strange spike to 1.4 volts when I first turn the relay on (actuating a valve) but promptly smoothes out to a steady state value of 0.8VDC. When I change it back to multiple channel, single sample, 1D double (like the picture I've attached) it again gives me the wrong voltage (1.4VDC).

 

I've played around with the sample rate changing it from 100Hz to 10,000Hz and that doesn't appear to have any affect.

 

Any other suggestions on what might be going on here? I'm completely baffled. I would "cheat" and configure a single channel but the fact that it still spikes to 1.4V (which is oddly the same steady state voltage when multiple channels are configured) makes me suspicious that the data may still be skewed.

 

Thanks for all your help!

 

0 Kudos
Message 4 of 5
(3,224 Views)

Oh, I also wanted to note that a probe after the index array displays 1.4VDC as well when the code is running.

Message Edited by Erik_1 on 07-23-2007 09:53 PM

0 Kudos
Message 5 of 5
(3,225 Views)