Professional Documents
Culture Documents
Sinamics s120 at s7-300400f Short-Doku v1d1 en PDF
Sinamics s120 at s7-300400f Short-Doku v1d1 en PDF
Sinamics s120 at s7-300400f Short-Doku v1d1 en PDF
SINAMICS S:
Speed Control of a S120
with SIMATIC S7-300/400F
(STEP7 V5) via PROFINET
/PROFIBUS with Safety
Integrated (via PROFIsafe)
and HMI
SINAMICS S120 SIMATIC S7-300/400F
http://support.automation.siemens.com/WW/view/en/68624711
Warranty and liability
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,
Siemens AG 2014 All rights reserved
Security Siemens provides products and solutions with industrial security functions that
informa- support the secure operation of plants, solutions, machines, equipment and/or
tion networks. They are important components in a holistic industrial security
concept. With this in mind, Siemens’ products and solutions undergo continuous
development. Siemens recommends strongly that you regularly check for
product updates.
For the secure operation of Siemens products and solutions, it is necessary to
take suitable preventive action (e.g. cell protection concept) and integrate each
component into a holistic, state-of-the-art industrial security concept. Third-party
products that may be in use should also be considered. For more information
about industrial security, visit http://www.siemens.com/industrialsecurity.
To stay informed about product updates as they occur, sign up for a product-
specific newsletter. For more information, visit
http://support.automation.siemens.com.
Table of contents
Warranty and liability................................................................................................... 2
1 Overview ............................................................................................................. 4
1.1 Requirements ....................................................................................... 5
2 Explanation of the Blocks ................................................................................. 6
2.1 FB11 "CtrlUnit_FB" ............................................................................... 6
2.2 FB12 "LineModule_FB" ........................................................................ 8
2.3 FB13 "Drive_FB" ................................................................................ 10
2.4 FB20 "Parameter_Access” ................................................................. 13
2.4.1 Describing the block ........................................................................... 13
2.4.2 Job and response data record ........................................................... 16
2.5 FB200 "Safety” ................................................................................... 19
3 Commissioning ................................................................................................ 20
4 Related Literature ............................................................................................ 22
5 History............................................................................................................... 22
Siemens AG 2014 All rights reserved
1 Overview
The short docu on hand describes the blocks which can be used for connecting a
PROFINET/PROFIBUS of a SINAMICS G120 to a failsafe SIMATIC S7300/400F in
STEP 7 V5. This short docu does not give any explanations and only shows the
most important points for integrating the blocks into your own projects.
The following functions can be realized with this:
Table 1-1
Block Function Explanation
FB11 The FB performs the communication
"CtrlUnit_FB" between the PLC and the Control Unit drive
object of the S120. Its digital inputs/outputs
are read/controlled, errors and alarms are
transmitted and errors acknowledged.
The FB uses the system functions SFC14
and SFC15 and uses the SIEMENS frame
390 with frame expansion (alarm, error) for
data transmission.
FB12 The FB performs the communication
"LineModule_FB" between the PLC and the line module drive
object of the S120. The module is switched
on/off with FB12, the mode is read out,
Siemens AG 2014 All rights reserved
1.1 Requirements
You require a SIMATIC S7-300/400F CPU, which supports data record routing,
(see /10/).
You require a SINAMICS S120 with firmware 4.5 or higher.
SINAMICS G120 must be connected to the local PROFIBUS or PROFINET
interface of the SIMATIC S7-300/400F using a CP is not supported.
Siemens AG 2014 All rights reserved
Details on the frame contents can be found in the SINAMICS S120/S150 list
manual in chap. 2.3 (/7/).
Siemens AG 2014 All rights reserved
You can therefore use the FB 11 as interface to SINAMICS G120 in your own
applications. You should call it cyclically in OB1.
Block interface
Figure 2-1: FB11 "CtrlUnit_FB"
Siemens AG 2014 All rights reserved
Interface Description
Table 2-2: Interface of FB11 "CtrlUnit_FB"
Data
Parameter Description
type
Input parameters
Acknowledge_Faults Bool Pending errors are acknowledged with rising edge.
DO_nn (n = 08…15) Bool Controls the CU digital output nn, if the respective
channel is configured as output.
Data
Parameter Description
type
Input_Address Word CU_S I/O input address
(from HW Config or STARTER)
Output_Address Word CU_S I/O output address
(from HW Config or STARTER)
Output parameters
Alarm_Present BOOL CU_S: alarm pending.
Fault_Present BOOL CU_S: fault pending.
Group_Alarm_Present BOOL CU_S: group alarm pending.
Group_Fault_Present BOOL CU_S: group fault pending.
DI_nn (n = 00…15) BOOL Read out of CU digital input nn.
Alarm_Code Int Alarm code of a pending CU_S alarm.
Fault_Code Int Error code of a pending CU_S fault.
Retval_RD Int Error information of SFC14
(output parameter RET_VAL of SFC14)
Retval_WR Int Error information of SFC15
(output parameter RET_VAL of SFC15)
Details on the frame contents can be found in the SINAMICS S120/S150 list
manual in chap. 2.3 (/7/).
The FB12 uses the system functions SFC14 and SFC15.
With regard to the line module you can do the following with FB12 …
switch it on and off,
request the status (ready for switch-on, in operation, PLC control requested),
acknowledge errors
detect pending alarms and errors.
Block interface
Figure 2-2: FB12 "LineModule_FB"
Siemens AG 2014 All rights reserved
Interface Description
Table 2-4: Interface of FB12 "LineModule_FB"
Data
Parameter Description
type
Input parameters
ON_OFF1 Bool The line module is switched on with a rising edge at
ON_OFF1 (if no error is pending).
Acknowledge_Faults Bool Pending errors are acknowledged with rising edge.
Input_Address Word A_INF I/O input address
(from HW Config or STARTER)
Output_Address Word A_INF I/O output address
(from HW Config or STARTER)
Output parameters
Rdy_For_Switching_On Bool Line module is ready to be switched on.
Operation_Enabled Bool Line module is in operation.
Ctrl_Request Bool Control to PLC requested.
The drive object is ready for taking over.
Alarm_Present Bool A_INF: alarm pending.
Fault_Present Bool A_INF: fault pending.
Data
Parameter Description
type
Alarm_Code Int Alarm code of a pending A_INF alarm.
Fault_Code Int Error code of a pending A_INF fault.
Retval_RD Int Error information of SFC14
(output parameter RET_VAL of SFC14)
Retval_WR Int Error information of SFC15
(output parameter RET_VAL of SFC15)
Details on the frame contents can be found in the SINAMICS S120/S150 list
manual in chap. 2.3 (/7/).
The FB13 uses the system functions SFC14 and SFC15.
Regarding the respective SINAMICS S120 drive, you can do the following with the
FB13 …
switch it on and off
acknowledge errors
specify the setpoint speed
request the status (ready for switch-on, in operation, PLC control requested),
detect pending alarms and errors,
read out actual speed value.
FB 13 can therefore be used as interface with SINAMICS S120 in your own
applications. You should call it cyclically in OB1.
Block interface
Figure 2-3: FB13 "Drive_FB"
Siemens AG 2014 All rights reserved
Interface Description
Table 2-7: Interface of FB13 "Drive_FB"
Data
Parameter Description
type
Input parameters
ON_OFF1 Bool The drive is switched on with a rising edge at
ON_OFF1.
Requirements:
No_OFF2 and No_OFF3 must already be TRUE
beforehand.
no fault must be pending.
No safety function must have triggered.
No_OFF2 Bool With falling edge the motor coasts to a halt.
No_OFF3 Bool Emergency stop of the motor with falling edge
Acknowledge_Faults Bool Pending faults of the drive are acknowledged with
rising edge.
Reference_speed Real Reference speed of the drive [1/min] (p2000 of the
respective drive)
n_Setpoint Real Speed setpoint [1/min]
Input_Address Word SERVO I/O input address
(from HW Config or STARTER)
Siemens AG 2014 All rights reserved
The FB coordinates the acyclic parameter transfer between the PLC and the
respective drive object of the SINAMICS S120 on the basis of a data exchange that
1
is based on the data structure of "data record 47” . Send the respective SINAMICS
Siemens AG 2014 All rights reserved
S120 drive object jobs for read-out or for changing the inverter parameters and
1
responses received, embedded in this structure. They may include error detection
if applicable, and the requested parameters if it was a read job.
With the help of the FB20 block input parameter you specify…
the address of the drive system (=address of the CU),
you would like to address,
the source address of the order data records in the PLC,
the target address of the response data records in the PLC,
Via the content of the order data record (data record 47) you specify…
the drive object number within the drive system
the function (change or read out parameters)
the number of parameters
the parameter number,
the parameter index (if present),
the parameter data type
You can simply use the FB20 in independent applications. You should call it
cyclically in OB1 or in OB3x.
1
(\7\),
SINAMICS S120 Function manual (/7/),
Chap. 11.1.4.2 Acyclic communication > Structure of orders and responses
Block interface
Figure 2-4: FB20 "Parameter_Access"
Interface Description
Table 2-9: Interface of the FB20 "Parameter_Access"
Data
Parameter Description
type
Input parameters
Address Int I/O address of the control unit of the respective
SINAMICS S120 drive system
Siemens AG 2014 All rights reserved
Error list
The FB 20 "Parameter_Access” can output the following error codes in the
"errorID” parameter:
Table 2-10: Error codes in "errorID” parameter
Error number Description Note
0 No error
8000 DB_No_send and DB_No_rev
are identical. Check the parameters of FB 20
8001 DB_No_rev or DB_No_send is "Parameter_Access”.
zero.
8002 SFC53 "WEREC” outputs In the instance DB of FB20, the error
errors code of the SFC53 is stored in
#WD_REC_STATUS.
8003 SFC52 "RDREC” outputs In the instance DB of FB20, the error
errors code of the SFC52 is stored in
#RD_REC_STATUS.
8004 The SFC24 "TEST_DB” In the instance DB of FB20, the error
reports: code of the SFC24 is stored in
Send DB is empty (length 0), #TEST_DB_1_STATUS. If it is 0, the
non-existent or faulty. DB is empty or write protected.
8005 The SFC24 "TEST_DB” In the instance DB of FB20, the error
reports: code of the SFC24 is stored in
Siemens AG 2014 All rights reserved
Reading parameters
The parameters p1120 (run-up time), p1121 (ramp-down time) and p945 (fault
memory, with 16 indices) are to be read-out from the SERVO 1 drive object of the
SINAMICS S120 drive system.
Figure 2-5: Reading parameter – order data record (order DB)
Header
Siemens AG 2014 All rights reserved
p1120
Address
p1121
p945
2
The number of the drive object is entered here :
CU_S (Control unit) = 1 (always 1)
A_INF (Line module) =2
SERVO 1 (drive 1) =3
SERVO 2 (drive 2) =4
2
SINAMICS S120 Function manual (\7\),
Chap. 11.1.4.3 Acyclic communication > Determining the drive object numbers
If the parameters are read incorrectly an error value will be output instead of a
parameter value. The error codes can be found in the SINAMICS S120 function
manual (see footer 1 on page 13).
Changing parameters
The parameters p7 (BOP backlight) and p3 (BOP access level) in the CU_S drive
object of the SINAMICS S120 drive system is to be changed.
Figure 2-7: Writing parameters – order data record (order DB)
Header
p7
Address
p3
p7
Data
Siemens AG 2014 All rights reserved
p3
Header
empty or error records
Siemens AG 2014 All rights reserved
If the parameters are changed incorrectly, an error data record is output for each
incorrect parameter. Its structure and the error codes can be found in the
SINAMICS S120 function manual (see footer 1 on page 13).
3 Commissioning
3
Follow the respective instructions in the appropriate documentation of the
application example for commissioning (\2\):
Chapter 3, if you want to use the STEP 7 example project.
Chapter 6, if you create your own project.
For the latter of the two above cases, here a brief step-by-step instruction:
Table 3-1: Key points for commissioning
PROFINET variant PROFIBUS variant
1. Establish the physical Ethernet connections Establish the physical Ethernet connection
between the SIMATIC S7-300/400F controller, between the SIMATIC S7-300/400F controller
the SINAMICS S120 and the PG/PC. and the PG/PC and the PROFIBUS connection
between the SIMATIC S7-300/400F controller
and the SINAMICS S120.
2. -- Set the PROFIBUS address of the SINAMICS
S120 on the rotary encoding switch.
3. Make sure that the IP address of the network card of your PG/PCs is located in the same subnet as
that of the SIMATIC S7-300/400F and that this address is not otherwise assigned in your project.
4. Set the F target address of the F-DI module used on its DIP switch.
…in the SIMATIC Manager
5. Assign the IP addresses, the subnet masks and --
Siemens AG 2014 All rights reserved
3
There is a detailed documentation for the example project, for the PROFINET and a
PROFIBUS communication each.
4 Related Literature
This list is not complete and only represents a selection of relevant information
Table 4-1
Topic Title / link
\1\ Siemens Industry http://support.automation.siemens.com
Online Support
\2\ Download page of http://support.automation.siemens.com/WW/view/en/68624711
this entry
\3\ Automating with STEP 7 in STL and SCL
Author: Hans Berger
Publisher: Publicis Publishing
ISBN: 978-3-89578-412-5
\4\ STEP7 Automating with STEP 7 in LAD and FBD
SIMATIC S7- Author: Hans Berger
300/400F Publisher: Publicis Publishing
ISBN: 978-3-89578-410-1
\5\ Reference Manual
System and Standard Functions for SIMATIC S7-300/400 Vol. 1/2
http://support.automation.siemens.com/WW/view/en/44240604
\6\ STARTER Download page
Siemens AG 2014 All rights reserved
http://support.automation.siemens.com/WW/view/en/26233208
\7\ SINAMICS Function Manual Drive Functions (V4.7):
S120 http://support.automation.siemens.com/WW/view/en/99686093
Manuals List manual (V4.7) (parameters and error list):
http://support.automation.siemens.com/WW/view/en/99682911
Function manual Safety Integrated (V4.7):
http://support.automation.siemens.com/WW/view/en/99668646
Commissioning manual (V4.7):
http://support.automation.siemens.com/WW/view/en/99687313
Device manual control unit and supplemented components:
http://support.automation.siemens.com/WW/view/en/99679173
Booksize power units:
http://support.automation.siemens.com/WW/view/en/99687925
\8\ Application SINAMICS S: Speed Control of a S120 with SIMATIC S7-300/400
example without (STEP7 V5) via PROFINET with Safety Integrated (via terminal)
PROFIsafe and HMI
http://support.automation.siemens.com/WW/view/en/68585847
\9\ Distributed Safety S7 Distributed Safety, configuring and programming
Manual http://support.automation.siemens.com/WW/view/de/100648623
\10\ FAQ about data http://support.automation.siemens.com/WW/view/en/7000978
record routing http://support.automation.siemens.com/WW/view/en/50037141
5 History
Table 5-1
Version Date Modifications
V1.0 06/2013 First version
Extended by SINAMICS S120 with FW 4.7 and
V1.1 12/2014
STARTER V4.4.