Chapter 6 Instruction Details
XBC E-Type Main Unit
6-157
Ver. 1
6.27 Exchange Instruction
6.27.1 XCHG, XCHGP, DXCHG, DXCHGP
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)
XCHG(P)
DXCHG(P)
D1 O O O - O O O - O -
-
- O O O O
2~4
-
-
-
D2 O O O - O O O - O -
-
- O O O O
Operand
Description
Data Type
D1
Device Number of data to exchange
WORD/DWORD
D2
Device Number of data to exchange
WORD/DWORD
1) XCHG (Exchange)
(1) Exchanges word data of specified D1 and D2.
1 word
b15
b0
D1
D2
2) DXCHG (Double Exchange)
(1) Exchanges word data of specified D1+1,D1 and D2+1,D2.
3) Program Example
(1) For P1000=’h1234’ and P1100=’5678’, Input Signal P00000 is changed from Off to On status, ‘5678’ is saved
in P10000 and then ‘h1234’ is saved in P1100.
XCHG P1000 P1100
P00000
(D)XCHG
(D)XCHGP
D
1
means (D)XCHG
P
D
1
D
2
D
2
Summary of Contents for XBC-DN10E
Page 1: ......
Page 10: ...Table of Contents Table of Contents 6 10 10 CLEAR ALL PLC 29...