EasyManua.ls Logo

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

Siemens SIMATIC S7-200
606 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
SIMATIC Instructions
9-123
S7-200 Programmable Controller System Manual
A5E00066097-02
Logical Rotate Right Byte, Rotate Left Byte
The Rotate Right Byte and Rotate Left Byte
instructions rotate the input byte value (IN) right or left by
the shift count (N), and load the result in the output byte
(OUT). The rotate is circular.
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
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
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
rotated is zero.
Rotate right byte and rotate 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 VB, IB, QB, MB, SMB, SB, LB, AC, *VD, *AC, *LD BYTE
N VB, IB, QB, MB, SMB, SB, LB, AC, Constant, *VD, *AC, *LD BYTE
OUT VB, IB, QB, MB, SMB, SB, LB, AC, *VD, *AC, *LD BYTE
L
A
D
S
T
L
OUT
ROR_B
EN
IN
N
OUT
OUT
ROL_B
EN
IN
N
OUT
RRB OUT, N
RLB OUT, N
F
B
D
ENO
ENO
222 224
✓✓
221 226

Table of Contents

Other manuals for Siemens SIMATIC S7-200

Related product manuals