77
https://support.industry.siemens.com/cs/ww/en/view/109479491 Application example 04/2016 Library Motion Control SINAMICS – LMCSINA SIMATIC S7-1500 / SIMATIC S7-1200

Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

https://support.industry.siemens.com/cs/ww/en/view/109479491

Application example 04/2016

Library Motion Control SINAMICS – LMCSINA SIMATIC S7-1500 / SIMATIC S7-1200

Page 2: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

Warranty and liability

LMCSINA Library Entry ID: 109479491, V2.3, 04/2016 2

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

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 documentation 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 deficiency or breach of a condition which goes to the root of the contract (“wesentliche Vertragspflichten”). 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 of the burden of proof to your detriment. Any form of duplication or distribution of these application examples or excerpts hereof is prohibited without the expressed consent of the Siemens AG.

Security informati

on

Siemens provides products and solutions with industrial security functions that support the secure operation of plants, solutions, machines, equipment and/or networks. They are important components in a holistic industrial security concept. With this in mind, Siemens' products and solutions undergo continuous development. Siemens recommends that you keep yourself regularly informed about 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 further 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 further information, visit http://support.industry.siemens.com.

Page 3: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

Table of contents

LMCSINA Library Entry ID: 109479491, V2.3, 04/2016 3

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

Table of contents Warranty and liability ................................................................................................... 2

1 Preface ................................................................................................................ 5 2 Control blocks that are available ..................................................................... 6

2.1 Interfacing the synchronous applications to SIMATIC using LMCSINA_AxisFB ................................................................................ 6 Hardware and software requirements .................................................. 7

2.2 Interfacing the cross-cutter to the SIMATIC with LMCSINA_CrossCutterFB.................................................................... 8 Hardware and software requirements .................................................. 9

2.3 Connecting the flying saw to the SIMATIC with LMCSINA_FlyingSawFB .................................................................... 10 Hardware and software requirements ................................................ 11

3 Configuring in STARTER ................................................................................ 12

3.1 Configuring the drive functionality ...................................................... 12 3.2 Configuring the communication .......................................................... 13 3.2.1 Preparation and telegram selection ................................................... 13 3.2.2 Creating the telegram interconnections ............................................. 14

Script integrated in Starter.................................................................. 15 Using the script integrated in the project ............................................ 17

3.2.3 Setting the user-defined GSDML for the TIA Portal ........................... 20 Continuing commissioning ................................................................. 20

4 LMCSINA_AxisFB in the TIA Portal ............................................................... 21

4.1 Preparation ......................................................................................... 21 Installing the GSDML file generated in the TIA Portal ....................... 21 Finding the GSDML in the hardware catalog ..................................... 22

4.2 Commissioningsteps .......................................................................... 23 Integrating the acyclic communication ............................................... 29

4.3 Interfaces ............................................................................................ 34 4.3.1 Block interfaces LMCSina_AxisFB ..................................................... 34 4.3.2 LMCSina_VirtualMaster block interfaces ........................................... 37 4.3.3 Overview of values for the output status ............................................ 38 4.3.4 Configuration data .............................................................................. 39 4.4 Operation ............................................................................................ 45 4.4.1 Enabling blocks .................................................................................. 45 4.4.2 Selecting functions ............................................................................. 45 4.4.3 Switching between functions .............................................................. 45 4.4.4 Post triggering .................................................................................... 45 4.4.5 Reading and writing configuration data .............................................. 45 4.4.6 Checking the entry ID ......................................................................... 45

5 LMCSINA_CrossCutterFB in the TIA Portal .................................................. 46

5.1 Preparation ......................................................................................... 46 Installing the GSDML file generated in the TIA Portal ....................... 46 Finding the GSDML in the hardware catalog ..................................... 47

5.2 Commissioning TIA Portal .................................................................. 48 Integrating the acyclic communication ............................................... 51

5.3 LMCSINA_CrossCutterFB interfaces ................................................. 56 5.3.1 Block inputs ........................................................................................ 56 5.3.2 Block outputs ...................................................................................... 58 5.3.3 Value overview for the output status .................................................. 59 5.4 Operation ............................................................................................ 60 5.4.1 Enabling the block .............................................................................. 60

Page 4: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

Table of contents

LMCSINA Library Entry ID: 109479491, V2.3, 04/2016 4

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

5.4.2 Reading configuration data ................................................................ 60 6 LMCSINA_FlyingSawFB in the TIA Portal ..................................................... 61

6.1 Preparation ......................................................................................... 61 Installing the GSDML file generated in the TIA Portal ....................... 61 Finding the GSDML in the hardware catalog ..................................... 62

6.2 Commissioning TIA Portal .................................................................. 63 Integrating the acyclic communication ............................................... 66

6.3 LMCSINA_FlyingSawFB interfaces ................................................... 71 6.3.1 Block inputs ........................................................................................ 71 6.3.2 Block outputs ...................................................................................... 72 6.3.3 Value overview for the output status .................................................. 74 6.4 Operation ............................................................................................ 75 6.4.1 Enabling the block .............................................................................. 75 6.4.2 Reading configuration data ................................................................ 75

7 LMCSINA_WinderFB in the TIA Portal ........................................................... 76

8 References ....................................................................................................... 77

9 History............................................................................................................... 77 10 Contact partner ................................................................................................ 77

Page 5: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

Table of contents

LMCSINA Library109479491

V2.3 04/2016 5/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

1094

7949

1_LM

CSI

NA_

V2_3

_en.

docx

1 Preface The SIMATIC library "Library Motion Control SINAMICS" allows the comprehensive motion control functions in the SINAMICS S120 to be controlled in a user-friendly and convenient fashion. The synchronous applications of the SINAMICS S120 – and the technological applications for flying saws and cross-cutters based on DCB-Extension – are supported. The library can be used with a SIMATIC S7-1500 as well as with a SIMATIC S7-1200. Control is possible via PROFINET or PROFIBUS-DP. The following applications are supported: • Camming with gearbox and positioning

https://support.industry.siemens.com/cs/ww/de/view/72839979 • Gearing and positioning

https://support.industry.siemens.com/cs/ww/de/view/72850279 • Gearing

https://support.industry.siemens.com/cs/ww/de/view/72850879 • 1:1 synchronous operation

https://support.industry.siemens.com/cs/ww/de/view/72840622 • Positioning without synchronous operation

https://support.industry.siemens.com/cs/ww/de/view/72849730 • Linear flying saws with DCB-Extension

https://support.industry.siemens.com/cs/ww/de/view/109477745 • Cross-cutters with DCB-Extension

https://support.industry.siemens.com/cs/ww/de/view/109477746

Page 6: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

Table of contents

LMCSINA Library109479491

V2.3 04/2016 6/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

1094

7949

1_LM

CSI

NA_

V2_3

_en.

docx

2 Control blocks that are available 2.1 Interfacing the synchronous applications to SIMATIC

using LMCSINA_AxisFB The Library Motion Control SINAMICS – abbreviated LMCSINA – includes the control of the synchronous applications for SINAMICS S120 based on DCB-Extension. Synchronous operation technology is implemented in the drive using a DCB library and appropriately programmed and configured DCB blocks. The synchronous axis – also called slave in the following – from a SIMATIC S7-1x00 is controlled by a user-defined block: LMCSINA_AxisFB. In conjunction with the LMCSINA_AxisFB block, there is also an additional function block to control a virtual master axis: LMCSINA_VirtualMaster. As it is necessary to acyclically transfer application parameters due to the inherent system features, in the LMCSINA_AxisFB block, acyclic tasks are externally integrated and executed. The integration is realized using UDT – LacycCom_typeSilentOperation – and allows the LMCSINA_AxisFB block to execute acyclic communications using the LacycCom_ReadDriveParam, LacycCom_WriteDriveParam and the LacycCom_Buffermanager blocks. Data is exchanged via IN/OUT data areas of the global axis data block to be generated based on the UDT LMCSINA_TypeAxisData. As a result of this interaction, when necessary the application can be operated with or without acyclic services. In the case that there is no acyclic communication, the user must make the appropriate changes in the application or the global data block.

Page 7: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

Table of contents

LMCSINA Library109479491

V2.3 04/2016 7/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

1094

7949

1_LM

CSI

NA_

V2_3

_en.

docx

Hardware and software requirements Table 2-1

Component Note

SIMATIC S7-15xx From V1.6 and higher SIMATIC S7-12xx From V4.1 and higher TIA Portal Step7 From V13 SP1 and higher TIA Portal Step7 professional license From V13 SP1 and higher SINAMICS S120 drive lineup with CU320-2 control module

From firmware 4.7 and higher

Starter commissioning tool with installed DCC (Optional with DCC engineering license to adapt the DCC charts)

From V4.4 and higher

SINAMICS DCB Extension runtime license for each CU

MLFB 6SL3077-0AA00-0AB0 (RT license for CU, licensing, see the following note)

Block library for motion control

From GMCV3_1_sinamics4_7.zip This library should be installed in Starter and then loaded to the drive device

Block library for extended mathematical functions

From math_extendedV1_0_sinamics4_7.zip This library should be installed in Starter and then loaded to the drive device

DCC chart for synchronous functionality in the drive (camming/gearing/…)

The matching DCC charts are available as XML export under the particular application in SIOS.

109479491 _LIB_v2.1.zip The library and the script files to support commissioning are provided in this zip file.

Note The Web License Manager is used to subsequently license the "SINAMICS DCB Extension" runtime license to run the new DCC libraries on the CU. You can find a description in the Function Manual FH1 under "Basic information about the drive system -> Licensing -> Creating or displaying license keys via the WEB License Manager".

Page 8: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

Table of contents

LMCSINA Library109479491

V2.3 04/2016 8/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

1094

7949

1_LM

CSI

NA_

V2_3

_en.

docx

2.2 Interfacing the cross-cutter to the SIMATIC with LMCSINA_CrossCutterFB The Library Motion Control SINAMICS – abbreviated LMCSINA – includes the control of the GMC technological applications, which are based on DCC. The technology is implemented in the drive using a DCB library and appropriately programmed and configured DCB blocks. The cross-cutter drive from a SIMATIC S7-1200/1500 is controlled by a user-defined block: LMCSINA_CrossCutterFB. As it is necessary to acyclically transfer application parameters due to the inherent system features, in the LMCSINA_ CrossCutterFB block, acyclic tasks are externally integrated and executed. The integration is realized using UDT – LAcycCom_typeSilentOperation – and allows the LMSINA_ CrossCutterFB block to acyclically read data using the LAcycCom_ReadDriveParam and the LAcycCom_Buffermanager blocks. Data is exchanged via the statAcyclicData data area of the instance data block of LMCSINA_CrossCutterFB. As a result of this interaction, when necessary the application can be operated with or without acyclic services. In the case that there is no acyclic communication, the user must manually make the appropriate changes in the application or the global data block.

Page 9: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

Table of contents

LMCSINA Library109479491

V2.3 04/2016 9/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

1094

7949

1_LM

CSI

NA_

V2_3

_en.

docx

Hardware and software requirements Table 2-2

Component Note

SIMATIC S7-15xx From V1.6 and higher SIMATIC S7-12xx From V4.1 and higher TIA Portal Step7 From V13 SP1 and higher TIA Portal Step7 professional license From V13 SP1 and higher SINAMICS S120 drive lineup with CU320-2 control module

From firmware 4.7 and higher

Starter commissioning tool with installed DCC (Optional with DCC engineering license to adapt the DCC charts)

From V4.4 and higher

SINAMICS DCB Extension runtime license for each CU

MLFB 6SL3077-0AA00-0AB0 (RT license for CU, licensing, see the following note)

Block library for motion control

From GMCV3_1_sinamics4_7.zip This library should be installed in Starter and then loaded to the drive device

Block library for extended mathematical functions

From math_extendedV1_0_sinamics4_7.zip This library should be installed in Starter and then loaded to the drive device

DCC chart for the cross-cutter drive and its leading value source (measuring wheel/leading axis)

The matching DCC charts are available as XML export under the particular application in SIOS.

109479491 _LIB_v2.1.zip The library and the script files to support commissioning are provided in this zip file.

Note The Web License Manager is used to subsequently license the "SINAMICS DCB Extension" runtime license to run the new DCC libraries on the CU. You can find a description in the Function Manual FH1 under "Basic information about the drive system -> Licensing -> Creating or displaying license keys via the WEB License Manager".

Page 10: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

Table of contents

LMCSINA Library109479491

V2.3 04/2016 10/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

1094

7949

1_LM

CSI

NA_

V2_3

_en.

docx

2.3 Connecting the flying saw to the SIMATIC with LMCSINA_FlyingSawFB The Library Motion Control SINAMICS – abbreviated LMCSINA – includes the control of the GMC technological applications, which are based on DCC. The technology is implemented in the drive using a DCB library and appropriately programmed and configured DCB blocks. A user-defined user block controls the saw drive from a SIMATIC S7-1200/1500: LMCSINA_FlyingSawFB. As a result of the system-related necessity to transfer application parameters acyclically, in the LMCSINA_ FlyingSawFB block, execution of acyclic tasks is externally integrated and implemented. The integration is realized using UDT – LAcycCom_typeSilentOperation – and allows the block LMCSINA_ FlyingSawFB to acyclically read using blocks LAcycCom_ReadDriveParam and LAcycCom_Buffermanager. Data exchange is realized via the data area statAcyclicData of the instance data block of LMCSINA_FlyingSawFB. As a result of this interaction, when necessary the application can be operated with or without acyclic services. In the case that there is no acyclic communication, the user must manually make the appropriate changes in the application or the global data block.

Page 11: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

Table of contents

LMCSINA Library109479491

V2.3 04/2016 11/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

1094

7949

1_LM

CSI

NA_

V2_3

_en.

docx

Hardware and software requirements Table 2-3

Component Note

SIMATIC S7-15xx From V1.6 and higher SIMATIC S7-12xx From V4.1 and higher TIA Portal Step7 From V13 SP1 and higher TIA Portal Step7 professional license From V13 SP1 and higher SINAMICS S120 drive lineup with CU320-2 control module

From firmware 4.7 and higher

Starter commissioning tool with installed DCC (Optional with DCC engineering license to adapt the DCC charts)

From V4.4 and higher

SINAMICS DCB Extension runtime license for each CU

MLFB 6SL3077-0AA00-0AB0 (RT license for CU, licensing, see the following note)

Block library for motion control

From GMCV3_1_sinamics4_7.zip This library should be installed in Starter and then loaded to the drive device

Block library for extended mathematical functions

From math_extendedV1_0_sinamics4_7.zip This library should be installed in Starter and then loaded to the drive device

DCC chart for the saw drive and its leading value source (measuring wheel/leading axis)

The matching DCC charts are available as XML export under the particular application in SIOS.

109479491 _LIB_v2.1.zip The library and the script files to support commissioning are provided in this zip file.

Note The Web License Manager is used to subsequently license the "SINAMICS DCB Extension" runtime license to run the new DCC libraries on the CU. You can find a description in the Function Manual FH1 under "Basic information about the drive system -> Licensing -> Creating or displaying license keys via the WEB License Manager".

Page 12: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

Table of contents

LMCSINA Library109479491

V2.3 04/2016 12/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

1094

7949

1_LM

CSI

NA_

V2_3

_en.

docx

3 Configuring in STARTER 3.1 Configuring the drive functionality

The drives must be configured and parameterized in Starter, as the actual motion control functionality, both for the synchronous applications as well as for cross-cutter and flying saw, are directly realized in the drive. Detailed step-by-step instructions are provided in the commissioning chapter of the application itself. The basic steps are again shown in the following.

Basic configuration steps 1. Install the necessary DCB libraries in STARTER/SCOUT, and load to the drive

device 2. Create the drives as usual (without EPOS function module!) 3. Activate the position controllers on the axes 4. Parameterize the mechanical system of the axes 5. Import the appropriate DCC charts (and save/compile) 6. Parameterize the basic motion control functionality, geometry of the system

etc. 7. If required, configure the communication (see Chapter 3.2)

Page 13: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

Table of contents

LMCSINA Library109479491

V2.3 04/2016 13/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

1094

7949

1_LM

CSI

NA_

V2_3

_en.

docx

3.2 Configuring the communication

3.2.1 Preparation and telegram selection

• When selecting the telegram of the axes to be controlled, "[999] Free telegram configuring with BICO" must be selected. If a standard telegram was active beforehand, reset the parameters on the axis by setting p10 = 30. The length of the input data/actual values and output values/setpoints should both be set to 20:

Fig. 3-1

NOTICE Undesirable axis motion as a result of incorrect telegram settings

If a telegram configuration other than "[999] Free telegram configuring with BICO" is set, even after running the commissioning script, incorrect BICO interconnections will continue to exist. Depending on the previous telegram selection, this can result in incorrect and undesirable axis motion.

• The synchronous application is linked to the higher-level SIMATIC control

using a user-defined telegram with a 20/20 length for the send and receive areas.

Page 14: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

Table of contents

LMCSINA Library109479491

V2.3 04/2016 14/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

1094

7949

1_LM

CSI

NA_

V2_3

_en.

docx

3.2.2 Creating the telegram interconnections

Executable script files are supplied for the particular applications to create the telegram interconnection. You will find the script that matches the particular application in the following table.

Table 3-1

Application used Script file required

Synchronous applications: - Camming - Gearing with positioning - Gearing - 1:1 synchronous operation - Positioning

LMCSINA_Synchronism_CommunicationScript (.txt/.xml)

Cross cutter LMCSINA_Technology_CommunicationScript (.txt/.xml)

Flying saw LMCSINA_Technology_CommunicationScript (.txt/.xml)

The script files supplied for the applications to establish the appropriate telegram interconnection can either be incorporated in Starter (from Starter version V4.4.1.0) or in the project itself. For all of the scripts mentioned above, the integration and execution is identical. The two versions for possible integration and execution are described in the following.

Page 15: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

Table of contents

LMCSINA Library109479491

V2.3 04/2016 15/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

1094

7949

1_LM

CSI

NA_

V2_3

_en.

docx

Script integrated in Starter With this version, the script is available in all drive projects with the matching device versions. However, in this case, the script is not archived with the project. This version makes sense if you frequently wish to commission similar projects with an unchanged script. To do this, proceed as follows: • Copy the script file provided (*.txt) to the installation directory of Starter in the

following file structure (in this case, with "C:\Program Files" as installation folder, for example): "C:\Program Files (x86)\Siemens\Step7\U7umc\data\scripts\device_configurations\v4.7\SINAMICS_S120"

• The saved scripts can now be selected in the configuration screen form of the drive via "Configuration scripts":

Fig. 3-2

Page 16: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

Table of contents

LMCSINA Library109479491

V2.3 04/2016 16/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

1094

7949

1_LM

CSI

NA_

V2_3

_en.

docx

• In the dialog that opens, select the appropriate script, and click on "Execute".

Fig. 3-3

• Follow the instructions of the script

Page 17: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

Table of contents

LMCSINA Library109479491

V2.3 04/2016 17/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

1094

7949

1_LM

CSI

NA_

V2_3

_en.

docx

Using the script integrated in the project With this version, you must import the script into every project where you wish to use it. However, the script remains integrated, even when archiving and transferring the project. This version especially makes sense if you wish to make your own project-specific modifications to the script. To do this, proceed as follows: • Insert a script folder at the project level Fig. 3-4

Page 18: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

Table of contents

LMCSINA Library109479491

V2.3 04/2016 18/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

1094

7949

1_LM

CSI

NA_

V2_3

_en.

docx

• Import the interconnection script (*.xml)

Fig. 3-5

• "Accept and execute" the script

Figure 3-6

• Follow the instructions of the script • Please refer to the documentation of the particular application for additional

parameter settings

Page 19: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

Table of contents

LMCSINA Library109479491

V2.3 04/2016 19/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

1094

7949

1_LM

CSI

NA_

V2_3

_en.

docx

Note Valid for synchronous applications (not for cross-cutters/flying saws):

The µm/LU resolution is defined in parameter p21660. This is necessary in order that the setpoint can be entered in SIMATIC in [mm] / [m°]. The value is 1µm = 1LU as default setting.

Page 20: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

Table of contents

LMCSINA Library109479491

V2.3 04/2016 20/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

1094

7949

1_LM

CSI

NA_

V2_3

_en.

docx

3.2.3 Setting the user-defined GSDML for the TIA Portal

If you are using a PROFIBUS drive, then a GSDML file does not have to be created in STARTER. The standard GSDs for PROFIBUS can be subsequently used in the TIA Portal. Proceed as follows if you wish to use a PROFINET drive:

Note When using PROFINET – when integrating into the TIA portal – it is necessary to create a user-defined GSDML for the TIA Portal. The standard GSDML of the SINAMICS S120 does not include a 20/20 telegram; however this is required for creating the user-defined GSDML file.

Create the user-defined GSDML file for your drive device using the following Starter script (script and detailed description are available at the following link):

http://support.automation.siemens.com/WW/view/de/92022677 When executed, the script automatically creates the user-defined GSDML file, which can be subsequently installed in the TIA Portal.

Continuing commissioning The next steps involve commissioning the communication and control in the TIA Portal. Proceed with the following chapter depending on the application being used: Table 3-2

Application used continue with commissioning Chapter number

Synchronous applications: - Camming - Gearing with positioning - Gearing - 1:1 synchronous operation - Positioning

Chapter4

Cross cutter Chapter5 Flying saw Chapter6

Page 21: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

Table of contents

LMCSINA Library109479491

V2.3 04/2016 21/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

1094

7949

1_LM

CSI

NA_

V2_3

_en.

docx

4 LMCSINA_AxisFB in the TIA Portal After you have configured the drive according to Chapter 3 , then the communication to the higher-level control is configured in the TIA Portal.

4.1 Preparation

If you wish to configure a PROFIBUS a device, then you can continue with Chapter 4.2. If you wish to configure a PROFINET device, then this is done using the user-defined GSDML file. How you can install this GSDML file is described in the following, and where you can then find it in the hardware catalog.

Installing the GSDML file generated in the TIA Portal Install the user-defined GSDML file that you generated in the TIA Portal as follows: Fig. 4-1

Fig. 4-2

Page 22: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

Table of contents

LMCSINA Library109479491

V2.3 04/2016 22/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

1094

7949

1_LM

CSI

NA_

V2_3

_en.

docx

Finding the GSDML in the hardware catalog The GSDML file can now be found in the folder structure of the hardware catalog – as shown in the following diagram. Fig. 4-3

Page 23: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

Table of contents

LMCSINA Library109479491

V2.3 04/2016 23/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

1094

7949

1_LM

CSI

NA_

V2_3

_en.

docx

4.2 Commissioningsteps

Configuring the control Create a SIMATIC S7-1200/1500 control, and then configure it as usual.

Note A minimum firmware release of 4.0 is required for the SIMATIC S7-1200. This is necessary to use the blocks from "LAcycCom" for acyclic communication.

The following's steps describe the procedure when creating the drives and the control blocks.

Integrating the drive 1. Integrating the SINAMICS drive into the network view

a. PROFIBUS: Use the existing GSD files b. PROFINET: Use the user-defined GSDML file that has been installed

2. Connect the drive to the control system

Fig. 4-4

Page 24: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

Table of contents

LMCSINA Library109479491

V2.3 04/2016 24/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

1094

7949

1_LM

CSI

NA_

V2_3

_en.

docx

Integrating the LMCSINA library

3. Dearchive the global LMCSINA library by right clicking in the global libraries. Fig. 4-5

Copy all of the required library elements into the folder of the control system Now copy all of the required library files into the appropriate folder of the created control system (carefully observe the sequence of steps!) 4. Copy "LAcycCom_Drives" from "01_Necessary components" to the PLC

variables folder 5. Copy "LAcycCom_typeSilentOperation" from "01_Necessary components" to

the PLC data types folder 6. Copy "LMCSINA_TypeAxisData"- including all additional LMCSINA types from

"LMCSINA_02_Synchronism""LMCSINA_Types" – to the PLC data types 7. Copy function blocks "LMCSINA_AxisFB", "LMCSINA_VirtualMasterFB" (when

using the virtual leading axis in the drive) to the PLC program blocks. Further, the block folder contains two data block examples, type "LMCSINA_TypeAxisData", which can also be used.

Note The reason for the different block folder for S7-1200 and S7-1500 is as follows: The blocks for the S7-1500 are set to "optimized access", the blocks for the S7-1200, are set to "not optimized". As far as the program code is concerned, both blocks are identical.

Page 25: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

Table of contents

LMCSINA Library109479491

V2.3 04/2016 25/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

1094

7949

1_LM

CSI

NA_

V2_3

_en.

docx

Fig. 4-6

NOTICE Avoid creating an invalid array of structs!

Problem: If a data type/block is transferred into the PLC, and is compiled before accepting the PLC variables/user constants provided, then an invalid array with "0" structures is created.

Remedy: The PLC variables must be completely accepted before compiling the PLC/program. This is necessary, as in the data types/blocks used, array limits are defined based on constants.

4

5

7

6

Page 26: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

Table of contents

LMCSINA Library109479491

V2.3 04/2016 26/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

1094

7949

1_LM

CSI

NA_

V2_3

_en.

docx

Calling block LMCSINA_AxisFB

• Calling axisFB "LMCSINA_AxisFB" with an instance for each synchronous axes (with or without a virtual leading axis).

• Interconnecting inputs and outputs.

Note The following inputs must (mandatory) be interconnected in order to call the function block:

– enable (the block is only calculated for TRUE)

– hardwareID (can be found under PLC variables – system constants)

– driveObjectNo (can be found in the properties of the drive object in STARTER)

– axisData (at this location, either the global data block, type LMCSINA_TypeAxisData or a variable, type LMCSINA_TypeAxisData is interconnected)

The block itself can now be simply compiled. Additional steps are required to use acyclic communication (see the next chapter)

Page 27: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

Table of contents

LMCSINA Library109479491

V2.3 04/2016 27/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

1094

7949

1_LM

CSI

NA_

V2_3

_en.

docx

Fig. 4-7

Page 28: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

Table of contents

LMCSINA Library109479491

V2.3 04/2016 28/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

1094

7949

1_LM

CSI

NA_

V2_3

_en.

docx

Creating a global axis data block

• A global data block is required for each instance of an LMCSINA_AxisFB • Create a global data block, either type "LMCSINA_TypeAxisData" – or with a

variable, type "LMCSINA_TypeAxisData". For the first version, the DB structure is fixed; for the second version, date can be added to the DB.

Calling block LMCSINA_VirtualMaster • Calling FB "LMCSINA_VirtualMaster" with an instance for each virtual leading

axis • Each FB LMCSINA_VirtualMaster requires a corresponding axis FB, as this in

turn, executes the cyclic/acyclic communication. • Data is exchanged between these 2 FBs using global data block/variable, type

"LMCSINA_TypeAxisData" • Interconnecting inputs and outputs.

Note The following inputs must (mandatory) be interconnected in order to call the function block:

– enable (the block is only calculated for TRUE)

– axisData (at this location, either the global data block, type LMCSINA_TypeAxisData or a variable, type LMCSINA_TypeAxisData is interconnected)

– The global data block/variable, type LMCSINA_TypeAxisData must be assigned a LMCSINA_AxisFB block

The block itself can now be simply compiled. Additional steps are required to use acyclic communication (see the next chapter)

Page 29: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

Table of contents

LMCSINA Library109479491

V2.3 04/2016 29/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

1094

7949

1_LM

CSI

NA_

V2_3

_en.

docx

Fig. 4-8

Integrating the acyclic communication

Note The function block can also be used without acyclic communication. The default values in the FB correspond to the default values in the drive parameters.

1. Opening/dearchiving the global "LAcycCom" block 2. Copy all data types from LAcycCom 00 Common Resources Management

LAcycCom_Types to the PLC data types 3. (Depending on the particular control system) copy the PLC variables

LAcycCom 00 Common Resources Management to the PLC folder

4. Copy function block "LAcycCom_ResourceManager" from LAcycCom 00 Common Resources Management to the folder of the control system used to the program blocks

5. Copy the global data block "LAcycCom_RequestBuffer" from LAcycCom 00 Common Resources Management to the PLC folder

Page 30: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

Table of contents

LMCSINA Library109479491

V2.3 04/2016 30/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

1094

7949

1_LM

CSI

NA_

V2_3

_en.

docx

Fig. 4-9

6. Copy function block "LAcycCom_ ReadDriveParams", "LAcycCom_

WriteDriveParams" from LAcycCom 01 Drives LAcycCom_Blocks PROFIDrive to the PLC folder

7. Copy all data types except "LAcycCom_typeSilentOperation" from LAcycCom 01 Drives LAcycCom_Types to PLC data types

Note Data type "LAcycCom_typeSilentOperation", as a result of the use in the LMCSINA environment, is also supplied there – and must therefore be integrated into the project ONCE. When not complied with, the TIA portal changes the comments of a data type, which can result in problems when compiling.

PLC variables "LAcycCom_Drives" should also exist in the project, and should therefore not be integrated another time.

4

2

3

3

5

Page 31: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

Table of contents

LMCSINA Library109479491

V2.3 04/2016 31/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

1094

7949

1_LM

CSI

NA_

V2_3

_en.

docx

Figure 4-10

8. Call function blocks "LAcycCom_ResourceManager" and

"LAcycCom_ReadDriveParams" in the (same) program block 9. Interconnect LAcycCom_RequestBuffer to input "globalBuffer" of

"LAcycCom_ResourceManager" block 10. Activation of LAcycCom_ResourceManager at input "enable" 11. Interconnect LAcycCom_RequestBuffer at input "globalBuffer" of block

"LAcycCom_ReadDriveParams" as well as "LAcycCom_WriteDriveParams" 12. Interconnect data area "statAcyclicData" – from the global data block of the

synchronous axes to input "dataset" of block "LAcycCom_ReadDriveParams" as well as "LAcycCom_WriteDriveParams"

6

7

6

Page 32: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

Table of contents

LMCSINA Library109479491

V2.3 04/2016 32/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

1094

7949

1_LM

CSI

NA_

V2_3

_en.

docx

Table 4-1

Fig. 4-11

Page 33: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

Table of contents

LMCSINA Library109479491

V2.3 04/2016 33/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

1094

7949

1_LM

CSI

NA_

V2_3

_en.

docx

Note Block LAcycCom_ResourceManager must be released at input "enable". Blocks LAcycCom_ReadDriveParams, LAcycCom_WriteDriveParams are exclusively controlled via input "dataset".

Page 34: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

Table of contents

LMCSINA Library109479491

V2.3 04/2016 34/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

1094

7949

1_LM

CSI

NA_

V2_3

_en.

docx

4.3 Interfaces

4.3.1 Block interfaces LMCSina_AxisFB

Table 4-2

Designation Type Data type Description

Enable IN BOOL TRUE: Activation of the FB

ackError IN BOOL TRUE: Acknowledging errors of the FB and the drive

enableAxis IN BOOL TRUE: Set axis enable FALSE: Remove axis enable

jogPositive IN BOOL TRUE: jog forward FALSE: stop jog

jogNegative IN BOOL TRUE: jog backward FALSE: stop jog

Pos IN BOOL rising edge: position axis

Homing IN BOOL rising edge: Home/reference axis

Stop IN BOOL TRUE: stop axis, axis is blocked for other commands

gearIn IN BOOL rising edge: synchronize gearing

gearOut IN BOOL rising edge: Synchronize gearing

camIn IN BOOL rising edge: synchronize camming

camOut IN BOOL rising edge: desynchronize camming

Phasing IN BOOL rising edge: Insert an offset between master and slave – or delete the existing offset

printMarkCorrection IN BOOL TRUE: Enable print mark correction FALSE: Deselect print mark correction

openBrake IN BOOL TRUE: Only open the brake if the axis is not enabled

Page 35: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

Table of contents

LMCSINA Library109479491

V2.3 04/2016 35/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

1094

7949

1_LM

CSI

NA_

V2_3

_en.

docx

Designation Type Data type Description

FALSE: Close brake

readWriteConfigData IN USInt 0: No read or write; 0->1: read out the drive configuration data (for the drive that has not been released) 0->2: write the configuration data to drive (for the drive that has not been released)

valid OUT BOOL TRUE: outputs valid at the block

busy OUT BOOL TRUE: block is being processed

error OUT BOOL TRUE: block error

axisError OUT BOOL TRUE: drive or application fault

commandBusy OUT BOOL TRUE: blocks for processing off

commandDone OUT BOOL TRUE: processing completed

resetActive OUT BOOL TRUE: rising edge for ackError occurred

ReadWriteSelected OUT BOOL TRUE: reading or writing configuration data active or completed

axisEnabled OUT BOOL TRUE: the axis is enabled FALSE: axis is not enabled

jogPositiveSelected OUT BOOL TRUE: axis jogs in positive direction

jogNegativeSelected OUT BOOL TRUE: axis jogs in negative direction

posSelected OUT BOOL TRUE: axis positioned, or positioning completed

homingSelected OUT BOOL TRUE: homing/referencing active or completed

stopSelected OUT BOOL TRUE: stop active or completed

gearInSelected OUT BOOL TRUE: synchronize gearing active or completed

Page 36: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

Table of contents

LMCSINA Library109479491

V2.3 04/2016 36/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

1094

7949

1_LM

CSI

NA_

V2_3

_en.

docx

Designation Type Data type Description

gearOutSelected OUT BOOL TRUE: desynchronize gearing active or completed

camInSelected OUT BOOL TRUE: synchronize camming active or completed

gearOutSelected OUT BOOL TRUE: desynchronize camming active or completed

phasingSelected OUT BOOL TRUE: phasing active or completed

printMarkCorrectionActive OUT BOOL TRUE: print mark correction selected in the drive

axisHomed OUT BOOL TRUE: axis homed/referenced

axisInPosition OUT BOOL TRUE: axis is located within the positioning window

axisStandstill OUT BOOL TRUE: axis stationery (speed low threshold value)

axisInSync OUT BOOL TRUE: the axis is in synchronism FALSE: axis is not in synchronism

offsetActive OUT BOOL TRUE: offset available

axisInVelocity OUT BOOL TRUE: positioning or jog velocity reached

brakeOpen OUT BOOL TRUE: brake is open

MasterValue OUT USINT 1: leading value 1 active 2: leading value 2 active

actualPosition OUT REAL actual position [mm]

actualVelocity OUT REAL actual velocity [mm/s]

status OUT WORD actual status of the FB

axisData IN/OUT LMCSINA_AxisDataTy

Structure for configuration data of the axis

Page 37: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

Table of contents

LMCSINA Library109479491

V2.3 04/2016 37/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

1094

7949

1_LM

CSI

NA_

V2_3

_en.

docx

Designation Type Data type Description

pe

4.3.2 LMCSina_VirtualMaster block interfaces

Table 4-3

Designation Type Data type Description

enable IN BOOL TRUE: Activation of the FB

jogPositive IN BOOL TRUE: jog forward FALSE: stop jog

jogNegative IN BOOL TRUE: jog backward FALSE: stop jog

pos IN BOOL rising edge: position axis

stop IN BOOL TRUE: stop axis, axis is blocked for other commands

set IN BOOL rising edge: enable setting value valid OUT BOOL TRUE: outputs valid at the block

busy OUT BOOL TRUE: block is being processed

error OUT BOOL TRUE: block error

commandBusy OUT BOOL TRUE: blocks for processing off

commandDone OUT BOOL TRUE: processing completed

jogPositiveSelected OUT BOOL TRUE: axis jogs in positive direction

jogNegativeSelected OUT BOOL TRUE: axis jogs in negative direction

posSelected OUT BOOL TRUE: axis positioned, or positioning completed

setSelected OUT BOOL TRUE: setting value activated

stopSelected OUT BOOL TRUE: stop active or completed

axisInPosition OUT BOOL Structure for configuration data of the axis

actualPosition OUT REAL actual position [mm]

actualVelocity OUT REAL actual velocity [mm/s]

Status OUT WORD actual status of the FB

axisData IN/OUT LMCSINA_AxisDataType

Structure for configuration data of the axis

Page 38: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

Table of contents

LMCSINA Library109479491

V2.3 04/2016 38/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

1094

7949

1_LM

CSI

NA_

V2_3

_en.

docx

4.3.3 Overview of values for the output status

Incorrect operation of the function block 8101 Axis not homed 8102 Command is not possible: 8103 Incorrect entry ID or entry ID is "0"

Error in the parameter assignment 8200 Pos direction not valid 8201 Pos velocity at limit 8210 homingMode not valid 8211 homingConfig not valid 8220 gearInMode not valid 8221 gearIn syncMode not valid

8230 camInMode 8231 camIn syncMode 8232 camNumber 8240 phasing motionDirection 8250 leadingValue 8251 leadingValue motionDirection 8260 Resolution µm/LU <= 0.0 8270 acyclic communication not available

Faults when executing from outside 8400 Drive alarm 8401 Drive fault 8402 Fault DCC

Faults when executing from the inside 8600 DPRD_DAT fault 8610 DPWR_DAT fault 8620 no connection LMCSinaVirtualMaster to LMCSinaAxisFB

8630 LDPV1_WRITE_PARAMETERS_UPPER_LIM as constant has a value that is not equal to 18. Set this value to 18 for compatibility reasons.

Page 39: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

Table of contents

LMCSINA Library109479491

V2.3 04/2016 39/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

1094

7949

1_LM

CSI

NA_

V2_3

_en.

docx

4.3.4 Configuration data

The individual functions are parameterized in the configuration data. In some instances, the elements are pure setting values for the FB. These can always be changed. The values are accepted with the next "Execute". The setting values, which are based on the parameters of the DCC synchronous application, cannot be changed in operation. Using "readWriteConfigData", they can be read from the drive, or written to the drive if the drive has not been enabled. These values are marked in the comment with "n.c.". Marking "r.o." means that this value is only read, but not written to.

LMCSina_AxisDataType elements Table 4-4 Elements of LMCSina_AxisDataType

Designation Data type Description

posData PosDataType Structure for parameterizing positioning functionality

homingData HomingDataType Structure for parameterizing homing functionality

jogData JogDataType Structure for parameterizing jogging functionality

stopData StopDataType Structure for parameterizing stopping functionality

gearingData GearingDataType Structure for parameterizing gearing functionality

cammingData CammingDataType Structure for parameterizing camming functionality

phasingData PhasingDataType Structure for parameterizing the offset input to a synchronized operation

diagnosticData DiagnosticDataType Structure to output diagnostic values driveData DriveDataType Structure for parameterizing general

drive parameters leadingValueData LeadingValueDataType Structure for parameterizing leading

value switchover printMarkCorrectionData PrintMarkCorrectionDataType Structure for parameterizing print

mark correction virtualMasterDataType VirtualMasterDataType Structure for parameterizing virtual

leading axis silentOperationData LDPV1_SilentOperationType Structure to connect LDPV1 functions

Page 40: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

Table of contents

LMCSINA Library109479491

V2.3 04/2016 40/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

1094

7949

1_LM

CSI

NA_

V2_3

_en.

docx

PosDataType elements Table 4-5 PosDataType elements

Designation Data type Default Description Position Real 0.0 position / distance [mm] velocity Real 0.0 velocity [mm/s] acceleration Real 1000.0 n.c. max. acceleration

[mm/s²] p21932 jerk Real 1000.0 n.c. max. jerk [mm/s³] /

0.0 = trapezial p21934 direction USInt 3 NEGATIVE (1) /

POSITIVE (2) / SHORTEST_WAY (3)

posAbsolute Bool false select absolute positioning

HomingDataType elements Table 4-6 HomingDataType elements

Designation Data type Default Description homingMode USInt 1 ACTIVE (1), ACTIVE_WITHOUT_BERO(2),

PASSIVE (3), ADJUST_ABSOLUTE_ENCODER (4)

homingConfig USInt 1 PosDir_PosEdge(1), PosDir_NegEdge(2), NegDir_NegEdge(3), NegDir_PosEdge(4),

homePosition Real 0.0 n.c. p21639 positionAfterHoming Real 0.0 n.c. position after active homing p21641 velocityToBero Real 50.0 n.c. Velocity homing up to the Bero proximity

switch p21637 velocityAfterBero Real 25.0 n.c. Velocity homing after the Bero proximity

switch p21638

JogDataType elements Table 4-7 JogDataType elements

Designation Data type Default Description

velocity Real 16.667 n.c. p21950

StopDataType elements Table 4-8 StopDataType elements

Designation Data type Default Description deceleration Real 1000.0 n.c. p23711 jerk Real 1000.0 n.c. p23712

Page 41: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

Table of contents

LMCSINA Library109479491

V2.3 04/2016 41/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

1094

7949

1_LM

CSI

NA_

V2_3

_en.

docx

GearingDataType elements Table 4-9 GearingDataType elements

Designation Data type

Default Description

gearInMode USInt 0 CATCH_UP_WITH_STOP_IMMEDIATELY: (0); CATCH_UP_WITH_STOP_AT_POSITION: (1); ENGAGE_FIXED_LENGTH_TRIGGER: (2); ENGAGE_FIXED_LENGTH_CONTINUOUS:(3); DISENGAGE_FIXED_LENGTH_TRIGGER: (4); DISENGAGE_FIXED_LENGTH_CONTINUOUS:(5)

absolute Bool false (0-1) sync on Master absolute maxVelocity Real 333.333 n.c. (0-1) max. sync. velocity [mm/s] p22101 maxAcceleration Real 5000.0 n.c. (0-1) max. sync. acceleration/deceleration

[mm/s²] p22102 maxJerk Real 5000.0 n.c. (0-1) max. sync. jerk [mm/s³] / 0.0 = trapezial

p22103 syncMode USInt 4 (0-1) POSITIVE: (1); NEGATIVE: (2);

SHORTEST_WAY: (3); OVERRIDE: (4) phaseShift Real 0.0 n.c. (0-1) Sets a fixed offset setpoint between the

leading axis and following axis for catching up with synchronization. p22140

stopPosition Real 0.0 n.c. (0-1) Sets the fixed stopping position for stopping with specified engaging position. p22150

couplePosition Real 0.0 n.c. (2-5) Sets the fixed coupling position for engaging/disengaging. p22210

length Real 10.0 n.c. (2-5) Sets the fixed engaging/disengaging length. p22220

rampLength Real 0.0 n.c. (2-5) Sets the acceleration ramp for engaging/disengaging. p22230

percentageAcceleratingRamp Real 10.0 n.c. (2-5) Sets the rounding. p22231

Page 42: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

Table of contents

LMCSINA Library109479491

V2.3 04/2016 42/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

1094

7949

1_LM

CSI

NA_

V2_3

_en.

docx

CammingDataType elements Table 4-10 CammingDataType elements

Designation Data type Default Description camNumber USInt 1 1: Cam1 / 2: Cam2 camInMode USInt 0 CATCH_UP_WITH_STOP_IMMEDIATELY: (0);

CATCH_UP_WITH_STOP_AT_POSITION: (1) velocity Real 166.667 n.c. Value in gearingData active acceleration Real 50.0 n.c. Value in gearingData active jerk Real 100.0 n.c. Value in gearingData active syncMode USInt 4 POSITIVE: (1); NEGATIVE: (2);

SHORTEST_WAY: (3); OVERRIDE: (4) phaseShift Real 0.0 n.c. Value in gearingData active stopPosition Real 0.0 n.c. Value in gearingData active masterAbsolute Bool true sync on Master absolute camAbsolute Bool true cam absolute/relative output

PhasingDataType elements Table 4-11 PhasingDataType elements

Designation Data type Default Description offset Real 0.0 n.c. offset [mm] p23401 absolute Bool false offset absolute/relative (true = absolute) deleteOffset Bool false true = delete offset motionDirection USInt 3 NEGATIVE (1) / POSITIVE (2) /

SHORTEST_WAY (3) velocity Real 166.667 n.c. max. sync. velocity [mm/s] p23740 acceleration Real 1000.0 n.c. max. sync. acceleration/deceleration [mm/s²]

p23741 jerk Real 1000.0 n.c. max. sync. jerk [mm/s³] / 0.0 = trapezial

p23742

DiagnosticDataType elements Table 4-12 DiagnosticDataType elements

Designation Data type Default Description ActualAlarmCode UInt 0 c.c. - r2132 actual drive warn code ActualFaultCode UInt 0 c.c. - r2131 actual drive fault code DPRD_DAT_RET_VAL Word 16#0 return value for function block DPRD_DAT

DPWR_DAT_RET_VAL Word 16#0 return value for function block DPWR_DAT HWIDact UInt 0 actual used hardware ID for cyclic / acyclic

operation

Page 43: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

Table of contents

LMCSINA Library109479491

V2.3 04/2016 43/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

1094

7949

1_LM

CSI

NA_

V2_3

_en.

docx

DriveDataType elements Table 4-13 DriveDataType elements

Designation Data type Default Description HW-ID Word 16#0 Hardware identifier (PLC) DO-Number USInt 0 drive object number (DRIVE) App-ID DInt 0 r.o. App-ID of the application r21502 resolution [µm/LU] Real 1.0 n.c. p21660 ACL_leadingAxis Real 360.0 n.c.Sets the axis cycle length of the leading

axis. p21650 ACL_camInput Real 360.0 n.c.Sets the axis cycle length at the cam input.

p21651 ACL_camOutput Real 360.0 n.c. Sets the axis cycle length at the cam

output. p21652 ACL_followingAxis Real 360.0 n.c.Sets the axis cycle length of the following

axis. p21653 maxSpeedPos Real 1.666.667 n.c. p21930 [mm/s] numeratorGear1 DInt 1 n.c. p22301 denominatorGear1 DInt 1 n.c. p22302

numeratorGear2 DInt 1 n.c. p22311 denominatorGear2 DInt 1 n.c. p22312

encoderIdentification USInt 0 r.o. "UNKNOWN (0): ABSOLUTE_ENCODER (1): INCREMENTAL_ENCODER (2): p404[0].1

LeadingValueDataType elements Table 4-14 LeadingValueDataType elements

Designation Data type Default Description leadingValue USInt 1 leadingvalue_1: 1/ leadingvalue_2: 2 motionDirection USInt 3 NEGATIVE (1) / POSITIVE (2) /

SHORTEST_WAY (3) maxVelocity Real 166.667 n.c. p22020 maxAcceleration Real 1000.0 n.c. p22021 maxJerk Real 1000.0 n.c. p22022

PrintMarkCorrectionDataType elements Table 4-15 PrintMarkCorrectionDataType elements

Designation Data type Default Description lowerOutputCam Real 0.0 n.c. p23601 upperOutputCam Real 0.0 n.c. 23602 printMarkCoordinate Real 0.0 n.c. 21640

Page 44: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

Table of contents

LMCSINA Library109479491

V2.3 04/2016 44/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

1094

7949

1_LM

CSI

NA_

V2_3

_en.

docx

VirtualMasterDataType elements Table 4-16 VirtualMasterDataType elements

Designation Data type Default Description posData Struct

posSetpoint Real 0.0 [mm] posVelocity Real 0.0 [mm/s] posAbsolut Bool false true = absolute

posDirection USInt 3 NEGATIVE (1) / POSITIVE (2) / SHORTEST_WAY (3)

maxAcceleration Real 1000.0 n.c. [mm/s²] p21832 maxJerk Real 1000.0 n.c. [mm/s³] p21834 maxSpeedPos Real 166.667 n.c. p21830

moveData Struct SpeedMoveJog Real 0.0

maxSpeedJog Real 166.667 n.c. Speed setpoint move and jog [mm/s]p21806

WR Struct controlWord Struct

setVLA Bool false

jogFWD_VLA Bool false

jogBWD_VLA Bool false

pos_absolutVLA Bool false

posFWD_VLA Bool false

posBWD_VLA Bool false

start_positioningVLA Bool false

stopVLA Bool false

velocity_override Int 0

positionSetpoint DInt 0 RD Struct actPosition Real 0.0 [mm] r21864

actVelocity Real 0.0 [mm/s] r21865 StatusWord Struct

positioning_activeVLA Bool false jog_activeVLA Bool false in_positionVLA Bool false

LifeSignCounter USInt 0 SettingValue Real 0.0 n.c. [mm] p21803

Page 45: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

Table of contents

LMCSINA Library109479491

V2.3 04/2016 45/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

1094

7949

1_LM

CSI

NA_

V2_3

_en.

docx

4.4 Operation

4.4.1 Enabling blocks

The blocks must be enabled with "Enable". Status 7000H means that the block is not computed. Status 7001H is output at the first call.

4.4.2 Selecting functions

If a function is selected with an input, then output "CommandBusy" and the "…Selected" output belonging to the function are TRUE. After processing has been completed, "CommandBusy" is FALSE – and "CommandDone" TRUE. "CommandDone" and "…Selected" remain TRUE as long as the input remains selected. If, after processing has been completed, the input is no longer TRUE, then "CommandDone" comes to for one cycle. Only one function can be simultaneously selected.

4.4.3 Switching between functions

Switching between various functions is only possible at standstill. The only exception is switching from jogging to positioning.

4.4.4 Post triggering

Post triggering is possible for all function; after post triggering, CommandBusy is FALSE for one cycle.

4.4.5 Reading and writing configuration data

Reading and writing configuration data is only possible if the drive is switched off. Input "readWriteConfigData" must be set to 1 to readout configuration data from the drive. The task is started when the status at the input changes. Input "readWriteConfigData" must be set to 2 to write configuration data to the drive. The task is started when the status at the input changes.

4.4.6 Checking the entry ID

Entry ID (r21502) is read out to check the functionality. If the configuration data are not read out, the entry ID must be manually entered into the configuration data.

Page 46: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

5 LMCSINA_CrossCutterFB in the TIA Portal

V2.3 04/2016 46/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

5 LMCSINA_CrossCutterFB in the TIA Portal 5.1 Preparation

If you wish to configure a PROFIBUS a device, then you can continue with Chapter 5.2. If you wish to configure a PROFINET device, then this is done using the user-defined GSDML file. How you can install this GSDML file is described in the following, and where you can then find it in the hardware catalog.

Installing the GSDML file generated in the TIA Portal Install the user-defined GSDML file that you generated in the TIA Portal as follows: Fig. 5-1

Fig. 5-2

Page 47: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

5 LMCSINA_CrossCutterFB in the TIA Portal

V2.3 04/2016 47/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

Finding the GSDML in the hardware catalog The GSDML file can now be found in the folder structure of the hardware catalog – as shown in the following diagram. Fig. 5-3

Page 48: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

5 LMCSINA_CrossCutterFB in the TIA Portal

V2.3 04/2016 48/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

5.2 Commissioning TIA Portal

Configuring the control Create a SIMATIC S7-1200/1500 control, and then configure it as usual.

Note A minimum firmware release of 4.0 is required for the SIMATIC S7-1200. This is necessary to use the blocks from "LAcycCom" for acyclic communication.

The following's steps describe the procedure when creating the drives and the control blocks.

Integrating the drive 1. Integrating the SINAMICS drive into the network view

a. PROFIBUS: Use the existing GSD files b. PROFINET: Use the user-defined GSDML file that has been installed

2. Connect the drive to the control system

Fig. 5-4

Page 49: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

5 LMCSINA_CrossCutterFB in the TIA Portal

V2.3 04/2016 49/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

Integrating the LMCSINA library

3. Dearchive the global LMCSINA library by right clicking in the global libraries. Fig. 5-5

Copy all of the required library elements into the folder of the control system Now copy all of the required library files into the appropriate folder of the created control system (carefully observe the sequence of steps!) 4. Copy "LAcycCom_Drives" from "01_Necessary components" to the PLC

variables folder 5. Copy "LAcycCom_typeSilentOperation" from "01_Necessary components" to

the PLC data types folder 6. "LMCSINA_TypeCrossCutter" from

"LMCSINA_03_Technology""LMCSINA_CrossCutter" to the PLC data types 7. Copy function block "LMCSina_CrossCutterFB" to the program blocks.

Page 50: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

5 LMCSINA_CrossCutterFB in the TIA Portal

V2.3 04/2016 50/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

Fig. 5-6

NOTICE Avoid creating an invalid array of structs!

Problem: If a data type/block is transferred into the PLC, and is compiled before accepting the PLC variables/user constants provided, then an invalid array with "0" structures is created.

Remedy: The PLC variables must be completely accepted before compiling the PLC/program. This is necessary, as in the data types/blocks used, array limits are defined based on constants.

Calling block LMCSINA_CrossCutterFB • Calling the axixFB "LMCSina_CrossCutterFB" with an instance for each cross-

cutter. • Interconnecting inputs and outputs.

Note The following inputs must (mandatory) be interconnected in order to call the function block:

– enable (the block is only calculated for TRUE)

– hardwareID (can be found under PLC variables – system constants)

– driveObjectNo (can be found in the properties of the drive object in STARTER)

The block itself can now be simply compiled. Additional steps are required to use acyclic communication (see the next chapter)

4

5

6

7

Page 51: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

5 LMCSINA_CrossCutterFB in the TIA Portal

V2.3 04/2016 51/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

Fig. 5-7

Integrating the acyclic communication

Note The function block can also be used without acyclic communication. The default values in the FB correspond to the default values in the drive parameters.

1. Opening/dearchiving the global "LAcycCom" library 2. Copy all data types from LAcycCom 00 Common Resources Management

LAcycCom_Types to the PLC data types 3. (Depending on the particular control system) copy the PLC variables

LAcycCom 00 Common Resources Management to the PLC folder 4. Copy function block "LAcycCom_ResourceManager" from LAcycCom 00

Common Resources Management to the folder of the control system used to the program blocks

Page 52: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

5 LMCSINA_CrossCutterFB in the TIA Portal

V2.3 04/2016 52/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

5. Copy the global data block "LAcycCom_RequestBuffer" from LAcycCom 00 Common Resources Management to the PLC folder

Fig. 5-8

6. Copy function block "LAcycCom_ ReadDriveParams" from LAcycCom 01

Drives LAcycCom_Blocks PROFIDrive to the PLC folder 7. Copy all data types except "LAcycCom_typeSilentOperation" from LAcycCom

01 Drives LAcycCom_Types to PLC data types

Note Data type "LAcycCom_typeSilentOperation", as a result of the use in the LMCSINA environment, is also supplied there – and must therefore be integrated into the project ONCE. When not complied with, the TIA portal changes the comments of a data type, which can result in problems when compiling.

PLC variables "LAcycCom_Drives" should also exist in the project, and should therefore not be integrated another time.

4

2

3

3

5

Page 53: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

5 LMCSINA_CrossCutterFB in the TIA Portal

V2.3 04/2016 53/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

Fig. 5-9

8. Call function blocks "LAcycCom_ResourceManager" and

"LAcycCom_ReadDriveParams" in the (same) program block 9. Interconnect LAcycCom_RequestBuffer to input "globalBuffer" of

"LAcycCom_ResourceManager" block 10. Activation of LAcycCom_ResourceManager at input "enable" 11. Interconnect LAcycCom_RequestBuffer at input "globalBuffer" of block

"LAcycCom_ReadDriveParams" 12. Interconnect the data area "statAcyclicData" from the instance DB of the cross-

cutter at input "dataset" of block "LAcycCom_ReadDriveParams"

6

7

Page 54: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

5 LMCSINA_CrossCutterFB in the TIA Portal

V2.3 04/2016 54/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

Fig. 5-10

Page 55: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

5 LMCSINA_CrossCutterFB in the TIA Portal

V2.3 04/2016 55/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

Fig. 5-11

Note Block LDPV1_Buffermanager must be released at input "enable". Block LDPV1_ReadParameters is exclusively controlled here using input "dataset".

Page 56: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

5 LMCSINA_CrossCutterFB in the TIA Portal

V2.3 04/2016 56/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

5.3 LMCSINA_CrossCutterFB interfaces

5.3.1 Block inputs

Table 5-1

Designation Data type

Default value

Description

enable Bool FALSE TRUE: Enable FB functionality FALSE: FB deactivated

ackError Bool FALSE Rising edge: Acknowledge drive fault enableAxis Bool FALSE Rising edge: Switch-on axis

Falling edge: Switch-off axis axisAcceleration Real 200.0 Acceleration, positioning/jogging [°/s²] jogPositive Bool FALSE TRUE: Jog forward jogNegative Bool FALSE TRUE: Jog backward jogVelocity Real 3600.0 Jogging velocity [°/min] traverseToMaintenance Bool FALSE TRUE: Traverse to start position maintenancePosition Real 0.0 Maintenance position [°] positioningVelocity Real 3600.0 Positioning velocity [°/min] approachDirection USInt 1 Defining the approach direction for the initial

position and wait position: 0: shortest path 1: only positive 2: only negative

homing Bool FALSE TRUE: Activate reference point approach homingMode UInt 1 Type of reference point approach:

0: no reference point approach/homing 1: Active reference point approach active, 2: Active reference point approach active, without BERO 3: Active reference point approach, backward 4: Active reference point approach, backward, without BERO 5: Active reference point approach, falling edge 6: Active reference point approach, falling edge without BERO 7: Active reference point approach, falling edge, backward 8: Active reference point approach, rising edge, backward, without BERO 10: Flying referencing/homing

enableCuttingOperation Bool FALSE TRUE: Enable cutting operation – traverse to start position

enableCut Bool FALSE TRUE or rising edge: Start cutting cuttingMode USInt 2 Selecting the cutting mode:

0: no cut 1: continuous cutting, immediately 2: continuous cutting 3: Test cut, immediate 4: No cut 5: Single cut, immediate 6: Single cut

formatLength Real 1000.0 Format length [mm] enableOscillation Bool FALSE TRUE: Enable oscillation for over-critical format

lengths enableCuttingCurve Bool FALSE TRUE: Enable cut curve input enableCuttingTorque Bool FALSE TRUE: Enable cut torque input printMarkCorrection Bool FALSE TRUE: Enable print mark sensing compensationVelocity Real 100000.0 Velocity for print mark correction compensation

[mm/min]

Page 57: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

5 LMCSINA_CrossCutterFB in the TIA Portal

V2.3 04/2016 57/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

Designation Data type

Default value

Description

compensationAcceleration Real 10000.0 Acceleration to compensate print mark correction [mm/s²]

distancePrintMarkCut Real 0.0 Distance, print mark cut [mm] counterReset Bool FALSE Rising edge: Reset material counter readWriteConfigData USInt 0 0: no reading or writing;

1: Reading the "configdata" from the drive hardwareID HW_IO 16#0 Hardware identification

(as example, can be found in the system constants of the PLC)

driveObjectNo USInt 0 Drive object number (as example, can be found in the communication page in Starter)

Values of the "homingMode" input Table 52

homingMode

Designation select homing

p21630

using negative

flag p21634

start direction

BWD p21635

disable BERO

p21636

select flying

homing p21643

0 no homing x 1 active homing x 2 active homing, without

BERO x x

3 active homing, BWD x x 4 active homing, BWD,

without BERO x x x

5 active homing, negative flag

x x

6 active homing, negative flag, without BERO

x x x

7 active homing, negative flag, BWD

x x x

8 active homing, negative flag, BWD, without BERO

x x x x

10 flying homing x

Values of the "cuttingMode" input Table 5-3

cuttingMode Meaning 0 no cut 1 immediate continuous cutting 2 continuous cutting 3 immediate test cut 4 test cut 5 immediate single cut 6 single cut

Page 58: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

5 LMCSINA_CrossCutterFB in the TIA Portal

V2.3 04/2016 58/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

5.3.2 Block outputs

Table 5-4

Designation Data type

Default value

Description

busy Bool FALSE TRUE: FB is working and new output values can be expected

valid Bool FALSE TRUE: Valid set of outputs available at the FB error Bool FALSE Rising edge informs that an error occurred during

the execution. axisError Bool FALSE TRUE: Drive error or application error axisEnabled Bool FALSE TRUE: Axis is in operation axisMoveFWD Bool FALSE TRUE: Axis traverses forward axisMoveBWD Bool FALSE TRUE: Axis traverses backward targetReached Bool FALSE TRUE: Target position reached joggingActive Bool FALSE TRUE: Jogging active posToMaintenanceActive Bool FALSE TRUE: Positioning to maintenance position active homingActive Bool FALSE TRUE: Homing active flyingHomingActive Bool FALSE TRUE: Flying referencing/homing active axisHomed Bool FALSE TRUE: Axis is homed cuttingEnabled Bool FALSE TRUE: Cutting operation enabled cutPossible Bool FALSE TRUE: Cut possible oscillatingDeactivated Bool FALSE TRUE: Oscillating deactivated – format length too

long actualPosition Real 0.0 Actual position [°] actualVelocity Real 0.0 Actual velocity [°/min] actualFormatLength Real 0.0 Actual format length [mm] numberOfCuts DInt 0 Number of cuts load Real 0.0 Actual torque in % of nominal torque actualAlarmCode Word 16#0 Displays the code of the last alarm that occurred. actualFaultcode Word 16#0 Displays the code of the oldest active fault. status Word 16#7000 Current status of FB

Page 59: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

5 LMCSINA_CrossCutterFB in the TIA Portal

V2.3 04/2016 59/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

5.3.3 Value overview for the output status

Table 5-5

Value Meaning 16#7101 jog velocity at limit 16#7102 positioning velocity at limit 16#7103 compensation velocity at limit 16#7110 positioning acceleration at limit 16#7111 compensation acceleration at limit 16#7200 acyclic command busy 16#7201 acyclic command busy and drive fault active 16#7202 acyclic command done 16#7203 acyclic command done and drive fault active 16#8210 homing mode not valid 16#8213 cutting mode not valid 16#8214 format length not valid 16#8215 approach direction not valid 16#8400 drive alarm active 16#8401 drive fault active 16#8402 DCC group fault active 16#8410 fine resolution not valid 16#8600 DPRD_DAT fault active 16#8610 DPWR_DAT fault active 16#8621 acyclic command error 16#8622 acyclic command error and drive fault active

Page 60: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

5 LMCSINA_CrossCutterFB in the TIA Portal

V2.3 04/2016 60/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

5.4 Operation

5.4.1 Enabling the block

The block must be enabled with "enable". Status 7000H means that the block is not computed. Status 7001H is output at the first call.

5.4.2 Reading configuration data

Input "readWriteConfigData" must be set to 1 to readout configuration data from the drive. The task is started when the status at the input changes. The absolute and/or the maximum values of the dynamic data are read out. The values must be read out if the following parameters are changed in the drive. Alternatively, the values can be manually adapted in the instance DB. The following parameters are read out:

Fig. 5-12

Page 61: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

6 LMCSINA_FlyingSawFB in the TIA Portal

V2.3 04/2016 61/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

6 LMCSINA_FlyingSawFB in the TIA Portal LMCSINA_FlyingSawFB is commissioned in exactly the same way as LMCSINA_CrossCutterFB. This is the reason that in the following screenshots, the LMCSINA_CrossCutter elements are visible.

6.1 Preparation

If you want to configure a PROFIBUS device, then you can continue with Chapter 6.2. If you wish to configure a PROFINET device, then this is done using the user-defined GSDML file. How you can install this GSDML file is described in the following, and where you can then find it in the hardware catalog.

Installing the GSDML file generated in the TIA Portal Install the user-defined GSDML file that you generated in the TIA Portal as follows: Fig. 6-1

Fig. 6-2

Page 62: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

6 LMCSINA_FlyingSawFB in the TIA Portal

V2.3 04/2016 62/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

Finding the GSDML in the hardware catalog The GSDML file can now be found in the folder structure of the hardware catalog – as shown in the following diagram. Fig. 6-3

Page 63: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

6 LMCSINA_FlyingSawFB in the TIA Portal

V2.3 04/2016 63/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

6.2 Commissioning TIA Portal

Configuring the control Create a SIMATIC S7-1200/1500 control, and then configure it as usual.

Note A minimum firmware release of 4.0 is required for the SIMATIC S7-1200. This is necessary to use the blocks from "LAcycCom" for acyclic communication.

The following's steps describe the procedure when creating the drives and the control blocks.

Integrating the drive 1. Integrating the SINAMICS drive into the network view

a. PROFIBUS: Use the existing GSD files b. PROFINET: Use the user-defined GSDML file that has been installed

2. Connect the drive to the control system

Fig. 6-4

Page 64: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

6 LMCSINA_FlyingSawFB in the TIA Portal

V2.3 04/2016 64/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

Integrating the LMCSINA library

3. Dearchive the global LMCSINA library by right clicking in the global libraries. Fig. 6-5

Copy all of the required library elements into the folder of the control system Now copy all of the required library files into the appropriate folder of the created control system (carefully observe the sequence of steps!) 4. Copy "LAcycCom_Drives" from "01_Necessary components" to the PLC

variables folder 5. Copy "LAcycCom_typeSilentOperation" from "01_Necessary components" to

the PLC data types folder 6. "LMCSINA_TypeFlyingSaw" from

"LMCSINA_03_Technology""LMCSINA_FlyingSaw" to the PLC data types 7. Copy function block "LMCSina_FlyingSawFB" to the program blocks.

Page 65: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

6 LMCSINA_FlyingSawFB in the TIA Portal

V2.3 04/2016 65/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

Fig. 6-6

NOTICE Avoid creating an invalid array of structs!

Problem: If a data type/block is transferred into the PLC, and is compiled before accepting the PLC variables/user constants provided, then an invalid array with "0" structures is created.

Remedy: The PLC variables must be completely accepted before compiling the PLC/program. This is necessary, as in the data types/blocks used, array limits are defined based on constants.

Calling block LMCSINA_FlyingSawFB • Call the axisFB "LMCSina_FlyingSawFB" with an instance for each saw drive. • Interconnecting inputs and outputs.

Note The following inputs must (mandatory) be interconnected in order to call the function block:

– enable (the block is only calculated for TRUE)

– hardwareID (can be found under PLC variables – system constants)

– driveObjectNo (can be found in the properties of the drive object in STARTER)

The block itself can now be simply compiled. Additional steps are required to use acyclic communication (see the next chapter)

4

5

6

7

Page 66: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

6 LMCSINA_FlyingSawFB in the TIA Portal

V2.3 04/2016 66/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

Fig. 6-7

Integrating the acyclic communication

Note The function block can also be used without acyclic communication. The default values in the FB correspond to the default values in the drive parameters.

1. Opening/dearchiving the global "LAcycCom" library 2. Copy all data types from LAcycCom 00 Common Resources Management

LAcycCom_Types to the PLC data types 3. (Depending on the particular control system) copy the PLC variables

LAcycCom 00 Common Resources Management to the PLC folder 4. Copy function block "LAcycCom_ResourceManager" from LAcycCom 00

Common Resources Management to the folder of the control system used to the program blocks

Page 67: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

6 LMCSINA_FlyingSawFB in the TIA Portal

V2.3 04/2016 67/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

5. Copy the global data block "LAcycCom_RequestBuffer" from LAcycCom 00 Common Resources Management to the PLC folder

Fig. 6-8

6. Copy function block "LAcycCom_ ReadDriveParams" from LAcycCom 01

Drives LAcycCom_Blocks PROFIDrive to the PLC folder 7. Copy all data types except "LAcycCom_typeSilentOperation" from LAcycCom

01 Drives LAcycCom_Types to PLC data types

Note Data type "LAcycCom_typeSilentOperation", as a result of the use in the LMCSINA environment, is also supplied there – and must therefore be integrated into the project ONCE. When not complied with, the TIA portal changes the comments of a data type, which can result in problems when compiling.

PLC variables "LAcycCom_Drives" should also exist in the project, and should therefore not be integrated another time.

4

2

3

3

5

Page 68: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

6 LMCSINA_FlyingSawFB in the TIA Portal

V2.3 04/2016 68/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

Figure 6-9

8. Call function blocks "LAcycCom_ResourceManager" and

"LAcycCom_ReadDriveParams" in the (same) program block 9. Interconnect LAcycCom_RequestBuffer to input "globalBuffer" of

"LAcycCom_ResourceManager" block 10. Activation of LAcycCom_ResourceManager at input "enable" 11. Interconnect LAcycCom_RequestBuffer at input "globalBuffer" of block

"LAcycCom_ReadDriveParams" 12. Interconnect the data area "statAcyclicData" from the instance DB of the cross-

cutter at input "dataset" of block "LAcycCom_ReadDriveParams"

6

7

Page 69: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

6 LMCSINA_FlyingSawFB in the TIA Portal

V2.3 04/2016 69/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

Fig. 6-10

Page 70: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

6 LMCSINA_FlyingSawFB in the TIA Portal

V2.3 04/2016 70/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

Fig. 6-11

Note Block LDPV1_Buffermanager must be released at input "enable". Block LDPV1_ReadParameters is exclusively controlled here using input "dataset".

Page 71: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

6 LMCSINA_FlyingSawFB in the TIA Portal

V2.3 04/2016 71/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

6.3 LMCSINA_FlyingSawFB interfaces

6.3.1 Block inputs

Table 6-1

Designation Data type

Default value

Description

enable Bool false TRUE: Enable functionality of FB; 0: Disable ackError Bool FALSE Rising edge: Acknowledge drive faults enableAxis Bool FALSE Rising edge: Enable axis; Falling edge: Disable

axis axisVelocity Real 100000.0 Maximum positioning velocity [mm/min] axisAcceleration Real 5000.0 Maximum acceleration for Acceleration

positioning/jogging [mm//s²] jogPositive Bool FALSE TRUE: Jog FWD jogNegative Bool FALSE TRUE: Jog BWD jogVelocity Real 1000.0 Jog velocity [mm/min] traverseToMaintenance Bool false Rising edge: Traverse to maintenance position maintenancePosition Real 0.0 Maintenance position [mm] homing Bool FALSE TRUE: enable homing homingMode UInt 1 Selection of Homing Mode: 0: no homing; 1:

active homing; 2: active homing, without BERO; 3:active homing, BWD; 4: active homing, BWD, without BERO; 5: active homing, negative flag; 6: active homing, negative flag, without BERO; 7: active homing, negative flag, BWD, without BERO; 8: active homing, negative flag, BWD, without BERO; 10: flying homing

enableCuttingOperation Bool false TRUE: enable cutting operation – traverse to starting position

enableCut Bool false TRUE or rising edge: start cut cuttingMode USInt 2 Selection of cutting mode: 0: no cut; 1: immediate

continuous cutting; 2: continuous cutting; 3: immediate test cut; 4: immediate test cut; 5: immediate single cut; 6: single cut

formatLength Real 1000.0 Format length [mm] knifeAtTop Bool TRUE TRUE: Feedback signal for Knife/saw at the top inhibitAutoReturn Bool false TRUE: Only return on command returnPositioning Bool false Rising edge: Return positioning with dynamic

response actClampFunction Bool false TRUE: Activate clamping function actGapFunction Bool false TRUE: Enable create gap mode createGapTrigger Bool false Rising edge: Trigger create gap enableSWLimit Bool false TRUE: Activate monitoring software limit switch disableHWLimit Bool false TRUE: Deactivate monitoring hardware limit

switch ackHWLimit Bool false Rising edge: Acknowledge hardware limit switch printMarkCorrection Bool false TRUE: Enables printmark sensing distancePrintMarkCut Real 0.0 Distance, print mark cut variable [mm] counterReset Bool false Rising edge: Material counter reset

readWriteConfigData USInt 0 0: no reading or writing; 1: read config data from drive

hardwareID HW_IO 16#0 Hardware identifier (see for example system constants – PLC)

driveObjectNo USInt 0 Drive object number (see for example communication overview Starter – DRIVE)

Page 72: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

6 LMCSINA_FlyingSawFB in the TIA Portal

V2.3 04/2016 72/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

Values of the "homingMode" input Table 62

homingMode

Designation select homing

p21630

using negative

flag p21634

start direction

BWD p21635

disable BERO

p21636

select flying

homing p21643

0 no homing x 1 active homing x 2 active homing, without

BERO x x

3 active homing, BWD x x 4 active homing, BWD,

without BERO x x x

5 active homing, negative flag

x x

6 active homing, negative flag, without BERO

x x x

7 active homing, negative flag, BWD

x x x

8 active homing, negative flag, BWD, without BERO

x x x x

10 flying homing x

Values of the "cuttingMode" input Table 6-3

cuttingMode Meaning 0 no cut 1 immediate continuous cutting 2 continuous cutting 3 immediate test cut 4 test cut 5 immediate single cut 6 single cut

6.3.2 Block outputs

Table 6-4

Designation Data type

Default value

Description

busy Bool false TRUE: FB is working and new output values can be expected

valid Bool false TRUE: Valid set of outputs available at the FB

error Bool false Rising edge informs that an error occurred during the execution.

axisError Bool FALSE TRUE: Drive error or application error axisEnabled Bool FALSE TRUE: Axis is in operation axisHomed Bool false TRUE: axis is homed axisMoveFWD Bool false TRUE: axis traverses forward axisMoveBWD Bool false TRUE: axis traverses backward targetReached Bool false TRUE: target position reached joggingActive Bool false TRUE: jogging active posToMaintenanceActive Bool false TRUE: positioning to maintenance position active homingActive Bool false TRUE: homing active flyingHomingActive Bool false TRUE: flying homing active cuttingEnabled Bool false TRUE: cutting operation enabled

Page 73: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

6 LMCSINA_FlyingSawFB in the TIA Portal

V2.3 04/2016 73/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

Designation Data type

Default value

Description

cutPossible Bool false TRUE: cut possible axisInSyncMaterial Bool false TRUE: axis synchronized to the material axisInStartPosition Bool false TRUE: axis is located at the starting position softwareLimitActive Bool false TRUE: software limit switch actuated hardwareLimitActive Bool false TRUE: hardware limit switch actuated actualPosition Real 0.0 Actual position [mm] actualVelocity Real 0.0 Actual velocity [mm/min] actualFormatLength Real 0.0 Actual format length [mm] numberOfCuts DInt 0 Number of cuts load Real 0.0 Actual torque in % of nominal torque actualAlarmCode Word 16#0 Displays the code of the last alarm that occurred. actualFaultcode Word 16#0 Displays the code of the oldest active fault.

status Word

#STATUS_NO_CALL Current status of FB

Page 74: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

6 LMCSINA_FlyingSawFB in the TIA Portal

V2.3 04/2016 74/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

6.3.3 Value overview for the output status

Table 6-5

Value Meaning 16#7101 jog velocity at limit 16#7102 positioning velocity at limit 16#7103 compensation velocity at limit 16#7110 positioning acceleration at limit 16#7111 compensation acceleration at limit 16#7200 acyclic command busy 16#7201 acyclic command busy and drive fault active 16#7202 acyclic command done 16#7203 acyclic command done and drive fault active 16#8210 homing mode not valid 16#8213 cutting mode not valid 16#8214 format length not valid 16#8215 approach direction not valid 16#8400 drive alarm active 16#8401 drive fault active 16#8402 DCC group fault active 16#8410 fine resolution not valid 16#8600 DPRD_DAT fault active 16#8610 DPWR_DAT fault active 16#8621 acyclic command error 16#8622 acyclic command error and drive fault active

Page 75: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

6 LMCSINA_FlyingSawFB in the TIA Portal

V2.3 04/2016 75/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

6.4 Operation

6.4.1 Enabling the block

The block must be enabled with "enable". Status 7000H means that the block is not computed. Status 7001H is output at the first call.

6.4.2 Reading configuration data

Input "readWriteConfigData" must be set to 1 to read out configuration data from the drive. The task is started when the status at the input changes. The absolute and/or the maximum values of the dynamic data are read out. The values must be read out if the following parameters are changed in the drive. Alternatively, the values can be manually adapted in the instance DB. The following parameters are read out:

Fig. 6-12

Page 76: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

7 LMCSINA_WinderFB in the TIA Portal

V2.3 04/2016 76/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

7 LMCSINA_WinderFB in the TIA Portal The description for implementation and use can be found in the DCC winder application documentation.

Page 77: Application example 04/2016 Library Motion Control SINAMICS – … · 2016-04-25 · Application example 04/2016 Library Motion Control SINAMICS – LMCSINA ... take suitable preventive

8 References

V2.3 04/2016 77/77

S

iem

ens

AG 2

016

All r

ight

s re

serv

ed

8 References Table 8-1

Topic Title

\1\ Siemens Industry Online Support

http://support.industry.siemens.com

\2\ Download page of this entry

https://support.industry.siemens.com/cs/de/en/view/109479491

\3\ Download page of the "LAcycCom" library

https://support.industry.siemens.com/cs/de/en/view/109479553

9 History Table 9-1

Version Date Modification

V1.0 09/2015 First edition V2.2 12/2015 Second edition V2.3 04/2016 Third edition

10 Contact partner Siemens AG Industry Sector DF FA PMA APC Frauenauracher Strasse 80 D - 91056 Erlangen mailto: [email protected]