Siemens Simatic S7-200 System Manual page 271

Programmable controller
Hide thumbs Also See for Simatic S7-200:
Table of Contents

Advertisement

Shift and Rotate Examples
I4.0
AC0
2
VW200
3
AC0
0100 0000 0000 0001
After First Rotate
AC0
1010 0000 0000 0000
After Second Rotate
AC0
0101 0000 0000 0000
Zero Memory Bit (SM1.0)
Overflow Memory Bit (SM1.1)
Figure 10-33
S7-200 Programmable Controller System Manual
C79000-G7076-C230-02
LAD
ROR_W
EN
IN
AC0
N
OUT
SHL_W
EN
IN
N
OUT
VW200
Application
Rotate
Before Rotate
Overflow
x
Overflow
1
Overflow
0
= 0
= 0
Example of Shift and Rotate Instructions for LAD and STL
STL
LD
I4.0
RRW
AC0, 2
SLW
VW200, 3
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) =
Instruction Set
Overflow
x
Overflow
1
Overflow
1
Overflow
1
=
0
1
10-83

Advertisement

Table of Contents
loading

Table of Contents