Shift Right Word, Shift Left Word - Siemens SIMATIC S7-200 System Manual

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

Advertisement

Shift Right Word, Shift Left Word

L
A
EN
D
F
IN
B
D
N
EN
IN
N
S
SRW
T
L
SLW
221
222 224
Inputs/Outputs
IN
VW, IW, QW, MW, SW, SMW, LW, T, C, AIW, AC, Constant, *VD,
*AC, *LD
N
VB, IB, QB, MB, SB, SMB, LB, AC, Constant, *VD, *AC, *LD
OUT
VW, IW, QW, MW, SW, SMW, LW, T, C, AC, *VD, *AC, *LD
S7-200 Programmable Controller System Manual
A5E00066097-02
The Shift Right Word and Shift Left Word instructions
shift the input word (IN) value right or left by the shift
SHR_W
count (N), and load the result in the output word (OUT).
ENO
The Shift instructions fill with zeros as each bit is shifted
OUT
OUT
out. If the shift count (N) is greater than or equal to 16,
the value is shifted a maximum of 16 times. If the shift
count is greater than 0, the overflow memory bit (SM1.1)
SHL_W
takes on the value of the last bit shifted out. The zero
ENO
memory bit (SM1.0) is set if the result of the shift
OUT
OUT
operation is zero.
Note that the sign bit is shifted when you are using
signed data types.
Error conditions that set ENO = 0: SM4.3 (run-time),
OUT, N
0006 (indirect address)
OUT, N
These instructions affect the following Special Memory
bits: SM1.0 (zero); SM1.1 (overflow)
226
Operands
SIMATIC Instructions
Data Types
WORD
BYTE
WORD
9-121

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents