Sei sulla pagina 1di 53

Tool on Control Technology

Influence of the Communication on the Process


Alarm Reaction Time of a SIMATIC S7-CPU.
Process Alarms OB40

Warranty, Liability and Support


We do not accept any liability for the information contained in this
document.
Any claims against us - based on whatever legal reason - resulting
from the use of the examples, information, programs, engineering
and performance data etc., described in this document shall be
excluded. Such an exclusion shall not apply in the case of
mandatory liability, e.g. under the German Product Liability Act
(“Produkthaftungsgesetz”), in case of intent, gross negligence, or
injury of life, body or health, guarantee for the quality of a product,
fraudulent concealment of a deficiency or breach of a condition
which goes to the root of the contract (“wesentliche
Vertragspflichten”). However, claims arising from a breach of a
condition which goes to the root of the contract shall be limited to
the foreseeable damage which is intrinsic to the contract, unless
caused by intent or gross negligence or based on mandatory
liability for injury of life, body or health. The above provisions does
not imply a change in the burden of proof to your detriment.
Copyright © Siemens AG 2005 All rights reserved

The Application Examples are not binding and do not claim to be


21264953_prozessalarm_DOKU_v30_e.doc

complete regarding the circuits shown, equipping and any


eventuality. They do not represent customer-specific solutions.
A&D AS CS3 KM

They are only intended to provide support for typical applications.


You are responsible in ensuring that the described products are
correctly used. These Application Examples do not relieve you of
the responsibility in safely and professionally using, installing,
operating and servicing equipment. When using these Application
Examples, you recognize that Siemens cannot be made liable for
any damage/claims beyond the liability clause described above.
We reserve the right to make changes to these Application
Examples at any time without prior notice. If there are any
deviations between the recommendations provided in these
Application Examples and other Siemens publications - e.g.
Catalogs - then the contents of the other documents have priority.

Copyright© 2005 Siemens A&D. It is not permissible to


transfer or copy these Application Examples or excerpts of
them without first having prior authorization from Siemens
A&D in writing.

For questions about this document please use the following


e-mail-address:
csweb@ad.siemens.de

Rev. V3.0 - Endgültig 08.06.2004 2/53


Process Alarms OB40

Content

1 Preliminary Remarks ................................................................................. 5


1.1 Field of application of the simulation ............................................................ 5
1.2 Scope of validity ........................................................................................... 6
1.3 Overview of the downloads .......................................................................... 7
1.4 History of the documentation ....................................................................... 7
1.5 Difference previous measurement / repeated measurement ....................... 8
1.6 Guide through the document........................................................................ 9
2 Overview of the Measurement ................................................................ 10
2.1 Measuring setup......................................................................................... 11
2.2 Configurations ............................................................................................ 13
2.3 Measured variables.................................................................................... 14
2.4 Technical data............................................................................................ 15
Copyright © Siemens AG 2005 All rights reserved

3 Overview of the Simulator....................................................................... 17


21264953_prozessalarm_DOKU_v30_e.doc

3.1 The user interface ...................................................................................... 17


A&D AS CS3 KM

3.2 The tables .................................................................................................. 21


4 Diagrams................................................................................................... 23
4.1 Overview diagram: CPU314C .................................................................... 26
4.2 Overview diagram: CPU315-2DP .............................................................. 27
4.3 Overview diagram: CPU317-2DP .............................................................. 27
4.4 Overview diagram: CPU318-2DP .............................................................. 28
4.5 Overview diagram: CPU416-2DP .............................................................. 28
4.6 Manager diagram ....................................................................................... 29
5 Background Knowledge and Tips for Optimization.............................. 30
5.1 Of which parts does the process alarm reaction time consist? .................. 30
5.2 Why does the communication influence the reaction time? ....................... 33
5.3 Which influence does a PG at the MPI interface have?............................. 34
5.4 What happens if you use a different S7-CPU? .......................................... 34
5.5 Where do you find interesting information on the topic? ............................ 35
6 The Measurement in Detail...................................................................... 36
6.1 General boundary conditions for the measuring setup .............................. 36
6.2 Photograph of the measuring setup ........................................................... 36
6.3 Properties of the hardware components .................................................... 37
6.4 Properties of the software applications ...................................................... 38

Rev. V3.0 - Endgültig 08.06.2004 3/53


Process Alarms OB40

6.5 Configuration of the components ............................................................... 39


6.6 Programming the components ................................................................... 41
6.6.1 STEP7 programs in the test CPU .............................................................. 41
6.6.2 STEP7 program in the load CPUs ............................................................. 44
6.6.3 Communication between test CPU and load CPUs ................................... 44
6.7 Measuring procedure ................................................................................. 45
6.7.1 Performance: Recording process alarm reaction time ............................... 45
6.7.2 Performance: Recording OB1 cycle time ................................................... 45
6.7.3 Example of a series of measurements....................................................... 46
6.8 Determination of the measured variables .................................................. 47
6.8.1 Process alarm reaction time....................................................................... 47
6.8.2 OB1 cycle time ........................................................................................... 51
6.9 Overview of the components (MLFB, versions) ......................................... 52
7 Appendix................................................................................................... 53
7.1 Abbreviations ............................................................................................. 53
7.2 Definitions .................................................................................................. 53
Copyright © Siemens AG 2005 All rights reserved
21264953_prozessalarm_DOKU_v30_e.doc
A&D AS CS3 KM

Rev. V3.0 - Endgültig 08.06.2004 4/53


Process Alarms OB40

1 Preliminary Remarks

1.1 Field of application of the simulation

Problem
Many applications in the field of mechanical engineering require quick and
reproducible reaction times to process signals. To meet this requirement,
the S7-CPU makes the mechanism of process alarm processing (OB40)
available.
Already during the concept phase of an automation project, the following
question has to be answered reliably:
• Can the required process alarm reaction times be reached with the
planned configuration?

Nowadays, an S7-CPU has to manage various communication tasks aside


from control tasks. An S7-CPU often communicates simultaneously with a
Copyright © Siemens AG 2005 All rights reserved

programming device, operating modules and other S7-CPUs via PB


21264953_prozessalarm_DOKU_v30_e.doc

subnets or IE subnets.
A&D AS CS3 KM

Depending on the type of the S7-CPU and the scope of the communication
load, the process alarm reaction time varies. This raises the following
questions:
• In which way does the communication influence the process alarm
reaction time and the cycle time?
• Are there differences in the S7-CPUs?

Our solution
To answer the questions listed above, extensive measurements were
performed on typical configurations.
The results can be downloaded:
• Simulator (Excel file)
• Documentation (PDF file on hand).

Rev. V3.0 - Endgültig 08.06.2004 5/53


Process Alarms OB40

Simulator
With the simulator, the process alarm reaction times for typical
configurations can be estimated with a high degree of accuracy.
In order to quickly determine the measured values, the simulator features
an interactive user interface.
By clicking the mouse, you can select different configurations and compare
them directly.
In a simple and playful manner, the simulator shows you the process alarm
reaction time to be expected in practice:
• Load the simulator on your PC, start it and you’re ready to go!
• The most important points on the measurement are covered by the
integrated description!

Documentation
If you are more interested in trends and magnitudes, please refer to the
diagrams in the documentation.
Copyright © Siemens AG 2005 All rights reserved
21264953_prozessalarm_DOKU_v30_e.doc

You will find a concise summary of the measuring results, valuable


background information, tips for optimizing your configuration and a
A&D AS CS3 KM

detailed description of the measurement.

1.2 Scope of validity

Only current components from the SIMATIC delivery scope were used for
the measurements:
• As at August 2003

Rev. V3.0 - Endgültig 08.06.2004 6/53


Process Alarms OB40

1.3 Overview of the downloads

As previously described, these measurements have produced two


downloads. The table provides an overview.

Table 1-1 Downloads


Download File type Version Content
Simulator EXCEL 2000 V3.0 • Interactive user interface for selecting the
configurations and display of the measured
values
• Integrated description containing the most
important information on the measurement
• All measured values in clear tables
Documentation PDF file V3.0 • Description of measurement and simulator
• Evaluation of the measured values in
diagrams
• Background information
Copyright © Siemens AG 2005 All rights reserved
21264953_prozessalarm_DOKU_v30_e.doc

The download “Documentation“ is available to you with this document.


A&D AS CS3 KM

1.4 History of the documentation

Here, you find an overview of the different versions of the document on


hand.
If you already have an older version of the documentation, the table below
gives you a quick overview of the changes that have been made.

Table 1-2 History of the documentation


Version Date of Version Measuring Change
documentation release measurement setup status
V1.0 03/27/01 V1.0 Jan. 2001 First creation
V1.1 05/01/01 Revision of the
comparison S5/S7
V2.0 10/01/01 V2.0 Oct. 2001 Measured in addition:
CPU312C, CPU314C
V2.1 02/25/02 Editing
V3.0 Oct. 2003 V3.0 Aug. 2003 Repeated
measurement

Rev. V3.0 - Endgültig 08.06.2004 7/53


Process Alarms OB40

1.5 Difference previous measurement / repeated measurement

The measurement on hand is the repetition of an already existing


performance measurement.

Overview of the differences


The table below summarizes the changes of the repeated measurement in
comparison with the previous measurement:

Table 1-3 Differences between previous and repeated measurement


Previous measurement Repeated measurement
Components changed
S7-CPUs: S7-CPU:
• As at: January 2001 • With current firmware and hardware revision levels:
As at August 2003
• CPU312C-2DP n/a
Copyright © Siemens AG 2005 All rights reserved

• CPU317-2DP newly added


21264953_prozessalarm_DOKU_v30_e.doc

Line-oriented operator panel: Windows-CE Operator panel:


A&D AS CS3 KM

OP7 OP170B
Output modules: Quicker output modules:
As at: January 2001 As at: August 2003
Additional measured variable
OB1 cycle time

Rev. V3.0 - Endgültig 08.06.2004 8/53


Process Alarms OB40

1.6 Guide through the document

This table allows you to decide quickly which chapter you want to read.

Table 1-4 Overview of the contents of this document


Chapter Content Provides information on
Chapter 1: Field of application cause, aims and application
Preliminary Remarks Overview of the downloads field of the measurement.
History of the documentation
Differences of the
measurements
Chapter 2: Measuring setup the most important details
Overview of the Measurement Measured variables for a quick start.
Technical data
Chapter 3: User interface
Overview of the Simulator Tables
Copyright © Siemens AG 2005 All rights reserved
21264953_prozessalarm_DOKU_v30_e.doc

Chapter 4: Diagrams the evaluation


Diagrams for quick comprehension.
A&D AS CS3 KM

Chapter 5: Influence on the process alarm interesting and valuable aspects


Background Knowledge and reaction time on the subject of the
Tips for Optimization Use of other S7-CPUs measurement.
Sources of information Tips for optimization.
Chapter 6: Properties of the components all details
The Measurement in Detail Measuring procedure required to understand and
Determination of the measured reproduce the measurement.
variables
Overview of MLFB
Chapter 7: Abbreviations important abbreviations and
Appendix Definitions definitions for orientation.

Rev. V3.0 - Endgültig 08.06.2004 9/53


Process Alarms OB40

2 Overview of the Measurement


This chapter gives you important information on the measurement:
• How is the measuring setup designed?
• Which configurations are measured?
• Which measured variables are determined?
• What are the “technical data” of the measurement?

If you want to obtain all details on the measurement, then please refer to
chapter 7 "The Measurement in Detail". It provides a detailed description of
the components and the measuring method.

Note on name:
In order to distinguish the S7-CPUs, the names listed below are used:
• Test CPU:
Copyright © Siemens AG 2005 All rights reserved
21264953_prozessalarm_DOKU_v30_e.doc

This S7-CPU processes the process alarm OB40. The performance data
are measured for this S7-CPU.
A&D AS CS3 KM

• Load CPU:
The load-CPU communicates with the test CPU via a PB subnet or an IE
subnet.

Rev. V3.0 - Endgültig 08.06.2004 10/53


Process Alarms OB40

2.1 Measuring setup

Different S7-CPUs (test CPUs) are loaded as heavily as possible with


different communication tasks.
The process alarm reaction time and the cycle time are measured.
In order to be as practice-relevant as possible, the measurement was
performed under the following boundary conditions:
• A typical STEP7 user program which is interrupted by a watchdog
interrupt OB every 10 ms is processed in the test CPU.
• 32 ET200 stations are connected to the integrated DP interface of the
test CPU.

Mechanical and electrical setup


All components are set up according to the setup guidelines in the following
SIMATIC manuals:
Copyright © Siemens AG 2005 All rights reserved

• Automation system S7-300, Setup, CPU data


21264953_prozessalarm_DOKU_v30_e.doc

• Automation systems S7-400, M7-400, Setup


A&D AS CS3 KM

• Device manual TP170A, TP170B, OP170B, Installation

Reference potential (M) is grounded. All racks are connected with the
station ground.

Measuring setup principle


Basically, the measuring setup consists of three parts:
• S7 station with S7-CPU (test CPU)
• ET200 stations
• Communication load.

Rev. V3.0 - Endgültig 08.06.2004 11/53


Process Alarms OB40

The figure below shows the basic measuring setup.

S7- CPU (test CPU) DO DI PB-CP IE-CP

OB1 A I 0.0
OB35 A I 1.0
A M 0.0
OB35

OB40: Channel
T PAW 0
BE

. Measuring
OB35 point
.
of the
OB35
BE cycle time
Copyright © Siemens AG 2005 All rights reserved

DP MPI PB IE
21264953_prozessalarm_DOKU_v30_e.doc

1,5 Mbit 187,5 kbit


A&D AS CS3 KM

Profibus DP

CPUnn
CPU
32 ET200

Measuring point of the


process alarm reaction time

Communication load:
Industrial
MPI Profibus Ethernet

CPU n
CPU CPUnn CPUnn
PG 3 / 15n 4CPU
load 4CPU
load
OP170 CPUs CPUs

Fig. 2-1 Basic measuring setup

Rev. V3.0 - Endgültig 08.06.2004 12/53


Process Alarms OB40

2.2 Configurations

The series of measurements are performed for different configurations


(measuring setups).

The configurations differ in the following characteristics (parameters):


Variations of the test CPU:
• Type of the S7-CPU
• Value of the parameter: “Cycle load due to communication”
• User program with or without call of
communication blocks
• Type of communication load.

The following specifications (constants) apply to all configurations:


Constants of the test CPU:
• Length of the user program
Copyright © Siemens AG 2005 All rights reserved
21264953_prozessalarm_DOKU_v30_e.doc

• Call interval of the watchdog interrupt (OB35)


A&D AS CS3 KM

• Baud rate of the integrated MPI interface


• Baud rate of the integrated DP interface
Other constants of the measurement:
• Centralized I/O
• Number of ET200 stations at the integrated DP interface
• Number and configuration of the operating modules (OP) at the
integrated MPI
• Online function of the programming device (PG) at the integrated MPI.

Rev. V3.0 - Endgültig 08.06.2004 13/53


Process Alarms OB40

2.3 Measured variables

The following measured variables are determined for all configurations:


• Process alarm reaction time
• OB1 cycle time:

Each measured variable is measured several times for each configuration.


The following values are determined from these measured values:
• Minimum value (smallest value from all measured values)
• Typical value (arithmetic mean value from all measured values)
• Maximum value (largest value from all measured values).

Process alarm reaction time:


This is the time between event 1 and event 2:
Copyright © Siemens AG 2005 All rights reserved
21264953_prozessalarm_DOKU_v30_e.doc

Event 1: A signal change from 0 to 1 takes place at an input with process


alarm capability.
A&D AS CS3 KM

The signal change is reported to the test CPU. The S7-CPU interrupts the
OB1 processing and starts OB40. In OB40, a digital output is controlled by
the direct command “T PAW”.

Event 2: A signal change from 0 to 1 takes place at the digital output.

OB1 cycle time:


This is the time between event 1 and event 2:
Event 1:
Process image update in the S7-CPU

Event 2:
Following process image update in the S7-CPU

Rev. V3.0 - Endgültig 08.06.2004 14/53


Process Alarms OB40

2.4 Technical data

Here, the properties of the measurement are summarized concisely in a


table.

Table 2-1 Technical data of the measurement


Simulator Process alarms
Outputs: Measured variables / performance data
Measured Measured values Unit Comments
variable:
Process alarm Maximum, typical and ms, 2 numbers of places Time from the input edge at the DI
reaction time minimum value after the decimal point until the output edge at the DO
Cycle time Maximum, typical and ms, no numbers of places OB1 cycle time of the S7-CPU
minimum value after the decimal point
Inputs: Selection of the configuration (measuring setup)
Component: Feature Measuring parameters Comments
S7-CPU Type 314C-2DP S7-300 CPU with integrated I/O
(test CPU) 315-2DP S7-300 CPU
317-2DP S7-300 CPU
318-2DP S7-300 CPU
416-2DP S7-400 CPU
Copyright © Siemens AG 2005 All rights reserved

Cycle load due to 5% / 10% Smallest value possible (S7-400: 5%, S7-300: 10%)
21264953_prozessalarm_DOKU_v30_e.doc

communication 20% Default value


Call of Yes Communication blocks in test CPU and load CPU:
communication (SFCs for SEND/RCV)
A&D AS CS3 KM

blocks in OB1 of the No Communication blocks only in load CPU:


test CPU PUT, GET (test object is server)
Communication load Without load No communication load on the test CPU
PG on MPI PG on MPI. Online function “Status variable”
OPs on MPI 3/15 OP on MPI, acquisition cycle 200 ms
Load CPUs via PB-CP Four 400-CPUs communicate with test CPU via PB-CP
Load CPUs via IE-CP Four 400-CPUs communicate with test CPU via IE-CP
All loads All above loads act simultaneously on the test CPU
and “Call communication blocks” = “Yes”
I/O Type Integrated I/O signals via integrated I/O. Only in S7-CPU314C
Central I/O signals via centralized I/O
Constant: Boundary conditions applying to all configurations
Component Feature Range of values Comments
Test CPU Baud rate DP 1,5 MBit/s
Baud rate MPI 187,5 kBit/s
Run time user program in the 20ms Applies to “Communication load” = “Without” (“no-load”)
test object
Interval OB35 10ms Length user program in OB35: 100 instructions
Centralized 300-input module SM321 With interrupt capability + diagnostics capability (diagnostics
I/O not active)
300-output module SM322 Diagnostics capability (diagnostics not active)
400-input module SM421 With interrupt capability + diagnostics capability (diagnostics
not active)
400-output module SM422 Diagnostics capability (diagnostics not active)
ET200 on DP Type ET200M Simulated with SIMIT simulator
Number stations 32
Configuration 16 byte DI
16 byte DO
Subnet PB 12 MBit/s
IE 100 MBit/s
OP Type OP 170B

Rev. V3.0 - Endgültig 08.06.2004 15/53


Process Alarms OB40

Simulator Process alarms


Information: These important constants are displayed for information.
Component Display Range of values Comments
Test CPU Cycle time without c-load 20ms Value is set via a load program.
Interval OB35 10ms Fixed set
Number of OPs 3 / 15 Number of OPs connected to selected test CPU
Number of load CPUs 4 Number of CPUs connected via subnet
Copyright © Siemens AG 2005 All rights reserved
21264953_prozessalarm_DOKU_v30_e.doc
A&D AS CS3 KM

Rev. V3.0 - Endgültig 08.06.2004 16/53


Process Alarms OB40

3 Overview of the Simulator


The simulator (Excel file) includes the following elements:
• An interactive user interface for convenient access to the measured
values.
• All measured values in clear tables for usage as reference books.
This chapter briefly describes both elements.

3.1 The user interface

How to activate the user interface:


• Download the Excel file
• Open the Excel file
• If prompted “Enable macros“
Copyright © Siemens AG 2005 All rights reserved
21264953_prozessalarm_DOKU_v30_e.doc

• Select the ”Simulation“ tab.


A&D AS CS3 KM

Note
If the macros cannot be activated, the safety settings in “Tools/Macros/Safety”
must be set to medium.

The setup of the user interface is explained below.

Rev. V3.0 - Endgültig 08.06.2004 17/53


Process Alarms OB40

Setup of the user interface (“SIMULATION” tab)

Yellow boxes: Purple boxes:


Selectable tabs:
Configuration 1 Configuration 2
Integrated description

Tab
selection

Functional
model
Copyright © Siemens AG 2005 All rights reserved
21264953_prozessalarm_DOKU_v30_e.doc
A&D AS CS3 KM

Operation

Input section: Information section:


Output section:
Configuration of the Display of important
constants Performance data of process
S7-CPU
alarms

Fig. 3-1 Simulator user interface

Rev. V3.0 - Endgültig 08.06.2004 18/53


Process Alarms OB40

Explanation on the user interface (“SIMULATION” tab)


The user interface is divided into the following sections:
Tab selection: Top of the “SIMULATION” tab
You find a summary of the most important information on the
measurement. Simply click the tab with the topic on which you need
information.
Functional model: Top half of the “SIMULATION” tab
Here you find the functional model on the measuring setup. It contains the
most important components of the measurement, the measured variables
and the measuring locations.
Operation: Bottom half of the “SIMULATION” tab
All inputs and outputs of the simulator are made here. The inputs and
outputs of a component are summarized. The following elements exist for
each component:
• Input section (shaded green):
Contains the input boxes for selecting a configuration.
Copyright © Siemens AG 2005 All rights reserved
21264953_prozessalarm_DOKU_v30_e.doc

• Output section (shaded orange):


Contains the output boxes for displaying the performance data.
A&D AS CS3 KM

• Information section (shaded gray):


Contains the output boxes for important information.

All input and output boxes are doubled in order to enable simultaneous
viewing of two configurations:
• Configuration 1: Shaded yellow
• Configuration 2: Shaded purple.

Summary of the color coding

Input section

Input box for configuration 1 Input box for configuration 2


Selection: x Selection: y

Output section

Output box for configuration 1 Output box for configuration 2


Output: x (measured) Output: y (measured)

Fig. 3-2 Color coding in the user interface

Rev. V3.0 - Endgültig 08.06.2004 19/53


Process Alarms OB40

Application example
A simple example illustrates the possibilities of using the simulator:

Given
• We are dealing with a CPU315-2DP
• The cycle load due to communication is 10%
• OPs are operated at the integrated MPI interface of the S7-CPU.

Required
• In which range does the process alarm reaction time fluctuate?
• Which effect does the communication load have on the process alarm
reaction time?

Application of the simulator


Copyright © Siemens AG 2005 All rights reserved
21264953_prozessalarm_DOKU_v30_e.doc

Proceed as follows:
In a first step, select two identical configurations (“yellow“ and ”purple“
A&D AS CS3 KM

configuration) in the user interface (“SIMULATION” tab):


• Type: CPU315-2DP
• Cycle load due to communication: 10%
• Communication load: Ops on MPI.

You can read immediately which fluctuation is to be expected in the


process alarm reaction time.

In order to recognize the effects of the communication load, merely change


the setting for “Communication load” in the purple configuration:
• Communication load: PGs on MPI

The influence can now be seen in the “yellow” and “purple” output boxes.
You can also do this accordingly for other measuring parameters.

Rev. V3.0 - Endgültig 08.06.2004 20/53


Process Alarms OB40

3.2 The tables

In the simulator, all measured values are filed in clear tables. You can
access this table in two different ways:

First option
• Download the Excel file
• Open the Excel file
• If prompted “Do not enable macros“

Second option
• Download the Excel file
• Open the Excel file
• If prompted "Enable macros"
the user interface of the simulator appears on the screen
Copyright © Siemens AG 2005 All rights reserved

• Close the user interface of the simulator:


21264953_prozessalarm_DOKU_v30_e.doc

The standard EXCEL user interface appears. The tables are available in
the Excel sheets.
A&D AS CS3 KM

The following tables are contained in the Excel file:

Table 3-1 Overview of the tables


No. Names of the Excel sheets
1 CPU314C-2DP
2 CPU315-2DP
3 CPU317-2DP
4 CPU318-2DP
5 CPU416-2DP

Thus, one Excel sheet exists for each S7-CPU.

Rev. V3.0 - Endgültig 08.06.2004 21/53


Process Alarms OB40

All tables have the same structure:


• The configurations can be found in the left part of the table
• The measuring results can be found in the right part of the table.

Detailed structure of a table:


• Column A-D: Configuration
• Column E-J: Measuring results.
Configurations
Measuring results
(performance data)
Below, a section of a table is shown as an example.
Copyright © Siemens AG 2005 All rights reserved
21264953_prozessalarm_DOKU_v30_e.doc
A&D AS CS3 KM

Series of measurements
example:
CPU TYPE: CPU315-2DP
Load: 4 CPUs on PB
Cycle load due to communication.: 10%
With communication (Send/Receive)
Centralized I/O

CPU TYPE

Fig. 3-3 Table section from the Excel fil

Rev. V3.0 - Endgültig 08.06.2004 22/53


Process Alarms OB40

4 Diagrams
This chapter displays the measured values in clear diagrams. Using these
diagrams, you quickly see magnitudes and trends of the measured values.
You will receive answers to the following questions:
• Which influence does the type of the S7-CPU have on the process alarm
reaction time?
• Which influence do the communication loads have in this process?
You find two different types of diagrams in this chapter:

Overview diagram
There is one overview diagram for each test object:
The following is plotted on the y-axis:
• Minimum, typical and maximum process alarm reaction time
depending on
• communication load
Copyright © Siemens AG 2005 All rights reserved
21264953_prozessalarm_DOKU_v30_e.doc

• cycle load due to communication.


A&D AS CS3 KM

Manager diagram
The overview diagrams are summarized in the manager diagram.
The following is plotted on the y-axis:
• Minimum, typical and maximum process alarm reaction time
depending on
• communication load
• type of the test CPU.

Overview of the diagrams


The table provides an overview of all diagrams.

Table 4-1 Overview of all diagrams


Test CPU I/O Overview diagram Manager diagram
Chapter Summarization of Chapter
314C-2DP Centralized I/O 4.1 4.6
Integrated I/O 0 x
315-2DP Centralized I/O 4.2 x
317-2DP Centralized I/O 4.3 x
318-2DP Centralized I/O 4.4 x
416-2DP Centralized I/O 4.5 x

Rev. V3.0 - Endgültig 08.06.2004 23/53


Process Alarms OB40

Structure of the overview diagrams


For each measured S7-CPU there is a diagram with the following structure:

y-axis:
Process alarm reaction time in ms Type S7-CPU

Description
of a diagram
bar
Copyright © Siemens AG 2005 All rights reserved
21264953_prozessalarm_DOKU_v30_e.doc
A&D AS CS3 KM

Cycle load due to Communication blocks: Type of the communication load:


communication: send/receive or put/get Without load, PG on MPI, OPs on
5%/10% or 20% MPI, load CPUs on PB, load
CPUs on IE or all loads

x-axis:
Parameters of the configuration

Rev. V3.0 - Endgültig 08.06.2004 24/53


Process Alarms OB40

Structure of the manager diagram


In the manager diagram, the overview diagrams are summarized in one
diagram. That way, one single diagram provides an overview of the entire
measurement.
The two bars per communication load from an overview diagram (one bar
for each value “cycle load due to communication”) are blended into one
single bar in the manager diagram.
• The upper end of a bar in the manager diagram is then the largest value
measured –considered via all measured values irrespective of the “Cycle
load due to communication” setting.
• Accordingly, the lower end is the smallest value measured –considered
via all measured values irrespective of the “Cycle load due to
communication” setting.
Thus, the entire fluctuation range of the measured values is displayed.
Copyright © Siemens AG 2005 All rights reserved
21264953_prozessalarm_DOKU_v30_e.doc
A&D AS CS3 KM

Rev. V3.0 - Endgültig 08.06.2004 25/53


Process Alarms OB40

4.1 Overview diagram: CPU314C

CPU314C: Centralized I/O


Copyright © Siemens AG 2005 All rights reserved
21264953_prozessalarm_DOKU_v30_e.doc
A&D AS CS3 KM

CPU314C: Integrated I/O

Rev. V3.0 - Endgültig 08.06.2004 26/53


Process Alarms OB40

4.2 Overview diagram: CPU315-2DP


Copyright © Siemens AG 2005 All rights reserved
21264953_prozessalarm_DOKU_v30_e.doc
A&D AS CS3 KM

4.3 Overview diagram: CPU317-2DP

Rev. V3.0 - Endgültig 08.06.2004 27/53


Process Alarms OB40

4.4 Overview diagram: CPU318-2DP


Copyright © Siemens AG 2005 All rights reserved
21264953_prozessalarm_DOKU_v30_e.doc
A&D AS CS3 KM

4.5 Overview diagram: CPU416-2DP

Rev. V3.0 - Endgültig 08.06.2004 28/53


Copyright © Siemens AG 2005 All rights reserved
21264953_prozessalarm_DOKU_v30_e.doc
A&D AS CS3 KM

Process Alarms OB40

4.6 Manager diagram

Notes on the diagram: CPU314C-I: CPU314C, measurement with integrated I/O


CPU314C-E: CPU314C, measurement with centralized (external) I/O

Rev. V3.0 - Endgültig 08.06.2004 29/53


Process Alarms OB40

5 Background Knowledge and Tips for Optimization


This chapter provides valuable information in a concise form. You find
answers to important questions regarding “process alarms”.
This helps you to understand the relations and puts you in a position to
optimize your configuration.

The topics of this chapter:


• Of which parts does the process alarm reaction time consist?
• Why does the communication influence the reaction time?
• Which influence does a PG at the MPI interface of the S7-CPU have?
• What happens if you use an S7-CPU different from the one measured?
• Where is interesting information on the topic available?
Copyright © Siemens AG 2005 All rights reserved
21264953_prozessalarm_DOKU_v30_e.doc

5.1 Of which parts does the process alarm reaction time consist?
A&D AS CS3 KM

The figure below shows the way of a process alarm through an S7 station.
In the example it is assumed that the I/O signals are processed via central
modules:
• The process alarm signal is collected at a central input module with
process alarm capability.
• The reaction to this signal takes place at a central output module.

S7 station
S7-CPU
Input Backpla Call Processing Backpla Output
module ne bus OB40 OB40 ne bus module
Output
command

t1 t2 t3 t4 t5 t6

Process alarm reaction time

Fig. 5-1 Composition of the process alarm reaction time

Rev. V3.0 - Endgültig 08.06.2004 30/53


Process Alarms OB40

In the example above, the process alarm reaction time consists of the
following run times:

Tabelle 5-1 Description of the run times of a process alarm reaction time
Run Explanation
time
t1 Time from the input terminal until the backplane bus of the S7 station.
t2 Run time at the backplane bus of the S7 station.
t3 Processing time of the operating system of the S7-CPU for the call of
OB40.
t4 Processing time of OB40 instructions: Command duration of the
output command (e.g.: T PAW).
t5 Run time at the backplane bus of the S7 station.
t6 Time for evaluating the output command and switching the output
electronics.

The different influences acting on the run times will be described in the
following. In addition, you obtain valuable tips for optimization.
Copyright © Siemens AG 2005 All rights reserved
21264953_prozessalarm_DOKU_v30_e.doc

Delay time input module


A&D AS CS3 KM

The delay time of the input module (t1) depends on:


• Type of the input module
• Input voltage
• Direction of the input edge (0 Æ 1 or 1 Æ 0)
• Parameterization of the diagnostics
• Slot in the central rack.

Tip
• For each input channel, the identical value should be parameterized for the input
! delay. If the parameterization differs, the process alarm reaction time may last longer.
• In critical applications, plug the modules triggering process alarms physically as close
to the S7-CPU as possible. The quickest reader of an alarm is rack 0, slot 4. The
quickness decreases insignificantly with ascending slot number.

Rev. V3.0 - Endgültig 08.06.2004 31/53


Process Alarms OB40

Delay time output module


The delay time (t6) of the output module depends on:
• Type of the output module
• Type and size of the output load
• Direction of the output edge (0 Æ 1 or 1 Æ 0)
• Parameterization of the diagnostics
• Slot in the central rack.

Tip
! During parameterizing the diagnostics alarm, the extension of the reaction time may
differ considerably depending on the module type. That is why it is absolutely necessary
to check the necessity of the parameter.

Call time of OB40


The call time of OB40 (t3) depends on different factors.
Copyright © Siemens AG 2005 All rights reserved
21264953_prozessalarm_DOKU_v30_e.doc

Normally, an S7-CPU processes OB1. Process alarms can interrupt OB1.


Processing of the process alarm OB is put in.
A&D AS CS3 KM

A certain period of time passes from the occurrence of the process alarm
until processing of the first instruction in the process alarm OB.
There are different causes for this delay:
Delay caused by the operating system of the S7-CPU:
• In each interruption of OB1, the operating system of the S7-CPU saves
the contents of the accumulators.
• If a process alarm occurs, internal operating system routines which are
not interruptible are active in the S7-CPU.
• PG test functions (status/control) are active.

Delay caused by the communication of the S7-CPU:


• PG communication
• PG routing
• OP communication
• Communication via subnets using CPs.

Delay caused by the user program of the S7-CPU:


• Use of the copy command SFC81 (UBLKMOV)
• Use of OBs with a higher priority
• Disabling the process alarm OB by SFC39.

Rev. V3.0 - Endgültig 08.06.2004 32/53


Process Alarms OB40

Processing time of OB40


The processing time of the process alarm OB (t4) depends on:
• Type of the S7-CPU
• Communication load of the S7-CPU
• Length of the program of the process alarm OB to the output command.
Tip
! For S7-CPUs of the S7-400 family and for the CPU318:
Shortest process alarm reaction times are reached, if the I/O access is effected in
the first instruction line of OB40. E.g. in the case of the "L PEW" command, the
value is loaded into the accumulator immediately and it is thus not subject to further
delays.
If the I/O commands are programmed as second or following instruction, the
influence of the communication comes to fruition. The reason for this is the fact that
the program can be interrupted by the operating system after each STEP7
instruction in order to process internal operating system routines.
Copyright © Siemens AG 2005 All rights reserved
21264953_prozessalarm_DOKU_v30_e.doc

5.2 Why does the communication influence the reaction time?


A&D AS CS3 KM

General information
During handling the communication jobs in the S7-CPU, the operating
system of the S7-CPU executes internal system routines to restore data.
If such a routine is processed at the time of the process alarm, a process
alarm must wait until this routine is completed.

Parameter “Cycle load due to communication”


In the hardware configuration, the load of OB1 due to the communication
can be set between 5% (10% in S7-300) and 50%.
Yet, the percentage is a mean.
In the case of a setting of e.g. 20%, the communication fraction in a
timeslice may be considerably higher than 20%. But the communication
fraction in the next timeslice amounts only to a few per cent or even 0%.
With this mechanism, the communication load of OB1 can on average be
limited to the set value. Yet, higher communication loads may develop
within the timeslices.

Rev. V3.0 - Endgültig 08.06.2004 33/53


Process Alarms OB40

5.3 Which influence does a PG at the MPI interface have?

The influence of the programming device at the MPI interface of the


S7-CPU on the process alarm reaction time may be significant.
Important
! If a PG is plugged “online” during running system, a higher process alarm reaction
time is to be expected.
It is absolutely necessary to check the effects before plugging the device.

5.4 What happens if you use a different S7-CPU?

If you want to use a CPU which was not measured here, the tables below
will help you. Using these tables, you will be able to judge whether this S7-
CPU responds worse, identically or better.
Copyright © Siemens AG 2005 All rights reserved

The process alarm reaction times “without communication load” of the S7-
21264953_prozessalarm_DOKU_v30_e.doc

CPU are documented in the reference manuals of the S7-CPU. These


values are summarized in the following tables.
A&D AS CS3 KM

S7-300 CPUs
Process alarm reaction times of the S7-300 CPUs without communication
load:

Table 5-2 Reaction times S7-300: Excerpt from reference manuals


S7-CPU Centralized I/O Integrated I/O
Minimum (μs) Maximum (μs) Maximum (μs)
312C 500 800 600
312 500 800 ---
312 IFM 600 1500 ---
313 / 314 IFM 500 1100
313C 400 600 500
313C-2 / 314C-2 400 700 500
315 300 1100 ---
314 / 315-2 400 700 ---
316-2 400 1100 ---
317-2 200 300 ---
318-2 230 270 ---
gray = S7-CPUs used in the measurement

Rev. V3.0 - Endgültig 08.06.2004 34/53


Process Alarms OB40

S7-400 CPUs
Process alarm reaction times of the S7-400 CPUs without communication
load:

Table 5-3 Reaction times S7-400: Excerpt from reference manuals


S7-CPU Minimum (μs) Maximum (μs)
412-1/-2 360 610
414-2/-3 255 435
416-2 /-3 210 350
417-4 255 435
417-4H solo 270 530
417-4H redundant 375 690
gray = S7-CPUs used in the measurement
Copyright © Siemens AG 2005 All rights reserved
21264953_prozessalarm_DOKU_v30_e.doc

5.5 Where do you find interesting information on the topic?


A&D AS CS3 KM

The table below lists manuals containing valuable information on “process


alarms”.

Table 5-4 List of manuals


No. Title Chapter MLFB Issue
/1/ System software for S7-300/400 system- and 1 6ES7810-4CA06- 12/2002
standard functions – reference manual 3.2 8AR0
/2/ Module data S7-300: “SIMATIC automation 3 Documentation 11/2002
system S7-300 module data” package:
6ES7398-8FA10-8AA0
/3/ Module data S7-400: “SIMATIC automation 4 Documentation 09/2003
system package:
S7-400, M7-400 module data“ 6ES7498-8AA03-8AA0
/4/ Referenzhandbuch: "SIMATIC 5 Documentation 06/2003
Automatisierungssystem S7-300 CPU-Daten: package:
CPU 31xC und CPU 31x" 6ES7398-8FA10-8AA0
/5/ Reference manual: “SIMATIC automation 3 6ES7 398-8FA10- 10/2001
system S7-300 CPU data: CPU 312 IFM and 8AA0
CPU 318-2 DP"
/6/ Reference manual “SIMATIC automation 3 Documentation 12/2002
system S7-400 CPU data” package:
6ES7498-8AA03-8AA0
/7/ Communication with SIMATIC EWA 4NEB 710 6075- 10/1999
01 02

Rev. V3.0 - Endgültig 08.06.2004 35/53


Process Alarms OB40

6 The Measurement in Detail


This chapter explains:
• The properties of the components
• The configuration and the programming of the components
• The measuring procedure
• The determination of the measured variables
• The MLFBs on the main components.

6.1 General boundary conditions for the measuring setup

Unless mentioned otherwise, all parameterizations / configurations


correspond to the default values of the components.
For the measuring setup, only components from the SIMATIC delivery
scope as of the date below are used:
Copyright © Siemens AG 2005 All rights reserved

• September 2003
21264953_prozessalarm_DOKU_v30_e.doc
A&D AS CS3 KM

6.2 Photograph of the measuring setup

Operator panel side


4 load CPUs
on PB-Bus
S7-400 test S7-300 test
CPU CPU

SIMIT PC station: 4 load CPUs on IE-Bus LeCroy


Simulation of the 32 storage oscilloscope
ET200 stations

Fig. 6-1 Measuring setup

Rev. V3.0 - Endgültig 08.06.2004 36/53


Process Alarms OB40

6.3 Properties of the hardware components

Different components were used during the measurements. The most


important properties of the core components will be briefly described below.
An overview table of the MLFBs and the versions of the essential
components are available in chapter 6.9.

Test CPU
• Communicates with the load CPUs via CP
• Reads/writes distributed I/O via the integrated DP interface
• Communicates with the OPs at the integrated MPI interface
• Measures its own cycle time.

Distributed I/O
• A PC with the simulation program SIMIT is connected at the integrated
DP interface. 32 ET200 stations are simulated.
Copyright © Siemens AG 2005 All rights reserved
21264953_prozessalarm_DOKU_v30_e.doc

• The PC creates a constant load for the test CPU.


A&D AS CS3 KM

Centralized I/O
• Reception of the process alarm signal (start trigger of a measurement).
• Output of a signal (stop trigger of a measurement).

Operator panel
• OPs are connected at the MPI interface of the test CPU.
• All OPs visualize data from the test CPU. In order to put a high load on
the S7-CPU, a configuration with many variables and a short clock was
chosen.
• The OPs create an optionally switchable load for the test CPU.

Programming device
• PG is connected online at the MPI interface of the test CPU.
• The PG executes the “Status variable” function on the test CPU. On the
PG, one complete screen page is filled with status values. The contents
are taken from different memory areas of the S7-CPU.
• The PG creates an optionally switchable load for the test CPU.

Rev. V3.0 - Endgültig 08.06.2004 37/53


Process Alarms OB40

Load CPUs on Profibus-CP and on Industrial Ethernet-CP


• The load CPUs are powerful S7-CPUs which exchange extensive data
with the test CPU.
• An optionally switchable load for the test CPU is created via the CP.

Pulse generator
• A separate S7-CPU generates 5 pulses per second. The CPU writes the
pulses to its digital output.
• The digital output is connected to the input (central or integrated) with
process alarm capability of the test CPU.

6.4 Properties of the software applications

In the following, you will be provided with important information on the


Copyright © Siemens AG 2005 All rights reserved

software applications used.


21264953_prozessalarm_DOKU_v30_e.doc

An overview table of the MLFBs and of the versions is available in chapter


A&D AS CS3 KM

6.9.

STEP7
For the configuration and the programming of the S7-CPUs:
• STEP7 5.2 SP1

ProTool
For the OP screen configuration was used:
• ProTool V6.0 SP2

Rev. V3.0 - Endgültig 08.06.2004 38/53


Process Alarms OB40

6.5 Configuration of the components

This chapter provides important information on the configurations of the


hardware components used. The description of the programs for the
“intelligent” components can be found in chapter 7.6.
Unless described differently, always the default settings of the components
apply.

Test CPU
Deviation from the standard parameterization of the CPU:
• Cycle monitoring time: 300ms
Baud rates of the integrated interfaces:
• MPI interface: 187,5Mbit/s
• DP interface: 1,5Mbit/s

Load CPU
Copyright © Siemens AG 2005 All rights reserved
21264953_prozessalarm_DOKU_v30_e.doc

The default settings are used.


A&D AS CS3 KM

Centralized I/O
Digital I/O modules of the SIMATIC S7 are used for the measurements.
The currently quickest modules with process alarm capability and
diagnostics capability are used (as at 03/07). Depending on the type of the
measurement, the modules are configured differently.

Measurement for the simulator:


Configurations of the digital input module:
• Input delay: 0,1 ms for all channels
• Trigger for process alarm: Positive edge (0 Æ 1)
• Diagnostics: Not used

Configurations of the digital output module:


• Load of the output: Resistor 470Ω
• Diagnostics: Not used

Measurement for random sample measurement:


The diagnostics are used in the digital input module and output module.
The remaining settings are as above.

Rev. V3.0 - Endgültig 08.06.2004 39/53


Process Alarms OB40

Distributed I/O
ET200 stations are operated at the integrated DP interface of the test CPU.
The ET200 stations are simulated with the SIMIT simulator. The simulator
runs on a PC which is connected to the test CPU internal Profibus
interface. The following distributed I/O is simulated:
• Number of ET200 stations: 32
• Type ET200: ET200M
• Configuration: 16 byte I / 16 byte O
During all measurements, the ET200 stations are connected to the test
CPU and polled actively.

Subnet PB
Settings of the PB subnet:
• 12Mbit/s
• FDL connection
Copyright © Siemens AG 2005 All rights reserved

• S7 connection
21264953_prozessalarm_DOKU_v30_e.doc
A&D AS CS3 KM

Subnet IE
Settings of the IE subnet:
• 100Mbit/s
• Transport protocol: TCP
• FDL: ISO-on-TCP
• S7 connection

Operator panel
OP configuration:
• Basic clock 200ms
• Image update 200ms
• Display of 31 word variables
• Use of range pointer, fault and status messages.

Programming device
Settings:
• Operating mode: Process mode
• PG function “Status variable”: A complete screen page with status
values is displayed on the PG.

Rev. V3.0 - Endgültig 08.06.2004 40/53


Process Alarms OB40

6.6 Programming the components

This chapter describes the programs of the “intelligent” components.

6.6.1 STEP7 programs in the test CPU

The STEP7 program of the test CPU consists of the program parts:
• User program
○ Load program (OB1)
○ OP program (OB1)
○ Communication program (OB1)
○ Watchdog interrupt program (OB35)
○ Process alarm program (OB40)
• Measuring program (OB1, OB40).
Copyright © Siemens AG 2005 All rights reserved
21264953_prozessalarm_DOKU_v30_e.doc

Organization blocks

OB35 OB1
A&D AS CS3 KM

Watchdog interrupt prog. Load program User program


OP program OB40

Communication prog. Process alarm prog.

Measuring program Measuring program Measuring program

Fig. 6-2 Program parts in the test CPU

Definition user program:


All program parts are combined which have nothing to do with the
measured value acquisition. Basically, these program parts can also be
found in real applications.

Definition measuring program:


All program parts are combined which are exclusively used for the
acquisition of measured values. The programs exist in all measurements.
Depending on the configuration of the measurement, only the required
program parts are called.

Rev. V3.0 - Endgültig 08.06.2004 41/53


Process Alarms OB40

Load program
The load program does not have a “real” function during the measurement.
With the program, only OB1 is filled to achieve the desired “no-load cycle
time”. The load program consists of a combination of different STEP7
commands:

Table 6-1 Weighting of the instructions in the load program of the test CPU
Statement type Percentage in the load program
Binary statements 60%
Time / counter statements 20%
Data word commands 10%
Floating point arithmetic 10%

Before the measurement, the no-load cycle time of the test CPU is once
adjusted to 20ms.
During adjusting, all loads (OPs on MPI, PG on MPI, load CPUs on IE and
load CPUs on PB-DP) except the simulated ET200 stations are taken away
physically. The communication program is not called. Thus, the no-load
Copyright © Siemens AG 2005 All rights reserved
21264953_prozessalarm_DOKU_v30_e.doc

program has the structure illustrated below:


A&D AS CS3 KM

Organization blocks

OB35 OB1
Watchdog interrupt prog. Load program User program
OP program

Fig. 6-3 Program parts during cycle time adjusting

OP program
The variables in the OP program are incremented in OB1 of the test CPU in
every cycle. The program is used for the variation of the data displayed on
the OP.

Communication program
The test CPU communicates with the load CPUs via CPs. For this, a
communication program is processed cyclically in the respective CPUs.
The program permanently exchanges data with the load CPUs.
After completing a communication job, this job is restarted immediately.
This creates a very high communication load.

Rev. V3.0 - Endgültig 08.06.2004 42/53


Process Alarms OB40

Two different communication types are realized:


• Without calls of communication blocks in OB1:
Test CPU does not actively participate in the communication; test CPU
is server
• With call of communication blocks in OB1:
Test CPU sends or receives data due to the call of communication
blocks. The communication blocks (SFCs/SFBs) are called cyclically.

Watchdog interrupt program


A watchdog interrupt (OB35) is called every 10ms. 100 instructions are
programmed in OB35. A real watchdog interrupt user program is simulated.

Process alarm program


In OB40, a bit pattern (logical 1) is written to the output I/O with a direct
command.
A delay of the processing of the user program is caused by SFC47 "WAIT".
A bit pattern is again written on the output I/O after a waiting time of 2ms
Copyright © Siemens AG 2005 All rights reserved

(logical 0).
21264953_prozessalarm_DOKU_v30_e.doc

Measuring program
A&D AS CS3 KM

In OB1, the measuring program performs the following:


• Depending on the measurement configuration, communication calls are
disabled or processed
• The OB1 cycle time is written in a data block. An evaluation program
determines the cycle time (minimum, typical, maximum) after completing
the process alarm measurement.

The following measuring program is realized in OB40:


• Toggling of a digital output (see above)

Rev. V3.0 - Endgültig 08.06.2004 43/53


Process Alarms OB40

6.6.2 STEP7 program in the load CPUs

The user program permanently exchanges data with the load CPUs. After
completing a communication job, this job is restarted immediately. This
creates a very high communication load.
Two different communication types are realized:
• Only PUT / GET is called cyclically in OB1 (setting "Without c-blocks" in
the test CPU). Test CPU is server.
• Communication blocks (e.g. SEND/RCV) are called cyclically in OB1.

6.6.3 Communication between test CPU and load CPUs

The tables below show with which blocks and with which user data size
each load CPU communicates with the test CPU.

Test object is S7-300 CPU


Series of measurements Blocks in test Blocks in load Length of Number of
Copyright © Siemens AG 2005 All rights reserved

Subnet Without / with call of c-blocks CPU CPU user data connectio
21264953_prozessalarm_DOKU_v30_e.doc

in test CPU in bytes ns

PB Without --- PUT 160 1


A&D AS CS3 KM

--- GET 160 1


With AG_RCV AG_SEND 240 1
AG_SEND AG_RCV 240
AG_RCV AG_SEND 240 1
AG_SEND AG_RCV 240
IE Without --- PUT 160 1
--- GET 160 1
With AG_RCV AG_SEND 240 1
AG_SEND AG_RCV 240
AG_RCV (*1) AG_SEND 512 (*2) 1
AG_SEND (*1) AG_RCV 512 (*2)
(*1) In the CPU318: AG_LRCV/AG_LSEND
(*2) In the CPU318: 8192 bytes

Test object is S7-400 CPU


Series of measurements Blocks in test Blocks in load Length of Number of
Subnet Without / with call of c-blocks CPU CPU user data connectio
in test CPU in bytes ns

PB Without --- PUT 400 1


and --- GET 400 1
IE With AG_RCV AG_SEND 240 1
AG_SEND AG_RCV 240
U_RCV U_SEND 440 1
U_SEND U_RCV 440
B_RCV B_SEND 16384 1
B_SEND B_RCV 16384

Rev. V3.0 - Endgültig 08.06.2004 44/53


Process Alarms OB40

6.7 Measuring procedure

This chapter briefly describes the individual steps of the measurement of a


measurement configuration.

6.7.1 Performance: Recording process alarm reaction time

A signal change from 0 Æ1 at the digital input (event 1) causes a signal


change 0 Æ1 at the digital output (event 2).
The storage oscilloscope is directly connected with the digital input and
output. The interval between the two events is measured and stored
internally.
The storage oscilloscope is stopped after 5.000 recordings and analyzed
via the internal histogram. The following values are determined:
• Minimum value: Smallest value measured
• Maximum value: Largest value measured
Copyright © Siemens AG 2005 All rights reserved
21264953_prozessalarm_DOKU_v30_e.doc

• Typical value: Arithmetic mean from all measured values.


A&D AS CS3 KM

6.7.2 Performance: Recording OB1 cycle time

The OB1 cycle time is written during the process alarm measurement. After
the measurement has been completed, the measured values stored in the
data block are analyzed and written to ET200 outputs.
The following values are determined:
• Minimum value: Smallest value measured
• Maximum value: Largest value measured
• Typical value: Arithmetic mean from all measured values.

Rev. V3.0 - Endgültig 08.06.2004 45/53


Process Alarms OB40

6.7.3 Example of a series of measurements

The figure below shows a screenshot of the storage oscilloscope after a


series of measurements with 5.000 measurements. In this example, the
CPU318 was recorded with all active communication loads.
The statistical allocation of the measured values can roughly be derived
from the height of the bar.
The lower the bar, the smaller the number of measured values that have
occurred in this range. The x-axis is the time axis.

Largest number of
a measured value
Copyright © Siemens AG 2005 All rights reserved
21264953_prozessalarm_DOKU_v30_e.doc

Minimum Maximum
measured measured
A&D AS CS3 KM

value value

t
Number of
measured
values taken

Typical
measured
value

Fig. 6-4 Example of a series of measurements: Screenshot of the storage


oscilloscope

Rev. V3.0 - Endgültig 08.06.2004 46/53


Process Alarms OB40

6.8 Determination of the measured variables

This chapter defines the measured variables and it introduces the


measuring method.
Measured variables:
• Process alarm reaction time
• OB1 cycle time.

6.8.1 Process alarm reaction time

Definition
The process alarm reaction time is the time from the occurrence of a signal
at the digital input until the reaction at the digital output.
Copyright © Siemens AG 2005 All rights reserved

The time between event 1 and event 2 is measured:


21264953_prozessalarm_DOKU_v30_e.doc

Event 1: A signal change from 0 to 1 takes place at an input with process


alarm capability.
A&D AS CS3 KM

The signal change is reported to the test CPU. The S7-CPU interrupts the
OB1 processing and starts OB40. In OB40, a digital output is controlled by
the direct command “T PAW”.

Event 2: A signal change from 0 to 1 takes place at the digital output.

Rev. V3.0 - Endgültig 08.06.2004 47/53


Process Alarms OB40

Measuring method
A pulse generator generates digital signals which are connected at an input
with process alarm capability of the test CPU. A process alarm is triggered
in case of a positive edge.
The test CPU reacts to the process alarm by calling OB40. In the user
program of OB40, a digital output is set immediately via direct command.
The interval between input and output signal of the test CPU is detected
and stored by a storage oscilloscope. The storage oscilloscope is stopped
after a cycle of 5.000 process alarms and the measuring results are
analyzed.

Schema of the measuring setup and the capture of the performance data:

Test CPU 4x / CPU 3x

ET200M
32 stations OB40 call
simulated
Copyright © Siemens AG 2005 All rights reserved
21264953_prozessalarm_DOKU_v30_e.doc

Profibus-DP Industrial Ethernet


A&D AS CS3 KM

MPI-Bus Profibus
SIMIT PC
DO DI

Pulse generator CPU


Number 3 / 15 PG
OP170B

t
Industrial Ethernet

MPI 4 load CPUs 4 load CPUs

Profibus-DP Measuring point

Profibus

Fig.6-5 Schema of the acquisition of the process alarm reaction time

Rev. V3.0 - Endgültig 08.06.2004 48/53


Process Alarms OB40

Time sequence (centralized I/O)

Periphery DI/DO Test CPU

Process alarm signal at the terminal


of the DI module
and at the input of the oscilloscope
START of the measurement

T1

Process alarm signal at the K-Bus


interface of the DI Process signal at the K-
Bus interface of the CPU
K-Bus
T2
T3 OB40 is called by the
operating system
Start of the execution of
the output command in
Copyright © Siemens AG 2005 All rights reserved

OB40
21264953_prozessalarm_DOKU_v30_e.doc

T4
A&D AS CS3 KM

Process signal at the K-


K-Bus Bus interface of the CPU
Process alarm signal at the K-Bus T5
interface of the DO

T6

Process alarm signal at the terminal


of the DO module
and at the input of the oscilloscope
END of the measurement

Time axis Time axis


with with
times times

Fig. 6-6 Time sequence of the measurement of the process alarms

Rev. V3.0 - Endgültig 08.06.2004 49/53


Process Alarms OB40

Description of the intervals Tx


The following table describes the intervals T1 to T6 as displayed in the time
sequence.

Table 6-2 Description of intervals Tx during process alarm reaction time measurement
Time Description Magnitude Depends on
T1 From: Signal at terminal DI module approx. Internal processing time of
and at oscilloscope 150µs the DI module
Until: Signal at the K-bus interface of the DI
module
T2 From: See above < 1µs Cycle time K-bus
Until: Signal at the K-bus interface of the
CPU
T3 From: See above Type of the CPU
Until: Call OB40 and start of the execution
of the output command
Copyright © Siemens AG 2005 All rights reserved

T4 From: See above < 1µs Operating system


21264953_prozessalarm_DOKU_v30_e.doc

Until: Process alarm signal at the K-bus


interface of the CPU
A&D AS CS3 KM

T5 From: See above < 1µs Cycle time K-bus


Until: Process alarm signal at the K-bus
interface of the DO module
T6 From: See above < 200µs Internal processing time of
Until: Process alarm signal at the output the DI module
terminal of the DO module
and at the oscilloscope

Rough measuring error consideration


The delay times caused by the oscilloscope don’t have any influence.
• Acquisition time of the signals <0,1µs
• The delays occur during the start as well as during the end of the
measurement. I.e., the “measuring error” is compensated.

There are no delay times falsifying the measuring result.

Rev. V3.0 - Endgültig 08.06.2004 50/53


Process Alarms OB40

6.8.2 OB1 cycle time

Definition
The OB1 cycle time is the time the operating system requires for
processing the cyclic program as well as all program parts interrupting this
cycle (e.g. processing a process or a watchdog interrupt) and system
activities (e.g. process image updates).

Measuring method
The duration of the previous OB1 throughput can be polled in OB1. This
value is read out from the start information of OB1 and stored in a data
block functioning as ring buffer.
During measuring the reaction time, the ring buffer is filled with 5.000 cycle
time measured values or continuously overwritten. This ensures that the
5.000 current measured values are in the ring buffer.
Copyright © Siemens AG 2005 All rights reserved

If the measurement is completed, values are no longer written into the ring
21264953_prozessalarm_DOKU_v30_e.doc

buffer and the evaluation of the cycle time is triggered.


The cycle time measurement supplies minimum, maximum and typical
A&D AS CS3 KM

cycle time. The typical cycle time is averaged. This is done via the 5.000
values in the ring buffer.

Rev. V3.0 - Endgültig 08.06.2004 51/53


Process Alarms OB40

6.9 Overview of the components (MLFB, versions)

Here, you find a summary of all components involved in the measurement.

Hardware components
Application Component Type MLFB E status Firmware
version
S7 station S7-CPU CPU 314C-2DP 6ES7314-6CF01-0AB0 1 V2.0.5
of the test object CPU 315-2DP 6ES7315-2AG10-0AB0 1 V2.0.0
CPU317-2DP 6ES7317-2AJ10-0AB0 1 V.2.1.1
CPU318-2DP 6ES7318-2AJ00-0AB0 3 V3.0.1
CPU 416-2DP 6ES7416-2XK02-0AB0 7 V3.1.0
IE CP CP343-1 6GK7343-1EX11-0AB0 2 V2.0.0
CP443-1 6GK7343-1EX11-0XE0 3 V2.3
PB CP CP342-5 6GK7342-5DA02-0XE0 1 V5.2.8
CP443-5 6GK7443-5DX02-0XE0 2 V3.2.3
SM321 DI 16xDC24V 6ES7 321-7BH00-0AB0 1 --
SM322 DO 8xDC24V 6ES7 322-8BF00-0AB0 2 --
Copyright © Siemens AG 2005 All rights reserved
21264953_prozessalarm_DOKU_v30_e.doc

SM421 DI 16xDC24V 6ES7 421-7BH01-0AB0 1 --


SM422 DO 32xDC24V 6ES7 422-7BL00-0AB0 4 --
Communication S7-CPU CPU 416-2DP 6ES7416-2XK02-0AB0 5 V3.0.1
A&D AS CS3 KM

load of the IE CP 1 CP443-1 6GK7443-1EX11-0XE0 3 V2.1.0


test object PB CP 1 CP443-5 6GK7443-5FX01-0XE0 1 V3.2
OP OP170B 6AV6542-0BB15-2AX0 10 V1.0.7
Bus components Switch IE 6GK1105-3AB00 2 V2.1
Repeater RS485 6ES7972-0AA01-0XA0 1 --

Software components
Application Component MLFB Version
Configuration / programming S7 STEP7 6ES7 810-4CC06-0XY0 V5.2 SP1
OP configuration ProTool 6AV 6581-3BX06-0CX0 V6.0 SP2

Rev. V3.0 - Endgültig 08.06.2004 52/53


Process Alarms OB40

7 Appendix

7.1 Abbreviations

Table 7-1 Abbreviations


Abbreviations Explanations
CP Communications processor
CPU Central processing unit
DO Digital output
DB Data block, usable in the STEP7 user program
DI Digital input
DP Distributed I/O
FB Function block, callable in the STEP7 user program
FC Function, callable in the STEP7 user program
I/O Inputs / outputs
IE Industrial Ethernet
C-block Communication block
C-load Communication load
Copyright © Siemens AG 2005 All rights reserved
21264953_prozessalarm_DOKU_v30_e.doc

“Cycle load due to Parameter in the hardware configuration: “Cycle


communication” load due to communication”
A&D AS CS3 KM

max Maximum value


min Minimum value
MPI Multiple Point Interface
OB Organization block
OP Operator panel
PB Profibus
PG Programming device
S7 Control system from the SIMATIC family
SEC SIMATIC Expert Communication
SFB Standard function block
SFC System function, callable in the STEP7 user
program
SIMIT SIMIT® process simulation system
typ Typical value, arithmetic mean

7.2 Definitions

Table 7-2 Definitions


Term Definition
Load CPU The load CPU communicates with the test CPU via a PB subnet or an
IE subnet.
Test CPU This S7-CPU processes the watchdog interrupt OB (OB35). The
performance data are measured for this S7-CPU.

Rev. V3.0 - Endgültig 08.06.2004 53/53

Potrebbero piacerti anche