343
5-28-3 HEXADECIMAL KEY INPUT – HKY(––)
OW: Control signal output word
IR, SR, AR, DM, HR, LR
IW: Input word
IR, SR, AR, DM, HR, LR
Ladder Symbols Operand Data Areas
HKY(––)
IW
OW
D
D: First register word
IR, SR, AR, DM, HR, LR
Limitations D and D+2 must be in the same data area.
Overview When the execution condition is OFF, HKY(––) is not executed. When the
execution condition is ON, HKY(––) inputs data from a hexadecimal keypad
connected 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 1. When one of the keypad keys is being pressed, input from the other keys is
disabled.
2. Input and output bits not used here can be used as ordinary input and output
bits.
With this instruction, one key input is read in 4 to 13 cycles. More than one cycle
is required because the ON keys can only be determined as the outputs are
turned ON to test them.
The hexadecimal key input device must be connectable in a 4 x 4 matrix.
Precautions I/O refreshing must be performed for all I/O points used by HKY(––) each time it
is executed to ensure effective operation. The I/O REFRESH instruction must
thus be used with HKY(––) whenever HKY(––) is used in a subroutine to ensure
that the I/O points are refreshed each execution. Refer to page 350 for an exam-
ple of this type of programming.
HKY(––) will be executed from the first cycle whenever program execution is
started, including restarts made after power interruptions.
Do not use HKY(––) more than twice in the program.
HKY(––) cannot be used for I/O Units mounted to Slave Racks.
Advanced I/O Instructions Section 5-28