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

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

Advertisement

Logical Rotate Right Byte, Rotate Left Byte

L
A
EN
D
F
IN
B
D
N
EN
IN
N
S
RRB
T
L
RLB
221
222 224
Inputs/Outputs
IN
VB, IB, QB, MB, SMB, SB, LB, AC, *VD, *AC, *LD
N
VB, IB, QB, MB, SMB, SB, LB, AC, Constant, *VD, *AC, *LD
OUT
VB, IB, QB, MB, SMB, SB, LB, AC, *VD, *AC, *LD
S7-200 Programmable Controller System Manual
A5E00066097-02
The Rotate Right Byte and Rotate Left Byte
instructions rotate the input byte value (IN) right or left by
ROR_B
ENO
the shift count (N), and load the result in the output byte
(OUT). The rotate is circular.
OUT
OUT
If the shift count (N) is greater than or equal to 8, a
modulo-8 operation is performed on the shift count (N)
before the rotation is executed. This results in a shift
ROL_B
ENO
count of 0 to 7. If the shift count is 0, a rotate is not
performed. If the rotate is performed, the value of the last
OUT
OUT
bit rotated is copied to the overflow bit (SM1.1).
If the shift count is not an integer multiple of 8, 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
OUT, N
rotated is zero.
OUT, N
Rotate right byte and rotate left byte operations are
unsigned.
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
SIMATIC Instructions
Data Types
BYTE
BYTE
BYTE
9-123

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents