Chapter 6 Instruction Details
XBC E-Type Main Unit
6-158
Ver. 1
6.27.2 GXCHG, GXCHGP
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)
GXCHG(P)
D1 O O O - O O O - O -
-
- O O O O
4~6
O
-
-
D2 O O O - O O O - O -
-
- O O O O
N O O O - O O O - O -
- O O O O O
Operand
Description
Data Type
D1
Start address of area to exchange data with D2 in word unit
WORD
D2
Start address of area to exchange data with D1 in word unit
WORD
N
Number of data to exchange in word unit
WORD
[Flag Set]
Flag
Description
Device
Number
Error
If N value exceeds applicable device’s area.
F110
1) GXCHG
(1) Exchanges N word data starting from D1 and D2.
(2) Exchanges N data while increasing based on the value of D1 and D2. If D1 and D2 are overlapped,
unintentional result will be caused.
2) Program Example
(1) Input Signal P00000 is changed from Off to On status, it exchanges 3-word data of P0010~P0012 and
P0020~P0022.
GXCHG P0010 P0020 3
P00000
GXCHG
P D
1
D
2
GXCHGP
D
1
D
2
means
N
N
h0001
h0002
h0003
h0004
h0005
h0006
h0100
h0101
h0102
h0103
h0104
h0105
D1
D10
N
h0001
h0002
h0003
h0100
h0101
h0102
P10
P20
h0100
h0101
h0102
h0001
h0002
h0003
P10
P20
After exchange
Summary of Contents for XBC-DN10E
Page 1: ......
Page 10: ...Table of Contents Table of Contents 6 10 10 CLEAR ALL PLC 29...