National Instruments Welding System 321645c-01 Manual De Usuario

Descargar
Página de 554
Chapter 2
Function Reference — AI_Read
©
 National Instruments Corporation
2-13
NI-DAQ FRM for PC Compatibles
Note
NI-DAQ does not distinguish between the low-gain and high-gain versions of the 
AT-MIO-16. 
If
 you enter a gain of 10 and you have a device with gains of 1, 2, 4, 
and 8, a gain of 2 actually is used and no error is returned.
reading is the integer in which NI-DAQ returns the 12-bit or 16-bit result of the A/D 
conversion.
Range:
0 to 4,095 (12-bit devices, unipolar mode).
–2,048 to 2,047 (12-bit devices, bipolar mode).
0 to 65,535 (16-bit devices, unipolar mode).
–32,768 to 32,767 (16-bit devices, bipolar mode).
Note
C Programmers—reading is a pass-by-reference parameter.
Using This Function
AI_Read
 addresses the specified analog input channel, changes the input gain to the specified 
gain setting, and initiates an A/D conversion. 
AI_Read
 waits for the conversion to complete 
and returns the result. If the conversion does not complete within a reasonable time, the call 
to 
AI_Read
 is said to have timed out and the timeOutError code is returned.