Din.vi – Measurement Computing UL for NI LabVIEW User Manual
Page 75
![background image](https://www.manualsdir.com/files/797520/content/doc075.png)
Universal Library Virtual Instruments (VIs)
Digital I/O VIs
DIn.VI
Reads a digital input 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 read.
Outputs:
DataValue
[I16] - Digital input value.
ErrCode
[I32] - Error code. See ErrMsg.VI
Arguments:
BoardNum
The board number associated with a board when it was installed with InstaCal.
PortNum
If the port type is not
AUXPORT
, the specified port must be configured for input.
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
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
DataValue
Digital input value. The size of the ports vary. If it is an eight-bit port, then the
returned value will be in the range 0- 255. If it is a four bit port the value will be in
the range 0
-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.
75