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-53
API Mnemonic
Operands
Function
11
D ZCP P
S1, S2, S, D
Zone Compare
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
*
*
*
*
*
*
*
*
*
*
*
S
*
*
*
*
*
*
*
*
*
*
*
D
*
*
*
ZCP, ZCPP: 9 steps
DZCP, DZCPP: 17 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
: First comparison value (Minimum)
S
2
: Second comparison value (Maximum)
S
: Comparison value
D
: Comparison result result (starting bit address – uses 3 consecutive bit
addresses)
Description:
1.
S
is compared with the lower limit,
S
1
and the upper limit
S
2
and
D
contains the compare result.
2.
The values are binary values. If bit 15=1 in 16-bit instruction or bit 31=1 in 32-bit instruction,
the comparison will regard the value as a negative binary value.
3. If
operand
S
1
,
S
2
,
S
use index register F, only a 16 bit compare is available.
4. Operand
S
1
should be less than Operand
S
2,
Operand
D
occupies 3 continuous addresses.
Program Example:
1. If
D
is set to M0, then M0, M1, M2 will display the result of the ZCP as shown below.
2.
When X0=ON, ZCP instruction is evaluated and one of M0, M1 or M2 will be ON. When
X0=OFF, ZCP instruction is not evaluated and M0, M1, M2 remain in the previous status.
X0
M0
M1
M2
ZCP
If C10 < K10, M0 = On
If
K10 < C10 < K100, M1 = On
If C10 > K100, M2 = On
X0
K10
C10
M0
K100
=
=
3.
Use RST or ZRST instructions to reset the comparison result.
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...