EasyManua.ls Logo

Mitsubishi Electric MELSEC iQ-R Series - Exchanging the Upper and Lower Bytes of 16-Bit Binary Data

Mitsubishi Electric MELSEC iQ-R Series
2110 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
6 BASIC INSTRUCTIONS
6.7 Data Transfer Instructions
521
6
Exchanging the upper and lower bytes of 16-bit binary data
SWAP(P)
These instructions exchange upper and lower 8-bit data in the specified device.
Execution condition
Setting data
Description, range, data type
Applicable devices
Processing details
The device specified by (d) exchanges its upper and lower 8-bit data.
Operation error
There is no operation error.
Ladder ST
ENO:=SWAP(EN,d);
ENO:=SWAPP(EN,d);
FBD/LD
Instruction Execution condition
SWAP
SWAPP
Operand Description Range Data type Data type (label)
(d) Start device for storing the data whose upper and lower 8-
bit data is exchanged
16-bit signed binary ANY16
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) 
RnCPU
RnENCPU
RnSFCPU RnSFCPURnPCPURnPCPU
(Standard) (Safety)
(Redundant)
(Process)
(d)
EN ENO
d
(d)
(d)
b15   b4b7b8b11b12 b0b3
b15   b4b7b8b11b12 b0b3
0101010110101010
0001010111101010

Table of Contents

Other manuals for Mitsubishi Electric MELSEC iQ-R Series

Related product manuals