Omron C200HE ユーザーズマニュアル

ページ / 564
346
5-28-4
TEN KEY INPUT – TKY(––)
D
1
: First register word
IR, SR, AR, DM, HR, LR
IW: Input word
IR, SR, AR, DM, HR, LR
Ladder Symbols
Operand Data Areas
TKY(––)
IW
D
1
D
2
D
2
: Key input word
IR, SR, AR, DM, HR, LR
Limitations
D
1
 and D
1
+1 must be in the same data area.
Overview
When the execution condition is OFF, TKY(––) is not executed. When the execu-
tion condition is ON, TKY(––) inputs data from a ten-key keypad connected to
the input indicated by IW. The data is input in two ways:
TKY(––) can be used in several locations in the program by changing the input
word, IW.
1, 2, 3...
1.
An 8-digit shift register is created in D
1
 and D
1
+1. When a key is pressed on
the ten-key keypad, the corresponding BCD digit is shifted into the least sig-
nificant digit of D
1
. The other digits of D
1
, D
1
+1 are shifted left and the most
significant digit of D
1
+1 is lost.
2.
The first ten bits of D
2
 indicate key input. When one of the keys on the key-
pad (0 to 9) is being pressed, the corresponding bit of D
2
 (00 to 09) is turned
ON.
Note
1. While one key is being pressed, input from other keys will not be accepted.
2. If more than eight digits are input, digits will be deleted beginning with the
leftmost digit.
3. Input bits not used here can be used as ordinary input bits.
Hardware
This instruction inputs 8 digits in BCD from a 10-key keypad and uses 10 input
points. Prepare a 10-key keypad, and connect it so that the switches for numeric
keys 0 through 9 are input to points 0 through 9 as shown in the following dia-
gram. The inputs on a DC Input Unit with 16 or more input points can be used.
1
3
5
7
9
11
13
15
COM
0
2
4
6
8
10
12
14
COM
ID212
0 V
0
9
DC Input Unit
10-key
Advanced I/O Instructions
Section 5-28