Controlling A Sinamics G120 Via Profisafe With A Simatic S7-1200 F-Cpu
Controlling A Sinamics G120 Via Profisafe With A Simatic S7-1200 F-Cpu
Controlling A Sinamics G120 Via Profisafe With A Simatic S7-1200 F-Cpu
Note The Application Examples are not binding and do not claim to be complete
regarding the circuits shown, equipping and any eventuality. The Application
Examples do not represent customer-specific solutions. They are only intended
to provide support for typical applications. You are responsible for ensuring that
the described products are used correctly. These Application Examples do not
relieve you of the responsibility to use safe practices in application, installation,
operation and maintenance. When using these Application Examples, you
recognize that we cannot be made liable for any damage/claims beyond the
liability clause described. We reserve the right to make changes to these
Application Examples at any time without prior notice.
If there are any deviations between the recommendations provided in these
Application Examples and other Siemens publications – e.g. Catalogs – the
contents of the other documents have priority.
We do not accept any liability for the information contained in this document.
Any claims against us – based on whatever legal reason – resulting from the use of
the examples, information, programs, engineering and performance data etc.,
described in this Application Example shall be excluded. Such an exclusion shall
not apply in the case of mandatory liability, e.g. under the German Product Liability
Act (“Produkthaftungsgesetz”), in case of intent, gross negligence, or injury of life,
body or health, guarantee for the quality of a product, fraudulent concealment of a
Siemens AG 2017 All rights reserved
Security Siemens provides products and solutions with industrial security functions that
informati support the secure operation of plants, systems, machines and networks.
on In order to protect plants, systems, machines and networks against cyber
threats, it is necessary to implement – and continuously maintain – a holistic,
state-of-the-art industrial security concept. Siemens’ products and solutions only
form one element of such a concept.
Customer is responsible to prevent unauthorized access to its plants, systems,
machines and networks. Systems, machines and components should only be
connected to the enterprise network or the internet if and to the extent necessary
and with appropriate security measures (e.g. use of firewalls and network
segmentation) in place.
Additionally, Siemens’ guidance on appropriate security measures should be
taken into account. For more information about industrial security, please visit
http://www.siemens.com/industrialsecurity.
Siemens’ products and solutions undergo continuous development to make them
more secure. Siemens strongly recommends to apply product updates as soon
as available and to always use the latest product versions. Use of product
versions that are no longer supported, and failure to apply latest updates may
increase customer’s exposure to cyber threats.
To stay informed about product updates, subscribe to the Siemens Industrial
Security RSS Feed under http://www.siemens.com/industrialsecurity.
Table of contents
Warranty and liability ................................................................................................... 2
1 Task ..................................................................................................................... 4
2 Solution............................................................................................................... 5
2.1 Overview of the total solution ............................................................... 5
2.2 Hardware and software components ................................................... 6
2.2.1 Validity .................................................................................................. 6
2.2.2 Components used ................................................................................ 6
3 Fundamentals .................................................................................................... 8
3.1 Function block "SINA_SPEED" (FB285) .............................................. 8
3.2 Safety functions integrated in the SINAMICS G120 ............................ 9
3.2.1 Safe Torque Off (STO) ....................................................................... 10
3.2.2 Safe Stop 1 (SS1) .............................................................................. 10
3.2.3 Safely Limited Speed (SLS) ............................................................... 11
3.2.4 Fail-safe communications via PROFIsafe .......................................... 12
3.3 "LDrvSafe" library ............................................................................... 13
4 Engineering and configuring .......................................................................... 15
4.1 Generating a project configuration ..................................................... 15
4.2 User program of the SIMATIC S7-1200 F-CPU ................................. 20
4.3 Node initialization for PROFINET communication ............................. 25
Siemens AG 2017 All rights reserved
1 Task
Introduction
The SIMATIC S7-1200 F-CPU can be operated as PROFINET controller.
As such, it can control a PROFINET-capable drive SINAMICS G120 as PROFINET
device. The data exchanged also includes safety-related data.
This application example covers the following drive types:
G120 with CU240E-2 PN-F or CU250S-2 PN
G120D with CU240D-2 PN-F or CU250D-2 PN-F
The abbreviation G120 is used in the following to represent all the above-listed
devices.
This application example shows you the following:
Configuring and parameterizing the SIMATIC S7-1200 F-CPU via the TIA
Portal
Configuring and parameterizing the SINAMICS G120 via Startdrive
Access to process data and parameters
Implementing safety-related communication between SIMATIC S7-1200 F-
CPU and SINAMICS G120 via PROFIsafe
Controlling SINAMICS G120 safety functions
Siemens AG 2017 All rights reserved
Requirements
Table 1-1 Requirements relating to the automation task
Requirement Explanation
Accessing process data The SINAMICS G120 should be switched
on and switched off and the speed setpoint
entered from an HMI device.
SINAMICS G120 safety functions Safety-related shutdown (STO or SS1) and
speed monitoring (SLS) is to be
implemented in the SINAMICS G120.
2 Solution
The solution shown here contains code blocks, that you can directly use in your
own applications.
Fig. 2-1 The most important hardware components that are used
Siemens AG 2017 All rights reserved
The most important components to implement the application example are listed
below.
Hardware components
Table 2-1 Hardware components that are used
Siemens AG 2017 All rights reserved
Power Module:
6SL3210-1SB11-0AA0
Motor 1 1LA7060-4AB10 Alternatively, other induction motors
can also be used. In this case, the
motor data must be adapted.
Software components
Table 2-2 Software components that are used
Component Number Article number Note
You can download the Service
SIMATIC STEP 7 Floating license Pack and the update at no charge:
1
Professional V14 SP1 6ES7822-1AA04-0YA5 https://support.industry.siemens.co
m/cs/ww/de/view/109745984
Can be downloaded at no charge:
Startdrive V14 SP1 1 6SL3072-4EA02-0XA0 https://support.industry.siemens.co
m/cs/ww/de/view/68034568
3 Fundamentals
3.1 Function block "SINA_SPEED" (FB285)
Fig. 3-1 FB "SINA_SPEED" (FB285)
NOTICE The function block cyclically supplies the SINAMICS drive with data from
the standard telegram 1. This must be selected when configuring the
telegram.
Siemens AG 2017 All rights reserved
Note The block interface is restricted to just a few inputs and outputs. All telegram
signals are reachable in the setpoint direction at any time via input "ConfigAxis".
The inputs are preassigned standard default values when inserting the block.
SDI Safe Direction Safe monitoring of the direction of motion (positive and
negative direction). Parameterizable shutdown
response when traversing in a direction that has not
been enabled.
Effect
Drive pulses are safely deleted using the Safe Torque Off function. The drive is
therefore in a safety-related no-torque state, and can no longer provide torque-
generating energy. This state is internally monitored in the drive.
Using the Safe Stop 1 function, safe shutdown can be implemented according to
Stop Category 1 in compliance with EN 60204-1.
Function SS1 quickly and safely stops a motor - and once the motor has come to a
standstill, activates STO to bring the motor into a safety-related, torque-free
condition.
Fig. 3-3 Safe Stop 1 (SS1)
Effect
After selecting function SS1, the drive independently brakes along a fast stop
ramp, and after a set, safety-related delay time has expired, or a parameterizable
speed has been fallen below, automatically activates the Safe Torque Off safety
function.
The SLS function monitors that the drive does not exceed a specific
speed/velocity limit.
Fig. 3-4 Safely Limited Speed (SLS)
Effect
The drive monitors the speed in a safety-related fashion, and activates a fault
response defined when configuring the system if a set velocity/speed limit was
exceeded. The speed monitoring of the SLS function can be broken down to a
maximum of 4 SLS levels.
The following control signals are sent to the drive from the F-CPU:
Fig. 3-6 From the F-CPU to the drive
Siemens AG 2017 All rights reserved
The drive returns the status of the safety functions to the F-CPU.
Fig. 3-7 From the drive to the F-CPU
Note Safety functions integrated in the drive that are not used must be deselected in
the F-CPU safety program using a high signal.
"LDrvSafe_CtrlT30SinaG" block
This function block is used to simply control the safety functions of the SINAMICS
G120 via PROFIsafe telegram 30.
Fig. 3-8 FB "LDrvSafe_CtrlT30SinaG"
Siemens AG 2017 All rights reserved
The safety functions of the SINAMICS are shown at the input of the block.
Input "InternalEventAck" is available to acknowledge SINAMICS safety
messages. These messages are acknowledged using a positive signal edge.
The user must interconnect the block output (in this case,
"ProfisafeCtrlT30SinaG") with a variable with the data type of the selected
PROFIsafe telegram. This is then used to directly control the drive.
Block "LDrvSafe_StatusT30SinaG"
This function block is used to simply evaluate the safety functions of the SINAMICS
G via PROFIsafe telegram 30.
Fig. 3-9 FB "LDrvSafe_StatusT30SinaG"
The status of the safety functions of the SINAMICS are shown at the output of
the block.
Siemens AG 2017 All rights reserved
The user must interconnect the input of block (in this case
"ProfisafeStatusT30SinaG") with a variable having a data type of the selected
PROFIsafe telegram. It is directly interconnected with the information of the
PROFIsafe telegram.
Note If you only wish to load the program example and commission, then follow the
instructions provided in Chapter 5.
If you wish to configure the SIMATIC S7-1200 F-CPU and the SINAMICS G120
yourself, and you do not wish to use the code example, then the subsequent tables
describe the necessary steps to do this.
This chapter does not describe the complete programming of the SIMATIC S7-
1200 and the configuring of the HMI device.
Table 4-1 Creating a project configuration
No. Action Screen
Creating a new project
1 Open the TIA Portal.
Create a new project and assign it
a name (e.g. "G120_at_S7-
1200F").
Siemens AG 2017 All rights reserved
3
Siemens AG 2017 All rights reserved
6 Then, under "Properties (1) > General (2)" parameterize the fail-safe input module depending on
the sensors being used, e.g.:
Channel 0, 8 (Emergency Stop command device) and Channel 2, 10 (position switch) (3)
Sensor evaluation: "1oo2 (2v2) evaluation"
Siemens AG 2017 All rights reserved
10 Under "Properties (1) > General (2) > PROFINET interface [X150]" open the telegram
configuration. (3)
Using "Add telegram (4) > Add safety telegram (5)", insert PROFIsafe telegram 30.
Note IP address and PROFINET device names are automatically assigned when
inserting the modules (S7-1200 and Control Unit).
You can change these module settings at any time under "Settings > General >
PROFINET interface> Ethernet addresses".
3
Siemens AG 2017 All rights reserved
1
Siemens AG 2017 All rights reserved
4 Then open the variable table and create two arbitrary variables (1) with the data types just
inserted (2), e.g.:
1 2 3
The start address (3) must be the same as the start address of the PROFIsafe telegram in the
HWCN (4) (hardware configuration); in this example, "2.0":
5 Now open function block "Main_Safety_RTG1", and insert block "ACK_GL" by dragging &
dropping.
The block can be found under the "Instructions" tab in the "Safety functions" folder.
Interconnect input "ACK_GLOB" (1) with a variable or an input, e.g. "I0.1". With a positive edge
at this input, each F I/O will be reintegrated after communication failure.
2 Assigning the PN device name is carried out for the SINAMICS G120:
Select the PN device name of the SINAMICS, in this case "drive_1". (1)
Set the PG/PC interface, via which you are connected to SINAMICS. (2)
Click on "Update list". (3)
Select SINAMICS. (4)
Click on "Assign name". (5)
Siemens AG 2017 All rights reserved
2 For all menu items, press "Next" without making any changes - with the exception of "Motor" (1).
Here, select "Select from order number list" (2), "1LA7 induction motor" (3) and "Order number
1LA7060-4AB10-xxxx" (4).
Then click on "Next" (5), and continue to run through the Wizard.
Siemens AG 2017 All rights reserved
6 The safely calculated speed is converted over from the motor side to the load side. A gearbox
ratio must be specified, which comprises the following:
p9521[0] (𝟏) 1
=
p9522[0] (𝟐) "Motor pole pair number (r313[0])" ∗ "𝑚𝑒𝑐ℎ𝑎𝑛𝑖𝑐𝑎𝑙 𝑡𝑟𝑎𝑛𝑠𝑚𝑖𝑠𝑠𝑖𝑜𝑛 𝑟𝑎𝑡𝑖𝑜 (𝑖)"
1 2
4
Siemens AG 2017 All rights reserved
5 Commissioning
Download the project to the components
The following table lists the actions to download the project.
Table 5-1 Download the project to the components
No. Action Screen
1 Open the project example, or the
project created in Chapter 4 .
2 Select the F-CPU and then click on
"Load to device".
Siemens AG 2017 All rights reserved
If Emergency Stop is actuated, STO is initiated and the motor is switched into a
torque-free condition.
If the protective door is opened in operation, the speed is limited by the internal
interconnection of the drive, and is safely monitored against the set limit value.
The speed limiting is not a safety function! The SLS functionality monitors the
speed against a certain limit value, and when exceeded, initiates a safe stop
response.
If the protective door is closed, the speed limiting and monitoring can be canceled
by acknowledging.
The "Safety" screen form is only used for information purposes. The safety control
word and status word are shown, as well as the status of the Emergency Stop and
protective door.
Fig. 6-2 Display at the panel
8 Change documentation
Table 8-1: Change documentation
Version Date Modifications
V1.0 07/2017 First Edition