427
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
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
FNC30-FNC39
Rotation and
Shift
12
FNC40-FNC49
Data Operation
13
FNC50-FNC59
High-Speed
Processing
14
FMC60-FNC69
Handy
Instruction
15
FNC70-FNC79
External FX I/O
Device
16
FNC80-FNC89
External FX
Device
17
FNC100-FNC109
Data
Transfer 2
18
FNC110-FNC139
Floating Point
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
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
The HKY or DHKY instruction can only be used once in a program.
When the 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. Caution on use in timer interrupt programs
When the HKY instruction is used in a timer interrupt program, it turns ON M8029 in the interrupt program.
→ For details, refer to Subsection 36.5.2.
7. 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 com-
plete 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