Siemens Simatic S7-200 System Manual page 269

Programmable controller
Hide thumbs Also See for Simatic S7-200:
Table of Contents

Advertisement

Shift Right Double Word, Shift Left Double Word
L
A
SHR_DW
EN
D
IN
N
SHL_DW
EN
IN
N
S
SRD
T
L
SLD
212
214
Rotate Right Byte, Rotate Left Byte
L
A
EN
D
IN
N
EN
IN
N
S
RRB
T
L
RLB
212
214
S7-200 Programmable Controller System Manual
C79000-G7076-C230-02
The Shift Right Double Word and Shift Left Double Word
instructions shift the input double word value right or left by the
shift count (N), and load the result in the output double word
(OUT).
OUT
Operands:
OUT
OUT
OUT
The shift instructions fill with zeros as each bit is shifted out.
OUT, N
If the shift count (N) is greater than or equal to 32, the value is
shifted a maximum of 32 times. If the shift count is greater than
OUT, N
0, the overflow memory bit takes on the value of the last bit
shifted out.
215
216
Shift right and shift left double word operations are unsigned.
Note: When programming in LAD, if you specify IN to be the
same as OUT, you can reduce the amount of memory required.
These instructions affect the following Special Memory bits:
SM1.0 (zero); SM1.1 (overflow)
The Rotate Right Byte and Rotate Left Byte instructions rotate
the input byte value right or left by the shift count (N), and load
ROR_B
the result in the output byte (OUT).
OUT
Operands:
OUT
ROL_B
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 rotate is
executed. This results in a shift count of 0 to 7. If the shift count
OUT, N
is 0, a rotate is not performed. If the rotate is performed, the
OUT, N
value of the last bit rotated is copied to the overflow bit.
Rotate right and rotate left byte operations are unsigned.
215
216
Note: When programming in LAD, if you specify IN to be the
same as OUT, you can reduce the amount of memory required.
These instructions affect the following Special Memory bits:
SM1.0 (zero); SM1.1 (overflow)
IN:
VD, ID, QD, MD, SMD, AC, HC,
Constant, *VD, *AC, SD
N:
VB, IB, QB, MB, SMB, AC, Constant,
*VD, *AC, SB
OUT:
VD, ID, QD, MD, SMD, AC, *VD, *AC,
SD
IN:
VB, IB, QB, MB, SMB, SB, AC, *VD,
*AC, SB
N:
VB, IB, QB, MB, SMB, SB, AC,
Constant, *VD, *AC, SB
OUT:
VB, IB, QB, MB, SMB, SB, AC, *VD,
*AC, SB
Instruction Set
10-81

Advertisement

Table of Contents
loading

Table of Contents