Simatic Automation System S7-300 CPU 317TF-2 DP: Controlling A SINAMICS S120 With Safety Functions

Download as pdf or txt
Download as pdf or txt
You are on page 1of 74

1

___________________
Introduction

___________________
Preparation 2

___________________
Wiring 3
SIMATIC
___________________
Configuration 4
Automation System S7-300
CPU 317TF-2 DP: ___________________
Programming 5
Controlling a SINAMICS S120
with Safety Functions ___________________
Trial run 6
Getting Started
___________________
Further Information 7

10/2012
A5E02982990-03
Legal information
Legal information
Warning notice system
This manual contains notices you have to observe in order to ensure your personal safety, as well as to prevent
damage to property. The notices referring to your personal safety are highlighted in the manual by a safety alert
symbol, notices referring only to property damage have no safety alert symbol. These notices shown below are
graded according to the degree of danger.

DANGER
indicates that death or severe personal injury will result if proper precautions are not taken.

WARNING
indicates that death or severe personal injury may result if proper precautions are not taken.

CAUTION
with a safety alert symbol, indicates that minor personal injury can result if proper precautions are not taken.

CAUTION
without a safety alert symbol, indicates that property damage can result if proper precautions are not taken.

NOTICE
indicates that an unintended result or situation can occur if the relevant information is not taken into account.
If more than one degree of danger is present, the warning notice representing the highest degree of danger will
be used. A notice warning of injury to persons with a safety alert symbol may also include a warning relating to
property damage.
Qualified Personnel
The product/system described in this documentation may be operated only by personnel qualified for the specific
task in accordance with the relevant documentation, in particular its warning notices and safety instructions.
Qualified personnel are those who, based on their training and experience, are capable of identifying risks and
avoiding potential hazards when working with these products/systems.
Proper use of Siemens products
Note the following:

WARNING
Siemens products may only be used for the applications described in the catalog and in the relevant technical
documentation. If products and components from other manufacturers are used, these must be recommended
or approved by Siemens. Proper transport, storage, installation, assembly, commissioning, operation and
maintenance are required to ensure that the products operate safely and without any problems. The permissible
ambient conditions must be complied with. The information in the relevant documentation must be observed.

Trademarks
All names identified by ® are registered trademarks of Siemens AG. The remaining trademarks in this publication
may be trademarks whose use by third parties for their own purposes could violate the rights of the owner.
Disclaimer of Liability
We have reviewed the contents of this publication to ensure consistency with the hardware and software
described. Since variance cannot be precluded entirely, we cannot guarantee full consistency. However, the
information in this publication is reviewed regularly and any necessary corrections are included in subsequent
editions.

Siemens AG A5E02982990-03 Copyright © Siemens AG 2012.


Industry Sector Ⓟ 07/2012 Technical data subject to change All rights reserved
Postfach 48 48
90026 NÜRNBERG
GERMANY
Table of contents

1 Introduction................................................................................................................................................ 5
2 Preparation ................................................................................................................................................ 7
2.1 Requirements.................................................................................................................................7
2.2 Task ...............................................................................................................................................9
3 Wiring ...................................................................................................................................................... 13
4 Configuration ........................................................................................................................................... 17
4.1 Setting up the T station with the help of wizards .........................................................................17
4.2 Configuring the F-DI signal module .............................................................................................20
4.3 Configuring the F-DO signal module ...........................................................................................23
4.4 Configuring a drive in HW Config.................................................................................................25
4.5 Downloading the hardware configuration to the target hardware ................................................26
4.6 Configuring a drive in S7T Config ................................................................................................27
4.7 Message frame configuration of the drive....................................................................................42
4.8 Configuring safety-related communication between the TF-CPU and drives with safety
functions.......................................................................................................................................43
4.9 Configuring the properties of the TF-CPU ...................................................................................46
4.10 Interconnecting the safety data block with SINAMICS parameters .............................................47
4.11 Configuring safety functions on the drive.....................................................................................51
4.12 Configuring an axis in S7T Config ...............................................................................................54
5 Programming ........................................................................................................................................... 61
5.1 Creating technology data blocks..................................................................................................61
5.2 Creating an S7 user program.......................................................................................................63
5.3 Editing the safety program ...........................................................................................................64
6 Trial run ................................................................................................................................................... 69
7 Further Information .................................................................................................................................. 73

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


Getting Started, 10/2012, A5E02982990-03 3
Table of contents

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


4 Getting Started, 10/2012, A5E02982990-03
Introduction 1
These instructions provide a practical example guiding you through the commissioning
tasks required to create a fully functional application, and showing you how to perform a
motion with additional safety functions. It will help you get acquainted with operating
CPU 317TF-2 DP and the SINAMICS S120 drive system.
Depending on your level of expertise, working through the sample will take between
4 and 5 hours.

Validity
The manual is valid for the following components:
● CPU 317TF-2 DP as of V 2.7/4.1.5
● SINAMICS S120 as of V 2.6.2
● S7 Technology as of V 4.2 SP1
● S7 Distributed Safety as of V 5.4 SP5 and S7 F Configuration Pack as of V 5.5 SP7

Requirementss
This document presumes that you have connected a SINAMICS S120 drive system
to the DP(DRIVE) interface of the CPU 317TF-2 DP.
We recommend the following manuals as preparation:
● Getting Started "CPU 317T-2 DP: Controlling an SINAMICS S120"
● Getting Started "S7 Distributed Safety"
● System manual "Safety Engineering in SIMATIC S7"

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


Getting Started, 10/2012, A5E02982990-03 5
Introduction

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


6 Getting Started, 10/2012, A5E02982990-03
Preparation 2
2.1 Requirements

Requirements
The following requirements must be fulfilled:
● You have an S7-300 station, consisting of:
– Power supply (PS), e.g. 6ES7307-1KA00-0AA0
– CPU 317TF-2 DP with Memory Card (8 MB or more),
6ES7317-6TF14-0AB0 V 2.7/V 4.1.5.
– Digital input module, safety-related (F-DI) with bus connector,
for example, 6ES7326-1BK02-0AB0
– Digital output module, safety-related (F-DO) with bus connector,
for example, 6ES7326-2BF10-0AB0
– Safety protector, 6ES7195-7KF00-0XA0
– Digital input module (DI) with bus connector, for example, 6ES7321-1BH02-0AA0
– Digital output module (DO) with bus connector, for example, 6ES7322-1BH01-0AA0
– Two optional front connectors for the digital modules
● For operating the safety functions, you need:
– Emergency stop switch, dual channel - see the Configurator for pushbuttons and
SIRIUS 3SB3/3SF5 indicator lamp in the Internet
(http://www.siemens.com/industrymall)
– Key switch, dual channel - see the Configurator for pushbuttons and SIRIUS
3SB3/3SF5 indicator lamp in the Internet (http://www.siemens.com/industrymall)
– 2 hinge position switches, dual channel, to monitor the protected zone door -
see the Configurator for position switches in the Internet
(http://www.siemens.com/industrymall)
● A PG with MPI interface and properly installed software packages and commissioning
tools as listed below:
– STEP 7 as of V5.5 SP1
– S7 Technology as of V 4.2 SP1
– Distributed Safety as of V 5.4 SP5 with F Configuration Pack as of V 5.5 SP7
● The PG is connected to the CPU via the MPI/DP interface
(transmission rate up to 12 Mbps; default 187.5 kbps):
– PROFIBUS cable 6ES7901-4BD00-0XA0 (for transmission rates up to 12 Mbps)

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


Getting Started, 10/2012, A5E02982990-03 7
Preparation
2.1 Requirements

● A SINAMICS S120 drive system with the following components is connected to the
CPU 317TF-2 DP via the DP(DRIVE) interface:
– CU320 Control Unit with TB30 Terminal Board (6SL3040-0MA00-0AA1)
– Smart Line Module 5 kW (6SL3130-6AE15-0AA0)
– Single/Double Motor Module 3 A (6SL3120-2TE13-0AA3)
– 1 synchronous motor 1FK7022-5AK71-1AG3 with incremental encoder sin/cos 1 Vpp
via sensor module cabinet SMC20 (6SL3055-0AA00-5BA1) - optional
– 1 synchronous motor 1FK7022-5AK71-1LG3 with DRIVE-CLiQ interface:
Absolute encoder EnDat 512 pulses/revolution
– Reference loops for position monitoring
– Control box for setpoint/actual-value linkage via terminals
● SINAMICS S120 has the factory settings.
● You know the firmware version of your SINAMICS S120.
If you do not know the firmware version, you can find the version listed in the supplied
documents. Alternatively, you can open the "content.txt" file on the CF card. The firmware
version is in the "Internal Version" entry. You can find more detailed information on
reading the firmware version in the SINAMICS S120 product information.

Note
We have used a SINAMICS S120 training case as an example of a drive for this
Getting Started. The training case is available under the following order number:
• Single-axis version with 1FK7 motor
6ZB2480-0AA00
• 2-axis version with 1FK7 motors
6ZB2480-0BA00

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


8 Getting Started, 10/2012, A5E02982990-03
Preparation
2.2 Task

● The hardware is completely assembled and wired. For information, refer to


Getting Started CPU 31x: Commissioning.
● You provided hardware limit switches and EMERGENCY-OFF switches for safe and
reliable operation of the system. This EMERGENCY-OFF switch is independent of the
emergency stop switch described in the application example.

WARNING

Non-compliance with the regulations can result in serious injuries and damage to
machines and equipment.
Operation of an S7-300 as part of plants or systems is subject to special rules and
regulations, based on its field of application. Please note the current safety regulations
for the prevention of accidents, e.g. IEC 204 (EMERGENCY-OFF equipment).

2.2 Task
The example includes a technology task (positioning) with safety functions.
The axis moves in a production area with access control.

Technology task
The positioning requests are performed via two inputs:
● Start position at position 1 (0 mm)
● Start position at position 2 (5000 mm)
3RVLWLRQ 3RVLWLRQ

$[LV

Other inputs are used to start or stop the axis.

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


Getting Started, 10/2012, A5E02982990-03 9
Preparation
2.2 Task

Safety elements
The following figure shows the safety elements in the protection zone.

1 Signal lamps for indicating the operating status


2 Safety door with 2 position switches
3 Emergency stop switch
4 Key switch for setup mode
5 Acknowledgment button for safety-related events and reintegration of the F-I/O

Figure 2-1 Production area with access protection

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


10 Getting Started, 10/2012, A5E02982990-03
Preparation
2.2 Task

Actuation of safety elements triggers the following safety functions on the drive:
Safety element Safety function on the drive
Emergency stop switch Safe Stop1 (SS1)
Position switch on safety door Safe Stop2 (SS2)
Key switch Safe Limiting Speed (SLS)

Example configuration
The tasks in the example result in the following hardware assembly:

)DLOVDIH7HFKQRORJ\&38
&387)'3

VDIHW\SURWHFWRU

)',
)'2
36 &38
', '2
352),%86
'3 '5,9(

3*3&SURJUDPPLQJGHYLFH 6,1$0,&66

'5,9(&/,4
352),%8603,
1R'5,9(
; ;
&/,4
; ;
LQWHUIDFH
; ;
3URJUDPPLQJ ; ;
GHYLFH 3* ZLWK
6'LVWULEXWHG6DIHW\
67(3
67HFKQRORJ\
&8
;
;

6PDUW/LQH 'RXEOH0RWRU
0RGXOH 0RGXOH 60&

0

0

Figure 2-2 Example assembly CPU 317TF-2 DP with SINAMICS S120

Motor M2 is a component of the SINAMICS S120 training case but is not used in the
example at hand.

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


Getting Started, 10/2012, A5E02982990-03 11
Preparation
2.2 Task

Basic procedure
Configure the TF-CPU, drive and an axis using HW Config and S7T Config. Configure the
safety functions on the drive with S7T Config. Then operate the configured axis with the user
program. The technology functions are included in the standard component of the user
program. The safety functions are controlled by the safety program. The status of the safety
functions on the drive is evaluated in the safety program.
The task is divided into the following learning units:

Step Learning unit Engineering tool


1 Wiring
2 Creating a T station SIMATIC Manager
3 Configuring the F-DI signal module HW Config
4 Configuring the F-DO signal module HW Config
5 Configuring the drive HW Config
6 Assigning the PG/PC interface NetPro
Downloading the hardware configuration to the target HW Config
hardware
7 Configuring the drive S7T Config
8 Message frame configuration S7T Config
9 Configuring safety-related communication between the HW Config
TF-CPU and drives with safety functions
10 Configuring the properties of the TF-CPU HW Config
11 Interconnecting the safety data block with SINAMICS S7T Config
parameters
12 Configuring safety functions on the drive S7T Config
13 Configure axes S7T Config
14 Creating technology data blocks Technology Objects
Management
15 Creating an S7 user program STEP 7, S7 Distributed Safety
16 Editing the safety program STEP 7, S7 Distributed Safety
17 Trial run

Example program
The program blocks for the described example can be found in STEP 7 in the sample
project, PROJECT-CPU317TF. You can open the project in SIMATIC Manager with
File > Open > Sample Projects, copy the program blocks into your own project and adapt
them to your hardware assembly.

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


12 Getting Started, 10/2012, A5E02982990-03
Wiring 3
WARNING
Danger from live wires
You may come into contact with live wires. Always switch off power before you start wiring
the S7-300.

Procedure
You can find a similar description of the installation and wiring of the CPU 317T(F)-2 DP in
the Getting Started Collection S7-300 PLC: CPU 31x: Commissioning in the Internet
(http://support.automation.siemens.com/WW/view/en/15390497).

Setting the PROFIBUS address on the CU320


Set the PROFIBUS address of the SINAMICS to PROFIBUS address 4. You set the
PROFIBUS address on the CU320 directly via the hardware DIP switch as follows:

352),%86
LQWHUIDFH

$GGUHVV

Figure 3-1 Schematic representation of the CU320 control unit

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


Getting Started, 10/2012, A5E02982990-03 13
Wiring

Wiring standard signal modules

9

0


',['&9
 

 

 

 

 





0

'2['&9$

/

 
 

 

 

 

  
  

0 

/ 








0 

Figure 3-2 Wiring overview for the standard signal modules

① Drive enable ⑦ MC_Reset_Done

② Reset ⑧ MC_Halt_Done

③ Stop ⑨ MC_MoveAbsolut1_Done

④ Start Position 1 ⑩ MC_MoveAbsolut2_Done

⑤ Start Position 2 ⑪ MC_MoveAbsolut1_SLS_Done

⑥ MC_Power_Status ⑫ MC_MoveAbsolut2_SLS_Done

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


14 Getting Started, 10/2012, A5E02982990-03
Wiring

Wiring the F-DI signal module

9

  
)', '&9
 
/ /
 
0 0
9V 9V

  
 
 
 
 
  
  

 


9V 9V
 
 
 
 
 
 

Figure 3-3 Wiring overview for the F-DI signal module

① Safety door contact top

② Safety door contact bottom

③ Emergency stop switch

④ Key switch for setup mode

⑤ Safety acknowledgment button

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


Getting Started, 10/2012, A5E02982990-03 15
Wiring

Wiring the F-DO signal module

9

)'2['&9$

/

0
  

  

 
  
   
  



 

  
 
 
 
 
 / 
/
/ /

0 0 
0 0

Figure 3-4 Wiring overview for the F-DO signal module

① Safety disabled

② Setup mode active

③ Emergency stop active

④ F acknowledgment required

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


16 Getting Started, 10/2012, A5E02982990-03
Configuration 4
4.1 Setting up the T station with the help of wizards
The station wizard helps you to carry out several steps when configuring a CPU 31xT(F)
in one work session.

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


Getting Started, 10/2012, A5E02982990-03 17
Configuration
4.1 Setting up the T station with the help of wizards

Procedure

Step Activity
1 Create a new project in the SIMATIC Manager (e.g. "Getting Started CPU 317TF").
2 Select the Insert > Station > SIMATIC T Station menu command.

The "Set up T station" dialog box opens.

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


18 Getting Started, 10/2012, A5E02982990-03
Configuration
4.1 Setting up the T station with the help of wizards

Step Activity
3 Select the following settings in the fields:
CPU type: CPU317TF-2 DP
"Generate Technology System Data" option activated
"MPI/DP": New, type "MPI", transmission rate 1.5 Mbit/s or higher
"PG/PC": New, "Assign" option activated
If required, press the button "Help" to obtain additional information. Confirm with "OK".
Result: A new SIMATIC 300 station is created in the project with a CPU 317TF-2 DP (latest version).
4 Open the hardware configuration and add the following modules, as specified in the section
Requirements (Page 7):
• Digital input module DI16xDC24V, e.g. 6ES7321-1BH02-0AA0
• Digital output module DO16xDC24V/0.5A, e.g. 6ES7322-1BH01-0AA0
5 Save and compile the hardware configuration.
The system compiles your project, and adds the "Technology Objects" object to the project window in
SIMATIC Manager.
6 Download the hardware configuration to the target system.

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


Getting Started, 10/2012, A5E02982990-03 19
Configuration
4.2 Configuring the F-DI signal module

4.2 Configuring the F-DI signal module

Use of the fail-safe input channels


Configure a fail-safe F-DI signal module. The following table shows which safety elements
need to be connected to the individual channels and how the channels need to be
configured.

Note
You must set a password to provide access permission for the safety program.

Table 4- 1 Configuration of the input channels, supply group 1Vs / 3Vs

Channel Use Parameter Value


0 and 12 1. Safety door sensor, Evaluation of encoders 1oo2 evaluation
dual channel Type of encoder Dual channel equivalent
interconnection
1 and 13 2. Safety door sensor, Evaluation of encoders 1oo2 evaluation
dual channel Type of encoder Dual channel equivalent
interconnection
2 and 14 Emergency stop switch, Evaluation of encoders 1oo2 evaluation
dual channel Type of encoder Dual channel equivalent
interconnection
3 Key switch for setup Evaluation of encoders 1oo1 evaluation
mode, single-channel Type of encoder Single-channel
interconnection
5 Acknowledgment button, Evaluation of encoders 1oo1 evaluation
single-channel Type of encoder Single-channel
interconnection

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


20 Getting Started, 10/2012, A5E02982990-03
Configuration
4.2 Configuring the F-DI signal module

Procedure

Step Activity
1 In slot 6 of the previously created hardware configuration, add an SM 326F DI24xDC24V F-DI
signal module (6ES7 326-1BK02-0AB0).
2 Open the "Parameters" tab in properties of the F-DI signal module.
There you change the following parameters:
• Operating mode
• F-Parameters
• Module parameters
3 Select "Safety mode".
4 Open the "F-Parameters" folder.

Note the DIP switch setting and set the DIP switch of the module to match.
5 Open the "Module parameters" folder.
Select "Channel passivation" as the "Reaction to channel errors".

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


Getting Started, 10/2012, A5E02982990-03 21
Configuration
4.2 Configuring the F-DI signal module

Step Activity
6 Assign the parameters of the channels used as shown in the "Configuration of the input channels" table:
Keep the default settings for channels 0 and 12, 1 and 13, 2 and 14:

For channels 3 and 15, select the parameters as shown in the following figure:

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


22 Getting Started, 10/2012, A5E02982990-03
Configuration
4.3 Configuring the F-DO signal module

Step Activity
7 Deactivate the remaining channels of the 1Vs / 3VS supply group and all channels of the 2VS / 4VS supply
group by clearing the check marks of the "Activated" option.
Confirm the entries with OK.
8 Enter a password for the safety program.

Result
The configuration of the F-DI signal module is complete.

4.3 Configuring the F-DO signal module

Use of the fail-safe output channels


Configure a fail-safe F-DO signal module. The table below shows which channels are used
and the meaning of the connected lights.

Table 4- 2 Use of the output channels

Channel Use
DO channel 0 Safety mode deactivated
DO channel 1 Setup mode activated (safety door open and key switch on "Setup")
DO channel 2 Emergency off active (emergency stop button is pressed or safety door
open without setup mode)
DO channel 3 Acknowledgment required (at least one F-I/O has a fault requiring
acknowledgment or needs to be reintegrated)

Note
You have to enter the password for the safety program to configure the fail-safe module.
The names and order of the parameters may differ from the following description if you are
using a different fail-safe module. You can find information on the parameters in the online
help.

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


Getting Started, 10/2012, A5E02982990-03 23
Configuration
4.3 Configuring the F-DO signal module

Procedure

Step Activity
1 In slot 7 of the hardware configuration, add an SM 326F DO10xDC24V F-DO signal module
(6ES7 326-2BF10-0AB0).
2 Open the "Parameters" tab in properties of the F-DO signal module.
Enter a password for the safety program, if prompted.
3 Select "Safety mode".
4 Open the "F-Parameters" folder.

Note the value of the "DIP switch setting" parameter and set the DIP switch of the module to match this
value.
5 Open the "Module parameters" folder.
Deactivate the "Diagnostics interrupt" option.
Select "Channel passivation" as the "Reaction to channel errors".
Activate the used channels 0 to 3 ("Use of the output channels" table).
Deactivate all other channels.
6 Confirm the entries with OK.

Result
The configuration of the F-DO signal module is complete.

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


24 Getting Started, 10/2012, A5E02982990-03
Configuration
4.4 Configuring a drive in HW Config

4.4 Configuring a drive in HW Config

Note
The procedure is described in detail in Step 6 of the Getting Started "CPU 317T-2 DP:
Controlling a SINAMICS S120".

Procedure

Step Activity Result


1 In the HW catalog, open the tree structure
SIMATIC Technology > PROFIBUS DP(DRIVE) > Drives >
SINAMICS.
2 Select the "SINAMICS > SINAMICS S120 CU320" drive component from the tree of the HW catalog.
3 Drag-and-drop the drive to the DP master system of the The "Properties – PROFIBUS interface
DP(DRIVE). SINAMICS" dialog opens.
4 Enter PROFIBUS address "4", then confirm with "OK". The "Properties - SINAMICS" dialog box
opens.
5 Select the appropriate device version that is suitable for your SINAMICS, e.g. 2.6.2, and confirm with "OK".
6 The "DP Slave Properties" dialog box opens. Open the "Isochronous mode" tab.
7 Set the "Synchronize drive with equidistant DP cycle", then set the time coefficients as shown below.

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


Getting Started, 10/2012, A5E02982990-03 25
Configuration
4.5 Downloading the hardware configuration to the target hardware

Step Activity Result


8 Click "Alignment". The following components are aligned to the
set values:
• DP cycle in the DP master system
• All drive components of the same family
(here SINAMICS)
9 Confirm with "OK".
10 Finalize your HW configuration by calling the Station > Your project will be compiled.
Save and compile command.

4.5 Downloading the hardware configuration to the target hardware

Requirements
To get online access to the SINAMICS S120 drive from the programming device, you need
routing between the X1-MPI/DP interface and the PROFIBUS-DP (DRIVE) through the
technology CPU.
Ensure that the appropriate PG/PC assignment has been made. If required, configure a
PG/PC assignment in NetPro.

Note
The procedure is described in detail in Step 7 of the Getting Started "CPU 317T-2 DP:
Controlling a SINAMICS S120".

Procedure

Step Activity
1 Download the hardware configuration to the CPU using the menu command PLC > Download to Module.
2 Close HW Config with Station > Exit.

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


26 Getting Started, 10/2012, A5E02982990-03
Configuration
4.6 Configuring a drive in S7T Config

4.6 Configuring a drive in S7T Config

Basic procedure
The drive is configured in two steps:
1. Automatic online configuration of the drive
2. Offline configuration of the drive with full DRIVE-CLIQ technology

Requirements
Routing is configured between the X1-MPI/DP interface and the PROFIBUS-DP (DRIVE)
through the TF-CPU in NetPro.
The factory settings are set on the drive.

Automatic online configuration of the drive

Step Activity
1 Open S7T Config. To do this, select "Technological objects" and the Options > Configure technology menu
command in the SIMATIC Manager.
Result: S7T Config opens.
2 Save the current project data using the Project > Save and Recompile All command.
3 Switch to online mode by selecting the Project > Connect to target system menu command.

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


Getting Started, 10/2012, A5E02982990-03 27
Configuration
4.6 Configuring a drive in S7T Config

Step Activity
4 In the project navigator, open the tree structure SIMATIC 300(1) > Technology > S120_CU320.
Double-click "Automatic configuration".

5 In the "Automatic configuration" dialog box, click "Configure".

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


28 Getting Started, 10/2012, A5E02982990-03
Configuration
4.6 Configuring a drive in S7T Config

Step Activity
6 Set the drive object type for both motors to "Servo" and confirm with "Create".

The two drive objects will be created and preconfigured automatically. The configuration data will be loaded to
the programming device.
Note:
The SINAMICS training case on which this document is based has two different motor types. One of the two
motor types uses DRIVE-CLIQ technology. The second encoder is connected via SMC20, which is why
DRIVE-CLiQ recognizes that a second encoder is present and creates it. However, the second motor cannot
be configured automatically.
7 Click "Go OFFLINE" to change to offline mode.

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


Getting Started, 10/2012, A5E02982990-03 29
Configuration
4.6 Configuring a drive in S7T Config

Note
For the application example, you only need the "Servo_02" drive with full DRIVE CLIQ
technology. "Servo_03" drive is configured automatically, but it is not necessary.

Offline configuration of the drive with full DRIVE-CLIQ technology


Configure the drive "Servo_02".

Step Activity
1 In the project navigator, open the SIMATIC 300(1) > Technology > S120_CU320 > Drives > Servo_02 >
tree structure. Double-click "Configuration" to open the offline drive configuration.
2 Click "Configure DDS..." to start the configuration.

The motor module features full DRIVE-CLIQ technology and has already been preconfigured correctly.
The correct motor and encoder have already been set.

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


30 Getting Started, 10/2012, A5E02982990-03
Configuration
4.6 Configuring a drive in S7T Config

Step Activity
3 Accept the default settings and click "Next >".

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


Getting Started, 10/2012, A5E02982990-03 31
Configuration
4.6 Configuring a drive in S7T Config

Step Activity
4 The motor module has DRIVE-CLIQ technology and has already been configured correctly.
Check the order number and click "Next >".

5 The SINAMICS training case on which this document is based does not have an active infeed module.
Confirm the warning about wiring of the operating signal with "Close".

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


32 Getting Started, 10/2012, A5E02982990-03
Configuration
4.6 Configuring a drive in S7T Config

Step Activity
6 Click the blue button and in the TB30_04 context menu, select digital input 0, which corresponds to parameter
r4022, bit 0. Then click "Next >".

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


Getting Started, 10/2012, A5E02982990-03 33
Configuration
4.6 Configuring a drive in S7T Config

Step Activity
7 The motor with full DRIVE-CLIQ technology is connected to the X1 terminal of the motor module. Click "Next >".

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


34 Getting Started, 10/2012, A5E02982990-03
Configuration
4.6 Configuring a drive in S7T Config

Step Activity
8 The motor with complete DRIVE-CLIQ technology has already been correctly configured. Click "Next >".

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


Getting Started, 10/2012, A5E02982990-03 35
Configuration
4.6 Configuring a drive in S7T Config

Step Activity
9 Select "No motor holding brake..." and click "Next >".

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


36 Getting Started, 10/2012, A5E02982990-03
Configuration
4.6 Configuring a drive in S7T Config

Step Activity
10 The correct encoder has already been correctly configured by means of DRIVE-CLIQ technology. Click "Next >".

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


Getting Started, 10/2012, A5E02982990-03 37
Configuration
4.6 Configuring a drive in S7T Config

Step Activity
11 Set the PROFIdrive telegram type to "SIEMENS telegram 105" and click "Next >".

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


38 Getting Started, 10/2012, A5E02982990-03
Configuration
4.6 Configuring a drive in S7T Config

Step Activity
12 Click the "Finish" button to exit the offline configuration of the drive.

The offline configuration of the drive is complete. Close the dialog box with "Close".

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


Getting Started, 10/2012, A5E02982990-03 39
Configuration
4.6 Configuring a drive in S7T Config

Step Activity
13 Open the drive object in the project navigator: SIMATIC 300(1) > Technology > S120_CU320 > Drives >
Servo_02. Select Open-loop/closed-loop control > Setpoint addition and click "Deceleration ramp".

Enter 3 s in the "OFF3 ramp-down time" box and close the dialog box with "Close".

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


40 Getting Started, 10/2012, A5E02982990-03
Configuration
4.6 Configuring a drive in S7T Config

Step Activity
14 In the project navigator, open the tree structure SIMATIC 300(1) > Technology > SINAMICS_S120 > Drives >
Servo_02.
Select the Expert list command from the shortcut menu.
15 Select parameter "p210" and enter "400".

The Smart Line Module and the Motor Module of the SINAMICS S120 training case have been especially
equipped for operation on a 230 V system. For this reason, "Parameter p210" of the connected drives must be
set to the following value, which differs from the factory settings:
p210 = 400 V device connection voltage SERVO/VECTOR
The setting of "parameter p210 = 400V" cannot be calculated by the SINAMICS operating system and is preset
for a 230 V power supply for the error-free operation of the SINAMICS S120 training case.
Select the "p1248" parameter (DC link voltage threshold, lower) and enter "244" V.

Result
This completes configuration of the drive in S7T Config.
You now can configure the PROFIdrive telegrams of the drive.

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


Getting Started, 10/2012, A5E02982990-03 41
Configuration
4.7 Message frame configuration of the drive

4.7 Message frame configuration of the drive


A PROFIsafe telegram (30) is required in addition to the standard PROFIdrive telegram for
communication between the drive and the TF-CPU.
In addition, the PROFIdrive standard actual value telegram must be extended by a safety
data block (3 words). This enables display of status information and messages about the
safety functions of the drive in the TO DB of the axis.

Requirements
The offline configuration of the drive is complete.

Procedure

Step Activity
1 In the project navigator, open the tree structure SIMATIC 300(1) > Technology > S120_CU320 > Communication.
Double-click "Telegram configuration".
2 In the "Telegram configuration" dialog box, verify that the telegram type for the drive is set to
"SIEMENS telegram 105".
3 Select the "Servo_02" line and click "Adapt telegram configuration > Add PROFIsafe".
Result: A new line for a PROFIsafe telegram (30) is inserted before the standard telegram 105.
4 Select standard telegram 105 and add an additional telegram extension for the safety data block:
3 words of input data, 0 words of output data (from master view).
5 Click "Align message frame with HW Config: Set up addresses" to have the message frame address set in the
"Input data" and "Output data" columns.
The telegram configuration should then appear as follows:

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


42 Getting Started, 10/2012, A5E02982990-03
Configuration
4.8 Configuring safety-related communication between the TF-CPU
and drives with safety functions

Step Activity
6 Check whether valid addresses are entered for all telegrams and close the dialog box.
7 Select the Project > Save and Recompile All menu command to save and compile the entire technology project.
8 Select the Project > Connect to target system menu command to switch to online mode.
9 The desired configuration is on the PG/PC.
In the project navigator, select the SIMATIC 300(1) > Technology > S120_CU320 tree structure. To transfer the
configuration to the drive, select the Target system > Download menu command. If necessary, click
"<== Download" in the "Online / Offline comparison" dialog box to transfer the configuration.
10 At the security prompt for the download, select the "After loading, copy RAM to ROM" option and click "Yes".
11 Close the dialog box with "Close".
12 In S7T Config, select the Project > Disconnect from target system menu command to switch to offline mode.

4.8 Configuring safety-related communication between the TF-CPU


and drives with safety functions
To access a drive with safety functions from the F-program via PROFIsafe,
you need to configure a master-slave coupling in HW Config.

Requirements
● The TF-CPU is configured in HW Config.
● The drive with safety functions is configured on the DP (DRIVE).

Note
Any changes to the hardware configuration at a later time require a new configuration of
the drive in S7T Config.

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


Getting Started, 10/2012, A5E02982990-03 43
Configuration
4.8 Configuring safety-related communication between the TF-CPU
and drives with safety functions

Procedure
To configure the master-slave coupling in HW Config, proceed as follows:

Step Description
1. In HW Config, double-click the technology (slot 3) and then select the "F-Configuration" tab. Click "Configure".
The "Properties - DP Slave" dialog box opens.

2. Select the "Technology" line in the "Coupling" tab and click "Connect".
The ID of the technology as an internal DP slave appears in the "Active Connection" box.
Confirm with "OK".
3. Click "Configure" again. The "F-Configuration" tab is now visible in the "Properties - DP Slave" dialog box.
4 Open the "F-Configuration" tab and click "New" to configure a safety-related communication link between the
TF-CPU and a drive, PROFIsafe module on the DP (DRIVE).

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


44 Getting Started, 10/2012, A5E02982990-03
Configuration
4.8 Configuring safety-related communication between the TF-CPU
and drives with safety functions

Step Description
5

In the "DP Slave - F-Configuration" properties dialog:


• The "F target address" start address of the drive is displayed in the "DP partner (F-I/O)" folder.

IMPORTANT: Note the fail-safe target address, because you will need it for the safety configuration
of the drive in S7T Config.
• In the "Local" folder: Keep the suggested local start address in the I-slave or enter a free address > 63.
• In the "Master (Safety Program" folder, enter the start address "Address (LADDR)" through which the drive
should be accessed from the safety program of the F-CPU of the DP master. The address must be within
the process image, for example, 100.

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


Getting Started, 10/2012, A5E02982990-03 45
Configuration
4.9 Configuring the properties of the TF-CPU

Step Description
6 Follow the instructions in the online help if necessary.
Confirm the entries with OK.
Result
The configured safety-related communication link between Integrated Technology (I-slave) and the drive
(PROFIsafe module) is now displayed.

7 Click OK to close all dialogs.

4.9 Configuring the properties of the TF-CPU

Procedure

Step Activity
1 Open the properties of the CPU 317TF-2 DP in HW Config.
2 Make the following settings in the "Protection level" section of the "Protection" tab:
Select the "Can be bypassed with password" option under "1: Access protection for F-CPU".
In the "Password" box, enter a password for the F-CPU (max. 8 characters) and repeat your entry in the
"Enter again" box.
Select the "CPU contains safety program" option.
3 Confirm the entries with OK.
4 Save and compile the hardware configuration.
5 Download the hardware configuration to the CPU using the menu command PLC > Download to Module.

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


46 Getting Started, 10/2012, A5E02982990-03
Configuration
4.10 Interconnecting the safety data block with SINAMICS parameters

4.10 Interconnecting the safety data block with SINAMICS parameters

Structure of the safety data block


The safety data block is used to extend the TO DB, through which the drive can send
process data (PCD) to the technology CPU.
The individual bits of the safety data block contain the status of the safety functions and
need to be interconnected with the following drive parameters:

Table 4- 3 Interconnection of the safety data block

Bit Meaning Parameter


0 STO is active r9722.0
1 SS1 is active r9722.1
2 SS2 is active r9722.2
3 SOS is selected. r9722.11
4 SLS is deselected (0 active) r9720.4
5 Reserved
6 Reserved
7 SSM (speed n is below limit) r9722.15
8 Reserved
9 Reserved
10 Reserved
11 Reserved
12 Reserved
13 Reserved
14 Reserved
15 At least one safety message pending r2139.5

Interconnect the individual bits of the safety data block in the telegram configuration of the
drive using a binector connector converter.

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


Getting Started, 10/2012, A5E02982990-03 47
Configuration
4.10 Interconnecting the safety data block with SINAMICS parameters

Procedure

Step Activity
1 In S7T Config, open the telegram configuration of the drive.
2 Select the created telegram extension and click "Interconnections / Diagnostics".
3 In the "Transmit direction" tab, disable the "Suppress inactive interconnections" option so that the free
interconnections will be displayed.
4 In the "Transmit direction" tab, assign the interconnected binector connector converter and the r9733 parameter
to the telegram extension.
In the PCD 11 line, click the left blue box to create the interconnection with r2089[3].

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


48 Getting Started, 10/2012, A5E02982990-03
Configuration
4.10 Interconnecting the safety data block with SINAMICS parameters

Step Activity
5 In the PCD 12/13 line, click the left blue box to create the interconnection with r9733[0].
Select the "Suppress inactive interconnections" option.
The interconnection then appears as follows:

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


Getting Started, 10/2012, A5E02982990-03 49
Configuration
4.10 Interconnecting the safety data block with SINAMICS parameters

Step Activity
6 Open the "Binector connector converter" tab.
Make sure that the p2051[10] parameter is interconnected in "Status word 4 sources".
Make the required interconnections according to "Interconnection of the safety data block" table,
as shown in the figure below.

The status word is then available at parameter r2089[3].


7 Select the Project > Save and Recompile All menu command to save and compile the entire technology project.
8 Switch to online mode by selecting the Project > Connect to target system menu command.
9 In the project navigator, select SIMATIC 300(1) > Technology > S120_CU320 in the project navigator.
To transfer the configuration to the drive, select the Target system > Download menu command.
10 At the security prompt for the download, select the "After loading, copy RAM to ROM" option and click "Yes".

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


50 Getting Started, 10/2012, A5E02982990-03
Configuration
4.11 Configuring safety functions on the drive

4.11 Configuring safety functions on the drive

Requirements
S7T Config is in online mode.

Procedure

Step Activity
1 Select "Functions > Safety Integrated" under your drive in the project navigator.
Click "Change settings" in the "Safety integrated" dialog.
2 Select "Extended functions via PROFISafe" in the "Safety function selection" box.
3

Select "Safety functions > Enable".


Click "Configuration".

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


Getting Started, 10/2012, A5E02982990-03 51
Configuration
4.11 Configuring safety functions on the drive

Step Activity
4 In the "PROFIsafe address" dialog box, enter the hexadecimal value of the "F target address" of the master-slave
coupling for the drive from HW Config. In this case, the address 1022 (3FE hex) was automatically assigned in
HW Config.

5 Click "Close" to confirm the entries and close the "Configuration" dialog.
6 Click "Safe stop functions" in the "Safety integrated" dialog.
Enter 5 mm in the "Safe stop functions" dialog, "Standstill tolerance SOS" dialog box.
Click "Close" to confirm the entries and close the "Safe stop functions" dialog.
7 Click "Safe limited speed (SLS)" in the "Safety integrated" dialog.

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


52 Getting Started, 10/2012, A5E02982990-03
Configuration
4.11 Configuring safety functions on the drive

Step Activity
8 In the "Safely limited speed" dialog, enter 500 ms under "Delay time between sel. SLS --> SLS active".

Change the velocity value Vmax for Stage 1 to 1200 mm/min.


Click "Close" to confirm the entries and close the "Safely limited speed" dialog.
9 Click "Copy parameters" in the "Safety integrated" dialog.
10 Click "Activate settings" in the "Safety integrated" dialog.
You are prompted to change the safety password for the drive.
Enter a safety password for the drive.
11 You are prompted to save the safety parameters.
Select "Parameters of the drive device".
12 In S7T Config, select the Project > Disconnect from target system menu command to switch to the offline mode.
13 Switch off the SINAMICS S120 drive system (de-energize) and switch it on again.
14 Once the device has completed its startup, switch to online mode in S7T Config by selecting the
Project > Connect to target system menu command.
15 Select "Technology > S120_CU320" in the project navigation and select the Target system > Load to PG
command from the shortcut menu. Confirm the security prompt with "Yes".
16 Save the project in S7T Config.
17 Switch to offline mode by selecting the Project > Disconnect from target system menu command.

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


Getting Started, 10/2012, A5E02982990-03 53
Configuration
4.12 Configuring an axis in S7T Config

4.12 Configuring an axis in S7T Config


Creating and configuring an axis technology object using S7T Config

Procedure

Step Activity Result


1 In the project navigator, open the tree structure SIMATIC 300(1) > Technology > AXES.
Double-click "Insert axis" to start the axis wizard:

Result: The “Insert Axis" dialog box opens.

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


54 Getting Started, 10/2012, A5E02982990-03
Configuration
4.12 Configuring an axis in S7T Config

Step Activity Result


2 Confirm the default technology selection (speed control, positioning) with "OK".

Result: The "Axis Configuration - Axis_1 - Axis Type" dialog box opens.

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


Getting Started, 10/2012, A5E02982990-03 55
Configuration
4.12 Configuring an axis in S7T Config

Step Activity Result


3 Accept the "Axis type: Linear, electrical". If required, click "Configure units". Confirm with "Continue".

Result: The "Axis Configuration - Axis_1 Drive Assignment" dialog box opens.

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


56 Getting Started, 10/2012, A5E02982990-03
Configuration
4.12 Configuring an axis in S7T Config

Step Activity Result


4 The drive configuration, consisting of the drive and telegram, can be taken from the configuration of the
drive and only has to be confirmed in this dialog box. Enter the normalization speed and the maximum
motor speed (see motor type plate). Click "Data transfer from the drive" and apply the settings with "Next".

Result: The "Axis configuration - Axis_1 - Encoder assignment" dialog box opens.

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


Getting Started, 10/2012, A5E02982990-03 57
Configuration
4.12 Configuring an axis in S7T Config

Step Activity Result


5 You can take the encoder assignment from the configuration of the drive.
Click "Data transfer from the drive" and apply the settings with "Next".

Result: The "Axis Configuration - Axis_1 - Encoder - Data" dialog opens.

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


58 Getting Started, 10/2012, A5E02982990-03
Configuration
4.12 Configuring an axis in S7T Config

Step Activity Result


6 Enter the resolution specified on your motor rating plate as well as the number of data bits.
In our example, the number of encoder pulses is "512" and the number of data bits is "21".

Accept the settings with "Continue".


If you use another encoder type, you can find appropriate examples for the encoder configuration in the
online help of S7T Config.
Result: The "Axis Configuration - Axis_1 - Summary" dialog box opens, showing the data you configured.

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


Getting Started, 10/2012, A5E02982990-03 59
Configuration
4.12 Configuring an axis in S7T Config

Step Activity Result


7

Complete the axis configuration with "Finish".


8 Close the message box with "OK". The axis configuration in S7T Config has
been completed.
9 In the project navigator, open the tree structure SIMATIC 300(1) > Technology > AXES > Axis_1 >
Configuration.
"Yes" is shown in the "SINAMICS Safety Integrated" box.
10 In S7T Config, select Project > Save and compile all The axis configuration will be stored and
to save the configuration data. compiled.

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


60 Getting Started, 10/2012, A5E02982990-03
Programming 5
5.1 Creating technology data blocks
Use "Technology Objects Management“ to generate a technology DB for each TO.
Do not copy the technology DBs in order to ensure a defined assignment between the
technology DB and its TO.

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


Getting Started, 10/2012, A5E02982990-03 61
Programming
5.1 Creating technology data blocks

Procedure

Step Activity Result


1 Change to "Technology Objects Management". Confirm the first message box with "OK", and the second
with "Yes".
If you are not yet running the "Technological Objects Management“ application, you can open it by
double-clicking "Technological Objects“ in the "Technology“ folder in SIMATIC Manager
(see also the step: "Configuring the axes with S7T Config").
Result: The "Technological Objects Management" opens.

Edit the DB numbers as shown in the figure in order to adapt these for use in our example.
2 Create the technology DBs listed below by clicking "Create": The system generates the technology data
blocks DB 1 to DB3, or DB4.
• Axis_1
• Axis_2 (if this exists)
• Trace
• MCDevice
3 Close the "Technological Objects Management" via the
Technological objects > Exit menu command.
4 Select Station > Save and compile menu command in HW The configuration data will be saved and
Config. compiled.
5 Download the hardware configuration to the TF-CPU using The configuration data will be downloaded to
the menu command PLC > Download to Module. the TF-CPU.
6 In the SIMATIC Manager select the block folder of the All blocks will be downloaded to the
station and select the menu command PLC > Download. TF-CPU.

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


62 Getting Started, 10/2012, A5E02982990-03
Programming
5.2 Creating an S7 user program

5.2 Creating an S7 user program

Procedure

Step Activity Result


1 In SIMATIC Manager, open the sample project The sample program is copied to the project.
"\Examples\PROJECT-CPU317TF". Copy the all blocks and
symbols to your project:
Confirm the message "The object "xy" already exists.
Do you want to overwrite it?” with "Yes".
Important: The sample program does not contain DB 1 to DB 4! Create these technology DBs in STEP 7
(see the step "Creating the technology DBs"), in order to maintain consistency between the user program
and the technology objects.
2 Double-click FB 100 if you want to edit the example The LAD/STL/FBD editor opens.
program.
3 Select these settings: You have now opened an extended and
clear view for editing the STEP 7 user
• View > LAD,
program.
• View > Overviews, and
• View > Details.
4 Double-click FB 101 if you want to edit the safety program. The LAD/STL/FBD editor opens.

Function block FB 100


The axis is enabled and pending errors are acknowledged in this block. Depending on the
selected Safety Function, you will be able to start and stop the axis motions to positions 1
and 2 at standard speed or reduced speed.

Function block FB 101


This block processes the signals of the emergency stop switch, the key switch and the door
contact switch securely with safety blocks. Signals for activation of the safety functions at the
drive will be written to the I/O area. This block also serves to reintegrate the drive after
passivation.
The function block is protected with the password "safety".

Advanced procedure
You create and generate the blocks of the safety program.

CAUTION

For more detailed information on creating the safety program, refer to the manual
"S7 Distributed Safety - Configuring and Programming".

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


Getting Started, 10/2012, A5E02982990-03 63
Programming
5.3 Editing the safety program

5.3 Editing the safety program

Requirements
The hardware configuration is complete, saved and compiled.
A fail-safe data block of type F-Global DB with the symbolic name F_GLOBDB is available in
the block folder of the S7 program. The F-Global DB is automatically inserted in HW Config
during saving and compiling of the hardware configuration when the "CPU contains safety
program" option is enabled in the properties of the CPU.
A fail-safe module of the type F_CALL is in the block folder of the S7 program.

Note
The "PROJECT_CPU317TF" sample project contains an FC1 block of the type F_CALL.

Note
When the hardware configuration is compiled, S7 Distributed Safety automatically creates
fail-safe blocks that are required in the safety program. These blocks may not be deleted
and not be changed.

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


64 Getting Started, 10/2012, A5E02982990-03
Programming
5.3 Editing the safety program

Procedure

Step Activity Result


1 Select CPU 317TF-2 DP in SIMATIC Manager and then The "Safety program" dialog box appears.
select the Options > Customize safety program menu
command.
2

Click "F-runtime groups" to create a fail-safe runtime group.


3 Click "New" to create a new fail-safe runtime group. The "Define new F-runtime group" dialog
box appears.

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


Getting Started, 10/2012, A5E02982990-03 65
Programming
5.3 Editing the safety program

Step Activity Result


4 Keep the default settings if you have copied the blocks of You return to the "Edit fail-safe runtime
the example program into the project. groups" dialog box.

If you have programmed your own blocks, select them from


the drop-down lists.
Confirm the entries with "OK".
5

If the specified blocks do not yet exist, they will be created after confirmation of the entries.
Therefore, confirm any questions with "Yes".
6 In the SIMATIC Manager, open OB 1 and check whether the call of FB100 (F_SimplePositioning) is
consistent (it is not red).
7 Open OB 35 and check whether the call of FC 1 (F_CALL) is consistent (it is not red).

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


66 Getting Started, 10/2012, A5E02982990-03
Programming
5.3 Editing the safety program

Step Activity Result


8 In the "Safety program" dialog box, click "Generate". The safety program is compiled and the
results will be displayed in a separate
window.
Note
Because the automatically created blocks have no fixed numbers, errors may occur during compilation of
the safety program. In this case, you need to check the addresses of the accesses to the F-I/O in the
function blocks of the program and adapt them if necessary.
Then compile the safety program again.
9 When compiling is completed without error, there is always a consistent safety program in the block
container, consisting of all F-blocks with an F-attribute.

The collective signature of all F-blocks with the F-attribute in the block container and the collective
signature of the safety program are identical (as highlighted in the picture). In other words, there is now a
consistent safety program ready for an acceptance procedure.
10 Click "Download" to load the safety program to the CPU.
A prompt appears offering you the option of downloading the standard user program along with the safety
program.
11 Confirm with "Yes".
Note: If you only download the F-blocks, the block in which the F-CALL block is called (cyclic interrupt
OB 35 in the example here) will not be loaded. You will then have to download the OB separately as in the
standard.
Note: You can only download the complete safety program in STOP mode.

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


Getting Started, 10/2012, A5E02982990-03 67
Programming
5.3 Editing the safety program

Step Activity Result


12 In the "Safety program" dialog box, open the "Offline" and If they match, then the download has been
"Online" tabs one after the other and verify that the successful.
collective signatures of all F-blocks with the F-attribute in the If they do not match, repeat the download
block container match online and offline. process.
13 Perform a STOP/RUN transition of the TF-CPU to activate
safety mode.
Note: After having created a safety program, perform a
complete functional test in accordance with your automation
task (see the manual, S7 Distributed Safety, Configuring
and Programming).

Result
You successfully created the safety program in accordance with the task objective of the
example.

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


68 Getting Started, 10/2012, A5E02982990-03
Trial run 6
NOTICE
You start the drive with the next steps.
To stop the drive again:
• Set input I 0.2 (Stop) to "1"
• Switch the CPU to STOP.
• Operating the emergency stop switch

The following is a description of trial runs for the control of safety functions on the
SINAMICS drive.

Note
The trial run for the technology task without safety functionality is described in detail in the
Getting Started "CPU 317T-2 DP: Controlling a SINAMICS S120".

Safe Stop 1 (SS1) trial run


If the emergency stop switch is operated during operation, then the drive will brake
autonomously at the OFF3 ramp until standstill (SS1). Once standstill has been reached,
or if the emergency stop switch is operated at a standstill, the drive is set to zero torque
(Safe Torque Off = STO).

Action Reaction Explanation


1 Power On (ramp-up completed) Q 24.2 = TRUE (emergency stop/safety door
active)
2 Close safety door Q 24.3 = TRUE (safety acknowledgment Acknowledgment for
I 8.0 = TRUE (SafetyDoor1) required) reintegration required
I 8.1 = TRUE (SafetyDoor2)
Trigger emergency stop
I 8.2 = TRUE (emergency off)
3 Acknowledge and reintegrate fail-safe I/Os Q 24.2 = FALSE No safety event
I 8.5 = TRUE (trigger edge) > FALSE Q 24.3 = FALSE pending
4 Acknowledge technology Q 4.1 = TRUE (reset done) No technology alarms
I 0.1 = TRUE (trigger edge) > FALSE pending
5 Activate position control Q 4.0 = TRUE (position control active) Drive enters position
I 0.0 = TRUE control

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


Getting Started, 10/2012, A5E02982990-03 69
Trial run

Action Reaction Explanation


6 Start positioning at 5000.0 Drive moves in positive direction
I 0.4 = TRUE (trigger edge) > FALSE
7 Emergency stop actuated while positioning Drive is slowed to a standstill according to SS1 and STO will
is running. OFF3 ramp and the drive is set to zero torque. become active
I 8.2 = FALSE (emergency stop) Q 24.2 = TRUE (emergency stop/safety door
active)
8 Trigger emergency stop Q 24.3 = TRUE (safety acknowledgment Acknowledgment of
I 8.2 = TRUE (emergency off) required) emergency stop
required
9 Acknowledge and reintegrate fail-safe I/Os Q 24.2 = FALSE No safety event
I 8.5 = TRUE (trigger edge) > FALSE Q 24.3 = FALSE pending
10 Acknowledge technology Q 4.1 = TRUE (reset done) No technology alarms
I 0.1 = TRUE (trigger edge) > FALSE pending

Safe Stop 2 (SS2) trial run


If you open the safety door during operation without actuation of the commissioning key
switch, the drive will brake autonomously on the OFF3 ramp until standstill (SS2) and will
change into a securely monitored position-controlled operation (Safe Operating Stop = SOS)
after reaching a standstill. The drive may be in position control, but a motion out of a
specified monitoring window would result in a safe reaction of the drive.

Action Reaction Explanation


1 Activate position control Q 4.0 = TRUE (position control active) Drive enters position
I 0.0 = TRUE control
2 Start positioning at 0.0 Drive moves in negative direction
I 0.3 = TRUE (trigger edge) > FALSE
3 Safety door open Drive is slowed to a standstill according to SS2 and SOS are
I 8.0 = FALSE (SafetyDoor1) OFF3 and the drive remains under control. active
I 8.2 = FALSE (SafetyDoor2) Q 24.2 = TRUE (emergency stop/safety door
active)
4 Close safety door Q 24.3 = TRUE (safety acknowledgment Acknowledgment of
I 8.0 = TRUE (SafetyDoor1) required) safety door required
I 8.2 = TRUE (SafetyDoor2)
5 Acknowledge and reintegrate fail-safe I/Os Q 24.2 = FALSE No safety event
I 8.5 = TRUE (trigger edge) > FALSE Q 24.3 = FALSE pending
6 Acknowledge technology Q 4.1 = TRUE (reset done) No technology alarms
I 0.1 = TRUE (trigger edge) > FALSE pending

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


70 Getting Started, 10/2012, A5E02982990-03
Trial run

Safely-Limited Speed (SLS) trial run


If you operate the commissioning key switch and then open the safety door, then the drive
will only travel at a safety-limited speed. If you exceed the speed, then the drive will switch
to a safe operating mode. If you open the safety door during travel with actuated
commissioning key switch, then the speed will be reduced automatically to a safe speed in
this sample program.

Action Reaction Explanation


1 Start positioning at 5000.0 Drive moves in positive direction
I 0.4 = TRUE (trigger edge) > FALSE
2 Set key switch to commissioning No further reaction
I 8.3 = TRUE (commissioning key switch)
3 Safety door open Drive travels further in the positive direction, SLS active
I 8.0 = FALSE (SafetyDoor1) but speed is reduced to safely limited speed.
I 8.2 = FALSE (SafetyDoor2) Q 24.1 = TRUE (commissioning mode active)
Q 24.2 = TRUE (emergency stop/safety door
active)
4 Close safety door Q 24.3 = TRUE (safety acknowledgment Acknowledgment of
I 8.0 = TRUE (SafetyDoor1) required) safety door required
I 8.2 = TRUE (SafetyDoor2)
5 Acknowledge and reintegrate fail-safe I/Os Drive travels further in positive direction and No safety event
I 8.5 = TRUE (trigger edge) > FALSE increases its velocity to original value. pending
Q 24.2 = FALSE
Q 24.3 = FALSE
7 After reaching position 5000.0 Q 4.4=TRUE (position 5000.0 reached)
(Q 4.6=TRUE if the same position is reached
while the speed is still reduced).

Diagnostics / correction of errors


Incorrect operator input, faulty wiring or inconsistent configuration data may lead to errors.
For information on how to analyze such errors and messages, refer to the S7-Technology
Manual.

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


Getting Started, 10/2012, A5E02982990-03 71
Trial run

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


72 Getting Started, 10/2012, A5E02982990-03
Further Information 7
Service and support on the Internet
In addition to our documentation, we offer a comprehensive knowledge base on the Internet
(http://support.automation.siemens.com). There you will find:
● The newsletter that provides you with latest information relating to your products
● Your appropriate documentation, using our Service & Support search engine
● An international bulletin board where users and specialists share their knowledge
● Your local Siemens partner for Automation & Drives in our Partner database
● Information about local service, repairs, and spare parts. Lots more is available under
"Services".

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


Getting Started, 10/2012, A5E02982990-03 73
Further Information

CPU 317TF-2 DP: Controlling a SINAMICS S120 with Safety Functions


74 Getting Started, 10/2012, A5E02982990-03

You might also like