Справочник Пользователя для National Instruments Welding System 321645c-01
Chapter 2
Function Reference — AI_VRead
©
National Instruments Corporation
2-17
NI-DAQ FRM for PC Compatibles
AI_VRead
Format
status = AI_VRead (deviceNumber, chan, gain, voltage)
Purpose
Reads an analog input channel (initiates an A/D conversion on an analog input channel) and
returns the result scaled to a voltage in units of volts.
returns the result scaled to a voltage in units of volts.
Parameters
Input
Output
Parameter Discussion
chan is the analog input channel number.
Range:
gain is the gain setting to be used for the specified channel. Refer to Appendix B,
, for valid gain settings. If you use an
invalid gain, NI-DAQ returns an error. If you call
AI_VRead
for the 516 and LPM devices or
DAQCard-500/700, NI-DAQ ignores the gain.
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, NI-DAQ uses a gain of 2 and returns no error.
AT-MIO-16. If you enter a gain of 10 and you have a device with gains of 1, 2, 4,
and 8, NI-DAQ uses a gain of 2 and returns no error.
Name
Type
Description
deviceNumber
i16
assigned by configuration utility
chan
i16
analog input channel number
gain
i16
gain setting to be used for the specified channel
Name
Type
Description
voltage
f64
the measured voltage returned, scaled to units
of volts
of volts