Dout.vi – Measurement Computing UL for NI LabVIEW User Manual
Page 79

Universal Library Virtual Instruments (VIs)
Digital I/O VIs
DOut.VI
Writes a byte to a digital output port.
Inputs:
BoardNum
[U32] - The board number assigned when installed with InstaCal. Can
be 0 to 100.
PortNum
[I32] - Specifies which digital I/O port to set.
DataValue
[I32] - Byte value to output to port.
Output:
ErrCode
[I32] - Error code. See ErrMsg.VI
Arguments:
BoardNum
The board number associated with a board when it was installed.
PortNum
If the port type is not
AUXPORT
, the specified port must be configured for output.
For many boards, AUXPORT is not configurable. However, some later boards do
require that the AUXPORT be configured using DCfgPort.VI or DCfgBit.VI.
Please see board details for more information.
The table below shows which ports are in which 82C55 and 8536 digital chips. The
most 82C55 chips on a single board is eight (8), on the CIO-DIO192. The most (2)
8536 chips occur on the CIO-INT32.
Mnemonic
Bit #
8255 Chip #
Chip Address
8536 Chip #
Chip Address
FIRSTPORTA
0 - 7
1A
Base + 0
1A
Base + 0
FIRSTPORTB
8 - 15
1B
1B
FIRSTPORTCL
16 - 19
1CL
1C
FIRSTPORTCH
20 - 23
1CH
Not present
SECONDPORTA
24 - 31
2A
Base + 4
2A
Base + 4
SECONDPORTB
32 - 39
2B
2B
SECONDPORTCL
40 - 43
2CL
2C
SECONDPORTCH
44 - 47
2CH
No port C High in 8536 chips
and so on, to the last chip on the board as: THIRDPORTx, FOURTHPORTx, FIFTHPORTx, SIXTHPORTx,
SEVENTHPORTx and...
EIGHTHPORTA
168 - 175
8A
Base + 28
EIGHTHPORTB
176 - 183
8B
EIGHTHPORTCL
184 - 187
8CL
EIGHTHPORTCH
188 - 191
8CH
Data Value
Value to write to the specified port. The size of the ports varies. If it is an eight-bit
port, then the output value must be in the range 0 to 255. If it is a four-bit port, the
value must be in the range 0 to 15.
ErrCode
Error code returned from the Universal Library. Zero if no error occurred. Use the
ErrMsg VI to convert
ErrCode
into a readable string.
Important - Read board-specific information in UL User's Guide
Refer to the example programs and the board-specific information contained in the Universal Library User's
Guide (available on our web site at
valid
PortNum
values.
79