5
Categories and Use of Basic Application Instructions
DVP-PM Operation Instruction
5-24
API Mnemonic
Operands
Function
11
D ZCP P
Zone Compare
Controllers
20PM
10PM
Bit Devices
Word Devices
Program Steps
Type
OP
X Y M S K H
KnX
KnY
KnM KnS T C D V Z
S
1
* *
*
*
*
*
*
*
*
*
*
S
2
* *
*
*
*
*
*
*
*
*
*
S
* *
*
*
*
*
*
*
*
*
*
D
*
*
*
ZCP, ZCPP: 9 steps
DZCP, DZCPP: 12 steps
Operands:
S
1
: Lower bound of zone comparison
S
2
: Upper bound of zone comparison
S
: Comparison value
D
: Comparison result
Explanations:
1.
S
is compared with its lower bound
S
1
and upper bound
S
2
and
D
stores the comparison results.
2. ZCP instruction supports V and Z. When ZCP is used as 16-bit instruction, Z device cannot be adopted; when
ZCP is used as 32-bit instruction, V device cannot be adopted.
3. Operand
S
1
should be smaller than operand
S
2.
When
S
1
>
S
2
, the instruction takes
S
1
as the 1
st
comparison
value and performs normal comparison similar to CMP instruction.
4. Operand
D
occupies 3 consecutive devices.
D
,
D
+1,
D
+2 hold the comparison results,
D
= ON if
S
1
>
S
,
D
+1
= ON if
S
1
≦
S
≦
S
2
,
D
+2 = ON if
S
2
<
S
.
Program Example:
1. If
D
is set as M0, then M0, M1, M2 will work as the program example below.
2. When X0 = ON, ZCP instruction is driven and one of M0, M1, M2 is ON. When X0 = OFF, ZCP instruction is not
driven and M0, M1, M2 remain in the previous status.
X0
ZCP
K10
K100
C10
M0
M1
M2
When K10
M0 = On
> C10,
When K10 < C10, < K100, M1 = On
When C10 K100, M2 = On
>
M0
3. Use RST or ZRST instruction to reset the comparison results
Summary of Contents for DVP-10PM
Page 1: ......
Page 45: ...2 Hardware Specifications and Wiring DVP PM Application Manual 2 30 MEMO...
Page 125: ...3 Functions of Devices in DVP PM DVP PM Application Manual 3 80 MEMO...
Page 341: ...8 Application Examples DVP PM Application Manual 8 2 Trajectory 3 Trajectory 4...
Page 427: ...9 Electrical CAM DVP PM Application Manual 9 74...
Page 437: ...10 Encrypting User Program DVP PM Application Manual 10 10 MEMO...
Page 458: ...11 G code Application DVP PM Application Manual 11 21 B O100 main program...
Page 561: ...14 Appendix DVP PM Application Manual 14 4 MEMO...