Omron CJ - REFERENCE MANUAL 10-2009 Reference Manual page 825

Table of Contents

Advertisement

The Input Unit must be a DC Input Unit or High-density Input Unit with at least 16 inputs and the Input
Unit cannot be mounted in a SYSMAC BUS Remote I/O Rack.
Timing Chart
I
00
01
02
to
09
D
2
00
01
02
to
09
10
(1)
(2)
Precaution
• TKY(211) will not operate correctly if I/O refreshing is not performed with the Input Unit connected to
the ten-key keypad after TKY(211) is executed. Consequently, set the input time constant for the
Input Units used for the data line input word to a value that is shorter than the cycle time, or do not
connect the ten-key keypad to the following Units.
• Basic I/O Units or High-density I/O Units mounted in a SYSMAC BUS Remote I/O Slave Rack
• Communications Slaves (DeviceNet or CompoBus/S Slaves)
• The two-word register in D1 and D1+1 operates as an 8-digit shift register. When a key is pressed on
the ten-key keypad, the corresponding BCD digit is shifted into the least significant digit of D1. The
other digits of D1, D1+1 are shifted left and the most significant digit of D1+1 is lost.
• When executed, TKY(211) begins reading the key input data from the first cycle, regardless of the
point at which the last instruction was stopped.
• When one of the keypad keys is being pressed, input from the other keys is disabled.
• There is no restriction on the number of times that TKY(211) can appear in the program (unlike the
C200HX/HG/HE and CQM1H Series).
Sample program
In this example, TKY(211) reads key inputs from a ten-key keypad and stores the inputs in CIO 200 and
CIO 201. The ten-key keypad is connected to CIO 100 (allocated to a CS1W-ID211 16-point DC Input
Unit).
P_On
Always ON Flag
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Input from 10-key
Turn ON flags
corresponding to
10-key inputs (The
flags remain ON
until the next input.)
ON if a key is pressed.
(3)
(4)
TKY(211)
I
100
D
200
1
D
D0
2
D
+1
1
Before
0 0 0 0 0 0 0 0
execution
0 0 0 0 0 0 0 1
(1)
"1" key input
(2)
0 0 0 0 0 0 1 0
"0" key input
0 0 0 0 0 1 0 2
(3)
"2" key input
(4)
0 0 0 0 1 0 2 9
"9" key input
3. Instructions
D
1
787
3

Advertisement

Table of Contents
loading

Table of Contents