FC6A S
ERIES
MICROS
MART
L
ADDER
P
ROGRAMMING
M
ANUAL
FC9Y-B1726 5-17
5: M
OVE
I
NSTRUCTIONS
XCHG (Exchange)
Valid Devices
For valid device address ranges, see "Device Addresses" on page 2-1.
Special internal relays cannot be designated as D1 or D2.
Valid Data Types
Examples: XCHG
•Data Type: Word
•Data Type: Double Word
Word data: D1 ↔ D2
Double-word data: D1·D1+1 → D2, D2+1
When input is on, the 16- or 32-bit data in devices assigned by D1 and D2 are exchanged with
each other.
Device Function I Q M R T C D P Constant Repeat
D1 (Destination 1) First device address to exchange — X X — — X — — —
D2 (Destination 2) First device address to exchange — X X — — X — — —
W (word) X When a bit device such as Q (output), M (internal relay), or R (shift register) is assigned as the destination, 16
points (word data) or 32 points (double-word data) are used.
When a word device such as D (data register) is assigned as the destination, 1 point (word data) or 2 points
(double-word data) are used.
I (integer) —
D (double word) X
L (long) —
F (float) —
D21 ↔ D24
When input I0 is turned on, data of data registers D21
and D24 assigned by devices D1 and D2 are exchanged
with each other.
D22
1000
D21
D23
Before Exchange After Exchange
2000
D24
D22
2000
D21
D23
1000
D24
D31·D32 ↔ D37·D38
When input I1 is turned on, data of data registers
D31·D32 and D37·D38 assigned by devices D1 and D2
are exchanged with each other.
Before Exchange After Exchange
1234567890
D31·D32
D33·D34
D35·D36
9876543
D31·D32
D33·D34
D35·D36
9876543
D37·D38
1234567890
D37·D38