EasyManuals Logo

Siemens Simatic S7 Series System Manual

Siemens Simatic S7 Series
726 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #318 background imageLoading...
Page #318 background image
Program instructions
7.14 Shift and rotate
S7-200 SMART
318 System Manual, 09/2015, A5E03822230-AC
Non-fatal errors with ENO = 0
SM bits affected
0006H Indirect address
0091H Operand out of range
0092H Error in count field
SM1.1 Overflow (last bit shifted out)
Input / output
Data type
Operand
DATA, S_bit
BOOL
I, Q, V, M, SM, S, T, C, L
N
BYTE
IB, QB, VB, MB, SMB, SB, LB, AC, *VD, *LD, *AC, Constant
Use the following equation to compute the address of the most significant bit of the Shift
Register (MSB.b):
MSB.b =
[(Byte of S_BIT) + ([N] - 1 + (bit of S_BIT)) / 8]
.
[remainder of the division by 8]
For example: if S_BIT is V33.4 and N is 14, the following calculation shows that the MSB.b is
V35.1.
MSB.b
= V33 + ([14] - 1 +4)/8
= V33 + 17/8
= V33 + 2 with a remainder of 1
= V35.1
The following figure shows bit shifting for negative and positive values of N.
A Shift Minus operation is indicated by a neg
a-
tive value of length N. The input value of
DATA
shifts into the most significant bit of the shift re
g-
ister, and shifts out of the least significant bit
location assigned by S_BIT. The data shifted out
is then placed in the overflow memory bit SM1.1.
A Shift Plus operation is indicated by a positive
value of length N. The input value of DATA shifts
into the least significant bit location assigned by
S_BIT and out of the most significant bit of the
Shift Register. The bit value shifted out is then
placed in the overflow memory bit SM1.1.
The maximum
length of the shift register as-
signed by N is 64 bits (positive or negative).

Table of Contents

Other manuals for Siemens Simatic S7 Series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Siemens Simatic S7 Series and is the answer not in the manual?

Siemens Simatic S7 Series Specifications

General IconGeneral
CPUVaries by model (e.g., S7-300, S7-400, S7-1200, S7-1500)
Communication InterfacesPROFIBUS, PROFINET, Ethernet, MPI
ProgrammingTIA Portal, STEP 7
Programming LanguagesLAD, FBD, STL, SCL, GRAPH
I/O ModulesDigital, Analog, Specialty modules available
Operating Temperature0°C to 60°C (standard models)
MountingDIN rail mounting
Operating Voltage24V DC or 120/230V AC (varies by model)
Protection ClassIP20 (standard models)
MemoryVaries depending on the S7 model. Includes work memory (RAM) for program execution, load memory (EEPROM or Flash) for program storage, and system memory for operating system functions. Memory sizes range from kilobytes to megabytes.

Related product manuals