6-125
XCH(P),DXCH(P)
1
2
3
4
4
6
7
8
6.4 Data Transfer Instructions
6.4.9 16-bit and 32-bit data exchanges (XCH(P),DXCH(P))
Operation Error
(1) There are no errors associated with the XCH (P) and DXCH (P) instruction.
Program Example
(1) The following program exchanges the present value of T0 with the contents of D0 when X8
goes ON.
[Ladder Mode] [List Mode]
(2) The following program exchanges the contents of D0 with the data from M16 to M31 when
X10 goes ON.
[Ladder Mode] [List Mode]
(3) The following program exchanges the contents of D0 and D1 with the data at M16 to M47
when X10 goes ON.
[Ladder Mode] [List Mode]
(4) The following program exchanges the contents of D0 and D1 with those of D9 and D10
when M0 goes ON.
[Ladder Mode] [List Mode]
Step
Instruction
Device
Step
Instruction
Device
Step
Instruction
Device
Step
Instruction
Device