National Instruments 321645c-01 Welding System User Manual


 
Chapter 2 Function Reference SCAN_Setup
NI-DAQ FRM for PC Compatibles 2-308
©
National Instruments Corporation
devices), or the total number of channels scanned equals (4)
*
(numChans)
*
(num_mux_brds). For example, if you use one AMUX-64T and scan eight onboard channels,
the total number of channels scanned equals (4)
*
(8)
*
(1) = 32.
If you use one or more external multiplexer devices (AMUX-64Ts) with the MIO-64, the total
number of channels scanned equals (4)
*
(numChans1)
*
(num_mux_brds) + numChans2,
where:
4 represents four-to-one multiplexer.
numChans1 is the number of onboard channels (of an MIO or AI connector, the first
connector) scanned.
Range: 0 through 7 differential, 0 through 15 single-ended.
num_mux_brds is the number of external multiplexer devices.
numChans2 is the number of onboard channels (of an analog connector, the second
connector) scanned.
Range: 0 through 23 differential, 0 through 48 single-ended.
If you are using SCXI, you must scan the analog input channels on the DAQ device that
corresponds to the SCXI channels you want. You should select the SCXI scan list using
SCXI_SCAN_Setup before you call this function. Refer to the NI-DAQ User Manual for
PC Compatibles for more information on SCXI channel assignments.
gainVector is an integer array of length numChans that contains the gain setting to be used
for each channel specified in chanVector. This gain setting applies only to the DAQ device;
if you use SCXI, you must establish any gain you want at the SCXI module either by setting
jumpers on the module or by calling
SCXI_Set_Gain. Refer to Appendix B, Analog Input
Channel, Gain Settings, and Voltage Calculation, for valid gain settings.
For example, if gainVector[5] = 10, when NI-DAQ scans the sixth channel, the function
sets the gain circuitry to a gain of 10. Notice also that gainVector[i] corresponds to
chanVector[i]. If gainVector[2] = 100 and chanVector[2] = 3, the third channel NI-DAQ
scans is analog input channel 3, and the function sets its gain to 100.
Using This Function
SCAN_Setup
stores numChans, chanVector, and gainVector in the Mux-Gain Memory
table on the device. The function uses this memory table during scanning operations
(
SCAN_Start
)
to automatically sequence through an arbitrary set of analog input channels
and to allow gains to automatically change during scanning.
You need to call
SCAN_Setup to set up a scan sequence for scanned operations; afterwards,
you only need to call the function when you want a scan sequence. If you call
DAQ_Start
or
AI_Read, NI-DAQ modifies the Mux-Gain Memory table on the device; therefore, you
should use
SCAN_Setup again after NI-DAQ modifies these calls to reinitialize the scan
sequence.