Specifications
SIMATIC Instructions
9-102
S7-200 Programmable Controller System Manual
C79000-G7076-C233-01
Swap Bytes
The Swap Bytes instruction exchanges the most
significant byte with the least significant byte of the word
(IN).
Error conditions that set ENO = 0: SM4.3 (run-time),
0006 (indirect address)
Inputs/Outputs Operands Data Types
IN VW, IW, QW, MW, SW, SMW, LW, T, C, AC, *VD, *AC, *LD WORD
Move and Swap Examples
LAD STL
LD I2.1
MOVB VB50, AC0
SWAP AC0
I2.1
MOV_B
EN
OUT AC0VB50 IN
SWAP
EN
AC0 IN
Application
AC0
AC0
swap
C3 D6
C3VB50
AC0
move
C3
D6 C3
Move Swap
FBD
ENO
ENO
MOV_B
EN
OUT
AC0
VB50
IN
ENO
SWAP
EN
AC0
IN
ENOI2.1
Figure 9-30 Example of Move and Swap Instructions for LAD, STL, and FBD
L
A
D
S
T
L
SWAP IN
SWAP
EN
IN
F
B
D
ENO
222 224
333
221