522
6 BASIC INSTRUCTIONS
6.7 Data Transfer Instructions
Exchanging the upper and lower bytes of 32-bit binary data
DSWAP(P)
These instructions exchange upper and lower 8-bit data in the specified device.
■Execution condition
■Description, range, data type
■Applicable devices
*1 FX and FY cannot be used.
• The device specified by (d) exchanges its upper and lower 8-bit data.
There is no operation error.
• The RnCPU and RnENCPU with firmware version "17" or later support this instruction. (Use an engineering tool with version "1.020W" or later.)
Ladder ST
ENO:=DSWAP(EN,d);
ENO:=DSWAPP(EN,d);
FBD/LD
Instruction Execution condition
DSWAP
DSWAPP
Operand Description Range Data type Data type (label)
(d) Start device for storing the data whose upper and lower 8-
bit data is exchanged
32-bit signed binary ANY32
EN Execution condition Bit BOOL
ENO Execution result Bit BOOL
Operand Bit Word Double word Indirect
specification
Constant Others
X, Y, M, L,
SM, F, B, SB,
FX, FY
J\ T, ST, C, D, W,
SD, SW, FD, R,
ZR, RD
U\G, J\,
U3E\(H)G
Z LT, LST,
LC
LZ K, H E $
(d)
*1
RnCPU
RnENCPU
RnSFCPU RnSFCPURnPCPURnPCPU
(Standard) (Safety)
(Redundant)
(Process)
(d)+1
(d)+1
∙∙∙∙∙∙ ∙∙∙∙∙∙
∙∙∙∙∙∙ ∙∙∙∙∙∙
0101010110101010
0001010111101010
(d)
(d)
∙∙∙∙∙∙ ∙∙∙∙∙∙
∙∙∙∙∙∙ ∙∙∙∙∙∙
0101010110101010
0001010111101010
b15 b4b7b8b11b12 b0b3
b15 b4b7b8b11b12 b0b3
b15 b4b7b8b11b12 b0b3
b15 b4b7b8b11b12 b0b3