3. Instruction Set
API
Mnemonic Operands Function
70 D
TKY
Ten key input
Type
OP
Bit Devices Word devices Program Steps
X Y M S K H KnX
KnY
KnM
KnS
T C D E F
TKY: 7 steps
DTKY: 13 steps
SS2
SX2
SS2
SX2
SS2
SX2
Operands:
S: Start device for key input (occupies 10 consecutive devices) D
1
: Device for storing keyed-in
value D
2
: Output signal (occupies 11 consecutive devices)
Explanations:
1. This instruction designates 10 external input points (corresponding to decimal numbers 0 ~ 9)
starting from S, connecting to 10 keys respectively. Input point started from S triggers
associated device in D
2
and D
2
maps to a decimal value, a 4-digit decimal value 0~9,999 (16-bit
instruction) or an 8-digit value 0~99,999,999 (32-bit instruction). The decimal value is stored in
D
1.
2. There is no limitation on the times of using this instruction in the program, however only one
instruction is allowed to be executed at the same time.
Program Example:
1. Connect the 10 input points starting from X30 to the 10 keys (0 ~ 9). When X20 = ON, the
instruction will be executed and the key-in values will be stored in D0 in BIN form. The key
status will be stored in M10 ~ M19.
ELC
0 1 32 4 5 6 7 8 9
X33X32X31X30S/S X36X35X34
X40
X37 X41+24V24G