National Instruments 321645c-01 用户手册
Chapter 2
Function Reference — AI_Configure
NI-DAQ FRM for PC Compatibles
2-6
©
National Instruments Corporation
AI_Configure
Format
status = AI_Configure (deviceNumber, chan, inputMode, inputRange, polarity, driveAIS)
Purpose
Informs NI-DAQ of the input mode (single-ended or differential), input range, and input
polarity selected for the device. Use this function if you have changed the jumpers affecting
the analog input configuration from their factory settings. For devices that have no jumpers
for analog input configuration, this function programs the device for the settings you want.
polarity selected for the device. Use this function if you have changed the jumpers affecting
the analog input configuration from their factory settings. For devices that have no jumpers
for analog input configuration, this function programs the device for the settings you want.
Parameters
Input
Parameter Discussion
chan is the analog input channel to be configured. Except for the E Series devices,
the AT-MIO-64F-5, and the AT-MIO-16X, you must set chan to –1 because the same analog
input configuration applies to all of the channels. For the E Series devices, AT-MIO-64F-5,
and AT-MIO-16X, chan specifies the channel to be configured. If you want all of the channels
to be configured identically, set chan to –1.
the AT-MIO-64F-5, and the AT-MIO-16X, you must set chan to –1 because the same analog
input configuration applies to all of the channels. For the E Series devices, AT-MIO-64F-5,
and AT-MIO-16X, chan specifies the channel to be configured. If you want all of the channels
to be configured identically, set chan to –1.
Range:
.
inputMode indicates whether the analog input channels are configured for single-ended or
differential operation:
differential operation:
0:
Differential (DIFF) configuration (default).
Name
Type
Description
deviceNumber
i16
assigned by configuration utility
chan
i16
channel to be configured
inputMode
i16
indicates whether channels are configured for
single-ended or differential operation
single-ended or differential operation
inputRange
i16
voltage range of the analog input channels
polarity
i16
indicates whether the ADC is configured for
unipolar or bipolar operation
unipolar or bipolar operation
driveAIS
i16
indicates whether to drive AISENSE to onboard
ground
ground