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
Need help?

Need help?

Do you have a question about the SIMATIC S7-200 and is the answer not in the manual?

Questions and answers

subrahmanya
April 4, 2025

settings get erased

1 comments:
Mr. Anderson
April 4, 2025

Settings on the Siemens SIMATIC S7-200 may get erased if the memory areas are not configured to be retentive. Only the first 14 bytes of M memory (MB0 to MB13) can be configured as retentive, which means they are saved to EEPROM when the CPU loses power. If memory is not set as retentive, its contents are lost during a power cycle. Also, changes made in RUN mode may not take effect permanently until a power cycle or STOP-to-RUN transition occurs.

This answer is automatically generated

Table of Contents

Save PDF