Counter 1 and scandiv, Module programming, Single-module parallel scanning – National Instruments SCXI-1120 User Manual

Page 79

Advertising
background image

Programming

Chapter 5

SCXI-1120 User Manual

5-8

© National Instruments Corporation

Counter 1 and SCANDIV

All MIO boards can operate their data acquisition board scan lists in two ways–they can acquire
one sample per data acquisition board scan list entry; or they can acquire N samples per data
acquisition board scan list entry, where N is a number from 2 to 65,535 that is programmed in
Counter 1. This second method of operation is especially useful when the data acquisition board
scan list length is limited to 16 entries, as it is on all MIO boards except the AT-MIO-16F-5,
which can have up to 512 entries. Because you can multiplex many SCXI-1120s in one chassis
to one MIO board channel, often the simplest way to program the MIO board is to use only one
data acquisition board scan list entry, and make N the total number of samples to be taken on all
modules in one scan. Check your MIO board user manual for limitations in the data acquisition
board scan list format.

To program the MIO board to take N samples per data acquisition board scan list entry, perform
the following additional programming steps at the end of the Enable the Scanning Data
Acquisition Operation
section in the appropriate data acquisition board user manual:

1. Write FF01 to the Am9513 Command Register to select Counter 1 Mode Register.

2. Write 0325 (hex) to the Am9513 Data Register to store Counter 1 Mode Value for most MIO

boards. For the AT-MIO-16F-5, and the AT-MIO-16X, and the AT-MIO-64F-5, write 1325
(hex).

3. Write FF09 to the Am9513 Command Register to select Counter 1 Load Register.

4. Write the number of samples to be taken per scan list entry (2 to 65,535) to the Am9513

Data Register to load Counter 1.

5. Write FF41 to the Am9513 Command Register to load Counter 1.

6. Write FFF1 to the Am9513 Command Register to step Counter 1.

7. Write FF21 to the Am9513 Command Register to arm Counter 1.

8. Set the SCANDIV bit in Command Register 1.

2. Module Programming

This section describes the programming steps for various scanning possibilities.

Single-Module Parallel Scanning

To perform single-module parallel scanning, you must cable the SCXI-1120 rear signal
connector to a data acquisition board with each output connected to a different data acquisition
board channel. See Chapter 2, Configuration and Installation, for more information.

To program the SCXI-1120 for single-module parallel scanning, write the binary pattern

00XXXX00 XX000000

to the SCXI-1120 Configuration Register. Notice that this can be the

RESET state.

Advertising