Справочник Пользователя для National Instruments Welding System 321645c-01

Скачать
Страница из 554
Chapter 2
Function Reference — AI_VRead
NI-DAQ FRM for PC Compatibles
2-18
©
 National Instruments Corporation
voltage is the floating-point variable in which NI-DAQ returns the measured voltage, scaled 
to units of volts.
Note
C Programmers—voltage is a pass-by-reference parameter.
Using This Function
AI_VRead
 addresses the specified analog input channel, changes the input gain to the 
specified gain setting, and initiates an A/D conversion. 
AI_VRead
 waits for the conversion to 
complete and then scales and returns the result. If the conversion does not complete within a 
reasonable time, the call to 
AI_VRead
 is said to have timed out and NI-DAQ returns the 
timeOutError code.
When you use SCXI as a front end for analog input to an MIO or AI device, Lab-PC+, 
Lab-PC-1200, Lab-PC-1200AI, PCI-1200, LPM device, or DAQCard-700, it is not advisable 
to use the 
AI_VRead
 function because that function does not take into account the gain of the 
SCXI module when scaling the data. Use the 
AI_Read
 function to get unscaled data, and then 
call the 
SCXI_Scale
 function.
When you have an SC-2040 accessory connected to an E Series device, this function takes 
both the onboard gains and the gains on SC-2040 into account while scaling the data. When 
you have an SC-2043-SG accessory connected to your DAQ device, this function takes both 
the onboard gains and the SC-2043-SG fixed gain of 10 into account while scaling the data.
When you have any SCC accessories connected to an E Series device, this function takes both 
the onboard gains and the SCC gains into account while scaling the data.