FX Series Programmable Controlers Applied Instructions 5
5-103
e) The HKY instruction may only be used ONCE.
f) Normal operation requires 8 scans to read the key
inputs. To achieve a steady and repeatable
performance, constant scan mode should be used,
i.e. M8039 is set ON and a user defined scan time
is written to register D8039. However, for a faster
response the HKY instruction should be
programmed in a timer interrupt routine as shown
in the example opposite.
Operation 2 - Using the HKY Instruction With
M8167:
(Applicable units: FX
2N and FX2NC)
When the HKY instruction is used with flag M8167 ON
(as shown right), the operation of keys A through F
allow actual entry of the Hexadecimal values of A
through F respectively into the data device D
2.Thisis
in addition to the standard 0 through 9 keys. All other
operation is as specified in ‘Operation 1 - Standard’.
Maximum storage values for this operation become
FFFF in 16 bit mode and FFFFFFFF in 32 bit (double
word) mode.
Y 0 D 0 M 0HKY X 0
EI
FEND
K8REF X 0
K8REF Y0
IRET
END
M8000
I 610
X17
Y 60 D 5 M90
HKY
X 10
M8167
X17
Y 60 D 5 M90
HKY
X 10
SET
M8167
RST
M8167
These two program examples
perform the same task.