Chapter 2 Function Reference — SCAN_Op
NI-DAQ FRM for PC Compatibles 2-298
©
National Instruments Corporation
Voltage Calculation , for valid gain settings. If you use an invalid gain, NI-DAQ returns an
error.
count is the number of samples to be acquired (that is, the number of A/D conversions to be
performed).
Range: 3 through 2
32
– 1 (except the E Series).
2 through 2
24
*
(total number of channels scanned) or 2
32
– 1, whichever is less
(E Series and DSA devices). For PCI-611X devices, count must be EVEN.
sampleRate is the sample rate you want in units of pts/s. This is the rate at which NI-DAQ
samples channels within a scan sequence.
Range: Roughly 0.00153 pts/s through 500,000 pts/s. The maximum rate varies
according to the type of device you have.
scanRate is the scan rate you want in units of scans per second (scans/s). This is the rate at
which NI-DAQ performs scans. NI-DAQ performs a scan each time the function samples all
the channels listed in the scan sequence.
Range: 0 and roughly 0.00153 scans/s up to 5,000,000 scans/s. A value of 0 means that
there is no delay between scans and that the effective scanRate is
sampleRate/numChans.
When scanRate is not 0, scanRate must allow a minimum delay between the last channel of
the scan and the first channel of the next scan.scan. This delay must be at least 11 µs on the
AT-MIO-16X and 6 µs on the AT-MIO-16F-5 and AT-MIO-64F-5. For E Series devices, this
delay corresponds exactly to the speed of the board: for example, 1 µs for an E-1 board, 2 µs
for an E-2 board, and so on.
Note Simultaneous sampling devices do not use the sampleRate parameter. Because
these devices use simultaneous sampling of all channels the scanRate parameter
controls the acquisition rate; therefore, scanRate of 0 is not allowed.
buffer is an integer array that must have a length not less than count. When
SCAN_Op returns
with an error code equal to zero, buffer contains the acquired data.
4 represents a four-to-one multiplexer.
Using This Function
SCAN_Op initiates a synchronous process of acquiring A/D conversion samples and storing
them in a buffer.
SCAN_Op does not return control to your application until NI-DAQ acquires
all the samples you want (or until an acquisition error occurs). When you use posttrigger
mode (with pretrigger mode disabled), the process stores count A/D conversions in the buffer
and ignores any subsequent conversions.