Chapter 5 programming, Programming considerations, Notation – National Instruments SCXI-1120 User Manual

Page 72: Register writes

Advertising
background image

© National Instruments Corporation

5-1

SCXI-1120 User Manual

Chapter 5
Programming

This chapter contains a functional programming description of the SCXI-1120 and Slot 0.

Note: If you plan to use a programming software package such as NI-DAQ, LabWindows, or

LabVIEW with your SCXI-1120 board, you do not need to read this chapter.

Programming Considerations

Programming the SCXI-1120 involves writing to the Configuration Register. Programming
Slot 0 involves writing to the HSCR and FIFO Register. Programming the data acquisition
boards involves writes to their registers. See your data acquisition board user manual for more
information. The programming instructions list the sequence of steps to take. The instructions
are language independent; that is, they instruct you to write a value to a given register without
presenting the actual code.

Notation

For the bit patterns to be written, the following symbols are used:

0

binary zero

1

binary one

X

don't care; either zero or one may be written

C

one of three bits used to specify the channel to be loaded into the MUXCOUNTER. This
value will either be the channel to be read for single reads, or a starting channel for
scanned measurements.

The 16-bit patterns are presented MSB first, left to right.

Register Writes

This section describes how to write to the Configuration Register, HSCR, and FIFO Register,
including the procedure for writing to the Slot-Select Register to select the appropriate slot. For
timing specifics, refer to the Timing Requirements and Communication Protocol section in
Chapter 2, Configuration and Installation. The rear signal connector pin equivalences to the
different National Instruments data acquisition boards are given in Table 5-1. Also see
Appendix E, SCXI-1120 Cabling. The Configuration Register, the HSCR, and the FIFO Register
are write-only registers.

The different bits in these registers often control independent pieces of circuitry. There are times
when you may want to set or clear a specific bit or bits without affecting the remaining bits.
However, a write to one of these registers will affect all bits simultaneously. You cannot read
the registers to determine which bits have been set or cleared in the past; therefore, you should
maintain a software copy of these registers. You can then read the software copy to determine
the status of the register. To change the state of a single bit without disturbing the remaining
bits, set or clear the bit in the software copy and write the software copy to the register.

Advertising