5 Applied Instructions and Basic Usage
DVP-20PM Application Manual
5-24
API
Applicable model
20PM
11
D
ZCP
P
P
Zonal comparison
Bit device Word device
X Y M S K H KnX KnY KnM KnS T C D V Z
S
1
* *
* * * * * * * * *
S
2
* *
* * * * * * * * *
S
* *
* * * * * * * * *
D
* * *
Note: The instruction supports V devices and Z devices. (If the 16-bit
instruction is used, Z devices can not be used. If the 32-bit
instruction is used, V devices can not be used.)
Please refer to specifications for more information about device
ranges.
16-bit instruction (9 steps)
ZCP
Continuity
instruction
ZCPP
Pulse
instruction
32-bit instruction (12 steps)
DZCP
Continuity
instruction
DZCPP
Pulse
instruction
Flag: None
Explanation
S
1
: Minimum value; S
2
: Maximum value; S: Comparison value; D: Comparison
result
The instruction is used to compare the value in S with that in S
1
, and compare
the value in S with that in S
2
. The comparison result is stored in D.
The value in S
2
must be greater than that in S
1
.
The operand D occupies three consecutive devices.
Example
If the operand D is M0, M0, M1, and M2 will be occupied automatically.
When X0 is ON, the instruction ZCP is executed, and M0, M1, or M2 is ON.
When X0 is OFF, the execution of the instruction ZCP stops, and the states of
M0, M1, and M2 remain unchanged.
X0
ZCP
K10
K100 C10
M0
M1
M2
If K10 M0 will be ON.>the value in C10,
If K10<the value in C10< K100, M1 will be ON.
If the value in C10 K100, M2 will be ON. >
M0
=
=