Siemens Simatic S7-200 System Manual page 270

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

Advertisement

Instruction Set
Rotate Right Word, Rotate Left Word
L
A
EN
D
IN
N
EN
IN
N
S
RRW
T
L
RLW
212
214
Rotate Right Double Word, Rotate Left Double Word
L
A
ROR_DW
EN
D
IN
N
ROL_DW
EN
IN
N
S
RRD
T
L
RLD
212
214
10-82
The Rotate Right Word and Rotate Left Word instructions
rotate the input word value right or left by the shift count (N), and
ROR_W
load the result in the output word (OUT).
OUT
Operands:
OUT
ROL_W
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 count of 0 to 15. If the shift
OUT, N
count is 0, a rotation is not performed. If the rotation is
OUT, N
performed, the value of the last bit rotated is copied to the
overflow bit.
Rotate Right and Rotate Left Word 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)
The Rotate Right Double Word and Rotate Left Double Word
instructions rotate 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
If the shift count (N) is greater than or equal to 32, a modulo-32
operation is performed on the shift count (N) before the rotation
is executed. This results in a shift count of 0 to 31. If the shift
OUT, N
count is 0, a rotation is not performed. If the rotation is
OUT, N
performed, the value of the last bit rotated is copied to the
overflow bit.
Rotate Right and Rotate Left Double-Word operations are
215
216
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)
IN:
VW, T, C, IW, MW, SMW, AC, QW,
AIW, Constant, *VD, *AC, SW
N:
VB, IB, QB, MB, SMB, AC, Constant,
*VD, *AC, SB
OUT:
VW, T, C, IW, QW, MW, SMW, AC,
*VD, *AC, SW
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
S7-200 Programmable Controller System Manual
C79000-G7076-C230-02

Advertisement

Table of Contents
loading

Table of Contents