Dcfgport.vi – Measurement Computing UL for NI LabVIEW User Manual
Page 73

Universal Library Virtual Instruments (VIs)
Digital I/O VIs
DCfgPort.VI
Configures a digital port as Input or Output. This mode is primarily for use with 82C55 chips and 8536 chips.
See the board user's manual for details of chip operation.
Summary:
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 configure.
Direction
[TF]-
DIGITALOUT
or
DIGITALIN
Outputs:
BoardNum
[U32] - The board number assigned when installed with InstaCal. Can
be 0 to 100. Can be used to pass
BoardNum
parameter to another VI.
ErrCode
[I32] - Error code. See ErrMsg.VI
Arguments:
BoardNum
The board number associated with a board when it was installed with InstaCal.
PortNum
The specified port must be configurable.
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 and 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.
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
Direction
DIGITALOUT (True) or DIGITALIN (False - default) configures an entire eight-
or four-bit port for output or input.
BoardNum
(Out)
The board number used when installed with InstaCal. This parameter can be used
to serialize VIs such that this VI precedes the next VI whose
BoardNum
is attached
to this output.
Notes
Using this function will reset all ports on a chip configured for output to a zero state. This means that if you
set an output value on
FIRSTPORTA
and then change the configuration on
FIRSTPORTB
from
OUTPUT
to
INPUT
,
the output value at
FIRSTPORTA
will be all zeros. You can, however, set the configuration on
SECONDPORTX
73