Справочник Пользователя для Mitsubishi Electronics FX2NC

Скачать
Страница из 382
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
every device within the destination range. The range
is specified by a device head address (D) and a
quantity of consecutive elements (n). If the specified number of destination devices (n)
exceeds the available space at the destination location, then only the available destination
devices will be written to. Please note that double word (32 bit) operation can only be
performed by FX units with ver 3.07 CPU’s or greater and FX
2C 
units.
5.2.8
XCH (FNC 17)
Mnemonic
Function 
Operands
Program steps
S
D
n
FMOV
FNC 16
(Fill move)
Copies a single
data device to a
range 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
(Exchange)
Data in the 
designated
devices is 
exchanged
KnY, KnM, KnS, T, C, D, V, Z
Note: when using the byte XCH (i.e.M8160 is 
ON) D
1
 and D
2
 must be the same device other-
wise a program error will occur and
M8067 will be turned ON
XCH,XCHP:
5 steps
DXCH, DXCHP:
9 steps
FX
0(S)
FX
0N
FX FX
(2C)
FX
2N(C)
FX
(2C)
FX
FX
2N(C)
FX
0N
FX
0(s)
PULSE-P
FX
(2C)
FX
FX
2N(C)
FX
0N
FX
0(s)
16 BIT OPERATION
FX
FX
0N
FX
0(s)
FX
(2C)
FX
2N(C)
32 BIT OPERATION
X0
FMOV
K 0
D 0
[ S ]
[ D ]
K 10
n
Note: This instruction has a special programming technique which allows it to mimic the
operation of newer applied instructions when used with older programming tools. See page 1-
5 for more details.
FX
0(S)
FX
0N
FX FX
(2C)
FX
2N(C)
X0
XCH(P) D 1
D 17
[ D1 ] [ D2 ]
X20
DXCH(P)
D 10 D 10
[ D1 ] [ D2 ]
M8160
M8000
M8160
Data register
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 exchanged. Ex.
Operation 2: (Applicable units: FX
(2C)
) This function is equivalent to FNC 147 SWAP The bytes within
each word of the designated devices D
are exchanged when ‘byte mode flag’ 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
FX
(2C)
FX
FX
2N(C)
FX
0N
FX
0(s)
PULSE-P
FX
(2C)
FX
FX
2N(C)
FX
0N
FX
0(s)
16 BIT OPERATION
FX
FX
0N
FX
0(s)
FX
(2C)
FX
2N(C)
32 BIT OPERATION