National Instruments 321645c-01 用户手册
Chapter 2
Function Reference — AO_VWrite
©
National Instruments Corporation
2-45
NI-DAQ FRM for PC Compatibles
AO_VWrite
Format
status = AO_VWrite (deviceNumber, chan, voltage)
Purpose
Accepts a floating-point voltage value, scales it to the proper binary number, and writes that
number to an analog output or current channel to change the output voltage.
number to an analog output or current channel to change the output voltage.
Parameters
Input
Parameter Discussion
chan is the analog output channel number.
Range:
0 or 1 for the AO-2DC, Lab and 1200 Series analog output, and MIO devices.
0 through 5 for AT-AO-6.
0 through 9 for AT-AO-10.
0 through 49 for the VXI-AO-48XDC.
0 through 5 for AT-AO-6.
0 through 9 for AT-AO-10.
0 through 49 for the VXI-AO-48XDC.
voltage is the floating-point value to be scaled and written to the analog output channel. The
range of voltages depends on the type of device, on the jumpered output polarity, and on
whether you apply an external voltage reference.
range of voltages depends on the type of device, on the jumpered output polarity, and on
whether you apply an external voltage reference.
•
Default ranges (bipolar, internal voltage reference):
MIO device:
MIO device:
–10 to +10 V
AT-AO-6/10:
–10 to +10 V
Lab and 1200 Series
analog output devices:
–5 to +5 V
VXI-AO-48XDC:
–10.24 to +10.24 V
•
Default ranges (unipolar, internal voltage reference):
AO-2DC device:
AO-2DC device:
0 to +10 V
Name
Type
Description
deviceNumber
i16
assigned by configuration utility
chan
i16
analog output channel number
voltage
f64
floating-point value to be scaled and written