FX Series Programmable Controlers Applied Instructions 5
5-131
5.13.1 SWAP (FNC 147)
Contents:
The upper b
te and the lower b
te of the source
device are swapped.
This instruction is equivalent to operation 2 of FNC
17 XCH (see pa
e 5-21).
Points to note:
a) In sin
le word (16 bit) operation the upper and lower b
te of the source device are
exchan
ed.
b) In double word (32 bit) operation the upper and lower b
te of each or the two 16 bit devices
are exchan
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
inal value ever
other scan. The use of the pulse
modifier or an interlock pro
ram is recommended.
Mnemonic Function
Operands
Program steps
S
SWAP
FNC 147
(B
te
Swap)
The hi
h and low
b
te of the
desi
nated
devices are
exchan
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