Mitsubishi Electronics FX Home Theater Server User Manual


 
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
y
device within the destination ran
g
e. The ran
g
e
is specified b
y
a device head address (D) and a
quantit
y
of consecutive elements (n). If the specified number of destination devices (n)
exceeds the available space at the destination location, then onl
y
the available destination
devices will be written to. Please note that double word (32 bit) operation can onl
y
be
performed b
y
FX units with ver 3.07 CPU’s or
g
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
g
le
data device to a
ran
g
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
g
e)
Data in the
desi
g
nated
devices is
exchan
g
ed
KnY, KnM, KnS, T, C, D, V, Z
Note: when usin
g
the b
y
te XCH (i.e.M8160 is
ON) D
1
and D
2
must be the same device other-
wise a pro
g
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
g
rammin
g
technique which allows it to mimic the
operation of newer applied instructions when used with older pro
g
rammin
g
tools. See pa
g
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
g
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
g
ed. Ex.
Operation 2:
(Applicable units: FX
(2C)
) This function is equivalent to FNC 147 SWAP The b
y
tes within
each word of the desi
g
nated devices D
1
are exchan
g
ed when ‘b
y
te mode fla
g
’ 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