275
FX
3G
/FX
3U
/FX
3UC
Series Programmable Controllers
Programming Manual - Basic & Applied Instruction Edition
9 Move and Compare – FNC 10 to FNC 19
9.8 FNC 17 – XCH / Exchange
1
Int
roduct
ion
2
O
ver
view
3
In
str
uc
tion
Li
st
4
D
evices
in D
etail
5
Spec
ified t
he
D
evice &
C
onst
ant
6
Bef
ore
Pr
ogr
am
m
ing
7
B
asic
In
st
ru
ct
io
n
8
FN
C
00-FN
C
09
P
rogr
am
F
low
9
FN
C
10
-FN
C
19
Mo
ve
&
Co
mp
are
10
FNC2
0-F
NC2
9
Ar
ith.
&
Logic
O
per
ation
Extension function (function compatible between the FX
2
Series and the FX
2C
Series)
When the instruction is executed while M8160 is ON, high-order 8 bits (byte) and low-order 8 bits (byte) of a
word device are exchanged each other.
Because this instruction works in the same way as SWAP (FNC147) instruction, use SWAP instruction when
programming new exchange.
In a 32-bit operation, high-order 8 bits (byte) and low-order 8 bits (byte) of each word device are exchanged
for each other.
Error
An operation error occurs in the following case. The error flag M8067 turns ON, and the error code is stored
in D8067.
• When M8160 is ON, and the device number is different between
and
M8000
FNC 17
DXCH
D 10
D 10
M8160
M8160
SWAP
X000
High-order 8 bits Low-order 8 bits
D 11
High-order 8 bits Low-order 8 bits
D 10
D
1
D
2