National Instruments 321645c-01 Welding System User Manual


 
Chapter 2 Function Reference SCAN_Sequence_Setup
©
National Instruments Corporation 2-305 NI-DAQ FRM for PC Compatibles
gainVector contains the gain settings to be used for each channel in chanVector. The channel
listed in entry i of chanVector will have the gain listed in entry i of gainVector.
scanRateDivisorVector contains the scan rate divisors to be used for each channel. The
sample rate for a channel equals the base scan rate (that is, the scan rate specified when
SCAN_Start is called) divided by the scan rate divisor for that channel. The channel listed in
entry i of chanVector will have the scan rate divisor listed in entry i of
scanRateDivisorVector.
scansPerSequence is an output parameter that contains the total number of scans in the scan
sequence created by NI-DAQ from your chanVector and scanRateDivisorVector including
any scans that consist entirely of ghost channels, or place holders.
samplesPerSequence is an output parameter that contains the total number of samples in the
scan sequence excluding any ghost channel place holders. The total size of a scan sequence
including ghost channel place holders is limited by the size of the memory on your device
used to hold this information. Currently, this limit is 512 entries. Because
samplesPerSequence excludes ghost channel place holders, an error might result even if
samplesPerSequence is less than 512.
Using This Function
You must observe the following restrictions:
Interval scanning must be used.
A channel can be listed only once in the channel vector.
SCXI cannot be used.
The AMUX-64T device cannot be used.
Your acquisition cannot be pretriggered.
The size of your buffer (the value of the count parameter to
SCAN_Start) must be a
multiple of samplesPerSequence.
The following example shows how to use
SCAN_Sequence_Setup:
numChans = 3
chanVector = {2, 5, 7}
gainVector = {1, 1, 1}
scanRateDivisorVector = {1, 2, 4}
The scan rate divisor for channel 2 is 1 so it will be sampled at the base scan rate. The scan
rate divisor for channel 5 is 2 so it will be sampled at a rate equal to the base scan rate divided
by 2. Likewise, the scan rate divisor for channel 7 is 4 so it will be sampled at a rate equal to
the base scan rate divided by 4.