Swap Bytes; Move And Swap Examples; Example Of Move And Swap Instructions For Simatic Lad, Stl, And Fbd - Siemens SIMATIC S7-200 System Manual

Hide thumbs Also See for SIMATIC S7-200:
Table of Contents

Advertisement

Swap Bytes

L
A
EN
D
F
IN
B
D
S
T
SWAP
L
221
222 224
Inputs/Outputs
IN
VW, IW, QW, MW, SW, SMW, LW, T, C, AC, *VD, *AC, *LD

Move and Swap Examples

I2.1
I2.1
VB50
Figure 9-30
S7-200 Programmable Controller System Manual
A5E00066097-02
The Swap Bytes instruction exchanges the most
significant byte with the least significant byte of the word
SWAP
ENO
(IN).
Error conditions that set ENO = 0: SM4.3 (run-time),
0006 (indirect address)
IN
226
Operands
LAD
MOV_B
EN
ENO
VB50
IN
OUT
AC0
SWAP
EN
ENO
AC0
IN
MOV_B
EN
ENO
IN
OUT AC0
AC0 IN
Move
VB50
C3
move
C3
AC0

Example of Move and Swap Instructions for SIMATIC LAD, STL, and FBD

LD
I2.1
MOVB
VB50, AC0
SWAP
AC0
FBD
SWAP
EN
ENO
Application
Swap
AC0
D6 C3
swap
C3 D6
AC0
SIMATIC Instructions
Data Types
WORD
STL
9-105

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents