Справочник Пользователя для National Instruments Welding System 321645c-01
Chapter 2
Function Reference — AO_VScale
©
National Instruments Corporation
2-43
NI-DAQ FRM for PC Compatibles
AO_VScale
Format
status = AO_VScale (deviceNumber, chan, voltage, binVal)
Purpose
Scales a voltage to a binary value that, when written to one of the analog output channels,
produces the specified voltage.
produces the specified voltage.
Parameters
Input
Output
Parameter Discussion
chan is the analog output channel number.
Range:
0 or 1 for the Lab and 1200 Series analog output devices, and MIO devices.
0 through 5 for AT-AO-6.
0 through 10 for AT-AO-10.
0 through 47 for the VXI-AO-48XDC.
0 through 5 for AT-AO-6.
0 through 10 for AT-AO-10.
0 through 47 for the VXI-AO-48XDC.
Note
C Programmers—binVal is a pass-by-reference parameter.
Using This Function
Using the following formula,
AO_VScale
calculates the binary value to be written to the
specified analog output channel to generate an output voltage corresponding to voltage.
binVal = (voltage/refVoltage) * maxBinVal
where values of refVoltage and maxBinVal are appropriate for your device and current
configuration.
configuration.
Name
Type
Description
deviceNumber
i16
assigned by configuration utility
chan
i16
analog output channel number
voltage
f64
voltage, in volts, to be converted to a binary value
Name
Type
Description
binVal
i16
converted binary value returned