Example Of Shift And Rotate 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

SIMATIC Instructions
Shift and Rotate Examples
I4.0
AC0
VW200
AC0
AC0
After second rotate
AC0
Zero Memory Bit (SM1.0)
Overflow Memory Bit (SM1.1)
Figure 9-39
9-126
LAD
ROR_W
EN
ENO
IN
2
AC0
N
OUT
SHL_W
I4.0
EN
ENO
IN
OUT
VW200
3
N
Rotate
Before rotate
Overflow
0100 0000 0000 0001
x
After first rotate
Overflow
1010 0000 0000 0000
1
Overflow
0101 0000 0000 0000
0
= 0
= 0

Example of Shift and Rotate Instructions for SIMATIC LAD, STL, and FBD

LD
I4.0
RRW
AC0, 2
SLW
VW200, 3
ROR_W
EN
ENO
IN
OUT
AC0
AC0
VW200
2
N
Application
Shift
Before shift
VW200
1110 0010 1010 1101
After first shift
VW200
1100 0101 0101 1010
After second shift
VW200
1000 1010 1011 0100
After third shift
VW200
0001 0101 0110 1000
Zero Memory Bit (SM1.0)
Overflow Memory Bit (SM1.1) =
S7-200 Programmable Controller System Manual
STL
FBD
SHL_W
EN
ENO
IN
OUT
VW200
3
N
Overflow
x
Overflow
1
Overflow
1
Overflow
1
=
0
1
A5E00066097-02

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents