Hexadecimal Key Input - Hky - Omron SYSMAC C200HS Operation Manual

Programmable controllers
Hide thumbs Also See for SYSMAC C200HS:
Table of Contents

Advertisement

Advanced I/O Instructions
5-28-3 HEXADECIMAL KEY INPUT – HKY(––)
Limitations
Overview
1, 2, 3...
Precautions
308
Ladder Symbols
HKY(––)
IW
OW
D
D and D+2 must be in the same data area.
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. 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.
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 315 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 once in the program.
HKY(––) cannot be used for I/O Units mounted to Slave Racks.
Section 5-28
Operand Data Areas
IW: Input word
IR, SR, AR, HR, LR
OW: Control signal output word
IR, SR, AR, HR, LR
D: First register word
IR, SR, AR, DM, HR, LR

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents