5
Categories and Use of Basic Application Instructions
DVP-PM Operation Instruction
5-132
API Mnemonic
Operands
Function
147
D SWAP P
Byte swap
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
*
*
*
*
*
*
*
*
*
SWAP, SWAPP: 3 steps
DSWAP, DSWAPP: 5 steps
Operands:
S
: Device for byte swap.
Explanations:
1.
For 16-bit instruction, high byte and low byte of the register will be swapped.
2.
For 32-bit instruction, byte swap is conducted on the 2 registers separately.
3.
When SWAP is used as 16-bit instruction, Z device cannot be adopted; when SWAP 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).
5.
This instruction adopts pulse execution instructions (SWAPP, DSWAPP)
Program Example 1:
When X0 = ON, high byte and low byte of D0 will be swapped.
D0
SWAPP
X0
D0
High Byte
Low Byte
Program Example 2:
When X0 = ON, high byte and low byte of D11 will be swapped as well as the high byte and low byte of D10.
D10
DSWAP
X0
D11
High Byte
Low Byte
D 0
1
High Byte
Low Byte
Содержание DVP-10PM
Страница 1: ......
Страница 45: ...2 Hardware Specifications and Wiring DVP PM Application Manual 2 30 MEMO...
Страница 125: ...3 Functions of Devices in DVP PM DVP PM Application Manual 3 80 MEMO...
Страница 341: ...8 Application Examples DVP PM Application Manual 8 2 Trajectory 3 Trajectory 4...
Страница 427: ...9 Electrical CAM DVP PM Application Manual 9 74...
Страница 437: ...10 Encrypting User Program DVP PM Application Manual 10 10 MEMO...
Страница 458: ...11 G code Application DVP PM Application Manual 11 21 B O100 main program...
Страница 561: ...14 Appendix DVP PM Application Manual 14 4 MEMO...