Upper And Lower Byte Exchanges (Swap, Swapp) - Mitsubishi MELSEC QCPU Programming Manual

Programmable logic controller
Table of Contents

Advertisement

6 BASIC INSTRUCTIONS

6.4.9 Upper and lower byte exchanges (SWAP, SWAPP)

Internal Devices
Set
(System, User)
Data
Bit
Word
D
[Instruction Symbol] [Execution Condition]
SWAP
SWAPP
[Set Data]
Set Data
D
[Functions]
(1) Exchanges the higher and lower 8 bits of the device designated by
[Operation Errors]
(1) There are no operation errors associated with 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]
6 - 95
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
MELSECNET/10(H)
File
Direct J \
Register
Bit
Command
Command
Head number of device where data is stored
b15
b12
b11
0
1
0 1
0 1 0 1
D
b15
b12
b11
1
0
1
0
1
D
b15
b12
b11
R10
0
0
0 0
b15
b12
b11
R10
1
1
1
1
QCPU
PLC CPU
Basic
High Performance
Usable Devices
Special
Function
Module
Word
U \G
Meaning
b8
b7
b4
b3
b0
1 0 1 0
1 0 1 0
b8
b7
b4
b3
b0
0
1
0
0
1
0
1
0
1
0
1
[List Mode]
Instruction
Steps
b8
b7
b4
b3
b0
0 0 0 0
1 1 1 1
1 1 1 1
b8
b7
b4
b3
b0
1
1
1
1
0
0
0
0
0
0
0
0
MELSEC-Q/QnA
QnA
Process CPU
Index
Constant
Register
Other
K, H
Zn
SWAP
D
SWAPP
D
Data Type
BIN 16 bits
.
D
Device
6 - 95
Q4AR

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec qnacpuMelsec q modeMelsec q series

Table of Contents