User manual
Chapter 3 Software Overview
© National Instruments Corporation 3-53 NI-DAQ User Manual for PC Compatibles
section in the NI-DAQ Function Reference Online Help file to find out
which digital functions your device supports. The SCXI functions control
the SCXI digital and relay modules.
These devices contain a number of digital I/O ports of up to eight digital
lines in width. The name port refers to a set of digital lines. Digital lines
are also referred to as bits in this text. In many instances, you control the
set of digital lines as a group for both reading and writing purposes and for
configuration purposes. For example, you can configure the port as an input
port or as an output port, which means that the set of digital lines making
up the port consist of either all input lines or all output lines.
In NI-DAQ, you refer to ports by number. Many digital I/O devices label
ports by letter. For these devices, use port number 0 for port A, port
number 1 for port B, and so on. For example, the DIO-24 contains three
ports of eight digital lines each. Ports 0, 1, and 2 are labeled PA, PB, and
PC on the DIO-24 I/O connector. The eight digital lines making up port 0,
lines 0 through 7, are labeled PA0 through PA7.
In some cases, you can combine digital I/O ports into a larger entity
called a group. On the DIO-32F and 653X devices, for example, you can
assign any of the ports DIOA through DIOD to one of two groups. On the
PCI-6115 and PCI-6120, you can also create groups smaller than the port
size. For example, both the PCI-6115 and the PCI-6120 have one digital
port of eight lines, but you can configure five lines as an input group and
three lines as an output group. A group of ports are handshaked or clocked
as a unit.
The Digital I/O functions can write to and read from both an entire port
and single digital lines within the port. To write to an entire port, NI-DAQ
writes a byte of data to the port in a specified digital output pattern. To read
from a port, NI-DAQ returns a byte of data in a specified digital output
pattern. The byte mapping to the digital I/O lines is as follows.
Table 3-6.
Byte Mapping to Digital I/O Lines
Bit Number Digital I/O Line Number
7 7Mostsignificantbit(MSB)
6 6
5 5
4 4
3 3










