Specifications

IEC 1131-3 Instructions
10-29
S7-200 Programmable Controller System Manual
C79000-G7076-C233-01
10.8 IEC Shift and Rotate Instructions
Table 10-8 gives page references for the non-standard IEC Shift instructions.
Table 10-8 Non-Standard IEC Instructions
Description
Page
Shift Register Bit Instruction 9-123
Logical Shift Right, Logical Shift Left
The Shift Right function shifts the value specified by the
variable IN to the right for the number of locations
specified by N. The result is placed into the variable
specified by OUT. Each bit is filled with a zero when it is
shifted right.
The Shift Left function shifts the value specified by the
variable IN to the left for the number of locations
specified by N. The result is placed into the variable
specified by OUT. Each bit is filled with a zero when it is
shifted left.
Error conditions that set ENO = 0: SM4.3 (run-time),
0006 (indirect address)
Inputs/Outputs Operands Data Types
IN VB, IB, QB, MB, SB, SMB, LB, VW, IW, QW, MW, SW, SMW,
LW, T, C, AIW, VD, ID, QD, MD, SD, SMD, LD, HC, AC,
Constant, *VD, *LD, *AC
BYTE, WORD
DWORD
N VB, IB, QB, MB, SB, SMB, LB, AC, Constant, *VD, *LD, *AC BYTE
OUT VB, IB, QB, MB, SB, SMB, LB, VW, IW, QW, MW, SW, SMW,
LW,T, C, VD, ID, QD, MD, SD, SMD, LD, AC *VD, *LD, *AC
BYTE, WORD
DWORD
L
A
D
F
B
D
SHR
EN
N
IN
ENO
SHL
EN
N
IN
ENO
OUT
222 224
333
221
OUT