LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx Analog Read does not yield proper value

I have a program that allows me to specify a voltage to output, then read the output back into the DAQ. On the AO port, wires come out and in to a voltmeter. The wires also go into an AI port so that the program can read the voltage. The problem, though, is that the voltage read is not the voltage that is shown on the voltmeter. The voltage on the voltmeter corresponds with the voltage I tell the DAQ to output, so I know the DAQ output is working correctly. The input is not working correctly though.

 

The AI worked correctly before, but I do not know why it is not working correctly now. Should I calibrate it? I have never actually calibrated the AI, so I thought that it came ready calibrated.

0 Kudos
Message 1 of 8
(2,942 Views)

When I open DAQ Assistant for the task assigned to reading the AI port and click "Run", the amplitude keeps increasing at 50mV per second. The voltage keeps drifting up and I cannot find a reason why.

0 Kudos
Message 2 of 8
(2,933 Views)

Hi Leyne,

 

What data acquisition device are you using?  Have you tried another channel?  How is the input not working correctly?  What occurs?  Is this behavior consistent?  What happened between when it used to work and now?  It is possible the channel has been damaged and needs repair.

Regards,


h_baker
National Instruments
Applications Engineer
0 Kudos
Message 3 of 8
(2,912 Views)

You're floating.  You probably have it set for differential when you want RSE.

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
0 Kudos
Message 4 of 8
(2,910 Views)

Thanks! I changed it back to RSE and it does not drift anymore. However, at 0 voltage being inputed to it, it displays 10 volts. Changing voltage inputed to it to 10 volts, the reading displays about 8 volts. Every integer increase in volt seems to decrease the output by a very smal amount. I don't understand why it is reading it like that.

0 Kudos
Message 5 of 8
(2,877 Views)

Using NI PCI-6289.
I just created a new task on a new channel. The voltage, again, constantly drifts up about .03 volts a second. The graph would be similar to a graph of y=sin(X)+b, having a constant amplitude, but with a constantly increasing b. Nothing is currently connected to this new channel. When a wire is connected to it, but having nothing connected to the wire, the voltage constantly drifts up also.

The input is not working correctly because when a voltage of 10 is being fed to the channel, it shows that a different voltage is being applied. As the voltage decreases by 1 until it is 0 volts, the overal voltage change that it shows is about .5 volts.

Between when it used to work and now, there has just been some disconnecting of wires, nothing big. I don't think the channel should be broken because it has been treated relatively carefully (never dropped, etc).

0 Kudos
Message 6 of 8
(2,873 Views)

Either something damaged your card or you have some configuration wrong.  Can you post your code so we can look at your DAQmx functions?

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
0 Kudos
Message 7 of 8
(2,864 Views)

Ensure this behavior occurs in Test Panels to eliminate any code issues.  This will allow you to interface with the hardware in the most simple way possible. Does the behavior persist?  Have you tried all analog input channels? 

Regards,


h_baker
National Instruments
Applications Engineer
0 Kudos
Message 8 of 8
(2,839 Views)