Specifications

7. Application Instructions
© DELTA ELECTRONICS, INC. ALL RIGHTS RESERVED
7-65
147 SWAP
S
Swap upper and
lower 8-bit
Bit device Word device
Device
Operand
X Y M S K H KnX KnY KnM KnS T C D E F
S
Ϩ Ϩ Ϩ ϨϨϨϨϨ
Note: When operand D is used with equipment F, it can only use
16-bit command. Please refer to function specification charts for
usage range of each device.
S
: the equipment for swapping upper and lower 8-bit
When being 16-bit command, swapping the content of upper and
lower 8-bit.
When being 32-bit command, swapping the content of upper and
lower 8-bit of two registers separately.
This command is usually pulse execution (SWAPP, DSWAPP).
Program Example 1:
When X0=ON, swapping the content of upper and lower 8-bit of D0.
D0SWAPP
X0
upper 8-bit
lower 8-bit
D0
Program Example 2:
When X0=ON, swapping upper 8-bit and lower 8-bit of D11 and swapping
upper 8-bit and lower 8-bit of D10.
D10DSWAP
X0
upper 8-bit
lower 8-bit
D11
D10
upper 8-bit
lower 8-bit
Footnote:
The version V4.9 and above of ES / EX / SS series support Continuous
execution command (SWAP, DSWAP).
150 MODRW
S
1
S
2
S
3
S
4
D
MODBUS data
read/write
Bit device Word device
Device
Operand
X Y M S K H KnX KnY KnM KnS T C D E F
S1
ϨϨ Ϩ
S
2
ϨϨ Ϩ
S
3
ϨϨ Ϩ
S
4
Ϩ
D
ϨϨ Ϩ
Note: usage range of S1 operand K0~K255. The limitation of S2 operand
indication content K3(H3), K6(H6), K16(H10). The usage of n:
n=K1~K16. Please refer to function specification charts for usage
range of each device.
S
1
: connection device address.
S
2
: function code.
S
3
: address
of being read or write.
S
4
: register of being read/write.
n
: length
of read/write data.