273
SWAP, SWAPP
1
2
3
4
6
7
8
6.4
D
ata T
ransfer I
nstr
uctions
6.4.11
SW
AP, SWAPP
: Head number of the devices where the data is stored (BIN 16 bits)
Function
(1) Exchanges the higher and lower 8 bits of the device designated by .
Operation Error
(1) There is no operation error in the SWAP(P) instruction.
Program Example
(1) The following program exchanges the higher 8 bits and lower 8 bits of R10 when X10 goes ON.
[Ladder Mode]
[List Mode]
[Operation]
SWAP, SWAPP
Upper and lower byte exchanges
6.4.11
SWAP, SWAPP
Setting
Data
Internal Devices
R, ZR
J \
U \G
Zn
Constants
Other
Bit
Word
Bit
Word
––
Basic
Process
High
performance
Redundant Universal
LCPU
Command
Command
S
W
AP
S
W
APP
D
D
SWAP
SWAPP
D
D
D
0 1 0 1
1 0 1 0
0 1
1
0
b11
b8
b15
b12
1 0 1 0
b7
b4
b0
b3
1
1
1
1
1
1
b11
b8
b15
b12
1
1
b7
b4
b0
b3
0
0
0
0
0
0
0
0
D
D
Step
Instruction
Device
0 0 0 0
1 1 1 1
0 0
0
0
b11
b8
b15
b12
1 1 1 1
b7
b4
b0
b3
1
1
0
0
1
1
b11
b8
b15
b12
0
0
b7
b4
b0
b3
1
1
0
0
1
1
0
0
R10
R10