Dbitout.vi – Measurement Computing UL for NI LabVIEW User Manual
Page 71

Universal Library Virtual Instruments (VIs)
Digital I/O VIs
DBitOut.VI
Sets the state of a single digital output bit. This VI treats all of the DIO chips on a board as a single very large
port. It lets you set the state of any individual bit within this large port. If the bit or port direction is
programmable you must first use DCfgBit.VI or DCfgPort.VI to configure the bit or port for output.
Inputs:
BoardNum
[U32] - The board number assigned when installed with InstaCal. Can
be 0 to 100.
PortType
[U32] - Specifies which digital port (
AUXPORT
,
FIRSTPORTA
).
BitNum
[U32] - Specifies the bit to set.
BitValue
[TF] - The bit's value (0 or 1)
Output:
ErrCode
- Error code. See ErrMsg.VI
Arguments:
BoardNum
The board number associated with a board when it was installed with InstaCal.
PortType
There are two general types of digital I/O - 8255 and other. Some boards (DIO
Series) use an 8255 for digital I/O. For these boards,
PortType
should be set to
FIRSTPORTA
. Other boards don't use an 8255. For these boards PortType should be
set to
AUXPORT
. Some boards have both types of digital I/O (PCI-DAS6025). Set
PortType
to either
FIRSTPORTA
or
AUXPORT
depending on which digital outputs you
wish to write.
BitNum
Specifies the bit number within the single large port. The specified bit must be in a
port that is currently configured as an output.
The table below shows which bit numbers are in which 82C55 and 8536 digital
chips. The CIO-DIO192 supports eight 82C55 chips—the most available on a
single board. The PCI-INT32 support two 8536 chips— the most available on a
single board.
82C55 Bit#
Chip #
Address
8536 Bit#
Chip #
Address
0 - 23
1
Base + 0
0 - 19
1
Base + 0
24 - 47
2
Base + 4
20 - 39
2
Base + 4
48 - 71
3
Base + 8
72 - 96
4
Base + 12
96 - 119
5
Base + 16
120 - 143
6
Base + 20
144 - 167
7
Base + 24
168 - 191
8
Base + 28
BitValue
The output value of the bit. Value will be 0 or 1. A (0) indicates a logic-low output;
a (1) indicates a logic high output. Logic-high does not necessarily mean 5 V. See
the board manual for chip specifications.
ErrCode
Error code returned from the Universal Library. Zero if no error occurred. Use the
ErrMsg VI to convert
ErrCode
into a readable string.
71