Programming instructions

Chapter 16 When You Need It Now— Immediate Digital I/O
©
National Instruments Corporation 16-3 LabVIEW Data Acquisition Basics Manual
As an alternative,
digital
channel
can consist of a port number. The port
number specifies the port of digital lines that you will use during your
digital operation. In this case, you must also specify
device
,
line
, and
port width
where applicable to further define your digital operation.
The
device
input identifies the DAQ device you are using. The
line
input is
an individual port bit or line in the port specified by
digital channel
. The
port
width
input specifies the number of lines that are in the port you are
using.
The
pattern
or
line state
is the value(s) you want to read from or write to
a device. Pattern values can be displayed in decimal (default), hexadecimal,
octal, or binary form. Refer to Chapter 9,
Numeric Controls and Indicators
,
in the
G Programming Reference Manual
for instructions on how to change
the display of a numeric control or indicator. The
iteration
input optimizes
your digital operation. When
iteration
is zero (the default value),
LabVIEW calls the DIO Port Config VI (an Intermediate VI) to configure
the port. If
iteration
is greater than zero, LabVIEW uses the existing
configuration, which improves performance. You can wire this input to
an iteration terminal of a loop. Every time
iteration
is zero, you call the
DIO Port Config VI, which resets the digital line values to their default
values. If you want to use the same digital values from one loop iteration to
another, only set
iteration
to zero for the first iteration of the loop, then
change it to a value greater than zero.
If you are using an SCXI module for nonlatched digital I/O and are not
using channel names, refer to the
SCXI Channel Addressing
section in
Chapter 20,
Special Programming Considerations for SCXI
, for
instructions on how to specify port numbers.