3 . I n s t r u c t i o n S e t
M N050 03003E F or mo re infor ma tio n vi sit:
w w w. e a t o n . c o m
3-199
API Mnemonic
Operands
Function
70
D
TKY
S ,D
1
, D
2
Ten Key Input
Bit Devices
Word devices
Program Steps
Type
OP
X Y M S K H KnX KnY KnM KnS T
C D E
F
S
*
*
*
*
D
1
*
*
*
*
*
*
*
*
D
2
*
*
*
TKY: 7 steps
DTKY: 13 steps
ELC ELCB
ELCM
PB PC/PA/PH
PV
PB PH/PA
32 16
P
32 16
P
32 16
P 32 16 P 32 16
P
Operands:
S
: Starting input address (occupies 10 consecutive bits)
D
1
: Destination for storing key input
value
D
2
: Key input signal (occupies 11 consecutives bits)
Description:
1. This
instruction specifies ten external inputs with
S
and these ten external inputs are identified
as decimal values of 0 to 9. These ten external input devices are connected to ten keys. When
each key is pressed, the decimal value for that key from 0 to 9,999 (max. 4 digits in 16-bit
instruction) or from 0 to 99,999,999 (max. 8 digits in 32-bit instruction) is stored in destination
D
1
.
D
2
is used to store the state of the current key number pressed.
2. For
ELC-PC/PA/PH,
S
and
D
2
do not support E, F index registers
3.
There is no limit on the number of times this instruction is used in the program, however only
one instruction is allowed to be executed at a time.
Program Example:
1.
Specify ten input terminals beginning with X30 to connect the ten keys to. These keys are
numbered from 0 to 9. When X20=ON, the instruction is executed and it will store the BIN
value of the key pressed into D0 and set the associated bit (M10~M19). M0-M9 in this example
are used to store the condition of the key that has been pressed last.
X20
TKY
X30
D0
M10
ELC
0
1
3
2
4
5
6
7
8
9
X33
X32
X31
X30
S/S
X36
X35
X34
X40
X37
X41
+24V
24G
Summary of Contents for ELC-PB
Page 1: ......
Page 5: ...For more information visit www eaton com MN05003003E iv...
Page 29: ...ELC Programming Manual For more information visit www eaton com MN05003003E 1 24 MEMO...
Page 502: ...3 Instruction Set MN05003003E For more information visit www eaton com 3 333...
Page 601: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 432...
Page 625: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 456...