811
3. Instructions
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Basic I/O Unit Instructions
3
TKY
TKY
Applicable Program Areas
Operands
I: Input Word (Data Line Inputs)
Specify the input word allocated to the Input Unit and connect the ten-key keypad's 0 to 9 data lines to
the Input Unit as shown in the following diagram.
D1: First Register Word
Specifies the leading word address where the ten-key keypad's numeric input (up to 8 digits) will be
stored.
Instruction Mnemonic Variations
Function
code
Function
TEN KEY INPUT TKY @TKY 211
Reads numeric data from a ten-key keypad con-
nected to an Input Unit and stores up to 8 digits of
BCD data in the specified words.
Symbol
TKY
Area
Function block
definitions
Block program areas Step program areas Subroutines Interrupt tasks
SFC action or
transition programs
Usage OK Not allowed OK OK Not allowed OK
Operand Description Data type Size
I Input word UINT 1
D1 First register word UDINT 2
D2 Key input word UINT 1
I: Input word
D1: First register word
D2: Key input word
TKY(211)
I
D1
D2
0123456789101112131415
−−−−−−
I
0
1
2
3
4
5
9
8
7
6
Bits 00 to 09 correspond
to keys 0 to 9.
D1
815 1211 0347
D1+1
815 1211 0347
Digit 1
Digit 2
Digit 3
Digit 4
Digit 5
Digit 6
Digit 7
Digit 8