Specifications

SIMATIC Instructions
9-116
S7-200 Programmable Controller System Manual
C79000-G7076-C233-01
9.13 SIMATIC Shift and Rotate Instructions
Shift Right Byte, Shift Left Byte
The Shift Right Byte and Shift Left Byte instructions
shift the input byte (IN) value right or left by the shift
count (N), and load the result in the output byte
(OUT).
The Shift instructions fill with zeros as each bit is shifted
out. If the shift count (N) is greater than or equal to 8, the
value is shifted a maximum of 8 times.
If the shift count is greater than 0, the overflow memory
bit (SM1.1) takes on the value of the last bit shifted out.
The zero memory bit (SM1.0) is set if the result of the
shift operation is zero.
Shift right and shift left byte operations are unsigned.
Error conditions that set ENO = 0: SM4.3 (run-time),
0006 (indirect address)
These instructions affect the following Special Memory
bits: SM1.0 (zero); SM1.1 (overflow)
Inputs/Outputs Operands Data Types
IN, OUT VB, IB, QB, MB, SB, SMB, LB, AC, *VD, *AC, *LD BYTE
N VB, IB, QB, MB, SB, SMB, LB, AC, Constant, *VD, *AC, *LD BYTE
L
A
D
S
T
L
OUT
SHR_B
EN
IN
N
OUT
OUT
SHL_B
EN
IN
N
OUT
SRB OUT, N
SLB OUT, N
ENO
F
B
D
ENO
222 224
33
3
221