National Instruments 321645c-01 用户手册

下载
页码 554
Chapter 2
Function Reference — SCXI_Set_Gain
NI-DAQ FRM for PC Compatibles
2-360
©
 National Instruments Corporation
SCXI_Set_Gain
Format
status = SCXI_Set_Gain (SCXIchassisID, moduleSlot, channel, gain)
Purpose
Sets the specified channel to the given gain or range setting on any SCXI module that 
supports programmable gain settings. Currently, the SCXI-1100, SCXI-1102, VXI-SC-1102, 
SCXI-1122, SCXI-1126, and SCXI-1141 have programmable gains; the other analog input 
modules have hardware-selectable gains.
Parameters
Input
Parameter Discussion
channel is the module channel you want to change the gain or range setting for. If 
channel = –1, 
SCXI_Set_Gain
 changes the gain or range for all channels on the module. 
The SCXI-1100 and SCXI-1122 have one gain amplifier, so all channels have the same gain 
setting; therefore, you must set channel = –1 for those modules.
gain is the gain or range setting you want to use. Notice that gain is a double-precision 
floating point parameter. Valid gain settings depend on the module type:
SCXI-1100: 1, 2, 5, 10, 20, 50, 100, 200, 500, 1,000, 2,000.
SCXI-1102/VXI-SC-1102: 1, 100.
SCXI-1122: 0.01, 0.02, 0.05, 0.1, 0.2, 0.5, 1, 2, 5, 10, 20, 50, 100, 200, 500, 1,000, 2,000.
SCXI-1126: 250, 500, 1,000, 2,000, 4,000, 8,000, 16,000, 32,000, 64,000, 128,000.
SCXI-1141: 1, 2, 5, 10, 20, 50, 100.
Name
Type
Description
SCXIchassisID
i16
chassis ID number
moduleSlot
i16
module slot number
channel
i16
module channel
gain
f64
gain or range setting