3. Instruction Set
3-187
174. External wiring:
Y23Y22Y21Y20C
X23X22X21X20S/S
CDEF
89AB
4567
0123
PLC(Transistor output)
+24V24G
Points to note:
175. When HKY instruction is executed, 8 scan cycles (matrix scan) are required for reading the
input value successfully. A scan cycle that is too long or too short may cause the input to be
read incorrectly. In this case we suggest the following solutions:
If the scan cycle is too short, I/O may not be able to respond in time, resulting in incorrect input
values. To solve this problem please fix the scan time.
If the scan period is too long, the key may respond slowly. In this case, write this instruction into
the time-interrupt subroutine to fix the execution time for this instruction.
176. The function of flag M1167:
When M1167 = ON, HKY instruction can input hexadecimal value consists of 0~F.
When M1167 = OFF, A~F of HKY instruction are used as function keys.