Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

C++ and AI_VREAD max voltage read is 5 Volts with DAQ Card 6024-E

Hello,

I’m using a DAQ card 6024 E. I’m setting this card with MAX Software for using –10V to +10V and single ended. I’m 16 channels. When I read a voltage hight 5 Volts through Labview, I read the correct voltage indeed well. By example 6 Volts input is 6 Volts displaying to screen.
When I read the same voltage in programming C++ with NIDAQ dll and function AI_VREAD (iDevice, iChan, iGain, &Volt) or IDevice = 1, iChan = channel from 0 to 15, iGain = 1. My reading i’snt correct. My voltage reading indicate maxi with 5 volts, even if in input voltage up + of 5 Volts by example 6 Volts or 7 Volts input return 5 Volts inside variable &Volts in function ai_vread
.

Where is my error ?
0 Kudos
Message 1 of 2
(3,818 Views)
Hello,
Please take a look at AI_Configure function and AI_VRead. In the AI_Configure function, there is an AI_Configure Table where you will see that the maximum range in Bipolar mode for 12 bit E-series cards is -5/+5 V. So there are two options. If you are expecting positive voltages, then change the mode to unipolar and get a 0-10V range. Otherwise, you can use a gain of 0.5 and increase the range to -10V/+10V. To use a gain of 0.5, you have to input the gain value input in AI_VRead function as -1.

Sincerely,
Sastry V.
Applications Engineer
National Instruments
Message 2 of 2
(3,818 Views)