60
Applications & Tools Answers for industry. Cover Connecting a SINAMICS G120 Drive to an S7-300/400 CPU in STEP 7 V5 via PROFINET SINAMICS G120 (CU 240E-2 PN(-F)), SIMATIC S7-300/400 Application Description May 2012

58820849_SINAMICS_G120_at_S7-300400-PN_DOKU_v10_en.pdf

Embed Size (px)

Citation preview

  • Applications & Tools

    Answers for industry.

    Cover

    Connecting a SINAMICS G120 Drive to an S7-300/400 CPU in STEP 7 V5 via PROFINET

    SINAMICS G120 (CU 240E-2 PN(-F)), SIMATIC S7-300/400

    Application Description May 2012

  • 2 SINAMICS G120 to S7-300/400-PN

    V1.0a, Entry ID: 56749384

    Cop

    yrig

    ht

    Sie

    men

    s A

    G 2

    012

    All

    right

    s re

    serv

    ed

    Siemens Industry Online Support This document is taken from Siemens Industry Online Support. The following link takes you directly to the download page of this document: http://support.automation.siemens.com/WW/view/en/58820849 Caution: The functions and solutions described in this entry are mainly limited to the realization of the automation task. In addition, please note that suitable security measures in compliance with the applicable Industrial Security standards must be taken if your system is interconnected with other parts of the plant, the company network or the Internet. For further information on this issue, please refer to Entry ID 50203404. http://support.automation.siemens.com/WW/view/en/50203404. If you have any questions concerning this document please e-mail us to the following address: mailto:[email protected] For further information on this topic, you may also actively use our Technical Forum in the Siemens Industry Online Support. Share your questions, suggestions or problems and discuss them with our strong forum community: http://www.siemens.com/forum-applications

  • SINAMICS G120 to S7-300/400-PN V1.0a, Entry ID: 56749384 3

    Cop

    yrig

    ht

    Sie

    men

    s A

    G 2

    012

    All

    right

    s re

    serv

    ed

    s

    SIMATIC, SINAMICS

    SINAMICS G120 with CU 240E- 2PN at an S7-300/400 PLC

    Task 1

    Solution 2

    Functional Mechanisms of this Application

    3 Setting up and Commissioning the Application

    4

    Operating the Application 5

    Configuration and Settings

    6

    Literature 7

    History 8

  • Table of Contents

    4 SINAMICS G120 to S7-300/400-PN

    V1.0a, Entry ID: 56749384

    Cop

    yrig

    ht

    Sie

    men

    s A

    G 2

    012

    All

    right

    s re

    serv

    ed

    Warranty and Liability

    Note The application examples are not binding and do not claim to be complete regarding configuration, equipment 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 sound practices in application, installation, operation and maintenance. When using these application examples, you recognize that we will not be 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 this application example and other Siemens publications (e.g. catalogs), the contents of the other documents shall have priority.

    We accept no liability for 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 deficiency or violation of fundamental contractual obligations. The damages for a breach of a substantial contractual obligation are, however, limited to the foreseeable damage, typical for the type of contract, except in the event of intent or gross negligence or injury to life, body or health. The above provisions do not imply a change in the burden of proof to your detriment. It is not permissible to transfer or copy these Application Examples or excerpts thereof without express authorization from Siemens Industry Sector.

  • Table of Contents

    SINAMICS G120 to S7-300/400-PN V1.0a, Entry ID: 56749384 5

    Cop

    yrig

    ht

    Sie

    men

    s A

    G 2

    012

    All

    right

    s re

    serv

    ed

    Table of Contents Warranty and Liability ................................................................................................. 4 1 Task..................................................................................................................... 7 2 Solution............................................................................................................... 8

    2.1 Overview of the general solution.......................................................... 8 2.2 Description of the core functionality ..................................................... 9 2.2.1 Parameterization for the communication.............................................. 9

    SINAMICS ............................................................................................ 9 SIMATIC S7-300/400 ........................................................................... 9

    2.2.2 Data exchange ..................................................................................... 9 Cyclic process data exchange ........................................................... 10 Acyclic data exchange (parameter access) ....................................... 10

    2.3 Hardware and software components used......................................... 11 3 Setting up and Commissioning the Application .......................................... 13

    3.1 Wiring ................................................................................................. 13 3.2 IP addresses and PN names ............................................................. 14 3.3 PG/PC settings................................................................................... 14 3.4 Downloading the SIMATIC program .................................................. 15 3.5 Downloading the SINAMICS parameterization .................................. 19

    4 Operation of the Application .......................................................................... 22 4.1 Prerequisites ...................................................................................... 22 4.2 Operating the application ................................................................... 22 4.3 Monitoring and parameter access via the operator panel.................. 24 4.3.1 Screens and screen navigation.......................................................... 24 4.3.2 Process data exchange...................................................................... 25

    Control and status word ..................................................................... 25 Set point and actual values ................................................................ 26

    4.3.3 Parameter access .............................................................................. 28 Read/write parameter......................................................................... 28 Fault buffer ......................................................................................... 29

    5 Functional Mechanisms of this Application ................................................. 31 5.1 Functionality and process data exchange.......................................... 32 5.1.1 Access to process data in the user program of the controller............ 32 5.1.2 Standardizing the setpoint and actual values .................................... 32 5.1.3 Transfer methods ............................................................................... 33

    Load / transfer or MOVE .................................................................... 33 SFC 14 DPRD_Dat / SFC 15 DPWR_Dat.................................... 33 FC 11 PNIO_Send / FC 12 PNIO_RECV...................................... 33

    5.1.4 Control and status word ..................................................................... 34 5.1.5 FB 11 Process Data_SFC ............................................................... 36 5.1.6 FB 13 Process Data_LT and FB 14 Process Data_MOVE........... 37 5.1.7 FB 12 Process Data_CP.................................................................. 38 5.2 Parameter access functionality .......................................................... 39 5.2.1 Job and response structure................................................................ 39 5.2.2 Read/Write Drive Parameter DB and Answer from Drive DB ....... 40 5.2.3 FB 20 Parameter_Access................................................................ 42

    6 Configuration and Settings ............................................................................ 45 6.1 Configuring the S7-300/400 controller ............................................... 45 6.2 Configuring the SINAMICS G120 drive.............................................. 51 6.3 Configuring the SINAMICS G120 drive via USB................................ 57

    7 Literature .......................................................................................................... 60

  • Table of Contents

    6 SINAMICS G120 to S7-300/400-PN

    V1.0a, Entry ID: 56749384

    Cop

    yrig

    ht

    Sie

    men

    s A

    G 2

    012

    All

    right

    s re

    serv

    ed

    8 History............................................................................................................... 60

  • 1 Task 2.1 Overview of the general solution

    SINAMICS G120 to S7-300/400-PN V1.0a, Entry ID: 56749384 7

    Cop

    yrig

    ht

    Sie

    men

    s A

    G 2

    012

    All

    right

    s re

    serv

    ed

    1 Task The SIMATIC S7 300/400 can be operated as a PROFINET controller. A SINAMICS drive can be used as PROFINET device and be controlled by the S7 300/400. This application example illustrates how to configure the SINAMICS and the S7-300/400, start it up and access process data and parameters.

    Overview of the automation task The following figure gives an overview of the automation task.

    Figure 1-1

    MPI, PROFIBUS or Ethernet

    PROFINET

    Requirements for the automation task

    Table 1-1 Requirement Explanation

    Access to process data The drive shall be switched on and off via the control word and the speed value be specified as quickly as possible.

    Access to parameters Read and write access from the controller to the parameters in the converter (in this example: ramp up and ramp down time) should be possible and be performed using as few resources as possible.

    Safety function of the converter

    The SINAMICS converters have the option of performing a fail-safe shutdown (e.g. emergency-stop).

  • 2 Solution 2.1 Overview of the general solution

    8 SINAMICS G120 to S7-300/400-PN

    V1.0a, Entry ID: 56749384

    Cop

    yrig

    ht

    Sie

    men

    s A

    G 2

    012

    All

    right

    s re

    serv

    ed

    2 Solution This application example gives an example of how to connect a SINAMICS G120 to an S7-300 using a GSD file in STEP 7 V5.

    2.1 Overview of the general solution

    Schematic layout The following figure gives a schematic overview of the most important components of the solution:

    Figure 2-1

    USB(alternative for parameterization

    via the fieldbus)

    PROFINET

    SINAMICS G120 S7-300/400 KTP 600

    Motor

    PC/PG

    The example shows you how ... ...the S7-300/400 controller is configured. ...the communication is programmed in the S7-300/400 controller. ...the SINAMICS G converter is configured using STARTER.

  • 2 Solution 2.2 Description of the core functionality

    SINAMICS G120 to S7-300/400-PN V1.0a, Entry ID: 56749384 9

    Cop

    yrig

    ht

    Sie

    men

    s A

    G 2

    012

    All

    right

    s re

    serv

    ed

    2.2 Description of the core functionality

    2.2.1 Parameterization for the communication

    Controller and converter are programmed with independent software packages. Therefore, the communication data must be entered twice.

    SINAMICS The configuration of SINAMICS G120 is performed using the STARTER commissioning tool. The Starter can be directly started from the SIMATIC Manager. For SINAMICS one of several telegram types can be selected for the data exchange. This defines which data is sent or received in which order. It is important that the same telegram type can be selected when configuring the controller.

    SIMATIC S7-300/400 SIMATIC S7-300/400 is in this example programmed with STEP 7 V5. For SINAMICS G120 and telegram type to appear in the hardware catalog in STEP 7 V5, a device description file (GSDML) must be imported. It is important, that the same telegram type is selected as for the parameterization of SINAMICS. When inserting SINAMICS into the SIMATIC project, the I/O addresses are also specified which shall be used by the controller for accessing the converter.

    2.2.2 Data exchange

    Data exchange between drive and PLC occurs in two areas: Process data,

    i.e. control word(s) and setpoint(s), or status word(s) and real value(s) Parameter area,

    i.e. reading/writing of parameter values

    Note The process data area and the parameter area are independent of each other and can be used individually.

  • 2 Solution 2.2 Description of the core functionality

    10 SINAMICS G120 to S7-300/400-PN

    V1.0a, Entry ID: 56749384

    Cop

    yrig

    ht

    Sie

    men

    s A

    G 2

    012

    All

    right

    s re

    serv

    ed

    Cyclic process data exchange Process data are transferred cyclically, which means in each bus cycle, in order for them to be transferred as quickly as possible. The S7-300/400 sends the control word and the setpoint value to SINAMICS and receives the status word and the real value. Depending on the telegram type, two further setpoint or real values, or extended control or status words respectively, can be transferred. On the controller side the process data is supplied as I/O input or output words. In the drive, the parameterization specifies which bits of the control word are

    used and which data are sent to the controller.

    Acyclic data exchange (parameter access) To be able to transfer parameters, telegram types are defined where four words are provided for a parameter transfer (PKW). Since these four words, like the process data (PZD), are always sent, a permanent communication load is produced even though the parameters themselves are generally only rarely transferred. Apart from the cyclic data exchange, using an acyclic data exchange can also be used, which is only inserted on demand. This makes it possible to transfer the parameter area acyclically on demand without creating a permanent communication load. The acyclic transfer takes clearly longer than the cyclic transfer of the process data. In this example the acyclic data exchange is used for the parameter access. In the controller, parameter jobs are sent to the drive by writing data record 47,

    and the response of the drive is read by reading data record 47. No particular action is required on the drive side.

    Note When using a CP341-1, the parameters of the drive cannot be accessed.

  • 2 Solution 2.3 Hardware and software components used

    SINAMICS G120 to S7-300/400-PN V1.0a, Entry ID: 56749384 11

    Cop

    yrig

    ht

    Sie

    men

    s A

    G 2

    012

    All

    right

    s re

    serv

    ed

    2.3 Hardware and software components used

    The application document was generated using the following components:

    Hardware components

    Table 2-1 Component Qty. Order number Note

    CPU 315-2 DP/PN 1 6ES7315-2EH14-0AB0 or other S7-300/400 CPU with PFOFINET

    SM 323 1 6ES7323-1BH00-0AA0 or an other module with DIs

    SINAMICS G120 1

    6SL3244-0BB13-1FA0 (CU 240E-2 PN-F) and 6SL3224-0BE22-2UA0 (PM240)

    or other SINAMICS G120 with CU240x-2 PN (-F)

    SIMATIC Panel KTP600 Basic color PN 1 6AV6647-0AD11-3AX0

    This panel is optional.

    SINAMICS G120 PC converter connection kit 2m

    1 6SL3255-0AA00-2CA0

    Contains STARTER on DVD and USB cable. Alternatively, the SW can be downloaded and a standard micro USB cable be used as well.

    SINAMICS IOP or SINAMICS BOP-2 1

    6SL3255-0AA00-4JA0 6SL3255-0AA00-4CA1

    optional

    Connector plug PROFINET 6 6GK1901-1BB10-2AA0

    The number already takes into account the connection with the PG/PC

    PROFINET line 6XV1840-2AH10 Motor 1 1LA7083-4AA60

    Standard software components

    Table 2-2 Component Qty. Order number Note

    SIMATIC STEP 7 V5.5 SP2 1

    Floating License 6ES7810-4CC10-0YA5

    STARTER V4.3.1.0 1 6SL3072-0AA00-0AG0 Free download: see /6/

    GSD file for SINAMICS G120 1 -

    Free download: see /7/

  • 2 Solution 2.3 Hardware and software components used

    12 SINAMICS G120 to S7-300/400-PN

    V1.0a, Entry ID: 56749384

    Cop

    yrig

    ht

    Sie

    men

    s A

    G 2

    012

    All

    right

    s re

    serv

    ed

    Sample files and projects The following list includes all files and projects used in this example.

    Table 2-3 Component Note

    58820849_SINAMICS_G120_at_S7-300400-PN_CODE_v10.zip

    This zip file contains the STEP 7 project. The password for the safety settings is 12345.

    58820849_SINAMICS_G120_at_S7-300400-PN_DOKU_v10_en.pdf This document

    CAUTION The STARTER example project is designed for a usage with the example components listed in Table 2-1. If a SINAMICS G120 with a different output or a different motor is connected, without adjusting the respective parameters, converter and/or motor can be damaged or destroyed.

  • 3 Setting up and Commissioning the Application 3.1 Wiring

    SINAMICS G120 to S7-300/400-PN V1.0a, Entry ID: 56749384 13

    Cop

    yrig

    ht

    Sie

    men

    s A

    G 2

    012

    All

    right

    s re

    serv

    ed

    3 Setting up and Commissioning the Application

    3.1 Wiring

    The figure below shows the hardware setup of the application.

    Figure 3-1 L1L2L3N

    PE24V0V

    PB PN PN CPU 315-2 PN/DP

    L1 L2 L3 PE

    U2 V2 W2 PE PN PN

    SINAMICSG120

    MY

    L+ M PN

    SIMATIC PanelKTP600

    on off2 off3 Ack Rev 0 n+ n-

    L+ MSM323

    E 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 M

    USB

    PN USB

    PG/PC

    optional

    Note The setup guidelines in the SINAMICS G120 manual (see /8/) and SIMATIC must generally be followed.

  • 3 Setting up and Commissioning the Application 3.2 IP addresses and PN names

    14 SINAMICS G120 to S7-300/400-PN

    V1.0a, Entry ID: 56749384

    Cop

    yrig

    ht

    Sie

    men

    s A

    G 2

    012

    All

    right

    s re

    serv

    ed

    3.2 IP addresses and PN names

    The following IP addresses and device names are used in the example:

    Table 3-1 IP Component Device Name

    192.168.0.1 S7-CPU S7-CPU 192.168.0.2 CU240E-2PN -F SINAMICS-G120-CU240E-V4.X 192.168.0.3 KTP600 KTP600 192.168.0.200 PG/PC

    The network mask is always 255.255.255.0 and no router is used.

    3.3 PG/PC settings

    Table 3-2 Action Remarks

    In the Windows settings for the network card to be used you set the fixed TCP/IP address 192.168.0.200 and the network mask 255.255.255.0. You may also enter any other IP address (192.168.0.x).

  • 3 Setting up and Commissioning the Application 3.4 Downloading the SIMATIC program

    SINAMICS G120 to S7-300/400-PN V1.0a, Entry ID: 56749384 15

    Cop

    yrig

    ht

    Sie

    men

    s A

    G 2

    012

    All

    right

    s re

    serv

    ed

    3.4 Downloading the SIMATIC program

    This chapter describes the steps for the installation of the example code.

    Table 3-3 No. Action Remarks

    1. Connect the controller with the PG/PC using a network cable.

    You can connect both devices directly or via a switch.

    2. Start STEP 7.

    3. Via Extras > Set PG/PC

    Interface... you open the settings of the online interface. Select the TCP/IP protocol in connection with the network card used by you.

  • 3 Setting up and Commissioning the Application 3.4 Downloading the SIMATIC program

    16 SINAMICS G120 to S7-300/400-PN

    V1.0a, Entry ID: 56749384

    Cop

    yrig

    ht

    Sie

    men

    s A

    G 2

    012

    All

    right

    s re

    serv

    ed

    No. Action Remarks

    4. Call up the Edit Ethernet Node dialog.

    5. Click on Browse...

    Select the CPU and click OK.

    Enter the IP address 192.168.0.1 and the subnet mask 255.255.255.0, and click on Assign IP Configuration.

    Enter the device name s7-cpu and click on Assign Name.

    Exit the dialog by clicking Close.

    6. Click on Accessible Nodes.

  • 3 Setting up and Commissioning the Application 3.4 Downloading the SIMATIC program

    SINAMICS G120 to S7-300/400-PN V1.0a, Entry ID: 56749384 17

    Cop

    yrig

    ht

    Sie

    men

    s A

    G 2

    012

    All

    right

    s re

    serv

    ed

    No. Action Remarks

    7. Mark all of the blocks in the CPU with and delete them. Acknowledge that system blocks and system data cannot be deleted.

    8. If you have not yet dearchived

    the project, select the project file in File > Retrieve..., and dearchive it.

  • 3 Setting up and Commissioning the Application 3.4 Downloading the SIMATIC program

    18 SINAMICS G120 to S7-300/400-PN

    V1.0a, Entry ID: 56749384

    Cop

    yrig

    ht

    Sie

    men

    s A

    G 2

    012

    All

    right

    s re

    serv

    ed

    No. Action Remarks

    9. Open the project, select the Blocks folder and clock on Download. Also download the system data!

    10. Restart the CPU after

    downloading.

    11. If you wish to use the panel, assign address 192.168.0.2 to it (analog to step 5), and download the HMI configuration.

  • 3 Setting up and Commissioning the Application 3.5 Downloading the SINAMICS parameterization

    SINAMICS G120 to S7-300/400-PN V1.0a, Entry ID: 56749384 19

    Cop

    yrig

    ht

    Sie

    men

    s A

    G 2

    012

    All

    right

    s re

    serv

    ed

    3.5 Downloading the SINAMICS parameterization

    This chapter describes the steps for downloading the example parameterization.

    Note The download can be performed via the USB interface or via the fieldbus interface. The application of the USB interface is illustrated below.

    Should you use a different converter or motor, you need to perform your own parameterization. In that case, follow the instructions in chapter 6 Configuration and Settings.

    In the screenshots below, a general project name G120_at_S7 is used. In this example it stands for G120_at_S7-300-PN

    Should you use a different converter, you need to perform your own parameterization. In that case, follow the instructions in chapter 6 Configuration and Settings.

    Table 3-4 No. Action Remarks

    1 Connect the CU 240E-2 PN-F of the SINAMICS G120 to the PG/PC.

    You can connect both devices directly or via a switch.

    2 Unless the SIMATIC program is currently loaded, please perform steps 1 to 3 from Table 3-1.

    4 Call up the Edit Ethernet Node dialog.

  • 3 Setting up and Commissioning the Application 3.5 Downloading the SINAMICS parameterization

    20 SINAMICS G120 to S7-300/400-PN

    V1.0a, Entry ID: 56749384

    Cop

    yrig

    ht

    Sie

    men

    s A

    G 2

    012

    All

    right

    s re

    serv

    ed

    No. Action Remarks

    5 Click on Browse... Select the SINAMICS

    G120 and click on OK. Enter the IP address

    192.168.0.2 and the subnet mask 255.255.255.0, and click on Assign IP Configuration.

    Enter the device name sinamics-g120-cu240e-v4.x and click on Assign Name.

    Exit the dialog by clicking Close.

    2 Click on

    G120_CU240E_2_PN_F and then double-click on Commissioning. This opens the STARTER with this project.

    5 Go online.

  • 3 Setting up and Commissioning the Application 3.5 Downloading the SINAMICS parameterization

    SINAMICS G120 to S7-300/400-PN V1.0a, Entry ID: 56749384 21

    Cop

    yrig

    ht

    Sie

    men

    s A

    G 2

    012

    All

    right

    s re

    serv

    ed

    No. Action Remarks

    6 Start the download and tick checkbox After download, copy RAM to ROM. Should you receive a query which indicates different parameters for the power unit, you need to make your own parameterization. In that case, follow the instructions in chapter 6 Configuration and Settings.

    7 Go offline.

  • 4 Operation of the Application 4.1 Prerequisites

    22 SINAMICS G120 to S7-300/400-PN

    V1.0a, Entry ID: 56749384

    Cop

    yrig

    ht

    Sie

    men

    s A

    G 2

    012

    All

    right

    s re

    serv

    ed

    4 Operation of the Application 4.1 Prerequisites

    To be able to switch on the drive via the digital inputs, the following points must be fulfilled: If the safety functions of the converter have been activated, then 24V must be

    supplied at terminals 16 and 17 (DI 4 and 5) of the SINAMICS G120; otherwise, the STO safety function is active, the yellow SAFE LED at the converter is blinking and the drive cannot be switched on.

    24V must not be supplied at terminal 8 (DI 3) of the SINAMICS G120, otherwise the command data record is switched over.

    When using an IOP, please check that the network icon ( ) is displayed on the top right. If the hand icon ( ) is displayed there, press the Hand/Auto button ( ).

    When using a BOP-2, please check whether the hand icon ( ) is displayed. If yes, press the Hand/Auto button ( ).

    4.2 Operating the application

    The drive is exclusively moved via digital inputs. The HMI is only used for monitoring.

    Table 4-1 Terminal Name Function

    E 0.0 On Switching the drive on/off, (Off2 and Off3 =1 must apply for the operation)

    E 0.1 Off 2 0= Motor immediately switched of, drive spins out E 0.2 Off 3 0= Fast stop, motor is decelerated with Off3 ramp down time (P1135) until it

    stops E 0.3 Ack Rising edge acknowledges a pending error in the drive E 0.4 Rev Reversed direction, the polarity of the setpoint value is negated E 0.5 0 The setpoint is set to 0. E 0.6 n+ The setpoint value is increased E 0.7 n- The setpoint value is decreased

  • 4 Operation of the Application 4.2 Operating the application

    SINAMICS G120 to S7-300/400-PN V1.0a, Entry ID: 56749384 23

    Cop

    yrig

    ht

    Sie

    men

    s A

    G 2

    012

    All

    right

    s re

    serv

    ed

    To switch on the drive, please follow the steps below:

    Table 4-2 Steps Action Note / Result

    1. Apply 24V to Off2(E0.1) and Off3(E0.2).

    The further required control bits for the operation are set to 1 by the program.

    2. Enter a pulse (switching on and back off) to Ack (E0.3).

    This acknowledges a possibly pending error message.

    3. Enter a pulse (switching on and back off) to 0 (E0.5).

    The setpoint is set to 0.

    4. Apply 24V to On(E0.0). The drive switches on. 5. Change the setpoint value with

    inputs n+ (E 0.6), n- (E0.7) and 0 (E0.5).

    The speed of the motor changes.

    6. Remove the 24V from On(E0.0). The drive switches back off.

  • 4 Operation of the Application 4.3 Monitoring and parameter access via the operator panel

    24 SINAMICS G120 to S7-300/400-PN

    V1.0a, Entry ID: 56749384

    Cop

    yrig

    ht

    Sie

    men

    s A

    G 2

    012

    All

    right

    s re

    serv

    ed

    4.3 Monitoring and parameter access via the operator panel

    4.3.1 Screens and screen navigation

    Figure 4-1

    Application example Support

    Process data exchange

    Next

    Parameter access

    Fault buffer

    From allsubordinate screens

    From allsubordinate screens

    Back Back

    Star

    t scr

    een

    Ove

    rvie

    w s

    cree

    n

    Onl

    ine

    Supp

    ort -

    Prom

    otio

    n

    Stat

    us w

    ord,

    Con

    trol

    Wor

    dSe

    tpoi

    nts

    and

    actu

    al v

    alue

    s

    Rea

    d/w

    rite

    para

    met

    ers

    Faul

    t buf

    fer

    Quit runtime

    Change language (english/german)

  • 4 Operation of the Application 4.3 Monitoring and parameter access via the operator panel

    SINAMICS G120 to S7-300/400-PN V1.0a, Entry ID: 56749384 25

    Cop

    yrig

    ht

    Sie

    men

    s A

    G 2

    012

    All

    right

    s re

    serv

    ed

    4.3.2 Process data exchange

    Both screens for the process data exchange access the idb_Process_Data_SFC data block (DB11). The operator panel supports the process data exchange via SFC, which has been realized in this application (see chapter 5.1.3). When selecting a different method, the data in the respective data block must be accessed respectively in the tag assignment in WinCC flexible.

    Control and status word

    Figure 4-2

    The bit commands, which you can partially specify via the digital input module, are displayed in the 16 bits wide control word. The current state of the converter is given via the also 16 bits wide status word. The displayed control or status word is identical with that in the respective VAT_Process_Data_... tag table.

  • 4 Operation of the Application 4.3 Monitoring and parameter access via the operator panel

    26 SINAMICS G120 to S7-300/400-PN

    V1.0a, Entry ID: 56749384

    Cop

    yrig

    ht

    Sie

    men

    s A

    G 2

    012

    All

    right

    s re

    serv

    ed

    Set point and actual values

    Figure 4-3

    The control tags contained in the above screen are identical with those in the respective VAT_Process_Data_... tag table.

    Setpoint speed value: In the yellow field on the top left, the setpoint speed value is displayed in this example via the digital inputs E0.4 to E0.7 (see Table 4-1).

    Actual values: The current actual values speed, current and torque are displayed below the speed setpoint value input.

    Control and status word: To keep an eye on control word and status word, without switching to the respective screen, they are also given here as a miniature display.

    Current messages: Current faults and warnings are displayed with a respective number. A 0 means, that no fault or alarm exists. If a message is pending it is displayed according to Figure 4-4.

  • 4 Operation of the Application 4.3 Monitoring and parameter access via the operator panel

    SINAMICS G120 to S7-300/400-PN V1.0a, Entry ID: 56749384 27

    Cop

    yrig

    ht

    Sie

    men

    s A

    G 2

    012

    All

    right

    s re

    serv

    ed

    Figure 4-4

    Tap or click on the message number to display the respective message text.

    Figure 4-5

    The message text is displayed as long as the message number is pressed.

  • 4 Operation of the Application 4.3 Monitoring and parameter access via the operator panel

    28 SINAMICS G120 to S7-300/400-PN

    V1.0a, Entry ID: 56749384

    Cop

    yrig

    ht

    Sie

    men

    s A

    G 2

    012

    All

    right

    s re

    serv

    ed

    4.3.3 Parameter access

    Read/write parameter

    Figure 4-6

    The control tags contained in the above screen are identical with those in the respective VAT_Parameter_access_... tag table.

    Table 4-3 Action Remark

    1. Select the access type with the Read parameters and Write parameters buttons.

    The selected access type is displayed via a bright green button.

  • 4 Operation of the Application 4.3 Monitoring and parameter access via the operator panel

    SINAMICS G120 to S7-300/400-PN V1.0a, Entry ID: 56749384 29

    Cop

    yrig

    ht

    Sie

    men

    s A

    G 2

    012

    All

    right

    s re

    serv

    ed

    Action Remark

    2. Read parameters: Proceed with point 3 in the table. Write parameters: When tapping or clicking the yellow input field for the rampup/rampdown time, a keyboard mask for the value input opens. Close your input with the Return key.

    8,0

    3. Start the write or read job with the

    Start button. Note: After a write job the new data are adopted as read parameters in the white fields in the left part of the screen. After writing you need not trigger any additional read job for the update.

    The job status specifies how the job was completed: done = complete without errors errori = complete with errors The status refers to processing the system function blocks SFB 52 RDREC and SFB 53 WRREC in STEP7 code. For fault diagnostics see Fehler! Verweisquelle konnte nicht gefunden werden..

    Fault buffer The screen displays the fault codes of eight current and eight acknowledged faults, which are saved in the converter.

  • 4 Operation of the Application 4.3 Monitoring and parameter access via the operator panel

    30 SINAMICS G120 to S7-300/400-PN

    V1.0a, Entry ID: 56749384

    Cop

    yrig

    ht

    Sie

    men

    s A

    G 2

    012

    All

    right

    s re

    serv

    ed

    Figure 4-7

    The fault codes in the above screen correspond to the control tags V_3_Value_00 (DW18) to V_3_Value_15 (DW48) in the answer_from_drive data block (DB103). Tap or click on the message number to display the respective message text.

    Figure 4-8

    The message text is displayed as long as the message number is pressed.

  • 5 Functional Mechanisms of this Application 4.3 Monitoring and parameter access via the operator panel

    SINAMICS G120 to S7-300/400-PN V1.0a, Entry ID: 56749384 31

    Cop

    yrig

    ht

    Sie

    men

    s A

    G 2

    012

    All

    right

    s re

    serv

    ed

    5 Functional Mechanisms of this Application Program overview

    Figure 5-1

    SFB 52 RDREC

    OB 1 CYCL_EXC

    FB 10 simulation

    FB 20 parameteraccess

    DB 10 idb simulation

    DB 20 idb parameter access

    SFB 53 WRREC

    DB 100 write driveparameter

    DB 101 read driveparameter

    DB 103 answerfrom drive

    FB 1x process data

    DB 1x idb process data

    The SIMATIC program consists of three areas: Simulation

    In this area, the control signals for the converter are generated, which are then sent to the drive as process data.

    Process data exchange In this area, the process data are sent to the converter (e.g. On-command and setpoint value) or received (status and actual values)

    Parameter access In this area the parameters of the converter are accessed.

    Note The two communication areas process data and parameter access are independent of each other and can also be used individually.

  • 5 Functional Mechanisms of this Application 5.1 Functionality and process data exchange

    32 SINAMICS G120 to S7-300/400-PN

    V1.0a, Entry ID: 56749384

    Cop

    yrig

    ht

    Sie

    men

    s A

    G 2

    012

    All

    right

    s re

    serv

    ed

    5.1 Functionality and process data exchange

    Figure 5-2

    SFB 52 RDREC

    OB 1 CYCL_EXC

    FB 10 simulation

    FB 20 parameteraccess

    DB 10 idb simulation

    DB 20 idb parameter access

    SFB 53 WRREC

    DB 100 write driveparameter

    DB 101 read driveparameter

    DB 103 answerfrom drive

    FB 1x process data

    DB 1x idb process data

    The contents of the process data are values which are regularly exchanged between controller and converter. These are at least the control and status word as well as the setpoint and actual value. Selecting the telegram type specifies the exact length and structure. The Siemens Telegram 352, PZD 6/6 telegram type used in the example exchanges 6 words in both directions.

    5.1.1 Access to process data in the user program of the controller

    At the start of the cycle, the operating system of S7-300/400 stores the (user) data received by the converter in the I/O input area and sends the data stored in the I/O output area to the converter at the end of the cycle. In the user program, the data can be access by copying from or into the I/O area. The used address areas are defined when establishing the hardware configuration. See step 12 in Table 6-1.

    5.1.2 Standardizing the setpoint and actual values

    The setpoint and actual values are transferred as standards. The standardization and reference values are stored in parameters P2000 to P2006 of the SINAMICS G120. 16384dez = 4000hex = 100% applies here, with 100% referring to the reference value for the transferred variable. Example:

    If P2000 (reference speed or reference frequency) is 1500 1/min and if a speed of 500 1/min shall be run, then 33% or 5461dec must be transferred.

  • 5 Functional Mechanisms of this Application 5.1 Functionality and process data exchange

    SINAMICS G120 to S7-300/400-PN V1.0a, Entry ID: 56749384 33

    Cop

    yrig

    ht

    Sie

    men

    s A

    G 2

    012

    All

    right

    s re

    serv

    ed

    Further information is available in chapter 6 Configuring the fieldbus in the operating instructions (/8/) of SINAMICS G120.

    5.1.3 Transfer methods

    To copy the process data into or from the I/O area, the following methods can be used depending on the requirements: 1. Load and transfer command (STL) or MOVE (FBD and LAD) 2. The system functions SFC 14 DPRD_Dat / SFC 15 DPWR_Dat 3. The functions FC 11 DP_Send / FC 12 DP_RECV when using a CP 342-5 All three methods are contained in the example program. In OB1 only the method with SFC 14/15 is called up.

    Load / transfer or MOVE The most simple way is using load and transfer commands (STL) or MOVE (FBD and LAD). This ensures consistency for each command (1, 2 and 4 bytes) and hence also the consistency within the individual elements, such as control word and setpoint value. However, the individual elements can origin from different bus cycles or occur in different bus cycles. For the applications for which the SINAMICS G120 is generally used this is still sufficient. FB 13 in the example program illustrates the usage of this method in STL and the FB 14 in FBD/LAD.

    SFC 14 DPRD_Dat / SFC 15 DPWR_Dat As opposed to the load, transfer or MOVE command, these system functions ensure that the consistency is maintained across the entire process data, i.e. all elements of the process data of a slave are transferred from the same bus cycle or are transferred within a bus cycle. This is necessary to enable a distributed synchronization. In the example program, all of the 6 words are copied consistently. Using SFC 14 DPRD_Dat and SFC 15 DPWR_Dat has no disadvantages, apart from the necessary call of system functions, which is often avoided by newcomers to programming, and a slightly longer processing duration than for the respective load, transfer or MOVE commands. FB11 in the example program shows the usage of this method.

    FC 11 PNIO_Send / FC 12 PNIO_RECV When using a CP 341-1, it is mandatory that the process data is transferred from the SIMATIC_NET_CP library using the FC 11 PNIO_Send / FC 12 PNIO_RECV functions. The consistency is provided across the entire process data. FB12 in the example program shows the usage of this method.

  • 5 Functional Mechanisms of this Application 5.1 Functionality and process data exchange

    34 SINAMICS G120 to S7-300/400-PN

    V1.0a, Entry ID: 56749384

    Cop

    yrig

    ht

    Sie

    men

    s A

    G 2

    012

    All

    right

    s re

    serv

    ed

    5.1.4 Control and status word

    The control and status word has already been defined. The subsequent figures illustrate the control and status word when selecting the Siemens Telegram 352, PZD 6/6 telegram type.

    Figure 5-3: Control word of the Siemens Telegram 352, PZD 6/6 telegram type

    Note A control word for which all bits are 0 is rejected as invalid by the converter. Therefore, at least bit 10 must always be set.

  • 5 Functional Mechanisms of this Application 5.1 Functionality and process data exchange

    SINAMICS G120 to S7-300/400-PN V1.0a, Entry ID: 56749384 35

    Cop

    yrig

    ht

    Sie

    men

    s A

    G 2

    012

    All

    right

    s re

    serv

    ed

    Figure 5-4 Status word of the Siemens Telegram 352, PZD 6/6 telegram type

  • 5 Functional Mechanisms of this Application 5.1 Functionality and process data exchange

    36 SINAMICS G120 to S7-300/400-PN

    V1.0a, Entry ID: 56749384

    Cop

    yrig

    ht

    Sie

    men

    s A

    G 2

    012

    All

    right

    s re

    serv

    ed

    5.1.5 FB 11 Process Data_SFC

    This FB shows the access to the process data using system functions SFC 14 DPRD_Dat / SFC 15 DPWR_Dat. It is called up cyclically in OB1.

    Figure 5-5 FB 11 Process Data_SFC

    Table 5-1

    Network Function

    1. The IO address of the drive (INT) is copied to a temporary WORD tag. 2. The process data is copied from the I/O area into the temporary #InData data

    area using SFC 14 DPRD_Dat. 3.

    4.

    Status word, warning and faults are copied from the temporary #InData data area to the respective block outputs, and the current real values (WORD) are copied into temporary tags (INT) for data type adjustment.

    5. The current speed is converted into REAL format by calling FC10. 6. The current electrical current is converted into REAL format by calling FC10. 7. The current torque is converted into REAL format by calling FC10. 8. The setpoint value (REAL) is converted into the standardized WORD format

    by calling FC11. 9. 10.

    Control word and setpoint (WORD) are copied to the temporary #OUTData data area. 0 is written to the remaining 4 words.

    11. The process data is copied from the temporary #OutData data area into the I/O area using SFC 15 DPWR_Dat.

  • 5 Functional Mechanisms of this Application 5.1 Functionality and process data exchange

    SINAMICS G120 to S7-300/400-PN V1.0a, Entry ID: 56749384 37

    Cop

    yrig

    ht

    Sie

    men

    s A

    G 2

    012

    All

    right

    s re

    serv

    ed

    5.1.6 FB 13 Process Data_LT and FB 14 Process Data_MOVE

    These FBs illustrate the access to the process data with MOVE (FBD/LAD) or load, transfer (STL) commands. They are not called in the program example, since FB11 Process Data_SFC with the same function is used there.

    Figure 5-6 FB 13 Process Data_LT and FB 14 Process Data_MOVE

    Table 5-2: Networks of FB 13 Process Data_LT Network Function

    1. Status word, warning and faults are copied from the #InData I/O area to the respective block outputs, and the current real values (WORD) are copied into temporary tags (INT) for data type adjustment.

    2. The current actual values are converted into REAL format by calling FC10. 3. Control word and setpoint are (after conversion to the standardized WORD

    format by FC11) copied to the I/O area.

    Table 5-3: Networks of FB 14 Process Data_MOVE Network Function

    1.

    2.

    Status word, warning and faults are copied from the I/O area to the respective block outputs, and the current real values (WORD) are copied into temporary tags (INT) for data type adjustment.

    3. The current speed is converted into REAL format by calling FC10. 4. The current electrical current is converted into REAL format by calling FC10. 5. The current torque is converted into REAL format by calling FC10. 6. Control word and setpoint are (after conversion to the standardized WORD

    format by FC11) copied to the I/O area.

  • 5 Functional Mechanisms of this Application 5.1 Functionality and process data exchange

    38 SINAMICS G120 to S7-300/400-PN

    V1.0a, Entry ID: 56749384

    Cop

    yrig

    ht

    Sie

    men

    s A

    G 2

    012

    All

    right

    s re

    serv

    ed

    5.1.7 FB 12 Process Data_CP

    This FB shows the access to the process data when using a CP341-1. It is not called in the program example, since the hardware configuration used in the example does not contain a CP341-1. Using slaves addressed via a CP341-1 requires the application of this method (FC11 and FC12 from the SIMATIC_NET_CP library).

    NOTICE Since FC11 and FC12 (for converting the setpoint and actual values) already exist in the project, FC11 PNIO_SEND and FC12 PNIO_RECV from the SIMATIC_NET_CP library are copied to the project as FC 1 PNIO_SEND and FC 2 PNIO_RECV.

    Figure 5-7 FB 12 Process Data_CP

    Table 5-4 Network Function

    1. The IO address of the drive (INT) is copied to a temporary WORD tag. 2. The process data is copied from the I/O area into the temporary #InData data

    area using FC 2 PNIO_RECV. 3.

    4.

    Status word, warning and faults are copied from the temporary #InData data area to the respective block outputs, and the current real values (WORD) are copied into temporary tags (INT) for data type adjustment.

    5. The current speed is converted into REAL format by calling FC10. 6. The current electrical current is converted into REAL format by calling FC10. 7. The current torque is converted into REAL format by calling FC10. 8. The setpoint value (REAL) is converted into the standardized WORD format

    by calling FC11. 9. 10.

    Control word and setpoint (WORD) are copied to the temporary #OUTData data area, and 0 is written to the remaining 4 words.

    11. The process data is copied from the temporary #OutData data area into the I/O area using FC 1 PNIO_SEND.

  • 5 Functional Mechanisms of this Application 5.2 Parameter access functionality

    SINAMICS G120 to S7-300/400-PN V1.0a, Entry ID: 56749384 39

    Cop

    yrig

    ht

    Sie

    men

    s A

    G 2

    012

    All

    right

    s re

    serv

    ed

    5.2 Parameter access functionality

    Figure 5-8

    SFB 52 RDREC

    OB 1 CYCL_EXC

    FB 10 simulation

    FB 20 parameteraccess

    DB 10 idb simulation

    DB 20 idb parameter access

    SFB 53 WRREC

    DB 100 write driveparameter

    DB 101 read driveparameter

    DB 103 answerfrom drive

    FB 1x process data

    DB 1x idb process data

    Acyclic parameter access occurs parallel to the cyclic process data exchange. This saves resources, since this connection is only established on demand, i.e. when accessing a parameter. In the controller, the Write data record and Read data record functions must be used for this. Data record 47 must always be used. Writing data record 47 sends a job to the converter which performs the job and provides a response. Reading data record 47 makes the response of the converter available in the controller so it can be evaluated. For reading and writing data records, the system function blocks SFB 53 WRREC and SFB 52 RDREC are used in the controller.

    Note Since SFB 53 WRREC and SFB 52 RDREC are not used with CP341-1, the parameter access is not possible when using this CP.

    5.2.1 Job and response structure

    The structure of the jobs and responses are available in Chapter 7.3.2.1 Configuring the fieldbus, PROFIdrive profile for PROFIBUS and PROFINET, acyclic communication in the operating instruction (/8/)

    Note Since the structure of the data record to be sent or received depends on the number of jobs and their number format, no generally valid structure can be used.

  • 5 Functional Mechanisms of this Application 5.2 Parameter access functionality

    40 SINAMICS G120 to S7-300/400-PN

    V1.0a, Entry ID: 56749384

    Cop

    yrig

    ht

    Sie

    men

    s A

    G 2

    012

    All

    right

    s re

    serv

    ed

    5.2.2 Read/Write Drive Parameter DB and Answer from Drive DB

    The job to access a parameter consists of at least 10 words. Therefore, the job should be assembled in a DB or in the memory area. In this example this is performed using DB 101 Read Drive Parameter and DB 100 Write Drive Parameter. The response by the converter also consists of several words. Therefore, the example uses DB 103 Answer from Drive. A job may contain the access to several parameters. Since the length of the data to be transferred per job depends on number and data types of the converter parameters, no generally valid structure can be devised. Therefore, in this example only the ramp up and ramp down times (P1120 and P1121) and a part of the fault memory (P945.x) are accessed. The job to read the parameters is stored in DB 101 Read Drive Parameter, the job to write them in DB 100 Write Drive Parameter. The response by the converter is copied to DB 103 Answer from Drive. The structure contained in it corresponds to the structure for a successful reading of the parameters.

    Figure 5-9 DB 100 for writing the ramp up and ramp down time (in the picture: 10s and 15 s)

  • 5 Functional Mechanisms of this Application 5.2 Parameter access functionality

    SINAMICS G120 to S7-300/400-PN V1.0a, Entry ID: 56749384 41

    Cop

    yrig

    ht

    Sie

    men

    s A

    G 2

    012

    All

    right

    s re

    serv

    ed

    Figure 5-10: DB 101 for reading the ramp up and ramp down time and 16 values of the fault memory

    Figure 5-11: DB for the response of the converter (read job)

    Note Since the structure of the data record to be sent or received depends on the number of jobs and their number format, no generally valid structure can be used.

  • 5 Functional Mechanisms of this Application 5.2 Parameter access functionality

    42 SINAMICS G120 to S7-300/400-PN

    V1.0a, Entry ID: 56749384

    Cop

    yrig

    ht

    Sie

    men

    s A

    G 2

    012

    All

    right

    s re

    serv

    ed

    5.2.3 FB 20 Parameter_Access

    In the example, the parameter access occurs in FB 20 Parameters. It is called cyclically in OB 1.

    Figure 5-12

    Table 5-5 Interface assignment of FB Parameters Name Type Function

    Inputs READ_WRITE BOOL 0= Read parameters

    1= Write parameters START BOOL A rising edge starts the transfer, the FB

    automatically sets the signal back to 0 Ramp_Time_Up REAL Ramp up time to be written Ramp_Time_Down REAL Ramp down time to be written Outputs busy BOOL Access in progress done BOOL Access successful error BOOL Access aborted with an error Actual_Ramp_time_up REAL Read ramp down time Actual_Ramp_time_down REAL Read ramp down time

    Setup The "Parameter FB consists of two parts: a step chain which controls the sequence of the parameter access.

    Networks 1 to 9 call of the system functions Read data record or Write data record.

    Network 10

  • 5 Functional Mechanisms of this Application 5.2 Parameter access functionality

    SINAMICS G120 to S7-300/400-PN V1.0a, Entry ID: 56749384 43

    Cop

    yrig

    ht

    Sie

    men

    s A

    G 2

    012

    All

    right

    s re

    serv

    ed

    Step chain The individual steps of FB 20 Parameter_access are represented in the following graphic. The possible transitions between the individual steps are also displayed there.

    Figure 5-13 Step chain

    In the individual states of the step chain the following functions are executed:

    Table 5-6: Function of the states of FB 20 Parameter_access State Function

    0 Wait for start trigger A rising edge of the START signal is waited for. If it is detected, all output signals are deleted, BUSY is set and step 1 is activated.

    1 Start WR_REC The START signal is reset, the req signal of SFB 53 WRREC is set and step 2 is activated.

    2 Wait for end of WR_REC

    It is waited until the busy signal of SFB 53 WRREC becomes 0 again. Then step 3 is activated.

    3 Check result of It is checked whether the data record was written

  • 5 Functional Mechanisms of this Application 5.2 Parameter access functionality

    44 SINAMICS G120 to S7-300/400-PN

    V1.0a, Entry ID: 56749384

    Cop

    yrig

    ht

    Sie

    men

    s A

    G 2

    012

    All

    right

    s re

    serv

    ed

    State Function WR_REC successfully.

    If yes, the req signal of SFB 53 WRREC is deleted again and step 4 is activated. If SFB 53 WRREC reports error 16#DF80_B500 (peer not ready), step 3 is activated again so SFB 53 WRREC repeats the job. If a different error has occurred, the req signal of SFB 53 WRREC is deleted, an internal error bit is set and step 7 is activated.

    4 Start RD_REC The req signal of FB RDREC is set and step 5 is activated.

    5 Wait for end of RD_REC

    It is waited until the busy signal of FB RDREC becomes 0 again. Then step 6 is activated.

    6 Check result of RD_REC

    It is checked whether the data record was read successfully. If yes, the req signal of SFB 52 RDREC is deleted again and step 7 is activated. If SFB 52 RDREC reports error 16#DE80_B500 (peer not ready), step 5 is activated again so FB RDREC repeats the job. If a different error has occurred, the req signal of SFB 52 RDREC is deleted, an internal error bit is set and step 7 is activated.

    7 Check for errors, copy outputs

    It is checked whether one of the internal error bits is set or whether an error bit has been set in the response of the converter. If an error bit is set,

    the error signal is set, the BUSY signal is deleted, 999999.9s is output as read time and step 0 is activated.

    If no error bit has been set, the read times are output, the BUSY is deleted, the transfer.done is set and step 0 is activated.

    Call of the system functions Read data record or Write data record After the currently required control bits were set in the sequence chart of FB 20 Parameter_access, the Write data record and Read data record system functions (SFB 53 WRREC and SFB 52 RDREC) are called in network 10. The READ/WRITE input tag is used for selecting which of both calls of SFB 53 WRREC is active. Both calls only differ in the DB sent to the drive: the one to write parameters or the one to read parameters.

  • 6 Configuration and Settings 6.1 Configuring the S7-300/400 controller

    SINAMICS G120 to S7-300/400-PN V1.0a, Entry ID: 56749384 45

    Cop

    yrig

    ht

    Sie

    men

    s A

    G 2

    012

    All

    right

    s re

    serv

    ed

    6 Configuration and Settings Note If you only wish to download and commission the example program, please

    follow the instructions in chapter 3 Setting up and Commissioning the Application.

    The following step tables describe what to do, if you cannot or do not wish to use the example code, and you want or have to configure SINAMICS G120 and SIMATIC S7 CPU by yourself.

    6.1 Configuring the S7-300/400 controller

    This chapter describes how the S7-300/400 must be configured for the example program. This chapter does not discuss integrating the operator panel and programming the S7-300/400.

    Note In the screenshots below, a general STEP 7 project name G120_at_S7 is used. In this example it stands for G120_at_S7-300-PN

    Table 6-1 No. Action Remarks

    1. Start STEP 7 V5.

    2. Start the New project wizard.

  • 6 Configuration and Settings 6.1 Configuring the S7-300/400 controller

    46 SINAMICS G120 to S7-300/400-PN

    V1.0a, Entry ID: 56749384

    Cop

    yrig

    ht

    Sie

    men

    s A

    G 2

    012

    All

    right

    s re

    serv

    ed

    No. Action Remarks

    3. Select the CPU 315-2DP/PN

    4. In this screen you click

    Continue >.

    5. Assign a name for the project

    (e.g. G120_at_S7-300/400-PN).

  • 6 Configuration and Settings 6.1 Configuring the S7-300/400 controller

    SINAMICS G120 to S7-300/400-PN V1.0a, Entry ID: 56749384 47

    Cop

    yrig

    ht

    Sie

    men

    s A

    G 2

    012

    All

    right

    s re

    serv

    ed

    No. Action Remarks

    6. Double-click the Hardware icon to open the hardware configuration.

    7. Select the PROFINET interface

    of the CPU and choose Insert PROFINET IO System from the context menu (right mouse button)

    8. Ensure that address

    192.168.0.1 and network mask 255.255.225.000 have been assigned.

    Click on the New button and create an Ethernet network. The CPU will automatically be connected to it.

    Click OK Click on OK in the higher-

    level mask

  • 6 Configuration and Settings 6.1 Configuring the S7-300/400 controller

    48 SINAMICS G120 to S7-300/400-PN

    V1.0a, Entry ID: 56749384

    Cop

    yrig

    ht

    Sie

    men

    s A

    G 2

    012

    All

    right

    s re

    serv

    ed

    No. Action Remarks

    9. Double-click the PN/IO interface of the CPU.

    10. Change the device name to

    S7-CPU (or the respective name assigned during node initiation (step 4 in Table 3-1) ).

    11. Ensure that the PROFINET

    network is displayed.

  • 6 Configuration and Settings 6.1 Configuring the S7-300/400 controller

    SINAMICS G120 to S7-300/400-PN V1.0a, Entry ID: 56749384 49

    Cop

    yrig

    ht

    Sie

    men

    s A

    G 2

    012

    All

    right

    s re

    serv

    ed

    No. Action Remarks

    12. If you have already installed the GSD file of SINAMICS G120, you may skip this step! Otherwise, unzip the files in a directory (see /7/), select the desired languages via Extras > Install GSD File..., install them and restart STEP 7 if necessary. Then call the hardware configuration again.

    13. In the catalog you chose the

    SINAMICS G120 CU240E-2PN(F) V4.5 object. The path in the catalog is: > PROFINET IO > Drives > SINAMICS > SINAMICS G120 CU240E-2 PN(-F) V4.5 Drag this object onto the PROFINET line and release the mouse button.

    14. The bottom area now displays

    the SINAMICS. In the catalog, under the SINAMICS G120 CU240E-2 PN(-F) V4.5 object, you find the possible telegram configuration. Drag the Siemens telegram 352, PZD 6/6 to the first free slot in the SINAMICS G120. Please ensure that the I-address and the Q-address are both 256. Otherwise, the calls of FB11, 12, 20 in the OB, or FB 13 and 14 respectively, must be adjusted accordingly.

  • 6 Configuration and Settings 6.1 Configuring the S7-300/400 controller

    50 SINAMICS G120 to S7-300/400-PN

    V1.0a, Entry ID: 56749384

    Cop

    yrig

    ht

    Sie

    men

    s A

    G 2

    012

    All

    right

    s re

    serv

    ed

    No. Action Remarks

    15. Double-click on the SINAMICS in the top half of the window and ensure that address 192.168.0.2 has been assigned.

    16. On slot 4 of the central rack

    please enter a DI or DI/DO module (e.g. 6ES323-1BH00-0AA0). Please ensure that the I-address is 0. Otherwise, you need to adjust the call of FB10 accordingly in OB1.

    17. Thus, the hardware configuration

    is completed. Click Save and compile

  • 6 Configuration and Settings 6.2 Configuring the SINAMICS G120 drive

    SINAMICS G120 to S7-300/400-PN V1.0a, Entry ID: 56749384 51

    Cop

    yrig

    ht

    Sie

    men

    s A

    G 2

    012

    All

    right

    s re

    serv

    ed

    6.2 Configuring the SINAMICS G120 drive

    Note In the screenshots below, a general STEP 7 project name G120_at_S7 is used. In this example it stands for G120_at_S7-300-PN

    Table 6-2 No. Action Remarks

    1. Connect the SINAMICS G120 to your PG/PC using the network cable.

    2. Start the SIMATIC Manager and open the project with S7-300/400. Alternatively, you can also start the STARTER and the project there. However, the subsequent steps will differ from those demonstrated here.

    3. Insert a SIMATIC station as a

    new object.

  • 6 Configuration and Settings 6.2 Configuring the SINAMICS G120 drive

    52 SINAMICS G120 to S7-300/400-PN

    V1.0a, Entry ID: 56749384

    Cop

    yrig

    ht

    Sie

    men

    s A

    G 2

    012

    All

    right

    s re

    serv

    ed

    No. Action Remarks

    4. Select the device, the CU and IP as the online access. Enter address 192.168.0.2. Close the dialog box with OK.

    5. In the tree you select the drive

    and open Commissioning (e.g. via double-click on the Commissioning icon) which opens the STARTER.

    6. Call up the Target Device

    Selection dialog in the STARTER via Target system > Select target device.... Select the CU and the S7ONLINE access point and then click on OK.

  • 6 Configuration and Settings 6.2 Configuring the SINAMICS G120 drive

    SINAMICS G120 to S7-300/400-PN V1.0a, Entry ID: 56749384 53

    Cop

    yrig

    ht

    Sie

    men

    s A

    G 2

    012

    All

    right

    s re

    serv

    ed

    No. Action Remarks

    7. Go online.

    8. Select the converter in the tree

    and then press Restore factory settings.

    9. Remove the checkmark for

    Save factory settings to ROM and then click OK.

    10. Expand the tree and double-click

    on Configuration. Then call up the wizard.

  • 6 Configuration and Settings 6.2 Configuring the SINAMICS G120 drive

    54 SINAMICS G120 to S7-300/400-PN

    V1.0a, Entry ID: 56749384

    Cop

    yrig

    ht

    Sie

    men

    s A

    G 2

    012

    All

    right

    s re

    serv

    ed

    No. Action Remarks

    11. Run the wizard and enter the data you need. If you have no specific requirements, use the respective default values, apart from the following exceptions Ensure that the field bus is

    selected in the Defaults of the setpoint/command sources field.

    In the Motor step you enter the data of the connected motor.

    After the wizard has been run through completely, double-click on Communication > PROFINET in the tree, select one of the Receive or Send direction tabs, and select Siemens telegram 352, PZD 6/6).

    12.

    Note: The telegram type matches the example. It is decisive here, that the same telegram is selected as for the hardware configuration in STEP 7.

    13. If you do not wish to use any safety functions, proceed with step 18.

    When using an F-CPU you can also address safety functions via the fieldbus, however, this is not part of this example. Further respective information is available in the Safety Integrated function manual for SINAMICS G120 (Manuals).

    14. Open Safety Integrated in the tree and click on Change settings.

  • 6 Configuration and Settings 6.2 Configuring the SINAMICS G120 drive

    SINAMICS G120 to S7-300/400-PN V1.0a, Entry ID: 56749384 55

    Cop

    yrig

    ht

    Sie

    men

    s A

    G 2

    012

    All

    right

    s re

    serv

    ed

    No. Action Remarks

    15. Select STO via terminal, click on Copy parameters and then on Activate settings.

    16. Enter a password and then click

    on Activate settings again. (The password used in this example is 12345)

    17. Choose Yes, to save the

    parameters in ROM.

    18. If you skipped the configuration

    of the safety functions , click on Copy RAM to ROM to save the parameterization permanently in the SINAMICS.

    19. Download the configuration

    created online into the PG.

  • 6 Configuration and Settings 6.2 Configuring the SINAMICS G120 drive

    56 SINAMICS G120 to S7-300/400-PN

    V1.0a, Entry ID: 56749384

    Cop

    yrig

    ht

    Sie

    men

    s A

    G 2

    012

    All

    right

    s re

    serv

    ed

    No. Action Remarks

    20. Go offline.

    21. Save the project on your hard

    disc.

    22. If you changed the safety

    programming of the SINAMICS, you must make a Power reset to activate it.

  • 6 Configuration and Settings 6.3 Configuring the SINAMICS G120 drive via USB

    SINAMICS G120 to S7-300/400-PN V1.0a, Entry ID: 56749384 57

    Cop

    yrig

    ht

    Sie

    men

    s A

    G 2

    012

    All

    right

    s re

    serv

    ed

    6.3 Configuring the SINAMICS G120 drive via USB

    You can also configure SINAMICS G120 via USB instead.

    Table 6-3 No. Action Remarks

    1. Connect the CU 240E-2 PN(-F) of SINAMICS G120 with the PG/PC using a USB cable.

    2. Start the STARTER and open the

    example project

    3. Open Set PG/PC interface.

  • 6 Configuration and Settings 6.3 Configuring the SINAMICS G120 drive via USB

    58 SINAMICS G120 to S7-300/400-PN

    V1.0a, Entry ID: 56749384

    Cop

    yrig

    ht

    Sie

    men

    s A

    G 2

    012

    All

    right

    s re

    serv

    ed

    No. Action Remarks

    4. Ensure that interface S7USB has been programmed for the DEVICE (STARTER/SCOUT) access point and acknowledge with OK.

    5. Open the properties of the G120

    you wish to access.

  • 6 Configuration and Settings 6.3 Configuring the SINAMICS G120 drive via USB

    SINAMICS G120 to S7-300/400-PN V1.0a, Entry ID: 56749384 59

    Cop

    yrig

    ht

    Sie

    men

    s A

    G 2

    012

    All

    right

    s re

    serv

    ed

    No. Action Remarks

    6. Select DEVICE (S7USB) and click OK.

    7. You have now reset the online

    access and are able to go online.

    Assign PROFINET device name With a USB connection, you can not us the edit Ethernet name... dialog to assign the PN device name. In Parameter 8920 you can enter the PROFINET device name of the SINAMICS. This name must be identical to the name fort he SINAMICS in the STEP 7 hardware configuration. You must make a power reset to the drive to activate it. During a startup of the S7-CPU, it will assign the IP configured in the hardware configuration to the drive.

  • 7 Literature

    60 SINAMICS G120 to S7-300/400-PN

    V1.0a, Entry ID: 56749384

    Cop

    yrig

    ht

    Sie

    men

    s A

    G 2

    012

    All

    right

    s re

    serv

    ed

    7 Literature The following list is by no means complete and only provides a selection of appropriate sources.

    Table 7-1 Topic Title / link

    /1/ Automatisieren mit STEP7 in AWL und SCL (Automating with STEP7 in STL and SCL) Author: Hans Berger Publicis MCD Verlag ISBN: 978-3-89578-397-5

    /2/ Automating with STEP7 in LAD and FBD Author: Hans Berger Publicis MCD Verlag ISBN: 978-3-89578-296-1

    /3/

    STEP7 SIMATIC S7-300/400

    Reference Manual System and Standard Functions for S7-300 and S7400 Volume 1/2 http://support.automation.siemens.com/WW/view/en/44240604

    /4/ Reference to the document

    http://support.automation.siemens.com/WW/view/en/58820849

    /5/ Siemens Industry Online Support

    http://support.automation.siemens.com

    /6/ STARTER http://support.automation.siemens.com/WW/view/en/26233208 /7/ GSDML files for

    SINAMICS G120 http://support.automation.siemens.com/WW/view/en/26641490

    /8/ SINAMICS G120 Manuals

    Operating instruction: http://support.automation.siemens.com/WW/view/en/59875488 List manual (parameters and error list): http://support.automation.siemens.com/WW/view/en/49946755 Safety Integrated function manual: http://support.automation.siemens.com/WW/view/en/59875481

    /9/ FAQ How to perform the routing from a PG via PROFIBUS interface via a SIMATIC station to SINAMICS G120/G120D via PROFINET? http://support.automation.siemens.com/WW/view/en/29457264

    8 History

    Table 8-1 Version Date Revisions

    V1.0 05/2012 First issue

    1 TaskConnecting a SINAMICS G120 Drive to an S7-300/400 CPU in STEP 7 V5 via PROFINET2 Solution2.1 Overview of the general solution2.2 Description of the core functionality2.2.1 Parameterization for the communication2.2.2 Data exchange

    2.3 Hardware and software components used

    3 Setting up and Commissioning the Application3.1 Wiring3.2 IP addresses and PN names3.3 PG/PC settings 3.4 Downloading the SIMATIC program3.5 Downloading the SINAMICS parameterization

    4 Operation of the Application4.1 Prerequisites4.2 Operating the application4.3 Monitoring and parameter access via the operator panel4.3.1 Screens and screen navigation4.3.2 Process data exchange4.3.3 Parameter access

    5 Functional Mechanisms of this Application5.1 Functionality and process data exchange5.1.1 Access to process data in the user program of the controller5.1.2 Standardizing the setpoint and actual values5.1.3 Transfer methods5.1.4 Control and status word5.1.5 FB 11 Process Data_SFC 5.1.6 FB 13 Process Data_LT and FB 14 Process Data_MOVE5.1.7 FB 12 Process Data_CP

    5.2 Parameter access functionality5.2.1 Job and response structure5.2.2 Read/Write Drive Parameter DB and Answer from Drive DB5.2.3 FB 20 Parameter_Access

    6 Configuration and Settings6.1 Configuring the S7-300/400 controller6.2 Configuring the SINAMICS G120 drive6.3 Configuring the SINAMICS G120 drive via USB

    7 Literature8 History