E L C P r o g r a m m i n g M a n u a l
F o r m o r e i n f o r m a t i o n v i s i t : w w w. e a t o n . c o m M N 0 5 0 0 3 0 0 3 E
3 - 4 9 8
API Mnemonic
Operands
Function
205
CMPT P
S
1
, S
2
, n, D
Compare Table
Bit Devices
Word devices
Program Steps
Type
OP
X Y M S K
H KnX
KnY
KnM KnS T
C
D
E
F
S
1
*
*
*
S
2
*
*
*
n
*
*
*
D
*
*
*
*
*
*
CMPT: 9 steps
CMPTP: 9 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
1
: Source address 1
S
2
: Source address 2
n
: Data length
(
n
= 1~16)
D
: Destination
address
Description:
1.
S
1
and
S
2
can be T/C/D addresses. For Counters, only 16-bit addresses are applicable
(C0~C199).
2.
Range for operand
n
: 1~16. The ELC will take the upper/lower bound value if the set value
exceeds the available range.
3.
Data written in operand
D
will all be stored in 16-bit format. When the data length is less than
16, the null bits are fixed at 0, e.g. if
n
= K8, bit 0~7 will be set according to compare results,
and bit 8~15 will all be 0.
Program example:
When M0 = ON, compare the 16-bit values in D0~D7 with those in D20~D27 and store the result in
D100.
M0
CMPT
D0
K8
D100
D20
y
Contents of D0~D7:
No. D0 D1 D2 D3 D4 D5 D6 D7
Value K10 K20 K30 K40 K50 K60 K70 K80
y
Contents of D20~D27:
No. D20 D21 D22 D23 D24 D25 D26 D27
Value K12 K20 K33 K44 K50 K66 K70 K88
y
After the execution of the CMPT instruction, the associated bit will be 1 if two devices
have the same value, and 0 for those that are not equal. Therefore the results in D100 will
be as below:
Содержание ELC-PB
Страница 1: ......
Страница 5: ...For more information visit www eaton com MN05003003E iv...
Страница 29: ...ELC Programming Manual For more information visit www eaton com MN05003003E 1 24 MEMO...
Страница 502: ...3 Instruction Set MN05003003E For more information visit www eaton com 3 333...
Страница 601: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 432...
Страница 625: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 456...