5
Categories and Use of Basic Application Instructions
DVP-PM Application Manual
5-33
API Mnemonic Operands
Function
17
D XCH P
Exchange
Controllers
20PM
10PM
Bit Devices
Word devices
Program Steps
Type
OP
X Y M S K H
KnX
KnY KnM KnS T C D E F
D
1
*
*
*
*
*
*
*
*
D
2
*
*
*
*
*
*
*
*
XCH, XCHP: 5 steps
DXCH, DXCHP: 9 steps
Operands:
D
1
: Device to be exchanged 1
D
2
: Device to be exchanged 2
Explanations:
1.
The contents in the devices designated by
D
1
and
D
2
will exchange
2.
It is better to apply a pulse execution for this instruction (XCHP).
3.
When XCH is used as 16-bit instruction, Z device cannot be adopted; when XCH is used as 32-bit instruction,
V device cannot be adopted.
4.
When specifying the bit device of KnX(Y/M/S), the starting No. should be a multiple of 16 in octal or decimal
format. For example, K1X0, K4Y20 (octal); K1M0, K4S16 (decimal).
Program example:
When X0=OFF
→
ON, the contents of D20 and D40 exchange with each other.
X0
D40
XCHP
D20
Before
execution
After
execution
120
120
40
40
D20
D40
D20
D40
Points to note:
1.
As a 16-bit instruction, when the devices designated by
D
1
and
D
2
are the same and M1303 = ON, the upper
and lower 8 bits of the designated devices exchange with each other.
2.
As a 32-bit instruction, when the devices designated by
D
1
and
D
2
are the same and M1303 = ON, the upper
and lower 16 bits in the designated device exchange with each other.
3.
When X0 = ON and M1303 = ON, 16-bit contents in D100 and those in D101 will exchange with each other.
X0
M1303
9
20
20
9
D100L
D100H
8
40
40
8
D101L
D101H
D100L
D100H
D101L
D101H
DXCHP
D100
D100
Before
execution
After
execution
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...