404
FX
3U
/FX
3UC
Series Programmable Controllers
Programming Manual - Basic & Applied Instruction Edition
15 External FX I/O Device – FNC 70 to FNC 79
15.2 FNC 71 – HKY / Hexadecimal Input
2. 32-bit operation (DHKY)
Hexadecimal data input through the keys 0 to F is written as it is to [
+1,
].
1) Input of a numeric value through the keys 0 to F: [
+1,
]
- When an input value is larger than "FFFFFFFF", it overflows from the most significant digit.
- Example:
When "9
→
2
→
3
→
B
→
F
→
A
→
F" is input, "923BFAF" is stored to [
+1,
] in the binary
format.
Related devices
→
For the instruction execution complete flag use method, refer to Subsection 6.5.2.
Cautions
1. Limitation in the number of the instruction
HKY or DHKY instruction can be used only once in a program.
When TKY and/or DTKY instruction should be used twice or more, use the indexing (V, Z) function.
2. When two or more keys are pressed at the same time
In such a case, the first key pressed is valid.
3. When the command contact turns OFF
Though the contents of
do not change, all of
to
+7 turn OFF.
4. Number of occupied device
1) Four devices are occupied from the head input (X) device
for connecting 16 keys.
2) Four devices are occupied from the head output (Y) device
for connecting 16 keys.
3) Eight devices are occupied from the head device
for outputting the key pressing information.
Make sure that these devices are not used in other controls for the machine.
-
to
+5: Key pressing information for the keys A to F
-
+6: Key sensing output for the keys A to F
-
+7: Key sensing output for the keys 0 to 9
5. Key input receiving timing
HKY and DHKY instructions are executed in synchronization with the operation cycle of the PLC.
The time for eight scans is required to finish a series of key scan.
To prevent key input receiving errors caused by the filter delay, utilize the "constant scan mode" and "timer
interrupt" function.
6. Output format
Use a transistor output type PLC.
Device
Name
Description
M8167
Function extension flag
Turns ON/OFF the hexadecimal data handling function of HKY (FNC 71) instruction.
OFF: Ten-keys and function keys
ON:
Hexadecimal keys
M8029
Instruction execution
complete flag
OFF: Data is being output to
to
+3 or the instruction is not executed yet.
ON:
A cycle operation of outputting data to
to
+3 (scan of the keys 0 to
F) is completed.
D
2
D
2
D
2
D
2
D
2
D
2
Command
input
FNC 71
DHKY
M8167
D
1
S
D
2
D
3
D
1
D
1
D
1
D
1
D
2
D
3
D
3
S
D
1
D
3
D
3
D
3
D
3
D
3