Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Content
1 Preliminary Remarks
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?
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).
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
Only current components from the SIMATIC delivery scope were used for
the measurements:
• As at August 2003
OP7 OP170B
Output modules: Quicker output modules:
As at: January 2001 As at: August 2003
Additional measured variable
OB1 cycle time
This table allows you to decide quickly which chapter you want to read.
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.
Reference potential (M) is grounded. All racks are connected with the
station ground.
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
Profibus DP
CPUnn
CPU
32 ET200
Communication load:
Industrial
MPI Profibus Ethernet
CPU n
CPU CPUnn CPUnn
PG 3 / 15n 4CPU
load 4CPU
load
OP170 CPUs CPUs
2.2 Configurations
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:
Following process image update in the S7-CPU
Cycle load due to 5% / 10% Smallest value possible (S7-400: 5%, S7-300: 10%)
21264953_prozessalarm_DOKU_v30_e.doc
Note
If the macros cannot be activated, the safety settings in “Tools/Macros/Safety”
must be set to medium.
Tab
selection
Functional
model
Copyright © Siemens AG 2005 All rights reserved
21264953_prozessalarm_DOKU_v30_e.doc
A&D AS CS3 KM
Operation
All input and output boxes are doubled in order to enable simultaneous
viewing of two configurations:
• Configuration 1: Shaded yellow
• Configuration 2: Shaded purple.
Input section
Output section
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?
Proceed as follows:
In a first step, select two identical configurations (“yellow“ and ”purple“
A&D AS CS3 KM
The influence can now be seen in the “yellow” and “purple” output boxes.
You can also do this accordingly for other measuring parameters.
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
The standard EXCEL user interface appears. The tables are available in
the Excel sheets.
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
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
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.
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
x-axis:
Parameters of the configuration
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
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
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.
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.
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.
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.
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
S7-300 CPUs
Process alarm reaction times of the S7-300 CPUs without communication
load:
S7-400 CPUs
Process alarm reaction times of the S7-400 CPUs without communication
load:
• September 2003
21264953_prozessalarm_DOKU_v30_e.doc
A&D AS CS3 KM
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
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.
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.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
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
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.
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.
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
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
Organization blocks
OB35 OB1
Watchdog interrupt prog. Load program User program
OP program
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.
(logical 0).
21264953_prozessalarm_DOKU_v30_e.doc
Measuring program
A&D AS CS3 KM
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.
The tables below show with which blocks and with which user data size
each load CPU communicates with the test CPU.
Subnet Without / with call of c-blocks CPU CPU user data connectio
21264953_prozessalarm_DOKU_v30_e.doc
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.
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
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 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”.
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:
ET200M
32 stations OB40 call
simulated
Copyright © Siemens AG 2005 All rights reserved
21264953_prozessalarm_DOKU_v30_e.doc
MPI-Bus Profibus
SIMIT PC
DO DI
t
Industrial Ethernet
Profibus
T1
OB40
21264953_prozessalarm_DOKU_v30_e.doc
T4
A&D AS CS3 KM
T6
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
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
cycle time. The typical cycle time is averaged. This is done via the 5.000
values in the ring buffer.
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
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
7 Appendix
7.1 Abbreviations
7.2 Definitions