Mitsubishi Electronics FX2C Home Theater Server User Manual


 
FX Series Programmable Controlers Applied Instructions 5
5-131
5.13.1 SWAP (FNC 147)
Contents:
The upper b
y
te and the lower b
y
te of the source
device are swapped.
This instruction is equivalent to operation 2 of FNC
17 XCH (see pa
g
e 5-21).
Points to note:
a) In sin
g
le word (16 bit) operation the upper and lower b
y
te of the source device are
exchan
g
ed.
b) In double word (32 bit) operation the upper and lower b
y
te of each or the two 16 bit devices
are exchan
g
ed.
Result of DSWAP(P) D10:
c) If the operation of this instruction is allowed to execute each scan, then the value of the
source device will swap back to its ori
g
inal value ever
y
other scan. The use of the pulse
modifier or an interlock pro
g
ram is recommended.
Mnemonic Function
Operands
Program steps
S
SWAP
FNC 147
(B
y
te
Swap)
The hi
g
h and low
b
y
te of the
desi
g
nated
devices are
exchan
g
ed
KnY, KnM, KnS, T, C, D, V, Z SWAP,SWAPP
: 5 steps
DSWAP,
DSWAPP:
9 steps
X34
D10
SWAPP
D10
Byte 1
Values are in Hex for clarity
Byte 2
D11
Byte 1
Byte 2
Before DSWAP After DSWAP
1F
H
8B
H
C4
H
35
H
1F
H
8B
H
C4
H
35
H