Specifications

SIMATIC Instructions
9-117
S7-200 Programmable Controller System Manual
C79000-G7076-C233-01
Shift Right Word, Shift Left Word
The Shift Right Word and Shift Left Word instructions
shift the input word (IN) value right or left by the shift
count (N), and load the result in the output word (OUT).
The Shift instructions fill with zeros as each bit is shifted
out. If the shift count (N) is greater than or equal to 16,
the value is shifted a maximum of 16 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 word 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 VW, IW, QW, MW, SW, SMW, LW, T, C, AIW, AC, Constant, *VD,
*AC, *LD
WORD
N VB, IB, QB, MB, SB, SMB, LB, AC, Constant, *VD, *AC, *LD BYTE
OUT VW, IW, QW, MW, SW, SMW, LW, T, C, AC, *VD, *AC, *LD WORD
L
A
D
S
T
L
OUT
SHR_W
EN
IN
N
OUT
OUT
SHL_W
EN
IN
N
OUT
SRW OUT, N
SLW OUT, N
ENO
F
B
D
ENO
222 224
333
221