Bien Tan
Bien Tan
MC-FE-I-007-V10-EN
Preliminary remarks
Functional examples for the topic "Safety Integrated" are fully-functioning
and tested automation configurations based on standard I DT & IA products
for simple, fast and low-cost implementation of automation tasks in safety
engineering. Each of the functional examples presented deals with sub-task
of a typical problem that customers are frequently confronted with in safety
engineering.
Besides listing all the necessary software and hardware components, and
describing their interconnection, the functional examples also include tested
and commented code. This means that the functions described here can be
set up within a short time and can thus be used as the basis for expanded
and adapted solutions.
Important Note
The safety function examples are non-binding and do not claim to be com-
plete in respect of configuration, equipment or any type of contingency. The
Copyright © Siemens AG 2009 All rights reserved
safety function examples are not customer-specific solutions but are only
intended to provide support in implementing typical tasks. You are respon-
31410726 _mc_fe_i_007_v10_en.doc
Table of contents
1 Warranty conditions, liability, and support .................................................. 5
2 Automation function....................................................................................... 6
2.1 Description of the function example.................................................................. 6
2.2 Advantages / customer benefits ....................................................................... 9
3 Required components.................................................................................. 10
3.1 Hardware components.................................................................................... 10
3.2 Software components ..................................................................................... 11
3.2.1 Engineering software ...................................................................................... 11
3.2.2 Firmware......................................................................................................... 11
4 Configuration and wiring ............................................................................. 12
4.1 Overview of the hardware configuration ......................................................... 12
4.2 Wiring of the hardware components ............................................................... 12
4.2.1 Wiring the control voltage ............................................................................... 12
4.2.2 Principle connection of the F-CPU to the TM54F ........................................... 14
Copyright © Siemens AG 2009 All rights reserved
If you have any questions about this article, please send an e-mail to
the following address:
[email protected]
2 Automation function
2.1 Description of the function example
sion.
SS1 Safe Stop 1 • The drive is quickly and safely stopped
along the OFF3 ramp and is safely moni-
tored.
• Transition to STO after a delay time has ex-
pired or the shutdown speed has been rea-
ched. (Stop function, Category 1 according
to EN 60204-1)
SS2 Safe Stop 2 • The drive is quickly and safely stopped
along the OFF3 ramp and is safely moni-
tored.
• Transition into SOS after a delay time has
expired; the drive remains in closed-loop
control. (Stop function, Category 2 accor-
ding to EN 60204-1)
SOS Safe Operating • This function serves to safely monitor the
Stop standstill position of a drive; the drive re-
mains in closed-loop control.
SLS Safely-Limited • The drive speed is safely monitored.
Speed • Parameterizable shutdown response when
the limit value is violated.
SSM Safe Speed Mo- • Safely displays when a speed limit is fallen
nitor below (n < nx)
Task description
A system equipped with SINAMICS S120 drives is controlled from a
SIMOTION D435. Different safety functions are required in the system.
SIMOTION itself has no safety functions. The extended safety functions in-
tegrated in the SINAMICS S120 drives are used.
These safety functions integrated in the drive are to be controlled from a
TM54F using hardware signals. The drives belong to different drives
groups. An F-CPU handles the safety-oriented logical pre-processing of the
input signals.
This function example is based on the SIMOTION D435 training case
(6ZB2 470-0AE00) and the SAFETY training case.
A typical overview of the assumed machine configuration is shown in the
following diagram.
Copyright © Siemens AG 2009 All rights reserved
31410726 _mc_fe_i_007_v10_en.doc
The following safety functions are used as basis for further consideration.
Safety
Description Response
function
Drive 1 is quickly stopped in a
controlled fashion -> subse-
The Emergency Stop button is quent pulse suppression (SS1)
SF1
actuated
Drive 2 is stopped with imme-
diate pulse suppression (STO)
Drive 1 should be stopped The SIMOTION brakes drive 1
quickly when safety door 1 is in the closed-loop position con-
opened. Drive 1 must then be trolled mode. The standstill
SF2
stopped with speed setpoint = position is safely monitored
0 and the standstill position (SOS) after a delay time has
safely monitored. expired
When safety door 2 is open,
The speed of drive 2 is moni-
SF3 drive 2 must not exceed a ma-
tored (SLS)
ximum speed
Copyright © Siemens AG 2009 All rights reserved
31410726 _mc_fe_i_007_v10_en.doc
Solution
Hardware overview
This function example shows how the STO, SS1, SOS and SLS safety
functions are controlled via the terminal expansion module TM54F at a
SIMOTION D435 with a SINAMICS S120 drive group.
The drive line-up in the booksize format comprises an infeed and a Double
Motor Module. A SIMOTION D435 is used for the closed-loop motion con-
trol and closed-loop motor control. The two servomotors, which are inde-
pendent of one another, are controlled from the Double Motor Module. A
Smart Line Module is used as infeed.
The safety-oriented signals are sensed using fail-safe inputs of the ET200M
and evaluated in the F-CPU. The pre-processed signals are transferred to
the TM54F terminal expansion module via fail-safe ET200M outputs. These
control the safety functions integrated in the SINAMICS S120 drive.
When Emergency Stop is initiated, drive 1 is stopped using the SS1 func-
tion integrated in the drive and drive 2 is stopped with STO.
Two switches in the Safety training case each simulate a safety door for
drive 1 and 2. If safety door 1 is opened, then SIMOTION brakes drive 1
down to standstill (zero speed). After a configurable time has expired, the
standstill position is safely monitored (the SOS function is selected). When
the door is closed, axis 1 restarts (the SOS function is deselected). When
safety door 2 is opened, the speed of drive 2 is monitored against a config-
urable maximum value (SLS function). The setpoint speed is limited to 80%
of the selected SLS stage. The speed limit is withdrawn if the simulated
door is closed again. The other drive is not influenced.
Copyright © Siemens AG 2009 All rights reserved
31410726 _mc_fe_i_007_v10_en.doc
3 Required components
The hardware components and software versions required to realize the
function example are listed in this chapter.
Note The function example was tested with the hardware components listed
here. Alternatively, other components with the same function may be
used. In such a case, a different parameterization and different wiring of
the components may be required.
S7 Distributed Safety
Copyright © Siemens AG 2009 All rights reserved
3.2.2 Firmware
Basic configuration
-X520
1 L3+
2 M1
-X521
1 L1+
DO 0+ 2 DI 0
F-DI 0
3 DI 1+
F-DO 0 4 DI 2
R1 R2 F-DI 1
5 DI 3+
DO 0- 6 DI 1-
7 DI 3-
M1 8 M1
Ethernet Encoder 2
-X120
-X130
Encoder 1
Copyright © Siemens AG 2009 All rights reserved
31410726 _mc_fe_i_007_v10_en.doc
DRIVE-CLiQ interconnection
In this function example, the PROFIBUS interfaces of the F-CPU and the
D435 are only used for programming. Hardwired 24 V signals are used
exclusively for the safety-oriented signal exchange between the F-CPU and
the TM54F.
Programming device / PC
• PROFIBUS address = 0
• As the F-CPU used is the bus master, the PROFIBUS interface of the
programming device must not be configured as the only master on the
bus (do not enter a checkmark in the field "PG/PC is the only master on
the bus").
Copyright © Siemens AG 2009 All rights reserved
31410726 _mc_fe_i_007_v10_en.doc
SIMOTION D435
• PROFIBUS address = 2
• The PROFIBUS address is set via HW Config.
Copyright © Siemens AG 2009 All rights reserved
31410726 _mc_fe_i_007_v10_en.doc
View in NetPro
Copyright © Siemens AG 2009 All rights reserved
• The SIMATIC components have been mounted and connected with one
another. The PROFIsafe addresses of the fail-safe input and output
modules must be set using the DIL switch; see Chapter 6.2 Hardware
configuration of the fail-safe control.
• All of the components are connected as specified in Chapter 4.2 Wiring
of the hardware components.
• The DRIVE-CLiQ topology of the SINAMICS components has been
maintained.
• The motors are connected to the Motor Module using the power and
encoder cable.
• The Motor Module is correctly connected with the infeed (DC link and
24 V DC control voltage).
• The infeed is connected to the line supply.
• The components are supplied with 24 V DC.
Hardware overview
The window then opens in which you can set the operating state of
SIMOTION. The rotary switch should be set to the RUN position.
Switches -S1 to -S4 are located on a switchbox that belongs to the Safety
training case. The various safety functions are selected using these
switches. Switches -S5 to -S10 are located on a switchbox that belongs to
the SIMOTION training case. These switches are used to switch axis
enable signals, start travel programs, initiate the test function for the safety
functions and acknowledge faults.
The Emergency Stop button S1 must be released in order to be able to
operate the drives
The axis enable signals for drive 1 (upper motor) are switched using switch
-S5. The associated travel program can be started and stopped using -S6.
For axis 2 (lower motor), -S7 is used to issue the enable signal and the
travel program is activated or deactivated with -S8. Pending alarms on the
SIMOTION as well as drive alarms can be acknowledged using -S9. The
safety alarms are the exception in this case, as they must be acknowledged
in a fail-safe fashion using -S4. The test stop to be cyclically executed for
the safety functions in the drives as well as the TM54F is activated using -
Copyright © Siemens AG 2009 All rights reserved
S10.
31410726 _mc_fe_i_007_v10_en.doc
If the Emergency Stop pushbutton -S1 is pressed, then for drive 1 (upper
motor), safety function SS1 is initiated; i.e. the drive is braked along the
OFF3 ramp and then STO is activated. STO is directly initiated for drive 2
(lower motor); i.e. the drive coasts down. When Emergency Stop is initiated
drive 1 comes to a standstill before drive 2.
Drive 1 can be operated when safety door 1 is closed (toggle switch -S2). If
-S2 is opened, then safety function SOS is initiated; i.e. SIMOTION brakes
the drive down to standstill. The drive standstill position is safely monitored
after a configurable time has expired. If the simulated safety door -S2 is
closed again, then the travel program is restarted. In this case, an ON
command is not necessary.
Drive 2 can be operated at any speed when safety door 2 is closed (toggle
switch -S3). If -S3 is opened, then SIMOTION limits the travel speed to
80% of the speed limit value of stage 1 of safety function SLS. This limit
value is monitored by safety function SLS after a defined time has expired.
If -S3 is closed again, then SLS is switched-out and the speed limit on the
SIMOTION is withdrawn. The drive can now be operated again with the
configured speed.
6 Example project
In this chapter, you get to know how the individual components must be
parameterized. SIMOTION SCOUT is used as the engineering software for
SIMOTION and the SINAMICS S120. Distributed Safety is a prerequisite
for programming the F-CPU.
It will now be described how the software project belonging to this function
example was set-up.
6.1 Passwords
Description Remark
In the SIMATIC
Manager, insert a
SIMATIC 300 station
into the project.
Copyright © Siemens AG 2009 All rights reserved
31410726 _mc_fe_i_007_v10_en.doc
Description Remark
In the properties
window of the F-CPU,
under the Protection
tab, activate access
protection for the F-
CPU and protect using
a password.
Activate the safety
program ("CPU
contains safety
program").
Copyright © Siemens AG 2009 All rights reserved
31410726 _mc_fe_i_007_v10_en.doc
Configure the
PROFIsafe address
using DIL switches.
Configuring F-DI 0
(channels 0, 12)
Description Remark
Configuring F-DI 1
(channels 1, 13)
Configuring F-DI 2
(channels 2, 14)
Copyright © Siemens AG 2009 All rights reserved
Configuring F-DI 3
31410726 _mc_fe_i_007_v10_en.doc
(channels 3, 15)
Configuring F-DI 5
(channels 5, 17)
Configure the
PROFIsafe address
using DIL switches.
Description Remark
Configuring F-DO 0
Configuring F-DO 1
Configuring F-DO 2
Copyright © Siemens AG 2009 All rights reserved
Configuring F-DO 5
31410726 _mc_fe_i_007_v10_en.doc
Configuring F-DO 7
Description Remark
Programming OB35
Description Remark
Programming FB1
Network 1:
Activate automatic
acknowledgement
Network 2:
Control signal lamp in -
S4.
Copyright © Siemens AG 2009 All rights reserved
31410726 _mc_fe_i_007_v10_en.doc
Programming FB1
Network 3:
-S1 (Emergency Stop)
is interconnected to F-
DO 0.
Network 4:
-S2 is interconnected,
inverted to F-DO 1.
Network 5:
-S3 is interconnected
to F-DO2.
Network 6:
-S4 is interconnected
to F-DO5.
Network 7:
-S4 is used for
acknowledgement.
Description Remark
In addition, download
the standard blocks
into the F-CPU.
Description Remark
Copyright © Siemens AG 2009 All rights reserved
31410726 _mc_fe_i_007_v10_en.doc
Insert an additional
SIMATIC 300 station
into the existing object.
Description Remark
Description Remark
compile. Then
31410726 _mc_fe_i_007_v10_en.doc
download HW Config
into SIMOTION. HW
Config can now be
closed.
SIMOTION is now
integrated into the
existing project.
Description Remark
Open SCOUT /
STARTER from the
SIMATIC project (->
double click on
"Commissioning")
Go online
Copyright © Siemens AG 2009 All rights reserved
31410726 _mc_fe_i_007_v10_en.doc
Description Remark
In the Project
Navigator for drive 1
(SERVO_02), open the
configuration window.
Post configuration,
drive 1
Description Remark
Post configuration,
drive 1
The PROFIdrive
message frame
(p0922) must be set for
the drive. Message
frame type 105 is used
here in the example.
Copyright © Siemens AG 2009 All rights reserved
31410726 _mc_fe_i_007_v10_en.doc
Post configuration,
drive 2
Description Remark
Post configuration,
drive 2
A 1FK7022 - 5AK71 -
1AG0 motor is used in
the example.
Copyright © Siemens AG 2009 All rights reserved
31410726 _mc_fe_i_007_v10_en.doc
Post configuration,
drive 2
Description Remark
Post configuration,
drive 2
The PROFIdrive
message frame
(p0922) must be set for
the drive. Message
frame type 105 is used
here in the example.
Copyright © Siemens AG 2009 All rights reserved
31410726 _mc_fe_i_007_v10_en.doc
The TM54F is
automatically created,
if for the automatic
configuration, it was
connected to the D435
via Drive-CLiQ.
Description Remark
On both drives,
several parameters
31410726 _mc_fe_i_007_v10_en.doc
now have to be
adapted in the expert
list.
Adaptation to 230V
operation.
Configuring the OFF3
ramp.
p2101 = r722.6 in the expert list of the CU
Interconnect alarm
acknowledgement with
-S9 (= DI 6 SINAMICS
Integrated).
Description Remark
Note:
The fail-safe terminal module must be configured online.
Description Remark
"Configuration" window
Description Remark
Description Remark
"Outputs" window
Assign a new
password. The value
"1" is used in the
example.
Activate settings
Note:
The system can be immediately restarted. However, it is recommended to
configure the safety functions of the axes beforehand.
Notes:
The safety functions in the drives must be configured online.
Only the windows are described in which parameter changes are required.
For both drives, safety functions STO, SS1, SS2, SOS, SLS and SSM are
commissioned so that they are able to be controlled. However, for drive 1,
the example is restricted to selecting SS1 and SOS. STO and SLS are
controlled for drive 2.
The safety functions are configured precisely the same way for both drives.
Description Remark
Copyright © Siemens AG 2009 All rights reserved
31410726 _mc_fe_i_007_v10_en.doc
Description Remark
"Safety Integrated"
window
"Configuration" window
Description Remark
500mm/min
Shutdown speed SS1
31410726 _mc_fe_i_007_v10_en.doc
= 100mm/min
Standstill tolerance
SOS = 2.5mm
Description Remark
Assign a new
password. The value
"1" is used in the
example.
Activate settings
backup.
Axial backup is
31410726 _mc_fe_i_007_v10_en.doc
If you have carried out the safety commissioning for all drives, with
Emergency Stop deselected, you can operarte the drives from the control
panel or SIMOTION.
The use of the safety functions integrated in the drive is selected and these
can be activated or deactivated using the operator control elements at the
F-CPU.
Only the following messages should be visible.
The message frame extension for the so-called safety data block was cre-
ated in Section 6.5.1. Here, the objective is to supply this data block with
the required data from SINAMICS Integrated. 6 bytes / 3 words are re-
quired. The data is sent from the drive to SIMOTION. No safety signals are
sent from SIMOTION to the drive.
The user connects up the process data using the BiCo interconnection in
SINAMICS. The sequence of the individual signals in the safety data block
must not be changed.
The checkback signal bits of the drive safety functions are transferred in
the first word.
The interconnection of the safety datablock on the drive side has the
31410726 _mc_fe_i_007_v10_en.doc
following assignment:
The SINAMICS safety status signals are shown in the SIMOTION system
variables D435.Axis_1.drivedata.drivesafetyextendedfunctionsinfodata.state.
The value of the setpoint speed limit is shown in
D435.Axis_1.drivedata.drivesafetyextendedfunctionsinfodata.safespeedlimit.
6.6 SIMOTION
On the SIMOTION side, the axes should be created as follows using the
Commissioning Wizards. SERVO_02 is assigned to Axis_1, SERVO_03 is
correspondingly connected to Axis_2. The procedure is shown for an axis
(Axis_1) as example. The two axes must be configured before the project is
downloaded into SIMOTION.
Description Remark
Start the
Commissioning
Copyright © Siemens AG 2009 All rights reserved
Wizards by double-
31410726 _mc_fe_i_007_v10_en.doc
Description Remark
Description Remark
Modulo correction is
not activated in the
example.
Copyright © Siemens AG 2009 All rights reserved
31410726 _mc_fe_i_007_v10_en.doc
The assignment
between SIMOTION
object (Axis_1) and the
SINAMICS axis
(SERVO_02) is
established in this
window.
Transfer data from the
drive (Normalization
speed and maximum
speed).
Check as to whether
PROFIdrive message
frame 105 is selected.
Description Remark
As the SINAMICS
drives have now been
configured, here a
check is only made as
to whether the values
were correctly
accepted. Generally,
changes are not
required.
It is especially
important that you
check the message
frame extension of 3
Copyright © Siemens AG 2009 All rights reserved
as this is required to
transfer safety data
from the drive to
SIMOTION.
The encoder is
assigned here.
The encoder data can
be transferred into the
Wizard using the "Data
transfer from the drive"
button.
Description Remark
Description Remark
acceleration and
deceleration.
31410726 _mc_fe_i_007_v10_en.doc
"Limits" window
Description Remark
"Control" window
Description Remark
Description Remark
The programs used in the function example are briefly presented in this
section. The program code and a very detailed description will not be given
as the program itself has comments.
ST programs include the comments directly in the code. For MMC
programs, commented blocks are identified by a green triangle in the upper
righthand corner. The comment can be opened by selecting the block and
opening a menu with the righthand mouse key. Here, the "Enter comment
..." entry must be selected.
The digital inputs of SINAMICS Integrated of the SIMOTION D435 are used
to control (open-loop) axis motion. These inputs are read into SIMOTION
via the I/O variable "io_cu320_inword". The outputs of SINAMICS
integrated can be controlled via the "io_cu320_outword" variable; however,
this is not applicable for this example. The inputs are used, e.g. to switch-
on the drives, start travel programs, acknowledge faults and to start the test
Copyright © Siemens AG 2009 All rights reserved
The two variables are created as shown as follows in the Project Navigator
under "I/O".
S1. This means that after starting the travel program once, "endless
motion" of the axis is executed until this is interrupted by selecting a safety
31410726 _mc_fe_i_007_v10_en.doc
6.6.2.6 Axis_01.mt_safety_axis_1
STO
When selecting STO, no special response is necessary as the impulses are
immediately suppressed. When deselecting, a response is also not
necessary as after deselecting STO, a new ON command must be set.
SS1
When selecting SS1, the axis must be switched into the follow-up mode
and the "Axis_01.mt_axis_1" motion program interrupted. To do this, Mo-
tionTask_3 and the actual traversing command are interrupted. When
deselecting SS1, MotionTask_3 is reset so that it can be restarted. As SS1
automatically results in an STO, a new ON command is required to restart
axis motion.
SS2
When selecting SS2, the axis must be switched into the follow-up mode
and the "Axis_01.mt_axis_1" motion program interrupted. To do this,
MotionTask_3 and the actual traversing command are interrupted.
MotionTask_3 is continued when SS2 is deselected. The motion is
automatically continued when deselected. An additional command is not
necessary.
SOS
Copyright © Siemens AG 2009 All rights reserved
6.6.2.7 Axis_02.mt_safety_axis_2
6.6.2.8 ST_VarGlobal
Variables required to evaluate the safety status word are defined in this ST
program.
6.6.2.9 ST_Main
completely comply with the specification. This is the reason that the safety
status word must be cyclically evaluated.
"startup"
In this program, the axis instances are assigned, i.e. it is defined as to
which axis corresponds to which variable. Further, the velocity limit of the
SIMOTION configuration project is buffered here in a variable. When
selecting SLS, this value is overwritten and when deselected, must be
available again. The program is processed in the StartupTask.
"extsafety"
The safety status work is evaluated in this program in order to obtain
information as to which safety functions are in which state. A distinction is
made between the states "selected" (coming event), "active" "deselected"
(going event) and "inactive". Depending on this information, the motion task
is then started, which includes the program for the axis-specific response to
safety functions (MotionTask_6 for Axis_1 and MotionTask_7 for Axis_2).
In the example, the program is processed in the IPO task; however, this is
only necessary if the SS2 or SS1 functions are being used. Without these
two functions, processing in the Background Task is sufficient. When
Copyright © Siemens AG 2009 All rights reserved
6.6.2.11 other_MMCs.executionfault
On the SIMOTION side, there are 3 messages for the extended safety
functions.
50201: Safety alarm in the drive
50202: Drive starts Safety Integrated Extended function
50203: Drive completes Safety Integrated Extended function
Presently, these messages can still not be used for configuring the axis-
specific responses of SIMOTION. This is the reason that they are hidden
for both axes for this function example.
Up until now, the configuration of the function example was described step-
by-step. The following steps should now be followed if the project example
is to be directly downloaded into the hardware.
To start, all of the components (S7-F-CPU, SIMOTION and SINAMICS
Integrated) should be generally reset or reset to the factory setting.
only necessary to change the bus address and the baud rate to the values
31410726 _mc_fe_i_007_v10_en.doc
The window to download the safety functions is first opened using the "yel-
low" button in the function bar. The download is then initiated from this win-
Copyright © Siemens AG 2009 All rights reserved
After the download, SCOUT is opened from the SIMATIC project (double-
click on "Commissioning").
This function does not exist as button for the TM54F. Here, the safety
screen should also be opened and the commissioning mode selected using
the "Change settings" button and exited again using "Activate settings". To
do this, the safety password ("1") must be entered.
The backup procedure from RAM to ROM must then be initiated for
31410726 _mc_fe_i_007_v10_en.doc
7 History
Version Date Change
V1.0 09/2009 First Edition