Chapter 6 Instruction Details
XBC E-Type Main Unit
6-160
Ver. 1
6.27.4 GSWAP, GSWAPP
Instruction
Area Available
Step
Flag
P M K F L T C S Z D.x R.x
Co
nst.
U N D R
Error
(F110)
Zero
(F111)
Carry
(F112)
GSWAP(P)
D O O O - O -
-
-
-
-
-
- O O O O
2~4
O
-
-
N O O O - O -
-
- O -
- O O O O O
Operand
Description
Data Type
D
First Device Number of data to exchange byte upper and lower
WORD
N
Number of word data to exchange byte upper and lower
WORD
[Flag Set]
Flag
Description
Device
Number
Error
If N’s range exceeds the specified area.
F110
1) GSWAP (Group SWAP)
(1) Exchanges byte upper and lower in N words.
2) Program Example
(1) If Input signal P00000 is changed from Off to On, 3-word data of P1000~P1002’s upper byte and lower byte
is exchanged.
0
Upper byte
0
1
0
0
0
0
0
1
0
0
0
1
0
1
0
Lower byte
0
0
1
0
0
0
0
0
1
0
0
0
1
0
1
0
0
0
1
0
0
0
0
0
1
0
0
0
1
0
1
0
Upper byte
P1000
Lower byte
P1001
P1002
0
0
0
0
1
0
1
0
0
0
0
0
1
0
1
0
0
0
0
0
1
0
1
0
0
1
0
0
0
0
0
1
0
1
0
0
0
0
0
1
0
1
0
0
0
0
0
1
GSWAP P1000 3
P00000
GSWAP
GSWAPP
D
means
GSWAP
P D
N
N
1
0
1
1
0
1
1
0
0
1
1
0
1
0
1
1
1
0
1
1
0
1
1
0
0
1
1
0
1
0
1
1
1
0
1
1
0
1
1
0
0
1
1
0
1
0
1
1
Byte exchanged
1byte
1byte
Summary of Contents for XBC-DN10E
Page 1: ......
Page 10: ...Table of Contents Table of Contents 6 10 10 CLEAR ALL PLC 29...