Specifications

SIMATIC Instructions
9-120
S7-200 Programmable Controller System Manual
C79000-G7076-C233-01
Rotate Right Word, Rotate Left Word
The Rotate Right Word and Rotate Left Word
instructions rotate the input word value (IN) right or left
by the shift count (N), and load the result in the output
word (OUT).
If the shift count (N) is greater than or equal to 16, a
modulo-16 operation is performed on the shift count (N)
before the rotation is executed. This results in a shift
count of 0 to 15. If the shift count is 0, a rotation is not
performed. If the rotation is performed, the value of the
last bit rotated is copied to the overflow bit (SM1.1).
If the shift count is not an integer multiple of 16, the last
bit rotated out is copied to the overflow memory bit
(SM1.1). The zero memory bit (SM1.0) is set when the
value to be rotated is zero.
Rotate right word and rotate 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, T, C, IW, MW, SMW, AC, QW, LW, AIW, Constant, *VD, *AC,
SW, *LD
WORD
N VB, IB, QB, MB, SMB, LB, AC, Constant, *VD, *AC, SB, *LD BYTE
OUT VW, T, C, IW, QW, MW, SMW, LW, AC, *VD, *AC, SW, *LD WORD
L
A
D
S
T
L
OUT
ROR_W
EN
IN
N
OUT
OUT
ROL_W
EN
IN
N
OUT
RRW OUT, N
RLW OUT, N
F
B
D
ENO
ENO
222 224
333
221