![Mitsubishi Electric MELSEC FX3G Programming Manual Download Page 447](http://html.mh-extra.com/html/mitsubishi-electric/melsec-fx3g/melsec-fx3g_programming-manual_239083447.webp)
445
FX
3G
/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
11
FNC3
0-F
NC3
9
R
otati
on and
Shif
t
12
FNC4
0-F
NC4
9
D
ata
O
per
ati
on
13
FN
C
50-FN
C
59
H
igh Speed
Pr
ocess
ing
14
FM
C
60-
FN
C
69
H
andy
In
st
ru
ct
ion
15
FNC7
0-F
N
C7
9
Ex
ter
nal
FX
I/O
D
evice
16
FN
C
80-FN
C
89
Ext
ernal FX
De
vic
e
17
FN
C
100-
FN
C
109
Da
ta
Transf
er 2
18
FN
C
110-
FN
C
139
Fl
oati
ng Poi
nt
19
FN
C
140
-F
N
C
14
9
Da
ta
O
per
ati
on 2
20
FN
C
150-
FN
C
159
Posit
ioning
C
ontr
ol
2. 32-bit operation (DHKY)
Hexadecimal numerical value data input using keys 0 to F is shifted into [
+1,
] from the least
significant byte.
1) Input of a numeric value using keys 0 to F:
- When the input value is larger than "FFFFFFFF", it overflows from the most significant digit.
- Example:
When "9
→
2
→
3
→
B
→
F
→
A
→
F" is input, numerical value "923BFAF" is stored in [
+1,
]
in binary.
Related devices
→
For the instruction execution complete flag use method, refer to Subsection 6.5.2.
Cautions
1. Limitation in the number of instructions
HKY or DHKY instruction can be used only once in a program.
When TKY and/or DTKY instruction should be used two or more times, 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,
to
+7 turn OFF.
4. Number of devices occupied
1) Four devices are occupied from the head X device
for connecting 16 keys.
2) Four devices are occupied from the head 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 by other machine controls.
-
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.
8 scan cycles are required to finish reading the keys.
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
Extension function 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
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