Delta DVP-ES2 User Manual
Page 444
D V P - E S 2 / E X 2 / S S 2 / S A2 / S X 2 / S E O p e r a t i o n M a n u a l - P r o g r a m m i n g
3-328
API Mnemonic
Operands
Function
147
D SWAP P
Byte swap
Controllers
ES2/EX2 SS2 SA2
SE
SX2
Bit Devices
Word devices
Program Steps
Type
OP
X Y M S
K H
KnX
KnY KnM KnS T C D E F
S
*
*
*
*
*
*
*
*
SWAP, SWAPP: 3 steps
DSWAP, DSWAPP: 5
steps
PULSE 16-bit 32-bit
ES2/EX2 SS2
SA2
SE
SX2 ES2/EX2 SS2
SA2
SE
SX2 ES2/EX2 SS2
SA2
SE
SX2
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.
This instruction adopts pulse execution instructions (SWAPP, DSWAPP)
4. If
operand
D uses device F, only 16-bit instruction is available
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
DS WAP
X0
D11
High Byte
Low Byte
D 0
1
High By te
Low Byte