
Chapter 5 Programming
AT-MIO-16X User Manual 5-14
©
National Instruments Corporation
Setting the SCANEN bit in conjunction with the DAQEN bit in
Command Register 1 enables scanning during multiple A/D
conversions. The SCANEN bit must be set regardless of the type o f
scanning used (continuous or interval); otherwise, only a single channel
is scanned.
Setting the SCN2 bit in Command Register 1 enables the use of a scan
interval during multiple A/D conversions. The scan-interval counter
gives each cycle through the scan sequence a time inter val . The
scan-interval counter begins counting at the start of the sca n sequ en ce
programmed into the channel configuration memory. When the scan
sequence terminates, the next cycle through the scan sequence do es no t
begin until the scan-interval counter has reached its terminal count.
Be sure that the scan-interval counter allows enough time for all
conversions in a scan sequence to occur so that conversio ns ar e not
missed.
Data Acquisition Programming FunctionsThis section provides a detailed explanation of the functions necessary
to program the analog input for single and multiple channel A/D
conversions.
Clearing the Analog Input Circuitry
The analog input circuitry can be cleared by strobing the DAQ Clear
Register. This operation leaves the analog input circuitry in the
following state:
• Analog input error flags OVERFLOW and OVERRUN are cleared
• Pending data acquisition interrupt requests are clear ed
• ADC FIFO is emptied
• DAQCOMP f lag i n th e St atus R egi st e r is cl e are d
Empty the ADC FIFO before starting any A/D conversions. This action
guarantees that the A/D conversion results read from the FIFO are the
results from the initiated conversions and are not left over results from
previous conversions.