IAI America XSEL-KX User Manual
Page 116
![background image](/manuals/350295/116/background.png)
100
Part 4 Commands
INB (Read I/O, flag as BCD)
Extension condition
(LD, A, O, AB, OB)
Input condition
(I/O, flag)
Command, declaration
Output
(Output, flag)
Command,
declaration
Operand 1
Operand 2
Optional
Optional
INB
Output, flag BCD digits
CC
[Function]
Read the I/O ports or flags from the one specified in operand 1 for the number of digits
specified in operand 2, to variable 99 as a BCD.
15
14
13
12
11
10
9
8
Input port number
ON
OFF
OFF
OFF
OFF
ON
OFF
ON
85
Variable 99
(Note 1)
A maximum of eight digits (32 bits) can be input.
(Note 2)
The number of I/O ports and flags that can be used is 4 x n (digits).
(Note 3)
The read data format can be changed using a FMIO command. (Refer to the FMIO
command.)
(This function is available in main application version 0.25 or later.)
[Example 1]
INB
8
2
Read input ports 8 through 15, to variable 99 as a
BCD.
[Example 2]
LET
1
8
Assign 8 to variable 1.
LET
2
2
Assign 2 to variable 2.
INB
*1
*2
Read the input ports from the content of variable 1
(input port 8) for the content of variable 2 (two digits)
(until input port 15), to variable 99 as a BCD.
Upper digit
Lower digit
8
5