![](https://pdfstore-manualsonline.prod.a.ki/pdfasset/3/8d/38d56254-54fe-46e3-85ae-d3f5260e1091/38d56254-54fe-46e3-85ae-d3f5260e1091-bg93.png)
FX Series Programmable Controlers Applied Instructions 5
5-21
5.2.7 FMOV (FNC 16)
Operation:
The data stored in the source device (S) is copied to
ever
device within the destination ran
e. The ran
e
is specified b
a device head address (D) and a
quantit
of consecutive elements (n). If the specified number of destination devices (n)
exceeds the available space at the destination location, then onl
the available destination
devices will be written to. Please note that double word (32 bit) operation can onl
be
performed b
FX units with ver 3.07 CPU’s or
reater and FX
2C
units.
5.2.8 XCH (FNC 17)
Mnemonic Function
Operands
Program steps
SD n
FMOV
FNC 16
(Fill move)
Copies a sin
le
data device to a
ran
e of
destination
devices
KnX, KnY,
KnM, KnS,
T, C, D, V, Z
KnY, KnM,
KnS,
T, C, D, V, Z
K, H
Note:n
≤
512
FMOV,FMOVP:7
steps
DFMOV,DFMOVP
:
13 steps
Mnemonic Function
Operands
Program steps
D
1
D
2
XCH
FNC 17
(Exchan
e)
Data in the
desi
nated
devices is
exchan
ed
KnY, KnM, KnS, T, C, D, V, Z
Note: when usin
the b
te XCH (i.e.M8160 is
ON) D
1
and D
2
must be the same device other-
wise a pro
ram error will occur and
M8067 will be turned ON
XCH,XCHP:
5 steps
DXCH, DXCHP:
9 steps
X0
FMOV K 0 D 0
[ S ] [ D ]
K 10
n
Note: This instruction has a special pro
rammin
technique which allows it to mimic the
operation of newer applied instructions when used with older pro
rammin
tools. See pa
e 1-
5 for more details.
X0
XCH(P) D 1 D 17
[ D1 ] [ D2 ]
X20
DXCH(P)
D 10 D 10
[ D1 ] [ D2 ]
M8160
M8000
M8160
Data re
ister Before XCH After XCH
D1
D17
20
530
530
20
Operation 1:
(Applicable units: FX and FX
2C
).The contents of the two destination devices D
1
and D
2
are swapped, i.e. the complete word devices are exchan
ed. Ex.
Operation 2:
(Applicable units: FX
(2C)
) This function is equivalent to FNC 147 SWAP The b
tes within
each word of the desi
nated devices D
1
are exchan
ed when ‘b
te mode fla
’ M8160 is ON. Please note
that the mode will remain active until it is reset,
i.e. M8160 is forced OFF. Ex.
D10
Byte 1 1F
H
8B
H
Byte 1
D11
Byte 1
Byte 1
8B
H
C4
H
35
H
1F
H
35
H
C4
H
Values are in Hex for clarity Before DXCH After DXCH