431
Advanced I/O Instructions
Section 5-31
5-31-3 HEXADECIMAL KEY INPUT – HKY(––)
Limitations
D and D+2 must be in the same data area.
Do not use HKY(––) more than twice in the program.
DM 6144 to DM 6655 cannot be used for D.
Description
When the execution condition is OFF, HKY(––) is not executed. When the exe-
cution condition is ON, HKY(––) inputs data from a hexadecimal keypad con-
nected to the input indicated by IW. The data is input in two ways:
1,2,3...
1.
An 8-digit shift register is created in D and D+1. When a key is pressed on
the hexadecimal keypad, the corresponding hexadecimal digit is shifted
into the least significant digit of D. The other digits of D, D+1 are shifted left
and the most significant digit of D+1 is lost.
2.
The bits of D+2 and bit 4 of OW indicate key input. When one of the keys
on the keypad (0 to F) is being pressed, the corresponding bit in D+2 (00
to 15) and bit 4 of OW are turned ON.
Note
When one of the keypad keys is being pressed, input from the other keys is
disabled.
HKY(––) inputs each digit in 3 to 12 cycles, and then starts over and contin-
ues inputting. Refer to page 431 for more details on HKY(––).
Flags
ER:
Indirectly addressed EM/DM word is non-existent.
(Content of
*
EM/
*
DM word is not BCD, or the EM/DM area boundary
has been exceeded.)
D and D+2 are not in the same data area.
SR 25408:
ON while HKY(––) is being executed.
OW
:
Control signal output word
IR, SR, AR, DM, EM, HR, TIM/CNT, LR
IW
:
Input word
IR, SR, AR, DM, EM, HR, TIM/CNT, LR
Ladder Symbols
Operand Data Areas
HKY(
−−
)
IW
OW
D
D
:
First register word
IR, SR, AR, DM, EM, HR, TIM/CNT, LR