Logical Rotate Right Word, Rotate Left Word - Siemens SIMATIC S7-200 System Manual

Hide thumbs Also See for SIMATIC S7-200:
Table of Contents

Advertisement

SIMATIC Instructions

Logical Rotate Right Word, Rotate Left Word

L
ROR_W
A
EN
D
F
IN
B
D
N
EN
IN
N
S
RRW
T
L
RLW
221
222 224
Inputs/Outputs
IN
VW, T, C, IW, MW, SW, SMW, AC, QW, LW, AIW, Constant, *VD,
*AC, *LD
N
VB, IB, QB, MB, SMB, LB, AC, Constant, *VD, *AC, SB, *LD
OUT
VW, T, C, IW, QW, MW, SW, SMW, LW, AC, *VD, *AC, *LD
9-124
The Rotate Right Word and Rotate Left Word
instructions rotate the input word value (IN) right or left
ENO
by the shift count (N), and load the result in the output
word (OUT). The rotate is circular.
OUT
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
ROL_W
ENO
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
OUT
OUT
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
OUT, N
value to be rotated is zero.
OUT, N
Note that the sign bit is shifted when you are using
signed data types.
Error conditions that set ENO = 0: SM4.3 (run-time),
226
0006 (indirect address)
These instructions affect the following Special Memory
bits: SM1.0 (zero); SM1.1 (overflow)
Operands
S7-200 Programmable Controller System Manual
Data Types
WORD
BYTE
WORD
A5E00066097-02

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents