FX Series Programmable Controlers Applied Instructions 5
5-19
5.2.2 ZCP (FNC 11)
Operation:
The operation is the same as the CMP instruction
except a single data value (S
3) is compared against
a data range (S
1-S2).
S
3 is less than S1and S2- bit device D is ON
S
3 is equal to or between S1 and S2 - bit device D+1
is ON
S
3 is greater than both S1 and S2 - bit device D+2 is
ON
Mnemonic Function
Operands
Program steps
S
1
S2 S3 D
ZCP
FNC 11
(Zone
compare)
Compares a data
value against a
data range -
resultsof<,=and
> are given.
K, H,
KnX, KnY, KnM, KnS,
T, C, D, V, Z
Note:
S
1
should be less than S2
Y, M, S
Note:
3 consecutive
devices are
used.
ZCP,Z CPP:
9steps
DZCP,
DZCPP:
17 steps
FX
1S
FX
1N
FX
2N
FX
2NC
PULSE-P
16 BIT OPERATION
32 BIT OPERATION
X0
K 120 M 3
[ S2 ] [ D ]
[ S1 ]
K 100ZCP
M3
M4
M5
C 30
[ S3 ]
C30<100,K120,M3=ON
K100 C30 K120,M4=ON
C30>K100,K120,M5=ON