Scanning examples, Example 1, Example 2 – National Instruments SCXI-1121 User Manual

Page 106: Scanning examples -15, Example 1 -15 example 2 -15

Advertising
background image

Chapter 5

Programming

© National Instruments Corporation

5-15

SCXI-1121 User Manual

Lab-NB User Manual

Program the sample-interval counter (Counter A0)

Service the data acquisition operation.

Scanning Examples

The following examples are intended to aid your understanding of module
and Slot 0 programming. It will be helpful to refer to the bit descriptions for
the Configuration Register and the FIFO Register at the beginning of
Chapter 4,

Register Descriptions

.

Example 1

You want to scan, in Multiplexed mode, channels 1 through 3 on an
SCXI-1121 in Slot 1 of an SCXI-1000 chassis. The SCXI-1121 is directly
cabled to a data acquisition board.

The programming steps are as follows:

1.

Program your data acquisition board as described in the

1. Data

Acquisition Board Setup Programming

section of this chapter.

2.

Following the procedure given in the

Register Writes

section, write

10000001 00001101

to the Configuration Register of the

SCXI-1121 in Slot 1.

3.

Follow the steps outlined in the section earlier in this chapter,

3. Programming the Slot 0 Hardscan Circuitry

, where step 3, Write the

Slot 0 scan list to the FIFO, consists of the following:

Write

00000000 00000010

to the FIFO Register. This

corresponds to Slot 1 for three samples.

4.

Follow the procedure given in the section,

4. Acquisition Enable,

Triggering, and Servicing

, earlier in this chapter.

Example 2

An SCXI-1000 chassis has four SCXI-1121s in Slots 1, 2, 3, and 4. The
SCXI-1121 in Slot 4 is cabled to the data acquisition board. You want to
scan channels 1 through 3 on the SCXI-1121 in Slot 1, channels 0 and 1 on
the SCXI-1121 in Slot 4, and channels 3 and 2 on the SCXI-1121 in Slot 3.

The programming steps are as follows:

1.

Program your data acquisition board as described in the

1. Data

Acquisition Board Setup Programming

section.

Advertising