You are on page 1of 138

LDrvSafe

Fail-safe SIMATIC library to control the Safety


Siemens
Integrated Functions of the SINAMICS drive family Industry
Online
https://support.industry.siemens.com/cs/ww/en/view/109485794 Support
Legal information

Legal information
Use of application examples
Application examples illustrate the solution of automation tasks through an interaction of several
components in the form of text, graphics and/or software modules. The application examples are
a free service by Siemens AG and/or a subsidiary of Siemens AG (“Siemens”). They are non-
binding and make no claim to completeness or functionality regarding configuration and
equipment. The application examples merely offer help with typical tasks; they do not constitute
customer-specific solutions. You yourself are responsible for the proper and safe operation of the
products in accordance with applicable regulations and must also check the function of the
respective application example and customize it for your system.
Siemens grants you the non-exclusive, non-sublicensable and non-transferable right to have the
application examples used by technically trained personnel. Any change to the application
examples is your responsibility. Sharing the application examples with third parties or copying the
application examples or excerpts thereof is permitted only in combination with your own products.
The application examples are not required to undergo the customary tests and quality inspections
of a chargeable product; they may have functional and performance defects as well as errors. It is
your responsibility to use them in such a manner that any malfunctions that may occur do not
result in property damage or injury to persons.

Disclaimer of liability
Siemens shall not assume any liability, for any legal reason whatsoever, including, without
limitation, liability for the usability, availability, completeness and freedom from defects of the
application examples as well as for related information, configuration and performance data and
any damage caused thereby. This shall not apply in cases of mandatory liability, for example
under the German Product Liability Act, or in cases of intent, gross negligence, or culpable loss of
life, bodily injury or damage to health, non-compliance with a guarantee, fraudulent
non-disclosure of a defect, or culpable breach of material contractual obligations. Claims for
damages arising from a breach of material contractual obligations shall however be limited to the
© Siemens AG 2021 All rights reserved

foreseeable damage typical of the type of agreement, unless liability arises from intent or gross
negligence or is based on loss of life, bodily injury or damage to health. The foregoing provisions
do not imply any change in the burden of proof to your detriment. You shall indemnify Siemens
against existing or future claims of third parties in this connection except where Siemens is
mandatorily liable.
By using the application examples you acknowledge that Siemens cannot be held liable for any
damage beyond the liability provisions described.

Other information
Siemens reserves the right to make changes to the application examples at any time without
notice. In case of discrepancies between the suggestions in the application examples and other
Siemens publications such as catalogs, the content of the other documentation shall have
precedence.
The Siemens terms of use (https://support.industry.siemens.com) shall also apply.

Security information
Siemens provides products and solutions with industrial security functions that support the secure
operation of plants, systems, machines and networks.
In order to protect plants, systems, machines and networks against cyber threats, it is necessary
to implement – and continuously maintain – a holistic, state-of-the-art industrial security concept.
Siemens’ products and solutions constitute one element of such a concept.
Customers are responsible for preventing unauthorized access to their plants, systems, machines
and networks. Such systems, machines and components should only be connected to an
enterprise network or the Internet if and to the extent such a connection is necessary and only
when appropriate security measures (e.g. firewalls and/or network segmentation) are in place.
For additional information on industrial security measures that may be implemented, please visit
https://www.siemens.com/industrialsecurity.
Siemens’ products and solutions undergo continuous development to make them more secure.
Siemens strongly recommends that product updates are applied as soon as they are available
and that the latest product versions are used. Use of product versions that are no longer
supported, and failure to apply the latest updates may increase customer’s exposure to cyber
threats.
To stay informed about product updates, subscribe to the Siemens Industrial Security RSS Feed
at: https://www.siemens.com/industrialsecurity.

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 2
Table of contents

Table of contents
Legal information ......................................................................................................... 2
1 Library Overview ................................................................................................ 5
1.1 Permissible Hardware .......................................................................... 5
1.2 Permissible Software ............................................................................ 5
2 Blocks of the library .......................................................................................... 6
2.1 List of blocks ......................................................................................... 6
2.1.1 Signatures of the individual blocks ....................................................... 7
2.2 PROFIsafe control words ..................................................................... 8
2.2.1 SinaGTlg30Control ............................................................................. 10
2.2.2 SinaSTlg30Control ............................................................................. 11
2.2.3 SinaTlg31Control ................................................................................ 13
2.2.4 SinaTlg900Control .............................................................................. 16
2.2.5 SinaTlg901Control .............................................................................. 18
2.2.6 SinaTlg902Control .............................................................................. 21
2.2.7 SinaTlg903Control .............................................................................. 24
2.2.8 PdcTlg30Control ................................................................................. 27
2.2.9 PdcTlg31Control ................................................................................. 28
2.3 PROFIsafe status words .................................................................... 30
2.3.1 SinaGTlg30Status .............................................................................. 32
2.3.2 SinaSTlg30Status ............................................................................... 34
2.3.3 SinaTlg31Status ................................................................................. 36
© Siemens AG 2021 All rights reserved

2.3.4 SinaTlg900Status ............................................................................... 39


2.3.5 SinaTlg901Status ............................................................................... 41
2.3.6 SinaTlg902Status ............................................................................... 45
2.3.7 SinaTlg903Status ............................................................................... 48
2.3.8 PdcTlg30Status .................................................................................. 53
2.3.9 PdcTlg31Status .................................................................................. 55
2.4 Safety Control Channel (SCC) ........................................................... 57
2.4.1 SinaTlg701Control .............................................................................. 59
2.5 Safety Info Channel (SIC) .................................................................. 62
2.5.1 SinaTlg700Status ............................................................................... 64
2.5.2 SinaTlg701Status ............................................................................... 68
2.6 General function blocks ...................................................................... 73
2.6.1 SafeVelocity ....................................................................................... 73
2.6.2 Basics of acyclic communication (LAcycCom) ................................... 77
2.6.3 Common interface parameters ........................................................... 78
2.6.4 SafeBrakeTest .................................................................................... 80
2.6.5 SafeReferencing ................................................................................. 84
2.6.6 HwAcknowledge ................................................................................. 88
2.7 Winder application .............................................................................. 91
2.7.1 Description ......................................................................................... 91
2.7.2 Solution............................................................................................... 92
2.7.3 Requirements for the distance sensors .............................................. 92
2.7.4 Permissible hardware ......................................................................... 93
2.7.5 Permissible hardware setup ............................................................... 93
2.7.6 General instructions ........................................................................... 98
2.7.7 Commissioning ................................................................................. 100
2.7.8 Function sequence ........................................................................... 101
Scaling of distance sensors ............................................................. 101
Masking the measured value of the distance sensor in SINAMICS 102
Unmasking the measured value of the distance sensor in the safety
part of the F-PLC .............................................................. 105
Discrepancy monitoring .................................................................... 105
Averaging the measured values of the distance sensors (optional) 106

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 3
Table of contents

Calculation of the current radius ...................................................... 106


Discrepancy Monitoring .................................................................... 106
Calculation of SLS limit .................................................................... 106
Transferring the calculated SLS limit ............................................... 106
Setting SLS limit 1 of SINAMICS S120 ............................................ 106
2.7.9 UnmaskedValueCalculation ............................................................. 108
2.7.10 DiscrepancyMonitoring ..................................................................... 112
2.7.11 AverageValueCalculation ................................................................. 115
2.7.12 WinderRadius ................................................................................... 117
2.7.13 WinderSLS ....................................................................................... 123
3 Functional test ............................................................................................... 126
3.1 Information for checking the Safety functionality of the machine ..... 126
3.2 Examples for checking the Safety functionality of the F blocks ....... 126
3.2.1 PROFIsafe control words ................................................................. 126
3.2.2 PROFIsafe status words .................................................................. 127
3.2.3 Winder application ............................................................................ 129
3.2.1 SafeVelocity ..................................................................................... 130
4 Working with the library ................................................................................ 131
4.1 Integrating the library into TIA Portal ................................................ 131
4.2 Integrating the library blocks into TIA Portal .................................... 133
4.3 Downloading the blocks to the S7 CPU ........................................... 134
4.4 Online help ....................................................................................... 135
5 Versioning of library LDrvSafe ..................................................................... 136
© Siemens AG 2021 All rights reserved

6 Appendix ........................................................................................................ 137


6.1 Application Support .......................................................................... 137
6.2 Links and Literature .......................................................................... 137
6.3 Change documentation .................................................................... 137

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 4
1 Library Overview

1 Library Overview
The library includes fail-safe S7 blocks to implement various applications in
conjunction with S7-1200F, S7-1500F, S7-1500F Software Controller, SINUMERIK
ONE and SINAMICS or SIMATIC Micro Drive coupled via PROFIsafe.

NOTE The SINAMICS Safety Functions are certified according to SIL2 in accordance
with IEC 61508 or IEC 61800-5-2, as well as PLd and Category 3 according to
ISO 13849-1.
PROFIsafe communication, as well as the failsafe PLC are certified according to
SIL3 in accordance with IEC 61508 or EN 62061, as well as PLe and Category 4
according to ISO 13849-1.

1.1 Permissible Hardware


Permissible are the following PLC families with the corresponding safety system
versions.

Table 1-1: Permissible PLC family


Permissible PLC family Permissible firmware Permissible safety-
© Siemens AG 2021 All rights reserved

version system-sersion
SIMATIC S7-1200F From V4.2 From V2.0
SIMATIC S7-1500F From V2.0 From V2.0
SIMATIC Drive Controller From V2.8 From V2.0
SIMATIC S7-1500F From V2.0 From V2.0
Software Controller
SINUMERIK ONE From V6.13 From V2.0

1.2 Permissible Software


Table 1-2: Permissible software
Component Article number
TIA Portal V16 or higher 6ES7822-1Ax06-xxxx
STEP 7 Safety Advanced V16 or higher 6ES7833-1FA16-0Yxx

Reaction time
The reaction time of the F program also depends on the cycle time of the calling
F-OB. The user must ensure that the reaction time matches the applications
WARNING
requirements.
Further information can be found at
https://support.industry.siemens.com/cs/ww/en/view/58856512

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 5
2 Blocks of the library

2 Blocks of the library


2.1 List of blocks
The subsequent table lists all blocks of the LDrvSafe library.
Table 2-1: List of blocks
Block Symbol Classification
FB 29000 SinaGT30Control In-house development
FB 29001 SinaST30Control In-house development
FB 29002 SinaT31Control In-house development
FB 29003 SinaT900Control In-house development
FB 29004 SinaT901Control In-house development
FB 29005 SinaT902Control In-house development
FB 29006 SinaT903Control In-house development
FB 29007 PdcTlg30Control In-house development
FB 29008 PdcTlg31Control In-house development
FB 29010 SinaGT30Status In-house development
FB 29011 SinaST30Status In-house development
FB 29012 SinaT31Status In-house development
© Siemens AG 2021 All rights reserved

FB 29013 SinaT900Status In-house development


FB 29014 SinaT901Status In-house development
FB 29015 SinaT902Status In-house development
FB 29016 SinaT903Status In-house development
FB 29017 PdcTlg30Status In-house development
FB 29018 PdcTlg31Status In-house development
FB 29020 AverageValueCalculation In-house development
FB 29021 DiscrepancyMonitoring In-house development
FB 29022 UnmaskedValueCalculation In-house development
FB 29023 WinderRadius In-house development
FB 29024 WinderSLS In-house development
FB 29030 SafeVelocity In-house development
FB 29100 SafeReferencing In-house development
FB 29101 HwAcknowledge In-house development
FB 29102 SafeBrakeTest In-house development
FB 29200 SinaT701Control In-house development
FB 29201 SinaT700Status In-house development
FB 29202 SinaT701Status In-house development

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 6
2 Blocks of the library

2.1.1 Signatures of the individual blocks

The signatures of the individual blocks of this library are listed in the following table.
Table 2-2: Signatures
Block Symbol Signature
FB 29000 SinaGT30Control 8F333427
FB 29001 SinaST30Control AC851398
FB 29002 SinaT31Control 5D03B0ED
FB 29003 SinaT900Control A15F64DB
FB 29004 SinaT901Control 59103094
FB 29005 SinaT902Control 2698E828
FB 29006 SinaT903Control A512028F
FB 29007 PdcTlg30Control FADE7F29
FB 29008 PdcTlg31Control C9F916C6
FB 29010 SinaGT30Status 27131F87
FB 29011 SinaST30Status 44E62E1B
FB 29012 SinaT31Status C67DA100
FB 29013 SinaT900Status B25F3C1C
FB 29014 SinaT901Status 460DF0D
© Siemens AG 2021 All rights reserved

FB 29015 SinaT902Status D82DAFCB


FB 29016 SinaT903Status 4968E86B
FB 29017 PdcTlg30Status 21415888
FB 29018 PdcTlg31Status 2E7280CB
FB 29020 AverageValueCalculation 8471964D
FB 29021 DiscrepancyMonitoring 3587F8C
FB 29022 UnmaskedValueCalculation 7ACEDEFE
FB 29023 WinderRadius 1DCC6934
FB 29024 WinderSLS D1C81A29
FB 29030 SafeVelocity 451D8674
FB 29100 SafeReferencing -
FB 29101 HwAcknowledge -
FB 29102 SafeBrakeTest -
FB 29200 SinaT701Control -
FB 29201 SinaT700Status -
FB 29202 SinaT701Status -

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 7
2 Blocks of the library

2.2 PROFIsafe control words


These function blocks are used to simply control the Safety Integrated Functions of
all SINAMICS hardware, which support the Safety Integrated Functions via
PROFIsafe.
The SINAMICS Safety Integrated Functions are represented at the inputs of the
blocks. At the block input, the user interconnects his Safety-related signals or
sensors (e.g. Emergency Stop, guard door ...) with the Safety Integrated Functions.
The input "ackSafetyFaults" is available to acknowledge Safety messages of the
SINAMICS in a failsafe way. These messages are acknowledged using a rising
signal edge.
Example:
Figure 2-1: Interconnecting Emergency Stop command device and acknowledgment signal
© Siemens AG 2021 All rights reserved

The user must interconnect the block output (in this case, "SinaGTlg30Control")
with a variable with the data type of the selected PROFIsafe telegram.
This variable must initially be created in the variable table. The start address (1)
must be the same as the start address (2) of the PROFIsafe telegram in the HWCN
(hardware configuration).
Figure 2-2: Creating a variable with the data type of the selected PROFIsafe telegram (in
this case, "LDrvSafe_typeSinaGTlg30Control") in variable table

1
Figure 2-3: Excerpt of the PROFIsafe configuration from HWCN

Wrong start address of the created variable


If the start address of the created variable is not the same as the start address of
CAUTION
the PROFIsafe telegram, the SINAMICS Safety Integrated Functions can’t be
controlled correctly.

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 8
2 Blocks of the library

The data type depends on the used function block.


Table 2-3: Assignment of function block and data type
Function block (symbolic name) Associated data type
LDrvSafe_SinaGTlg30Control LDrvSafe_typeSinaGTlg30Control
LDrvSafe_SinaSTlg30Control LDrvSafe_typeSinaSTlg30Control
LDrvSafe_SinaTlg31Control LDrvSafe_typeSinaTlg31Control
LDrvSafe_SinaTlg900Control LDrvSafe_typeSinaTlg900Control
LDrvSafe_SinaTlg901Control LDrvSafe_typeSinaTlg901Control
LDrvSafe_SinaTlg902Control LDrvSafe_typeSinaTlg902Control
LDrvSafe_SinaTlg903Control LDrvSafe_typeSinaTlg903Control
LDrvSafe_PdcTlg30Control LDrvSafe_typePdcTlg30Control
LDrvSafe_PdcTlg31Control LDrvSafe_typePdcTlg31Control

At the end, interconnect the variable created to the block output.


Figure 2-4: Interconnecting the block output
© Siemens AG 2021 All rights reserved

No selection of the Safety Functions


If there is more than one PROFIsafe telegram with the same length, Safety
CAUTION
Functions can be selected in the F-PLC that are not supported or enabled in the
drive.
To detect this error, call the corresponding telegram block "...Status" and
compare the feedback of the safety function "...active" with the control of the
Safety Function.

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 9
2 Blocks of the library

2.2.1 SinaGTlg30Control

Description
This function block is used to simply control the Safety Integrated Functions of
SINAMICS G120 via PROFIsafe telegram 30.

Principle of operation
Figure 2-5: Structure of block LDrvSafe_SinaGTlg30Control

At the block input, the user interconnects Safety-related signals or sensors (e.g.
Emergency Stop, guard door ...) with the Safety Integrated Functions.
© Siemens AG 2021 All rights reserved

The user must interconnect output "SinaGTlg30Control" with a variable of data type
"LDrvSafe_typeSinaGTlg30Control".
Details on how to commission the block are provided in chapter PROFIsafe control
words.

Interface
Table 2-4: Input parameters of block LDrvSafe_SinaGTlg30Control
Parameter Data type Description
STO BOOL Controlling the Safety Integrated Function Safe
Torque Off (STO)
1: Deselect STO
0: Select STO
SS1 BOOL Controlling the Safety Integrated Function Safe
Stop 1 (SS1)
1: Deselect SS1
0: Select SS1
SLS BOOL Controlling the Safety Integrated Function Safely-
Limited Speed (SLS)
1: Deselect SLS
0: Select SLS
selectSLSbit0 BOOL Switchover between the four SLS levels (is active in
conjunction with signal "selectSLSbit1")
1: Select "Select SLS bit 0"
0: Deselect "Select SLS bit 0"
selectSLSbit1 BOOL Switchover between the four SLS levels (is active in
conjunction with signal "selectSLSbit0")
1: Select "Select SLS bit 1"
0: Deselect "Select SLS bit 1"

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 10
2 Blocks of the library

Parameter Data type Description


SDIpositive BOOL Controlling the Safety Integrated Function Safe
Direction (SDI) in the positive direction of rotation
1: Deselect SDI positive
0: Select SDI positive
SDInegative BOOL Controlling the Safety Integrated Function Safe
Direction (SDI) in the negative direction of rotation
1: Deselect SDI negative
0: Select SDI negative
ackSafetyFaults BOOL Fail-safe acknowledgment of Safety faults in the
drive using a positive signal edge at this input

Table 2-5: Output parameters of block LDrvSafe_SinaGTlg30Control


Parameter Data type Description
SinaGTlg30Control LDrvSafe_type Assignment of the Safety Integrated
SinaGTlg30Control Functions at the block input to the structure
of the PROFIsafe telegram

2.2.2 SinaSTlg30Control

Description
© Siemens AG 2021 All rights reserved

This function block is used to simply control the Safety Integrated Functions of
SINAMICS S via PROFIsafe telegram 30.

Principle of operation
Figure 2-6: Structure of block LDrvSafe_SinaSTlg30Control

At the block input, the user interconnects Safety-related signals or sensors (e.g.
Emergency Stop, protective door ...) with the Safety Integrated Functions.
The user must interconnect output "SinaSTlg30Control" with a variable of data type
"LDrvSafe_typeSinaSTlg30Control".
Details on how to commission the block are provided in chapter PROFIsafe control
words.

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 11
2 Blocks of the library

NOTE The Safety Function SLP is not supported when using a SINAMICS S110.

Interface
Table 2-6: Input parameters of block LDrvSafe_SinaSTlg30Control
Parameter Data type Description
STO BOOL Controlling the Safety Integrated Function Safe
Torque Off (STO)
1: Deselect STO
0: Select STO
SS1 BOOL Controlling the Safety Integrated Function Safe
Stop 1 (SS1)
1: Deselect SS1
0: Select SS1
SS2 BOOL Controlling the Safety Integrated Function Safe
Stop 2 (SS2)
1: Deselect SS2
0: Select SS2
SOS BOOL Controlling the Safety Integrated Function Safe
Operating Stop (SOS)
1: Deselect SOS
0: Select SOS
SLS BOOL Controlling the Safety Integrated Function Safely-
© Siemens AG 2021 All rights reserved

Limited Speed (SLS)


1: Deselect SLS
0: Select SLS
selectSLSbit0 BOOL Switchover between the four SLS levels (is active in
conjunction with signal "selectSLSbit1")
1: Select "Select SLS bit 0"
0: Deselect "Select SLS bit 0"
selectSLSbit1 BOOL Switchover between the four SLS levels (is active in
conjunction with signal "selectSLSbit0")
1: Select "Select SLS bit 1"
0: Deselect "Select SLS bit 1"
SLP BOOL Controlling the Safety Integrated Function Safely-
Limited Position (SLP)
1: Deselect SLP
0: Select SLP
SLA BOOL Controlling the Safety Integrated Function Safely-
Limited Acceleration (SLA)
1: Deselect SLA
0: Select SLA
SDIpositive BOOL Controlling the Safety Integrated Function Safe
Direction (SDI) in the positive direction of rotation
1: Deselect SDI positive
0: Select SDI positive
SDInegative BOOL Controlling the Safety Integrated Function Safe
Direction (SDI) in the negative direction of rotation
1: Deselect SDI negative
0: Select SDI negative
ackSafetyFaults BOOL Fail-safe acknowledgment of Safety faults in the
drive using a positive signal edge at this input

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 12
2 Blocks of the library

Table 2-7: Output parameters of block LDrvSafe_SinaSTlg30Control


Parameter Data type Description
SinaSTlg30Control LDrvSafe_type Assignment of the Safety Integrated
SinaSTlg30Control Functions at the block input to the structure
of the PROFIsafe telegram

2.2.3 SinaTlg31Control

Description
This function block is used to simply control the Safety Integrated Functions of
SINAMICS via PROFIsafe telegram 31.

Principle of operation
Figure 2-7: Structure of block LDrvSafe_SinaTlg31Control
© Siemens AG 2021 All rights reserved

At the block input, the user interconnects Safety-related signals or sensors (e.g.
Emergency Stop, protective door ...) with the Safety Integrated Functions.
The user must interconnect output "SinaTlg31Control" with a variable of data type
"LDrvSafe_typeSinaTlg31Control".
Details on how to commission the block are provided in chapter PROFIsafe control
words.

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 13
2 Blocks of the library

Interface
Table 2-8: Input parameters of block LDrvSafe_SinaTlg31Control
Parameter Data type Description
STO BOOL Controlling the Safety Integrated Function Safe
Torque Off (STO)
1: Deselect STO
0: Select STO
SS1 BOOL Controlling the Safety Integrated Function Safe Stop
1 (SS1)
1: Deselect SS1
0: Select SS1
SS2 BOOL Controlling the Safety Integrated Function Safe Stop
2 (SS2)
1: Deselect SS2
0: Select SS2
SS2E BOOL Controlling the Safety Integrated Function Safe Stop
2 with external Stop (SS2E)
1: Deselect SS2E
0: Select SS2E
SS2ESR BOOL Controlling the Safety Integrated Function Safe Stop
2 Extended Stop and Retract (SS2ESR)
1: Deselect SS2ESR
0: Select SS2ESR
© Siemens AG 2021 All rights reserved

SOS BOOL Controlling the Safety Integrated Function Safe


Operating Stop (SOS)
1: Deselect SOS
0: Select SOS
SLS BOOL Controlling the Safety Integrated Function Safely-
Limited Speed (SLS)
1: Deselect SLS
0: Select SLS
selectSLSbit0 BOOL Switchover between the four SLS levels (is active in
conjunction with signal "selectSLSbit1")
1: Select "Select SLS bit 0"
0: Deselect "Select SLS bit 0"
selectSLSbit1 BOOL Switchover between the four SLS levels (is active in
conjunction with signal "selectSLSbit0")
1: Select "Select SLS bit 1"
0: Deselect "Select SLS bit 1"
SLP BOOL Controlling the Safety Integrated Function Safely-
Limited Position (SLP)
1: Deselect SLP
0: Select SLP
selectSLPrange BOOL Switchover between the two SLP traversing ranges
1: SLP traversing range 2
0: SLP traversing range 1
SLA BOOL Controlling the Safety Integrated Function Safely-
Limited Acceleration (SLA)
1: Deselect SLA
0: Select SLA
SDIpositive BOOL Controlling the Safety Integrated Function Safe
Direction (SDI) in the positive direction of rotation
1: Deselect SDI positive
0: Select SDI positive

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 14
2 Blocks of the library

Parameter Data type Description


SDInegative BOOL Controlling the Safety Integrated Function Safe
Direction (SDI) in the negative direction of rotation
1: Deselect SDI negative
0: Select SDI negative
selectGearboxStage BOOL Switchover between the eight gearbox stages (is
Bit0 active in conjunction with signals
"selectGearboxStageBit1" and
"selectGearboxStageBit2")
selectGearboxStage BOOL Switchover between the eight gearbox stages (is
Bit1 active in conjunction with signals
"selectGearboxStageBit0" and
"selectGearboxStageBit2")
selectGearboxStage BOOL Switchover between the eight gearbox stages (is
Bit2 active in conjunction with signals
"selectGearboxStageBit0" and
"selectGearboxStageBit1")
switchoverGearbox BOOL Higher position tolerance when switching over the
Stage gearbox stage
1: Increased position tolerance when switching over
the gearbox stage: p9542 * p9543 (without actual
value synchronization p9501.3 = 0); p9549 * p9543
(with actual value synchronization p9501.3 = 1)
0: Position tolerance when switching over the
gearbox stage: p9542
© Siemens AG 2021 All rights reserved

ackSafetyFaults BOOL Fail-safe acknowledgment of Safety faults in the


drive using a positive signal edge at this input

Table 2-9: Output parameters of block LDrvSafe_SinaTlg31Control


Parameter Data type Description
SinaTlg31Control LDrvSafe_type Assignment of the Safety Integrated
SinaTlg31Control Functions at the block input to the structure of
the PROFIsafe telegram

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 15
2 Blocks of the library

2.2.4 SinaTlg900Control

Description
This function block is used to simply control the Safety Integrated Functions of
SINAMICS via PROFIsafe telegram 900.

Principle of operation
Figure 2-8: Structure of block LDrvSafe_SinaTlg900Control

At the block input, the user interconnects Safety-related signals or sensors (e.g.
Emergency Stop, protective door ...) with the Safety Integrated Functions.
© Siemens AG 2021 All rights reserved

The user must interconnect output "SinaTlg900Control" with a variable of data type
"LDrvSafe_typeSinaTlg900Control".
Details on how to commission the block are provided in chapter PROFIsafe control
words.

Interface
Table 2-10: Input parameters of block LDrvSafe_SinaTlg900Control
Parameter Data type Description
STO BOOL Controlling the Safety Integrated Function Safe Torque
Off (STO)
1: Deselect STO
0: Select STO
SS1 BOOL Controlling the Safety Integrated Function Safe Stop 1
(SS1)
1: Deselect SS1
0: Select SS1
SLS BOOL Controlling the Safety Integrated Function Safely-
Limited Speed (SLS)
1: Deselect SLS
0: Select SLS
selectSLSbit0 BOOL Switchover between the four SLS levels (is active in
conjunction with signal "selectSLSbit1")
1: Select "Select SLS bit 0"
0: Deselect "Select SLS bit 0"
selectSLSbit1 BOOL Switchover between the four SLS levels (is active in
conjunction with signal "selectSLSbit0")
1: Select "Select SLS bit 1"
0: Deselect "Select SLS bit 1"
SDIpositive BOOL Controlling the Safety Integrated Function Safe
Direction (SDI) in the positive direction of rotation

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 16
2 Blocks of the library

Parameter Data type Description


1: Deselect SDI positive
0: Select SDI positive
SDInegative BOOL Controlling the Safety Integrated Function Safe
Direction (SDI) in the negative direction of rotation
1: Deselect SDI negative
0: Select SDI negative
ackSafetyFaults BOOL Fail-safe acknowledgment of Safety faults in the drive
using a positive signal edge at this input

Table 2-11: Output parameters of block LDrvSafe_SinaTlg900Control


Parameter Data type Description
SinaTlg900Control LDrvSafe_type Assignment of the Safety Integrated
SinaTlg900Control Functions at the block input to the structure
of the PROFIsafe telegram
© Siemens AG 2021 All rights reserved

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 17
2 Blocks of the library

2.2.5 SinaTlg901Control

Description
This function block is used to simply control the Safety Integrated Functions of
SINAMICS via PROFIsafe telegram 901.

Principle of operation
Figure 2-9: Structure of block LDrvSafe_SinaTlg901Control
© Siemens AG 2021 All rights reserved

At the block input, the user interconnects Safety-related signals or sensors (e.g.
Emergency Stop, protective door ...) with the Safety Integrated Functions.
The user must interconnect output "SinaTlg901Control" with a variable of data type
"LDrvSafe_typeSinaTlg901Control".
Details on how to commission the block are provided in chapter PROFIsafe control
words.

Interface
Table 2-12: Input parameters of block LDrvSafe_SinaTlg901Control
Parameter Data type Description
STO BOOL Controlling the Safety Integrated Function Safe
Torque Off (STO)
1: Deselect STO
0: Select STO

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 18
2 Blocks of the library

Parameter Data type Description


SS1 BOOL Controlling the Safety Integrated Function Safe
Stop 1 (SS1)
1: Deselect SS1
0: Select SS1
SS2 BOOL Controlling the Safety Integrated Function Safe
Stop 2 (SS2)
1: Deselect SS2
0: Select SS2
SS2E BOOL Controlling the Safety Integrated Function Safe
Stop 2 with external Stop (SS2E)
1: Deselect SS2E
0: Select SS2E
SS2ESR BOOL Controlling the Safety Integrated Function Safe
Stop 2 Extended Stop and Retract (SS2ESR)
1: Deselect SS2ESR
0: Select SS2ESR
SOS BOOL Controlling the Safety Integrated Function Safe
Operating Stop (SOS)
1: Deselect SOS
0: Select SOS
SLS BOOL Controlling the Safety Integrated Function Safely-
Limited Speed (SLS)
1: Deselect SLS
© Siemens AG 2021 All rights reserved

0: Select SLS
selectSLSbit0 BOOL Switchover between the four SLS levels (is active
in conjunction with signal "selectSLSbit1")
1: Select "Select SLS bit 0"
0: Deselect "Select SLS bit 0"
selectSLSbit1 BOOL Switchover between the four SLS levels (is active
in conjunction with signal "selectSLSbit0")
1: Select "Select SLS bit 1"
0: Deselect "Select SLS bit 1"
SLP BOOL Controlling the Safety Integrated Function Safely-
Limited Position (SLP)
1: Deselect SLP
0: Select SLP
selectSLPrange BOOL Switchover between the two SLP traversing
ranges
1: SLP traversing range 2
0: SLP traversing range 1
SLA BOOL Controlling the Safety Integrated Function Safely-
Limited Acceleration (SLA)
1: Deselect SLA
0: Select SLA
SDIpositive BOOL Controlling the Safety Integrated Function Safe
Direction (SDI) in the positive direction of rotation
1: Deselect SDI positive
0: Select SDI positive
SDInegative BOOL Controlling the Safety Integrated Function Safe
Direction (SDI) in the negative direction of
rotation
1: Deselect SDI negative
0: Select SDI negative

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 19
2 Blocks of the library

Parameter Data type Description


selectGearboxStage BOOL Switchover between the eight gearbox stages (is
Bit0 active in conjunction with signals
"selectGearboxStageBit1" and
"selectGearboxStageBit2")
selectGearboxStage BOOL Switchover between the eight gearbox stages (is
Bit1 active in conjunction with signals
"selectGearboxStageBit0" and
"selectGearboxStageBit2")
selectGearboxStage BOOL Switchover between the eight gearbox stages (is
Bit2 active in conjunction with signals
"selectGearboxStageBit0" and
"selectGearboxStageBit1")
switchoverGearbox BOOL Higher position tolerance when switching over the
Stage gearbox stage
1: Increased position tolerance when switching
over the gearbox stage: p9542 * p9543 (without
actual value synchronization p9501.3 = 0); p9549
* p9543 (with actual value synchronization
p9501.3 = 1)
0: Position tolerance when switching over the
gearbox stage: p9542
variableSLS INT Variable input of SLS level 1
SLS level 1 of SINAMICS is dynamically varied
between 0.01 and 100%
© Siemens AG 2021 All rights reserved

ackSafetyFaults BOOL Fail-safe acknowledgment of Safety faults in the


drive using a positive signal edge at this input

Table 2-13: Output parameters of block LDrvSafe_SinaTlg901Control


Parameter Data type Description
SinaTlg901Control LDrvSafe_type Assignment of the Safety Integrated
SinaTlg901Control Functions at the block input to the structure
of the PROFIsafe telegram

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 20
2 Blocks of the library

2.2.6 SinaTlg902Control

Description
This function block is used to simply control the Safety Integrated Functions of
SINAMICS via PROFIsafe telegram 902.

Principle of operation
Figure 2-10: Structure of block LDrvSafe_SinaTlg902Control
© Siemens AG 2021 All rights reserved

At the block input, the user interconnects Safety-related signals or sensors (e.g.
Emergency Stop, protective door ...) with the Safety Integrated Functions.
The user must interconnect output "SinaTlg902Control" with a variable of data type
"LDrvSafe_typeSinaTlg902Control".
Details on how to commission the block are provided in chapter PROFIsafe control
words.

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 21
2 Blocks of the library

Interface
Table 2-14: Input parameters of block LDrvSafe_SinaTlg902Control
Parameter Data type Description
STO BOOL Controlling the Safety Integrated Function Safe
Torque Off (STO)
1: Deselect STO
0: Select STO
SS1 BOOL Controlling the Safety Integrated Function Safe Stop
1 (SS1)
1: Deselect SS1
0: Select SS1
SS2 BOOL Controlling the Safety Integrated Function Safe Stop
2 (SS2)
1: Deselect SS2
0: Select SS2
SS2E BOOL Controlling the Safety Integrated Function Safe Stop
2 with external Stop (SS2E)
1: Deselect SS2E
0: Select SS2E
SS2ESR BOOL Controlling the Safety Integrated Function Safe Stop
2 Extended Stop and Retract (SS2ESR)
1: Deselect SS2ESR
0: Select SS2ESR
© Siemens AG 2021 All rights reserved

SOS BOOL Controlling the Safety Integrated Function Safe


Operating Stop (SOS)
1: Deselect SOS
0: Select SOS
SLS BOOL Controlling the Safety Integrated Function Safely-
Limited Speed (SLS)
1: Deselect SLS
0: Select SLS
selectSLSbit0 BOOL Switchover between the four SLS levels (is active in
conjunction with signal "selectSLSbit1")
1: Select "Select SLS bit 0"
0: Deselect "Select SLS bit 0"
selectSLSbit1 BOOL Switchover between the four SLS levels (is active in
conjunction with signal "selectSLSbit0")
1: Select "Select SLS bit 1"
0: Deselect "Select SLS bit 1"
SLP BOOL Controlling the Safety Integrated Function Safely-
Limited Position (SLP)
1: Deselect SLP
0: Select SLP
selectSLPrange BOOL Switchover between the two SLP traversing ranges
1: SLP traversing range 2
0: SLP traversing range 1
SLA BOOL Controlling the Safety Integrated Function Safely-
Limited Acceleration (SLA)
1: Deselect SLA
0: Select SLA
SDIpositive BOOL Controlling the Safety Integrated Function Safe
Direction (SDI) in the positive direction of rotation
1: Deselect SDI positive
0: Select SDI positive

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 22
2 Blocks of the library

Parameter Data type Description


SDInegative BOOL Controlling the Safety Integrated Function Safe
Direction (SDI) in the negative direction of rotation
1: Deselect SDI negative
0: Select SDI negative
selectGearboxStage BOOL Switchover between the eight gearbox stages (is
Bit0 active in conjunction with signals
"selectGearboxStageBit1" and
"selectGearboxStageBit2")
selectGearboxStage BOOL Switchover between the eight gearbox stages (is
Bit1 active in conjunction with signals
"selectGearboxStageBit0" and
"selectGearboxStageBit2")
selectGearboxStage BOOL Switchover between the eight gearbox stages (is
Bit2 active in conjunction with signals
"selectGearboxStageBit0" and
"selectGearboxStageBit1")
switchoverGearbox BOOL Higher position tolerance when switching over the
Stage gearbox stage
1: Increased position tolerance when switching over
the gearbox stage:p9542 * p9543 (without actual
value synchronization p9501.3 = 0); p9549 * p9543
(with actual value synchronization p9501.3 = 1)
0: Position tolerance when switching over the
gearbox stage: p9542
© Siemens AG 2021 All rights reserved

variableSLS INT Variable input of SLS level 1


SLS level 1 of SINAMICS is dynamically varied
between 0.01 and 100%
ackSafetyFaults BOOL Fail-safe acknowledgment of Safety faults in the
drive using a positive signal edge at this input

Table 2-15: Output parameters of block LDrvSafe_SinaTlg902Control


Parameter Data type Description
SinaTlg902Control LDrvSafe_type Assignment of the Safety Integrated
SinaTlg902Control Functions at the block input to the structure
of the PROFIsafe telegram

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 23
2 Blocks of the library

2.2.7 SinaTlg903Control

Description
This function block is used to simply control the Safety Integrated Functions of
SINAMICS via PROFIsafe telegram 903.

Principle of operation
Figure 2-11: Structure of block LDrvSafe_SinaTlg903Control
© Siemens AG 2021 All rights reserved

At the block input, the user interconnects Safety-related signals or sensors (e.g.
Emergency Stop, protective door ...) with the Safety Integrated Functions.
The user must interconnect output "SinaTlg903Control" with a variable of data type
"LDrvSafe_typeSinaTlg903Control".
Details on how to commission the block are provided in chapter PROFIsafe control
words.

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 24
2 Blocks of the library

Interface
Table 2-16: Input parameters of block LDrvSafe_SinaTlg903Control
Parameter Data type Description
STO BOOL Controlling the Safety Integrated Function Safe
Torque Off (STO)
1: Deselect STO
0: Select STO
SS1 BOOL Controlling the Safety Integrated Function Safe
Stop 1 (SS1)
1: Deselect SS1
0: Select SS1
SS2 BOOL Controlling the Safety Integrated Function Safe
Stop 2 (SS2)
1: Deselect SS2
0: Select SS2
SS2E BOOL Controlling the Safety Integrated Function Safe
Stop 2 with external Stop (SS2E)
1: Deselect SS2E
0: Select SS2E
SS2ESR BOOL Controlling the Safety Integrated Function Safe
Stop 2 Extended Stop and Retract (SS2ESR)
1: Deselect SS2ESR
0: Select SS2ESR
© Siemens AG 2021 All rights reserved

SOS BOOL Controlling the Safety Integrated Function Safe


Operating Stop (SOS)
1: Deselect SOS
0: Select SOS
SLS BOOL Controlling the Safety Integrated Function Safely-
Limited Speed (SLS)
1: Deselect SLS
0: Select SLS
selectSLSbit0 BOOL Switchover between the four SLS levels (is active in
conjunction with signal "selectSLSbit1")
1: Select "Select SLS bit 0"
0: Deselect "Select SLS bit 0"
selectSLSbit1 BOOL Switchover between the four SLS levels (is active in
conjunction with signal "selectSLSbit0")
1: Select "Select SLS bit 1"
0: Deselect "Select SLS bit 1"
SLP BOOL Controlling the Safety Integrated Function Safely-
Limited Position (SLP)
1: Deselect SLP
0: Select SLP
selectSLPrange BOOL Switchover between the two SLP traversing ranges
1: SLP traversing range 2
0: SLP traversing range 1
SLA BOOL Controlling the Safety Integrated Function Safely-
Limited Acceleration (SLA)
1: Deselect SLA
0: Select SLA
SDIpositive BOOL Controlling the Safety Integrated Function Safe
Direction (SDI) in the positive direction of rotation
1: Deselect SDI positive
0: Select SDI positive

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 25
2 Blocks of the library

Parameter Data type Description


SDInegative BOOL Controlling the Safety Integrated Function Safe
Direction (SDI) in the negative direction of rotation
1: Deselect SDI negative
0: Select SDI negative
SCA BOOL Controlling the Safety Integrated Function Safe
Cam (SCA)
1: Deselect SCA
0: Select SCA
selectGearboxStage BOOL Switchover between the eight gearbox stages (is
Bit0 active in conjunction with signals
"selectGearboxStageBit1" and
"selectGearboxStageBit2")
selectGearboxStage BOOL Switchover between the eight gearbox stages (is
Bit1 active in conjunction with signals
"selectGearboxStageBit0" and
"selectGearboxStageBit2")
selectGearboxStage BOOL Switchover between the eight gearbox stages (is
Bit2 active in conjunction with signals
"selectGearboxStageBit0" and
"selectGearboxStageBit1")
switchoverGearbox BOOL Higher position tolerance when switching over the
Stage gearbox stage
1: Increased position tolerance when switching over
© Siemens AG 2021 All rights reserved

the gearbox stage: p9542 * p9543 (without actual


value synchronization p9501.3 = 0); p9549 * p9543
(with actual value synchronization p9501.3 = 1)
0: Position tolerance when switching over the
gearbox stage: p9542
variableSLS INT Variable input of SLS level 1
SLS level 1 of SINAMICS is dynamically varied
between 0.01 and 100%
ackSafetyFaults BOOL Fail-safe acknowledgment of Safety faults in the
drive using a positive signal edge at this input

Table 2-17: Output parameters of block LDrvSafe_SinaTlg903Control


Parameter Data type Description
SinaTlg903Control LDrvSafe_type Assignment of the Safety Integrated
SinaTlg903Control Functions at the block input to the structure
of the PROFIsafe telegram

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 26
2 Blocks of the library

2.2.8 PdcTlg30Control

Description
This function block is used to simply control the Safety Integrated Functions of
SIMATIC Micro Drive via PROFIsafe telegram 30.

Principle of operation
Figure 2-12: Structure of block LDrvSafe_PdcTlg30Control

At the block input, the user interconnects Safety-related signals or sensors (e.g.
Emergency Stop, protective door ...) with the Safety Integrated Functions.
The user must interconnect output "PdcTlg30Control" with a variable of data type
"LDrvSafe_typePdcTlg30Control".
Details on how to commission the block are provided in chapter PROFIsafe control
© Siemens AG 2021 All rights reserved

words.

Interface
Table 2-18: Input parameters of block LDrvSafe_PdcTlg30Control
Parameter Data type Description
STO BOOL Controlling the Safety Integrated Function Safe
Torque Off (STO)
1: Deselect STO
0: Select STO
SS1 BOOL Controlling the Safety Integrated Function Safe
Stop 1 (SS1)
1: Deselect SS1
0: Select SS1
SLS BOOL Controlling the Safety Integrated Function Safely-
Limited Speed (SLS)
1: Deselect SLS
0: Select SLS
SLT BOOL Controlling the Safety Integrated Function Safely-
Limited Torque (SLT)
1: Deselect SLT
0: Select SLT
ackSafetyFaults BOOL Fail-safe acknowledgment of Safety faults in the
drive using a positive signal edge at this input
Table 2-19: Output parameters of block LDrvSafe_PdcTlg30Control
Parameter Data type Description
PdcTlg30Control LDrvSafe_type Assignment of the Safety Integrated
PdcTlg30Control Functions at the block input to the structure
of the PROFIsafe telegram

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 27
2 Blocks of the library

2.2.9 PdcTlg31Control

Description
This function block is used to simply control the Safety Integrated Functions of
SIMATIC Micro Drive via PROFIsafe telegram 31.

Principle of operation
Figure 2-13: Structure of block LDrvSafe_PdcTlg31Control

At the block input, the user interconnects Safety-related signals or sensors (e.g.
© Siemens AG 2021 All rights reserved

Emergency Stop, protective door ...) with the Safety Integrated Functions.
The user must interconnect output "PdcTlg31Control" with a variable of data type
"LDrvSafe_typePdcTlg31Control".
Details on how to commission the block are provided in chapter PROFIsafe control
words.

Interface
Table 2-20: Input parameters of block LDrvSafe_PdcTlg31Control
Parameter Data type Description
STO BOOL Controlling the Safety Integrated Function Safe
Torque Off (STO)
1: Deselect STO
0: Select STO
SS1 BOOL Controlling the Safety Integrated Function Safe
Stop 1 (SS1)
1: Deselect SS1
0: Select SS1
SLS BOOL Controlling the Safety Integrated Function Safely-
Limited Speed (SLS)
1: Deselect SLS
0: Select SLS
selectSLSbit0 BOOL Switchover between the four SLS levels (is active in
conjunction with signal "selectSLSbit1")
1: Select "Select SLS bit 0"
0: Deselect "Select SLS bit 0"
selectSLSbit1 BOOL Switchover between the four SLS levels (is active in
conjunction with signal "selectSLSbit0")
1: Select "Select SLS bit 1"
0: Deselect "Select SLS bit 1"
SLT BOOL Controlling the Safety Integrated Function Safely-

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 28
2 Blocks of the library

Parameter Data type Description


Limited Torque (SLT)
1: Deselect SLT
0: Select SLT
selectSLTbit0 BOOL Switchover between the four SLT levels (is active in
conjunction with signal "selectSLTbit1")
1: Select "Select SLT bit 0"
0: Deselect "Select SLT bit 0"
selectSLTbit1 BOOL Switchover between the four SLT levels (is active in
conjunction with signal "selectSLTbit0")
1: Select "Select SLT bit 1"
0: Deselect "Select SLT bit 1"
ackSafetyFaults BOOL Fail-safe acknowledgment of Safety faults in the
drive using a positive signal edge at this input

Table 2-21: Output parameters of block LDrvSafe_PdcTlg31Control


Parameter Data type Description
PdcTlg31Control LDrvSafe_type Assignment of the Safety Integrated
PdcTlg31Control Functions at the block input to the structure
of the PROFIsafe telegram
© Siemens AG 2021 All rights reserved

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 29
2 Blocks of the library

2.3 PROFIsafe status words


These function blocks are used to simply evaluate the Safety Integrated Functions
of all SINAMICS hardware, which supports the Safety Integrated Functions via
PROFIsafe.
The states of the SINAMICS Safety Integrated Functions are represented at the
output of the block. At the block output, the user interconnects the statuses of the
Safety Integrated Functions with his failsafe signals or actuators (e.g. guard door
release, contactor ...).
Example:
Figure 2-14: Interconnecting signals to display STO and Safety faults
© Siemens AG 2021 All rights reserved

The user must interconnect the block input (in this case, "SinaGTlg30Status") with
a variable with the data type of the selected PROFIsafe telegram.
This variable must initially be created in the variable table. The start address (1)
must be the same as the start address (2) of the PROFIsafe telegram in the HWCN
(hardware configuration).

Figure 2-15: Creating a variable with the data type of the selected PROFIsafe telegram (in
this case, "LDrvSafe_typeSinaGTlg30Status") in variable table

Figure 2-16: Excerpt of the PROFIsafe configuration from HWCN

CAUTION Wrong start address of the created variable


If the start address of the created variable is not the same as the start address of
the PROFIsafe telegram, the SINAMICS Safety Integrated Functions can’t be
evaluated correctly.

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 30
2 Blocks of the library

The data type depends on the function block used.


Table 2-22: Assignment of function block and data type
Function block (symbolic name) Associated data type
LDrvSafe_SinaGTlg30Status LDrvSafe_typeSinaGTlg30Status
LDrvSafe_SinaSTlg30Status LDrvSafe_typeSinaSTlg30Status
LDrvSafe_SinaTlg31Status LDrvSafe_typeSinaTlg31Status
LDrvSafe_SinaTlg900Status LDrvSafe_typeSinaTlg900Status
LDrvSafe_SinaTlg901Status LDrvSafe_typeSinaTlg901Status
LDrvSafe_SinaTlg902Status LDrvSafe_typeSinaTlg902Status
LDrvSafe_SinaTlg903Status LDrvSafe_typeSinaTlg903Status
LDrvSafe_PdcTlg30Status LDrvSafe_typePdcTlg30Status
LDrvSafe_PdcTlg31Status LDrvSafe_typePdcTlg31Status

At the end, interconnect the variable created to the block input.


Figure 2-17: Interconnecting the block input
© Siemens AG 2021 All rights reserved

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 31
2 Blocks of the library

2.3.1 SinaGTlg30Status

Description
This function block is used to simply evaluate the Safety Integrated Functions of
SINAMICS G via PROFIsafe telegram 30.

Principle of operation
Figure 2-18: Structure of block LDrvSafe_SinaGTlg30Status
© Siemens AG 2021 All rights reserved

The states of the Safety Integrated Functions of SINAMICS G are represented at


the output of the block.
The user must interconnect input "SinaGTlg30Status" with a variable of data type
"LDrvSafe_typeSinaGTlg30Status".
Details on how to commission the block are provided in chapter PROFIsafe status
words.

Interface
Table 2-23: Input parameters of block LDrvSafe_SinaGTlg30Status
Parameter Data type Description
SinaGTlg30Status LDrvSafe_type Assignment of the structure of the
SinaGTlg30Status PROFIsafe telegram at the block input to the
states of the Safety Integrated Functions

Table 2-24: Output parameters of block LDrvSafe_SinaGTlg30Status


Parameter Data type Description
safetyFaultActive BOOL Display of Safety faults in the drive:
1: Safety fault in the drive
0: Fault-free operation
STOactive BOOL Status of Safety Integrated Function Safe
Torque Off (STO)
1: STO active
0: STO inactive
SS1active BOOL Status of Safety Integrated Function Safe
Stop 1 (SS1)
1: SS1 active
0: SS1 inactive

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 32
2 Blocks of the library

Parameter Data type Description


SLSactive BOOL Status of Safety Integrated Function Safely-
Limited Speed (SLS)
1: SLS active
0: SLS inactive
SLSbit0Active BOOL Display of the active SLS level (in
conjunction with signal
"selectSLSbit1active")
1: Select SLS bit 0 active
0: Select SLS bit 0 inactive
SLSbit1Active BOOL Display of the active SLS level (in
conjunction with signal
"selectSLSbit0active")
1: Select SLS bit 1 active
0: Select SLS bit 1 inactive
SDIpositiveActive BOOL Status of Safety Integrated Function Safe
Direction (SDI) in the positive direction of
rotation
1: SDI positive active
0: SDI positive inactive
SDInegativeActive BOOL Status of Safety Integrated Function Safe
Direction (SDI) in the negative direction of
rotation
1: SDI negative active
© Siemens AG 2021 All rights reserved

0: SDI negative inactive


SSMactive BOOL Status of Safety Integrated Function Safe
Speed Monitor (SSM)
1: SSM active
0: SSM inactive

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 33
2 Blocks of the library

2.3.2 SinaSTlg30Status

Description
This function block is used to simply evaluate the Safety Integrated Functions of
SINAMICS S via PROFIsafe telegram 30.

Principle of operation
Figure 2-19: Structure of block LDrvSafe_SinaSTlg30Status
© Siemens AG 2021 All rights reserved

The states of the Safety Integrated Functions of SINAMICS S are represented at


the output of the block.
The user must interconnect input "SinaSTlg30Status" with a variable of data type
"LDrvSafe_typeSinaSTlg30Status".
Details on how to commission the block are provided in chapter PROFIsafe status
words.

Interface
Table 2-25: Input parameters of block LDrvSafe_SinaSTlg30Status
Parameter Data type Description
SinaSTlg30Status LDrvSafe_type Assignment of the structure of the
SinaSTlg30Status PROFIsafe telegram at the block input to the
states of the Safety Integrated Functions

Table 2-26: Output parameters of block LDrvSafe_SinaSTlg30Status


Parameter Data type Description
safetyFaultActive BOOL Display of Safety faults in the drive:
1: Safety fault in the drive
0: Fault-free operation

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 34
2 Blocks of the library

Parameter Data type Description


STOactive BOOL Status of Safety Integrated Function Safe Torque Off
(STO)
1: STO active
0: STO inactive
SS1active BOOL Status of Safety Integrated Function Safe Stop 1 (SS1)
1: SS1 active
0: SS1 inactive
SS2active BOOL Status of Safety Integrated Function Safe Stop 2 (SS2)
1: SS2 active
0: SS2 inactive
SOSselected BOOL Status of Safety Integrated Function Safe Operating
Stop (SOS)
1: SOS selected (still not active)
0: SOS deselected
SOSactive BOOL Status of Safety Integrated Function Safe Operating
Stop (SOS)
1: SOS active
0: SOS inactive
SLSactive BOOL Status of Safety Integrated Function Safely-Limited
Speed (SLS)
1: SLS active
0: SLS inactive
© Siemens AG 2021 All rights reserved

SLSbit0Active BOOL Display of the active SLS level (in conjunction with
signal "selectSLSbit1active")
1: Select SLS bit 0 active
0: Select SLS bit 0 inactive
SLSbit1Active BOOL Display of the active SLS level (in conjunction with
signal "selectSLSbit0active")
1: Select SLS bit 1 active
0: Select SLS bit 1 inactive
SLPactive BOOL Status of Safety Integrated Function Safely-Limited
Position (SLP)
1: SLP active
0: SLP inactive
SLAactive BOOL Status of Safety Integrated Function Safely-Limited
Acceleration (SLA)
1: SLA active
0: SLA inactive
SDIpositiveActive BOOL Status of Safety Integrated Function Safe Direction
(SDI) in the positive direction of rotation
1: SDI positive active
0: SDI positive inactive
SDInegativeActive BOOL Status of Safety Integrated Function Safe Direction
(SDI) in the negative direction of rotation
1: SDI negative active
0: SDI negative inactive
SSMactive BOOL Status of Safety Integrated Function Safe Speed
Monitor (SSM)
1: SSM active
0: SSM inactive

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 35
2 Blocks of the library

2.3.3 SinaTlg31Status

Description
This function block is used to simply evaluate the Safety Integrated Functions of
SINAMICS via PROFIsafe telegram 31.

Principle of operation
Figure 2-20: Structure of block LDrvSafe_SinaTlg31Status
© Siemens AG 2021 All rights reserved

The states of the Safety Integrated Functions of SINAMICS are represented at the
output of the block.
The user must interconnect input "SinaTlg31Status" with a variable of data type
"LDrvSafe_typeSinaTlg31Status".
Details on how to commission the block are provided in chapter PROFIsafe status
words.

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 36
2 Blocks of the library

Interface
Table 2-27: Input parameters of block LDrvSafe_SinaTlg31Status
Parameter Data type Description
SinaTlg31Status LDrvSafe_type Assignment of the structure of the
SinaTlg31Status PROFIsafe telegram at the block input to the
states of the Safety Integrated Functions

Table 2-28: Output parameters of block LDrvSafe_SinaTlg31Status


Parameter Data type Description
safetyFaultActive BOOL Display of Safety faults in the drive:
1: Safety fault in the drive
0: Fault-free operation
STOactive BOOL Status of Safety Integrated Function Safe Torque
Off (STO)
1: STO active
0: STO inactive
SS1active BOOL Status of Safety Integrated Function Safe Stop 1
(SS1)
1: SS1 active
0: SS1 inactive
SS2active BOOL Status of Safety Integrated Function Safe Stop 2
(SS2)
© Siemens AG 2021 All rights reserved

1: SS2 active
0: SS2 inactive
SS2Eactive BOOL Status of Safety Integrated Function Safe Stop 2
with external stop (SS2E)
1: SS2E active
0: SS2E inactive
SS2ESRactive BOOL Status of Safety Integrated Function Safe Stop 2
Extended Stop and Retract (SS2ESR)
1: SS2ESR active
0: SS2ESR inactive
SOSselected BOOL Status of Safety Integrated Function Safe
Operating Stop (SOS)
1: SOS selected (still not active)
0: SOS deselected
SOSactive BOOL Status of Safety Integrated Function Safe
Operating Stop (SOS)
1: SOS active
0: SOS inactive
SLSactive BOOL Status of Safety Integrated Function Safely-
Limited Speed (SLS)
1: SLS active
0: SLS inactive
SLSbit0Active BOOL Display of the active SLS level (in conjunction
with signal "selectSLSbit1active")
1: Select SLS bit 0 active
0: Select SLS bit 0 inactive
SLSbit1Active BOOL Display of the active SLS level (in conjunction
with signal "selectSLSbit0active")
1: Select SLS bit 1 active
0: Select SLS bit 1 inactive

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 37
2 Blocks of the library

Parameter Data type Description


SLPactive BOOL Status of Safety Integrated Function Safely-
Limited Position (SLP)
1: SLP active
0: SLP inactive
SLPrangeActive BOOL Display of the active SLP traversing range
1: SLP traversing range 2 active
0: SLP traversing range 1 active
SLPupperLimit BOOL Display of the upper SLP limit:
Maintained 1: Upper limit maintained
0: Upper limit not maintained
SLPlowerLimit BOOL Display of the lower SLP limit:
Maintained 1: Lower limit maintained
0: Lower limit not maintained
safePositionValid BOOL Status of Safety Integrated Functions Safe
Position (SP) and Safely-Limited Position
(SLP)
1: SP valid
0: SP invalid
safelyReferenced BOOL Status of Safety Integrated Functions Safe
Position (SP) and Safely-Limited Position
(SLP) to evaluate safe absolute positions
1: Safely referenced/homed
0: Not safely referenced/homed
© Siemens AG 2021 All rights reserved

SLAactive BOOL Status of Safety Integrated Function Safely-


Limited Acceleration (SLA)
1: SLA active
0: SLA inactive
SDIpositiveActive BOOL Status of Safety Integrated Function Safe
Direction (SDI) in the positive direction of rotation
1: SDI positive active
0: SDI positive inactive
SDInegativeActive BOOL Status of Safety Integrated Function Safe
Direction (SDI) in the negative direction of
rotation
1: SDI negative active
0: SDI negative inactive
SSMactive BOOL Status of Safety Integrated Function Safe Speed
Monitor (SSM)
1: SSM active
0: SSM inactive
statusFDI0 BOOL Status of fail-safe digital input F-DI0 (only for
CU310-2):
1: F-DI0 inactive
0: F-DI0 active
statusFDI1 BOOL Status of fail-safe digital input F-DI1 (only for
CU310-2):
1: F-DI1 inactive
0: F-DI1 active
statusFDI2 BOOL Status of fail-safe digital input F-DI2 (only for
CU310-2):
1: F-DI2 inactive
0: F-DI2 active

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 38
2 Blocks of the library

2.3.4 SinaTlg900Status

Description
This function block is used to simply evaluate the Safety Integrated Functions of
SINAMICS via PROFIsafe telegram 900.

Principle of operation
Figure 2-21: Structure of block LDrvSafe_SinaTlg900Status
© Siemens AG 2021 All rights reserved

The states of the Safety Integrated Functions of SINAMICS are represented at the
output of the block.
The user must interconnect input "SinaTlg900Status" with a variable of data type
"LDrvSafe_typeSinaTlg900Status".
Details on how to commission the block are provided in chapter PROFIsafe status
words.

Interface
Table 2-29: Input parameters of block LDrvSafe_SinaTlg900Status
Parameter Data type Description
SinaTlg900Status LDrvSafe_type Assignment of the structure of the
SinaTlg900Status PROFIsafe telegram at the block input to the
states of the Safety Integrated Functions

Table 2-30: Output parameters of block LDrvSafe_SinaTlg900Status


Parameter Data type Description
safetyFaultActive BOOL Display of Safety faults in the drive:
1: Safety fault in the drive
0: Fault-free operation
STOactive BOOL Status of Safety Integrated Function Safe Torque
Off (STO)
1: STO active
0: STO inactive

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 39
2 Blocks of the library

Parameter Data type Description


SS1active BOOL Status of Safety Integrated Function Safe Stop 1
(SS1)
1: SS1 active
0: SS1 inactive
SLSactive BOOL Status of Safety Integrated Function Safely-
Limited Speed (SLS)
1: SLS active
0: SLS inactive
SLSbit0Active BOOL Display of the active SLS level (in conjunction
with signal "sLSbit1Active")
1: Select SLS bit 0 active
0: Select SLS bit 0 inactive
SLSbit1Active BOOL Display of the active SLS level (in conjunction
with signal "sLSbit0Active")
1: Select SLS bit 1 active
0: Select SLS bit 1 inactive
SDIpositiveActive BOOL Status of Safety Integrated Function Safe
Direction (SDI) in the positive direction of rotation
1: SDI positive active
0: SDI positive inactive
SDInegativeActive BOOL Status of Safety Integrated Function Safe
Direction (SDI) in the negative direction of
rotation
© Siemens AG 2021 All rights reserved

1: SDI negative active


0: SDI negative inactive
SSMactive BOOL Status of Safety Integrated Function Safe Speed
Monitor (SSM)
1: SSM active
0: SSM inactive
statusFDI0 BOOL Status of fail-safe digital input F-DI0:
1: F-DI0 inactive
0: F-DI0 active
statusFDI1 BOOL Status of fail-safe digital input F-DI1:
1: F-DI1 inactive
0: F-DI1 active
statusFDI2 BOOL Status of fail-safe digital input F-DI2:
1: F-DI2 inactive
0: F-DI2 active

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 40
2 Blocks of the library

2.3.5 SinaTlg901Status

Description
This function block is used to simply evaluate the Safety Integrated Functions of
SINAMICS via PROFIsafe telegram 901.

Principle of operation
Figure 2-22: Structure of block LDrvSafe_SinaTlg901Status
© Siemens AG 2021 All rights reserved

The states of the Safety Integrated Functions of SINAMICS are represented at the
output of the block.
The user must interconnect input "SinaTlg901Status" with a variable of data type
"LDrvSafe_typeSinaTlg901Status".
Details on how to commission the block are provided in chapter PROFIsafe status
words.

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 41
2 Blocks of the library

Interface
Table 2-31: Input parameters of block LDrvSafe_SinaTlg901Status
Parameter Data type Description
SinaTlg901Status LDrvSafe_type Assignment of the structure of the
SinaTlg901Status PROFIsafe telegram at the block input to the
states of the Safety Integrated Functions

Table 2-32: Output parameters of block LDrvSafe_SinaTlg901Status


Parameter Data type Description
safetyFaultActive BOOL Display of Safety faults in the drive:
1: Safety fault in the drive
0: Fault-free operation
STOactive BOOL Status of Safety Integrated Function Safe Torque
Off (STO)
1: STO active
0: STO inactive
SS1active BOOL Status of Safety Integrated Function Safe Stop 1
(SS1)
1: SS1 active
0: SS1 inactive
SS2active BOOL Status of Safety Integrated Function Safe Stop 2
(SS2)
© Siemens AG 2021 All rights reserved

1: SS2 active
0: SS2 inactive
SS2Eactive BOOL Status of Safety Integrated Function Safe Stop 2
with external stop (SS2E)
1: SS2E active
0: SS2E inactive
SS2ESRactive BOOL Status of Safety Integrated Function Safe Stop 2
Extended Stop and Retract (SS2ESR)
1: SS2ESR active
0: SS2ESR inactive
SOSselected BOOL Status of Safety Integrated Function Safe
Operating Stop (SOS)
1: SOS selected (still not active)
0: SOS deselected
SOSactive BOOL Status of Safety Integrated Function Safe
Operating Stop (SOS)
1: SOS active
0: SOS inactive
SLSactive BOOL Status of Safety Integrated Function Safely-
Limited Speed (SLS)
1: SLS active
0: SLS inactive
SLSbit0Active BOOL Display of the active SLS level (in conjunction with
signal "selectSLSbit1active")
1: Select SLS bit 0 active
0: Select SLS bit 0 inactive
SLSbit1Active BOOL Display of the active SLS level (in conjunction with
signal "selectSLSbit0active")
1: Select SLS bit 1 active
0: Select SLS bit 1 inactive

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 42
2 Blocks of the library

Parameter Data type Description


SLPactive BOOL Status of Safety Integrated Function Safely-
Limited Position (SLP)
1: SLP active
0: SLP inactive
SLPrangeActive BOOL Display of the active SLP traversing range
1: SLP traversing range 2 active
0: SLP traversing range 1 active
SLPupperLimit BOOL Display of the upper SLP limit:
Maintained 1: Upper limit maintained
0: Upper limit not maintained
SLPlowerLimit BOOL Display of the lower SLP limit:
Maintained 1: Lower limit maintained
0: Lower limit not maintained
safePositionValid BOOL Status of Safety Integrated Functions Safe
Position (SP) and Safely-Limited Position (SLP)
1: SP valid
0: SP invalid
safelyReferenced BOOL Status of Safety Integrated Functions Safe
Position (SP) and Safely-Limited Position (SLP)
to evaluate safe absolute positions
1: Safely referenced/homed
0: Not safely referenced/homed
© Siemens AG 2021 All rights reserved

SLAactive BOOL Status of Safety Integrated Function Safely-


Limited Acceleration (SLA)
1: SLA active
0: SLA inactive
SDIpositiveActive BOOL Status of Safety Integrated Function Safe Direction
(SDI) in the positive direction of rotation
1: SDI positive active
0: SDI positive inactive
SDInegativeActive BOOL Status of Safety Integrated Function Safe Direction
(SDI) in the negative direction of rotation
1: SDI negative active
0: SDI negative inactive
SSMactive BOOL Status of Safety Integrated Function Safe Speed
Monitor (SSM)
1: SSM active
0: SSM inactive
statusFDI0 BOOL Status of fail-safe digital input F-DI0:
1: F-DI0 inactive
0: F-DI0 active
statusFDI1 BOOL Status of fail-safe digital input F-DI1:
1: F-DI1 inactive
0: F-DI1 active
statusFDI2 BOOL Status of fail-safe digital input F-DI2:
1: F-DI2 inactive
0: F-DI2 active
variableSLSvalue INT Display of the active SLS limit value of the 1st SLS
level:
Value range: 1 … 32767 (100%)
cycleCounter INT Counter of the Safety clock cycle
Value range: -32768 … 32767

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 43
2 Blocks of the library

Parameter Data type Description


safePosition INT Display of the actual position value as 16-bit value
Value range: ± 32767
© Siemens AG 2021 All rights reserved

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 44
2 Blocks of the library

2.3.6 SinaTlg902Status

Description
This function block is used to simply evaluate the Safety Integrated Functions of
SINAMICS via PROFIsafe telegram 902.

Principle of operation
Figure 2-23: Structure of block LDrvSafe_SinaTlg902Status
© Siemens AG 2021 All rights reserved

The states of the Safety Integrated Functions of SINAMICS are represented at the
output of the block.
The user must interconnect input "SinaTlg902Status" with a variable of data type
"LDrvSafe_typeSinaTlg902Status".
Details on how to commission the block are provided in chapter PROFIsafe status
words.

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 45
2 Blocks of the library

Interface
Table 2-33: Input parameters of block LDrvSafe_SinaTlg902Status
Parameter Data type Description
SinaTlg902Status LDrvSafe_type Assignment of the structure of the
SinaTlg902Status PROFIsafe telegram at the block input to the
states of the Safety Integrated Functions
Table 2-34: Output parameters of block LDrvSafe_SinaTlg902Status
Parameter Data type Description
safetyFaultActive BOOL Display of Safety faults in the drive:
1: Safety fault in the drive
0: Fault-free operation
STOactive BOOL Status of Safety Integrated Function Safe Torque
Off (STO)
1: STO active
0: STO inactive
SS1active BOOL Status of Safety Integrated Function Safe Stop 1
(SS1)
1: SS1 active
0: SS1 inactive
SS2active BOOL Status of Safety Integrated Function Safe Stop 2
(SS2)
1: SS2 active
© Siemens AG 2021 All rights reserved

0: SS2 inactive
SS2Eactive BOOL Status of Safety Integrated Function Safe Stop 2
with external stop (SS2E)
1: SS2E active
0: SS2E inactive
SS2ESRactive BOOL Status of Safety Integrated Function Safe Stop 2
Extended Stop and Retract (SS2ESR)
1: SS2ESR active
0: SS2ESR inactive
SOSselected BOOL Status of Safety Integrated Function Safe
Operating Stop (SOS)
1: SOS selected (still not active)
0: SOS deselected
SOSactive BOOL Status of Safety Integrated Function Safe
Operating Stop (SOS)
1: SOS active
0: SOS inactive
SLSactive BOOL Status of Safety Integrated Function Safely-
Limited Speed (SLS)
1: SLS active
0: SLS inactive
SLSbit0Active BOOL Display of the active SLS level (in conjunction
with signal "selectSLSbit1active")
1: Select SLS bit 0 active
0: Select SLS bit 0 inactive
SLSbit1Active BOOL Display of the active SLS level (in conjunction
with signal "selectSLSbit0active")
1: Select SLS bit 1 active
0: Select SLS bit 1 inactive

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 46
2 Blocks of the library

Parameter Data type Description


SLPactive BOOL Status of Safety Integrated Function Safely-
Limited Position (SLP)
1: SLP active
0: SLP inactive
SLPrangeActive BOOL Display of the active SLP traversing range
1: SLP traversing range 2 active
0: SLP traversing range 1 active
SLPupperLimit BOOL Display of the upper SLP limit:
Maintained 1: Upper limit maintained
0: Upper limit not maintained
SLPlowerLimit BOOL Display of the lower SLP limit:
Maintained 1: Lower limit maintained
0: Lower limit not maintained
safePositionValid BOOL Status of Safety Integrated Functions Safe
Position (SP) and Safely-Limited Position
(SLP)
1: SP valid
0: SP invalid
safelyReferenced BOOL Status of Safety Integrated Functions Safe
Position (SP) and Safely-Limited Position
(SLP) to evaluate safe absolute positions
1: Safely referenced/homed
0: Not safely referenced/homed
© Siemens AG 2021 All rights reserved

SLAactive BOOL Status of Safety Integrated Function Safely-


Limited Acceleration (SLA)
1: SLA active
0: SLA inactive
SDIpositiveActive BOOL Status of Safety Integrated Function Safe
Direction (SDI) in the positive direction of rotation
1: SDI positive active
0: SDI positive inactive
SDInegativeActive BOOL Status of Safety Integrated Function Safe
Direction (SDI) in the negative direction of
rotation
1: SDI negative active
0: SDI negative inactive
SSMactive BOOL Status of Safety Integrated Function Safe Speed
Monitor (SSM)
1: SSM active
0: SSM inactive
statusFDI0 BOOL Status of fail-safe digital input F-DI0:
1: F-DI0 inactive
0: F-DI0 active
statusFDI1 BOOL Status of fail-safe digital input F-DI1:
1: F-DI1 inactive
0: F-DI1 active
statusFDI2 BOOL Status of fail-safe digital input F-DI2:
1: F-DI2 inactive
0: F-DI2 active
variableSLSvalue INT Display of the active SLS limit value of the 1st
SLS level:
Value range: 1 … 32767 (100%)
cycleCounter INT Counter of the Safety clock cycle
Value range: -32768 … 32767

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 47
2 Blocks of the library

Parameter Data type Description


safePosition DINT Display of the actual position value as 32-bit value
Value range: ± 737280000

2.3.7 SinaTlg903Status

Description
This function block is used to simply evaluate the Safety Integrated Functions of
SINAMICS via PROFIsafe telegram 903.

Principle of operation
Figure 2-24: Structure of block LDrvSafe_SinaTlg903Status – part 1
© Siemens AG 2021 All rights reserved

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 48
2 Blocks of the library

Figure 2-25: Structure of block LDrvSafe_SinaTlg903Status – part 2


© Siemens AG 2021 All rights reserved

The states of the Safety Integrated Functions of SINAMICS are represented at the
output of the block.
The user must interconnect input "SinaTlg903Status" with a variable of data type
"LDrvSafe_typeSinaTlg903Status".
Details on how to commission the block are provided in chapter PROFIsafe status
words.

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 49
2 Blocks of the library

Interface
Table 2-35: Input parameters of block LDrvSafe_SinaTlg903Status
Parameter Data type Description
SinaTlg903Status LDrvSafe_type Assignment of the structure of the
SinaTlg903Status PROFIsafe telegram at the block input to the
states of the Safety Integrated Functions

Table 2-36: Output parameters of block LDrvSafe_SinaTlg903Status


Parameter Data type Description
safetyFaultActive BOOL Display of Safety faults in the drive:
1: Safety fault in the drive
0: Fault-free operation
STOactive BOOL Status of Safety Integrated Function Safe Torque Off
(STO)
1: STO active
0: STO inactive
SS1active BOOL Status of Safety Integrated Function Safe Stop 1 (SS1)
1: SS1 active
0: SS1 inactive
SS2active BOOL Status of Safety Integrated Function Safe Stop 2 (SS2)
1: SS2 active
0: SS2 inactive
© Siemens AG 2021 All rights reserved

SS2Eactive BOOL Status of Safety Integrated Function Safe Stop 2 with


external stop (SS2E)
1: SS2E active
0: SS2E inactive
SS2ESRactive BOOL Status of Safety Integrated Function Safe Stop 2
Extended Stop and Retract (SS2ESR)
1: SS2ESR active
0: SS2ESR inactive
SOSselected BOOL Status of Safety Integrated Function Safe Operating
Stop (SOS)
1: SOS selected (still not active)
0: SOS deselected
SOSactive BOOL Status of Safety Integrated Function Safe Operating
Stop (SOS)
1: SOS active
0: SOS inactive
SLSactive BOOL Status of Safety Integrated Function Safely-Limited
Speed (SLS)
1: SLS active
0: SLS inactive
SLSbit0Active BOOL Display of the active SLS level (in conjunction with
signal "selectSLSbit1active")
1: Select SLS bit 0 active
0: Select SLS bit 0 inactive
SLSbit1Active BOOL Display of the active SLS level (in conjunction with
signal "selectSLSbit0active")
: Select SLS bit 1 active
0: Select SLS bit 1 inactive

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 50
2 Blocks of the library

Parameter Data type Description


SLPactive BOOL Status of Safety Integrated Function Safely-Limited
Position (SLP)
1: SLP active
0: SLP inactive
SLPrangeActive BOOL Display of the active SLP traversing range
1: SLP traversing range 2 active
0: SLP traversing range 1 active
SLPupperLimit BOOL Display of the upper SLP limit:
Maintained 1: Upper limit maintained
0: Upper limit not maintained
SLPlowerLimit BOOL Display of the lower SLP limit:
Maintained 1: Lower limit maintained
0: Lower limit not maintained
safePositionValid BOOL Status of Safety Integrated Functions Safe Position
(SP) and Safely-Limited Position (SLP)
1: SP valid
0: SP invalid
safelyReferenced BOOL Status of Safety Integrated Functions Safe Position
(SP) and Safely-Limited Position (SLP) to evaluate
safe absolute positions
1: Safely referenced/homed
0: Not safely referenced/homed
© Siemens AG 2021 All rights reserved

SLAactive BOOL Status of Safety Integrated Function Safely-Limited


Acceleration (SLA)
1: SLA active
0: SLA inactive
SDIpositiveActive BOOL Status of Safety Integrated Function Safe Direction
(SDI) in the positive direction of rotation
1: SDI positive active
0: SDI positive inactive
SDInegativeActive BOOL Status of Safety Integrated Function Safe Direction
(SDI) in the negative direction of rotation
1: SDI negative active
0: SDI negative inactive
SSMactive BOOL Status of Safety Integrated Function Safe Speed
Monitor (SSM)
1: SSM active
0: SSM inactive
statusFDI0 BOOL Status of fail-safe digital input F-DI0:
1: F-DI0 inactive
0: F-DI0 active
statusFDI1 BOOL Status of fail-safe digital input F-DI1:
1: F-DI1 inactive
0: F-DI1 active
statusFDI2 BOOL Status of fail-safe digital input F-DI2:
1: F-DI2 inactive
0: F-DI2 active
SCA1..30 BOOL Status of safe cam 1..30:
1: Position is at cam 1..30
0: Position is not at cam 1..30
SCAactive BOOL Status of Safety Integrated Function Safe Cam (SCA)
1: SCA active
0: SCA inactive

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 51
2 Blocks of the library

Parameter Data type Description


SCAvalid BOOL Status of Safety Integrated Function Safe Cam (SCA)
1: SCA valid
0: SCA invalid
variableSLSvalue INT Display of the active SLS limit value of the 1st SLS
level:
Value range: 1 … 32767 (100%)
© Siemens AG 2021 All rights reserved

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 52
2 Blocks of the library

2.3.8 PdcTlg30Status

Description
This function block is used to simply evaluate the Safety Integrated Functions of
SIMATIC Micro Drive via PROFIsafe telegram 30.

Principle of operation
Figure 2-26: Structure of block LDrvSafe_PdcTlg30Status

The states of the Safety Integrated Functions of SIMATIC Micro Drive are
represented at the output of the block.
The user must interconnect input "PdcTlg30Status" with a variable of data type
"LDrvSafe_typePdcTlg30Status".
Details on how to commission the block are provided in chapter PROFIsafe status
© Siemens AG 2021 All rights reserved

words.

Interface
Table 2-37: Input parameters of block LDrvSafe_PdcTlg30Status
Parameter Data type Description
PdcTlg30Status LDrvSafe_type Assignment of the structure of the
PdcTlg30Status PROFIsafe telegram at the block input to the
states of the Safety Integrated Functions

Table 2-38: Output parameters of block LDrvSafe_PdcTlg30Status


Parameter Data type Description
safetyFaultActive BOOL Display of Safety faults in the drive:
1: Safety fault in the drive
0: Fault-free operation
STOactive BOOL Status of Safety Integrated Function Safe Torque Off
(STO)
1: STO active
0: STO inactive
SS1active BOOL Status of Safety Integrated Function Safe Stop 1 (SS1)
1: SS1 active
0: SS1 inactive
SLSactive BOOL Status of Safety Integrated Function Safely-Limited
Speed (SLS)
1: SLS active
0: SLS inactive
SLTactive BOOL Status of Safety Integrated Function Safely-Limited
Torque (SLT)
1: SLT active
0: SLT inactive

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 53
2 Blocks of the library
© Siemens AG 2021 All rights reserved

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 54
2 Blocks of the library

2.3.9 PdcTlg31Status

Description
This function block is used to simply evaluate the Safety Integrated Functions of
SIMATIC Micro Drive via PROFIsafe telegram 31.

Principle of operation
Figure 2-27: Structure of block LDrvSafe_PdcTlg31Status
© Siemens AG 2021 All rights reserved

The states of the Safety Integrated Functions of SIMATIC Micro Drive are
represented at the output of the block.
The user must interconnect input "PdcTlg31Status" with a variable of data type
"LDrvSafe_typePdcTlg31Status".
Details on how to commission the block are provided in chapter PROFIsafe status
words.

Interface
Table 2-39: Input parameters of block LDrvSafe_PdcTlg31Status
Parameter Data type Description
PdcTlg31Status LDrvSafe_type Assignment of the structure of the
PdcTlg31Status PROFIsafe telegram at the block input to the
states of the Safety Integrated Functions

Table 2-40: Output parameters of block LDrvSafe_PdcTlg31Status


Parameter Data type Description
safetyFaultActive BOOL Display of Safety faults in the drive:
1: Safety fault in the drive
0: Fault-free operation
STOactive BOOL Status of Safety Integrated Function Safe Torque Off
(STO)
1: STO active
0: STO inactive
SS1active BOOL Status of Safety Integrated Function Safe Stop 1 (SS1)
1: SS1 active
0: SS1 inactive

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 55
2 Blocks of the library

Parameter Data type Description


SLSactive BOOL Status of Safety Integrated Function Safely-Limited
Speed (SLS)
1: SLS active
0: SLS inactive
SLSbit0Active BOOL Display of the active SLS level (in conjunction with
signal "selectSLSbit1active")
1: Select SLS bit 0 active
0: Select SLS bit 0 inactive
SLSbit1Active BOOL Display of the active SLS level (in conjunction with
signal "selectSLSbit0active")
1: Select SLS bit 1 active
0: Select SLS bit 1 inactive
SLTactive BOOL Status of Safety Integrated Function Safely-Limited
Torque (SLT)
1: SLT active
0: SLT inactive
SLTbit0Active BOOL Display of the active SLT level (in conjunction with
signal "selectSLTbit1active")
1: Select SLT bit 0 active
0: Select SLT bit 0 inactive
SLTbit1Active BOOL Display of the active SLT level (in conjunction with
signal "selectSLTbit0active")
1: Select SLT bit 1 active
© Siemens AG 2021 All rights reserved

0: Select SLT bit 1 inactive


SSMactive BOOL Status of Safety Integrated Function Safe Speed
Monitor (SSM)
1: SSM active
0: SSM inactive

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 56
2 Blocks of the library

2.4 Safety Control Channel (SCC)


These function blocks are used to control the test stop and safe brake test (SBT) of
all SINAMICS hardware, which support the Safety Control Channel.

The control bits for the brake test and the test stop are represented at the inputs of
the blocks. At the block input, the user interconnects the control signals.
Further information about the block status is available at the block output.
Example:
Figure 2-28: Selecting the test stop via telegram 701
© Siemens AG 2021 All rights reserved

The block input "hardwareId" has to be connected according to the hardware-ID of


the corresponding telegram slot of telegram 701 (1).
Figure 2-29: Extract from telegram configuration of SINAMICS S120

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 57
2 Blocks of the library

The corresponding UDT "LDrvSafe_typeSinaTlg701Control" has to be present in


the PLC data types (2).
Figure 2-30: UDT in the PLC data types

NOTICE Incorrect hardware-ID of the telegram


When an incorrect hardware-ID is assigned, the test stop and safe brake test
© Siemens AG 2021 All rights reserved

cannot be controlled correctly.

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 58
2 Blocks of the library

2.4.1 SinaTlg701Control

Description
This function block is used to control the test stop and the safe brake test of
SINAMICS via telegram 701.

Principle of operation
Figure 2-31: Structure of block LDrvSafe_SinaTlg701Control
© Siemens AG 2021 All rights reserved

At the block input, the user interconnects the control signals for test stop and safe
brake test.
Details on how to commission the block are provided in chapter Safety Control
Channel (SCC).

The block is processed while the block input "enable" is set.


When an error occurs in the block, the output "error" is set; "status" shows the fault
number. Errors are only acknowledged with a negative edge at input "enable".

Interface
Table 2-41: Input parameters of block LDrvSafe_SinaTlg701Control
Parameter Data type Description
enable BOOL Processing of block
Activating the block with a rising edge.
Acknowledging faults with a falling edge.
testStop BOOL Test stop of Extended / Advanced Safety
Functions:
1: Test stop selected
0: Test stop deselected
closeBrake BOOL Command for closing/releasing the brake from
the control side
1: Close brake
0: Release brake
selectBrakeTest BOOL SBT: Selection of brake test
1: Select brake test
0: Deselect brake test

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 59
2 Blocks of the library

Parameter Data type Description


startBrakeTest BOOL SBT: Start of brake test
1: Start brake test
0: End brake test
brakeSelection BOOL SBT: Brake to be tested
1: Select brake 2
0: Select brake 1
selectDirectionOfRotation BOOL SBT: Test direction
1: Select negative direction
0: Select positive direction
selectTestSequence BOOL SBT: Test sequence
1: Select test sequence 2
0: Select test sequence 1
statusOfExternalBrake BOOL SBT: Status of an external brake
1: External brake closed
0: External brake open
hardwareId HW_IO Hardware-ID
Identification of the telegram via hardware-
identifier

Table 2-42: Output parameters of block LDrvSafe_SinaTlg701Control


© Siemens AG 2021 All rights reserved

Parameter Data type Description


valid BOOL Block active
The block is active, there are no faults and all
output signals are valid
busy BOOL Processing order
The input values are transferred
error BOOL Fault
The error bit is set as soon as an error occurs in
the block.
status WORD Block status
Shows the actual status of the block. As soon as
an error occurs, the corresponding message code
is given out here

Table 2-43: Status- and error display of block LDrvSafe_SinaTlg701Control


Status Description Remedy/information
7000 No call
The block is not executed
7001 First block call
First block call after setting "enable"
7002 Subsequent block calls
Subsequent block calls until the
block is terminated
8600 Undefined state Reset "enable" and execute the
The block internal statemachine order again.
was stopped because of an
unknown error.

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 60
2 Blocks of the library

Status Description Remedy/information


80XX Error during cyclic write An error occured during cyclic
communication. Check the correct
integration of the block (Further
information at \7\; The used block is
"SETIO_PART")
© Siemens AG 2021 All rights reserved

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 61
2 Blocks of the library

2.5 Safety Info Channel (SIC)


These function blocks are used to evaluate the Safety Integrated Functions and the
safe brake test (SBT) of all SINAMICS hardware, which supports the Safety Info
Channel.

The states of the SINAMICS Safety Integrated Functions, the safe brake test and
the test stop are represented at the output of the block. At the block output, the
user interconnects these signals according to the program sequence.
Further information about the block status is available at the block output.
Example:
Figure 2-32: Display of safety faults and the state of STO via telegram 700
© Siemens AG 2021 All rights reserved

The block input "hardwareId" has to be connected according to the hardware-ID of


the corresponding telegram slot of telegram 700 or 701 (1).
Figure 2-33: Extract from telegram configuration of SINAMICS S120

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 62
2 Blocks of the library

The corresponding UDT has to be present in the PLC data types (2).
Figure 2-34: UDT in the PLC data types

NOTICE Incorrect hardware-ID of the telegram


When an incorrect number is set as hardware-ID, the status information cannot
be evaluated correctly.
© Siemens AG 2021 All rights reserved

The data type depends on the function block used.


Table 2-44: Assignment of function block and data type
Function block (symbolic name) Associated data type
LDrvSafe_SinaTlg700Status LDrvSafe_typeSinaTlg700Status
LDrvSafe_SinaTlg70Status LDrvSafe_typeSinaTlg701Status

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 63
2 Blocks of the library

2.5.1 SinaTlg700Status

Description
This function block is used to simply evaluate the Safety Integrated Functions of
SINAMICS via telegram 700.

Principle of operation
Figure 2-35: Structure of block LDrvSafe_SinaTlg700Status
© Siemens AG 2021 All rights reserved

The states of the Safety Integrated Functions of SINAMICS are represented at the
output of the block.
Details on how to commission the block are provided in chapter Safety Info
Channel (SIC).

The block is processed as long as the block input "enable" is set.


When an error occurs in the block, the output "error" is set; "status" shows the fault
number. Errors are only acknowledged with a negative edge at input "enable".

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 64
2 Blocks of the library

Interface
Table 2-45: Input parameters of block LDrvSafe_SinaTlg700Status
Parameter Data type Description
enable BOOL Processing of block
Activating the block with a rising edge. Acknowledging
faults with a falling edge.
hardwareId HW_IO Hardware-ID
Identification of the telegram 700 via the hardware-
identifier

Table 2-46: Output parameters of block LDrvSafe_SinaTlg700Status


Parameter Data type Description
valid BOOL Block active
The block is active, there are no faults, and all
output signals are valid
busy BOOL Processing order
The block is busy. New output values can be
expected.
error BOOL Fault
The error bit is set as soon as an error occurs in the
block.
© Siemens AG 2021 All rights reserved

status WORD Block status


Shows the actual status of the block. As soon as an
error occurs, the corresponding message code is
given out here
safetyFaultActive BOOL Display of Safety faults in the drive:
1: Safety fault in the drive
0: Fault-free operation
STOactive BOOL Status of Safety Integrated Function Safe Torque
Off (STO)
1: STO active
0: STO inactive
SS1active BOOL Status of Safety Integrated Function Safe Stop 1
(SS1)
1: SS1 active
0: SS1 inactive
SS2active BOOL Status of Safety Integrated Function Safe Stop 2
(SS2)
1: SS2 active
0: SS2 inactive
SOSselected BOOL Status of Safety Integrated Function Safe
Operating Stop (SOS)
1: SOS selected (still not active)
0: SOS deselected
SOSactive BOOL Status of Safety Integrated Function Safe
Operating Stop (SOS)
1: SOS active
0: SOS inactive
SLSselected BOOL Status of Safety Integrated Function Safely-
Limited Speed (SLS)
1: SLS selected (still not active)
0: SLS deselected

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 65
2 Blocks of the library

Parameter Data type Description


SLSactive BOOL Status of Safety Integrated Function Safely-
Limited Speed (SLS)
1: SLS active
0: SLS inactive
SLAactive BOOL Status of Safety Integrated Function Safely-
Limited Acceleration (SLA)
1: SLA active
0: SLA inactive
SLSbit0Active BOOL Display of the active SLS level (in conjunction with
signal "selectSLSbit1active")
1: Select SLS bit 0 active
0: Select SLS bit 0 inactive
SLSbit1Active BOOL Display of the active SLS level (in conjunction with
signal "selectSLSbit0active")
1: Select SLS bit 1 active
0: Select SLS bit 1 inactive
SDIpositiveSelected BOOL Status of Safety Integrated Function Safe Direction
(SDI) in the positive direction of rotation
1: SDI positive selected (still not active)
0: SDI positive deselected
SDInegativeSelected BOOL Status of Safety Integrated Function Safe Direction
(SDI) in the negative direction of rotation
1: SDI negative selected (still not active)
© Siemens AG 2021 All rights reserved

0: SDI negative deselected


ESRretractRequested BOOL Display of function module Extended stop and
retract (ESR)
1: ESR requested
0: ESR not requested
safetyMessageActive BOOL Display of safety messages in the drive:
1: Safety message active
0: No Safety message active
SLSlimit DWORD Display of the active SLS speed limit
(standardized via p2000, with sign)
4000 0000 hex = speed in p2000

Table 2-47: Status- and error display of block LDrvSafe_SinaTlg700Status


Status Description Remedy/information
7000 No call
The block is not executed
7001 First block call
First block call after setting "enable"
7002 Subsequent block calls
Subsequent block calls until the
block is terminated
8600 Undefined state Reset "enable" and execute the
The block internal statemachine order again.
was stopped because of an
unknown error.

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 66
2 Blocks of the library

Status Description Remedy/information


80XX Error during cyclic read An error occured during cyclic
communication. Check the correct
integration of the block (Further
information at \7\; The used block is
"GETIO_PART")
© Siemens AG 2021 All rights reserved

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 67
2 Blocks of the library

2.5.2 SinaTlg701Status

Description
This function block is used to evaluate the Safety Integrated Functions and the
brake test of SINAMICS via telegram 701.

Principle of operation
Figure 2-36: Structure of block LDrvSafe_SinaTlg701Status – part 1
© Siemens AG 2021 All rights reserved

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 68
2 Blocks of the library

Figure 2-37: Structure of block LDrvSafe_SinaTlg701Status – part 2


© Siemens AG 2021 All rights reserved

The states of the Safety Integrated Functions and the safe brake test of SINAMICS
are represented at the output of the block.
Details on how to commission the block are provided in chapter Safety Info
Channel (SIC).

The block is processed as long as the block input "enable" is set.


When an error occurs in the block, the output "error" is set; "status" shows the fault
number. Errors are only acknowledged with a negative edge at input "enable".

Interface
Table 2-48: Input parameters of block LDrvSafe_SinaTlg701Status
Parameter Data type Description
enable BOOL Processing of block
Activating the block with a rising edge. Acknowledging
faults with a falling edge.
hardwareId HW_IO Hardware-ID
Identification of the telegram via the hardware-identifier

Table 2-49: Output parameters of block LDrvSafe_SinaTlg701Status


Parameter Data type Description
valid BOOL Block active
The block is active, there are no faults and all
output signals are valid

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 69
2 Blocks of the library

Parameter Data type Description


busy BOOL Processing order
The block is busy. New output values can be
expected.
error BOOL Fault
The error bit is set as soon as an error occurs in
the block.
status WORD Block status
Shows the actual status of the block. As soon
as an error occurs, the corresponding message
code is given out here
safetyFaultActive BOOL Display of Safety faults in the drive:
1: Safety fault in the drive
0: Fault-free operation
STOactive BOOL Status of Safety Integrated Function Safe
Torque Off (STO)
1: STO active
0: STO inactive
SS1active BOOL Status of Safety Integrated Function Safe Stop
1 (SS1)
1: SS1 active
0: SS1 inactive
SS2active BOOL Status of Safety Integrated Function Safe Stop
© Siemens AG 2021 All rights reserved

2 (SS2)
1: SS2 active
0: SS2 inactive
SS2Eactive BOOL Status of Safety Integrated Function Safe Stop
2 with external stop (SS2E)
1: SS2E active
0: SS2E inactive
SS2ESR active BOOL Status of Safety Integrated Function Safe Stop
2 Extended Stop and Retract (SS2ESR)
1: SS2ESR active
0: SS2ESR inactive
SOSselected BOOL Status of Safety Integrated Function Safe
Operating Stop (SOS)
1: SOS selected (still not active)
0: SOS deselected
SOSactive BOOL Status of Safety Integrated Function Safe
Operating Stop (SOS)
1: SOS active
0: SOS inactive
SLSselected BOOL Status of Safety Integrated Function Safely-
Limited Speed (SLS)
1: SLS selected (still not active)
0: SLS deselected
SLSactive BOOL Status of Safety Integrated Function Safely-
Limited Speed (SLS)
1: SLS active
0: SLS inactive
SLAactive BOOL Status of Safety Integrated Function Safely-
Limited Acceleration (SLA)
1: SLA active
0: SLA inactive

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 70
2 Blocks of the library

Parameter Data type Description


SLSbit0Active BOOL Display of the active SLS level (in conjunction
with signal "selectSLSbit1active")
1: Select SLS bit 0 active
0: Select SLS bit 0 inactive
SLSbit1Active BOOL Display of the active SLS level (in conjunction
with signal "selectSLSbit0active")
1: Select SLS bit 1 active
0: Select SLS bit 1 inactive
SDIpositiveSelected BOOL Status of Safety Integrated Function Safe
Direction (SDI) in the positive direction of
rotation
1: SDI positive selected (still not active)
0: SDI positive deselected
SDInegativeSelected BOOL Status of Safety Integrated Function Safe
Direction (SDI) in the negative direction of
rotation
1: SDI negative selected (still not active)
0: SDI negative deselected
ESRretractRequested BOOL Display of function module Extended stop and
retract (ESR)
1: ESR requested
0: ESR not requested
safetyMessageActive BOOL Display of safety messages in the drive:
© Siemens AG 2021 All rights reserved

1: Safety message active


0: No Safety message active
SLPrangeSelected BOOL Display oft he selected SLP position range
1: SLP range 2 selected
0: SLP range 1 selected
SLPselectedAndUser BOOL Stauts of user agreement for safe referencing
Agreement 1: SLP selected and user agreement set
0: SLP selected or user agreement not set
SDIpositive BOOL Status of Safety Integrated Function Safe
Direction (SDI) in the positive direction of
rotation
1: SDI positive selected (still not active)
0: SDI positive deselected
SDInegative BOOL Status of Safety Integrated Function Safe
Direction (SDI) in the negative direction of
rotation
1: SDI negative selected (still not active)
0: SDI negative deselected
testStopActive BOOL Status of test stop for Extended / Advanced
Safety Functions:
1: Test stop active
0: Test stop inactive
testStopRequired BOOL Display whether test stop has to be executed.
1: Test stop required
0: Test stop not required
referencePosition BOOL Display whether safe referencing has to be
Required executed
1: Reference position required
0: Reference position not required

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 71
2 Blocks of the library

Parameter Data type Description


referencePositionValid BOOL Status of reference position in the drive
1: Reference trigger command identified or
reference position valid
0: No reference trigger command identified or
reference position invalid
SLSlimit DWORD Display of the active SLS speed limit
(standardized via p2000, with sign)
4000 0000 hex = speed in p2000
brakeTestSelected BOOL SBT: State of selection
1: Brake test selected
0: Brake test deselected
setpointInput BOOL SBT: Selected setpoint source
1: Setpoint specification for the drive
0: Setpoint specification, external (controller)
activeBrake BOOL SBT: Active brake
1: Test brake 2 active
0: Test brake 1 active
brakeTestActive BOOL SBT: State of activation
1: Test active
0: Test inactive
brakeTestResult BOOL SBT: Result
© Siemens AG 2021 All rights reserved

1: Test successful
0: Test error
brakeTestCompleted BOOL SBT: Execution
1: Test run finished
0: Test incomplete
externalBrakeRequest BOOL SBT: State of the external brake
1: Colse brake
0: Open brake
currentLoadSign BOOL SBT: Active test direction
1: Negative sign
0: Positive sign
acceptanceTestSLP BOOL Display of acceptance test mode for SLP
selected 1: Acceptance test SLP (SE) selected
0: Acceptance test SLP (SE) deselected
acceptanceTestMode BOOL Display of acceptance test mode for setpoint
Selected limitation
1: Acceptance test mode selected
0: Acceptance test mode deselected

Table 2-50: Status- and error display of block LDrvSafe_SinaTlg701Status


Status Description Remedy/information
7000 No call
The block is not executed
7001 First block call
First block call after setting "enable"
7002 Subsequent block calls
Subsequent block calls until the block is
terminated

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 72
2 Blocks of the library

Status Description Remedy/information


8600 Undefined state Reset "enable" and execute the
The block internal statemachine was order again.
stopped because of an unknown error.
80XX Error during cyclic read An error occured during cyclic
communication. Check the correct
integration of the block (Further
information at \7\; The used block is
"GETIO_PART")

2.6 General function blocks


2.6.1 SafeVelocity

Fig. 2-38: Block SafeVelocity


© Siemens AG 2021 All rights reserved

Description
The function block is used to calculate the velocity in a safety-relevant fashion,
based on the safe position and the clock cycle counter.
The block can monitor both modulo as well as linear axes
• Minimum velocity for linear axes: 1 mm/min
• Maximum velocity for linear axes: 73 000 000 mm/min
• Minimum velocity for modulo axes: 1 °/s
• Maximum velocity for modulo axes: (¼ * ModuloRange) / Safety program cycle

Interface
Parameters
IN
EN Bool Enable input, not used
axisType Bool Axis type
Defines in which unit the velocity is calculated (p9502).
For a linear axis [0] in mm/min.
For a rotary axis [1] in °/s.
Default assignment: 0

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 73
2 Blocks of the library

Parameters
safePosition DInt Actual position of the axis
Position actual value of the axis in the 32-bit format
Default assignment:0
safePositionValid Bool Safe position actual value valid
The transferred position actual value of the PROFIsafe telegram is
valid
moduloRange DInt Modulo range
Defined value range of the rotary axis (p9505). 0.001° is entered
This input is only evaluated for an active rotary axis (axisType = 1).
safetyCycleCounter Int Clock cycle counter
Safety clock cycle counter
Default assignment:0
safetyMonitoringCycle DInt Monitoring clock cycle
Parameterized monitoring clock cycle of the safety functions
(p9500) in ms
Default assignment:12 ms
ack Bool Acknowledgment
Errors in the block are acknowledged with a rising edge.

OUT
actVelocity DInt Velocity
© Siemens AG 2021 All rights reserved

Calculated velocity in unit mm/min or °/s


error Bool Error
The error bit is set as soon as an error occurs in the block.
diag Int Diagnostic word
Provides information as to why the velocity calculation was not
successful
ENO Bool Enable for next block, not used

Bit Description Reset condition


0 The velocity is correctly calculated; however, the For very small position differences, the
result lies between 0 mm/min or °/s and 1 integer data type cannot be used to
mm/min or °/s. calculate the velocity. The result would lie
between 0 and 1.
1 Parameterizing error: An input variable does not Check the value range of the inputs:
correspond to the permissible value range. safePosition: -737 280 000 to 737 280 000
safetyMonitoringCycle: 1 to 25
moduloRange:0 to 737 280 000
2 The velocity cannot be calculated if a safe Ensure that you have interconnected bit
position is not available. "SafePositionValid" at the input, and this
has a HIGH signal
Signal "SafePositionValid" is transferred
from the drive with a certain delay, and in
the first clock cycle of the block results in
this error.
3 The parameterized modulo range is less than Check input "moduloRange". This must
the actual position value match parameter p9505 in the SINAMICS.
The input of the modulo range is realized in
0.001°.
4 Overflow of the value range when scaling the The maximum permissible velocity was
velocity unit to mm/min. exceeded. An additional calculation is not
possible.

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 74
2 Blocks of the library

Bit Description Reset condition


5 Overflow of the value range for the clock cycle The number of block calls must be
counter difference calculation increased (the F-OB cycle must be
decreased).
6 Internal calculation overflow Activate acknowledgment input "ack"

NOTE Jumps (chitter/noise) in the safe position can lead to availability problems
(Diag=16), since the block cannot distinguish between a change in direction of
rotation or an overflow.
The behavior is caused by high-resolution encoders at low operating speeds or
at standstill. The availability problems can occur at position value zero, or at the
positive and negative maximum, but do not lead to an unsafe condition.
In the case of availability problems at standstill at position zero, manual setting of
the safe position to a value other than zero provides a remedy.
To do this, a new position must be entered in the parameter list of the drive in
parameter p9572 "SI Motion reference position (Control Unit)". This position is
then accepted by setting parameter p9573 "SI Motion accept reference position
(Control Unit)". The value must be selected so that the safe position at standstill
only accepts values that are either in the positive or negative range.
© Siemens AG 2021 All rights reserved

Function
1. The block is based on the fundamental principle of the velocity calculation:
𝑃𝑜𝑠𝑑𝑖𝑓𝑓 = 𝑃𝑜𝑠𝑛𝑒𝑤 − 𝑃𝑜𝑠𝑜𝑙𝑑
𝐶𝑦𝑐𝑙𝑒 𝑑𝑖𝑓𝑓 = 𝑐𝑦𝑐𝑙𝑒 𝑐𝑜𝑢𝑛𝑡𝑒𝑟𝑛𝑒𝑤 − 𝐶𝑦𝑐𝑙𝑒𝑐𝑜𝑢𝑛𝑡𝑒𝑟𝑜𝑙𝑑
𝑇𝑖𝑚𝑒𝑑𝑖𝑓𝑓 = 𝐶𝑦𝑐𝑙𝑒𝑑𝑖𝑓𝑓 ∙ 𝑆𝑎𝑓𝑒𝑡𝑦𝑐𝑦𝑐𝑙𝑒
𝑃𝑜𝑠𝑑𝑖𝑓𝑓
𝑣 =
𝑇𝑖𝑚𝑒𝑑𝑖𝑓𝑓
2. The safe position transferred via PROFIsafe from the drive is interconnected at
input safePosition.
3. To be certain that the position value is valid, bit "Safe position valid" of the
PROFIsafe telegram is interconnected at input safePositionValid.
4. The cycle counter transferred from the drive is interconnected at input
safetyCycleCounter.
5. To calculate the time difference, the safety monitoring cycle
safetyMonitoringCycle (p9500) of SINAMICS is also required.
6. If the cycle difference of the block is zero, then the last calculated velocity is
output again. This step is repeated until a cycle difference occurs or the block
goes into the error state.
7. The calculated velocity is output formatted at ActVelocity. In order that the
velocity unit matches that of the drive, the user defines the type of linear axis
(FALSE) or rotary axis (TRUE) at input axisType.
8. In the rotary axis mode, the modulo range can be parameterized using input
moduloRange. This value is only valid in the "Rotary axis" mode.
9. Specifying a modulo range in the linear axis mode does not influence how the
block functions.
10. The error bit is set as soon as an error occurs in the block, and an error
number is displayed at Diag.
11. The user must specify the error response in the user program.

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 75
2 Blocks of the library

12. Acknowledgment is realized using a positive signal edge at input ack.


13. The precondition for using this block is active PROFIsafe communication
between the F-PLC and SINAMICS using telegram 902. (Telegram 901 can be
used with the appropriate scaling in the drive and reverse calculation in the
safety program).
© Siemens AG 2021 All rights reserved

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 76
2 Blocks of the library

2.6.2 Basics of acyclic communication (LAcycCom)

NOTE The subsequently described function blocks are called in the standard user
program. These are no failsafe blocks.

The following blocks use acyclic communication with DPV1 services. To ensure a
collision-free communication, the library LAcycCom is used. Below is a brief
description which blocks are needed for the LDrvSafe. All required blocks are
delivered with the LDrvSafe. Further information and the download for the library
LAcycCom are to be found at the according documentation \6\.

Open the project and the library "LAcycCom". Subsequently insert the marked
folder via drag&drop in your project:
Figure 2-39: Relevant blocks of LAcycCom
© Siemens AG 2021 All rights reserved

Subsequently call the block "LAcycCom_ResourceManager" in OB1 and connect


the block input "requestBuffer" with the data block "LAcycCom_RequestBuffer".
Connect the input "enable" according to your user program.
Figure 2-40: Connection of block ResourceManager

NOTICE Cyclic block call


The block "LAcycCom_ResourceManager" must be called every cycle of OB1.

The remaining in- and outputs are not relevant for further use with the library
LDrvSafe.

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 77
2 Blocks of the library

2.6.3 Common interface parameters

Because of the library "LAcycCom" there are identical inputs in the following
blocks.
These are connected as shown in the example with block "HwAcknowledge". The
block is subsequently connected with "Axis1" of SINAMICS S120.
Figure 2-41: Example connection

driveObjectId
Figure 2-42: Source of "driveObjectId"
© Siemens AG 2021 All rights reserved

Open "Devices & networks" in the project navigation. Mark the SINAMICS S120
and select the "Device view" (1). The device view lists all available modules. Select
the axis for which the Block should be used (2) and interconnect the input
"driveObjectId" with the corresponding drive object id.
Further information and the download for the library are found at the according
documentation for LAcycCom \6\.

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 78
2 Blocks of the library

hardwareId
Figure 2-43: Source of "hardwareId"

Navigate in the project navigation to the "Default tag table" and open it (1). Open
the tab "System constants" (2) and select the constant which name contains the
name of the control unit and the addition "ModuleAccessPoint" (3). Interconnect
this variable of the data type "Hw_SubModule" with the input "hardwareId".
Further information and the download for the library are found at the according
© Siemens AG 2021 All rights reserved

documentation for LAcycCom \6\.

requestBuffer
Set the input “enable” to “true” and connect the input "requestBuffer" with the data
block "LAcycCom_RequestBuffer".
Figure 2-44: RequestBuffer

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 79
2 Blocks of the library

2.6.4 SafeBrakeTest

Description
This function block is for the automatic execution of the Safety Integrated Function
Safe Brake Test (SBT) in combination with technology objects after an enabling
signal.

Principle of operation
Figure 2-45: Structure of block LDrvSafe_SafeBrakeTest
© Siemens AG 2021 All rights reserved

Interconnect the inputs “driveObjectId”, “hardwareId” and “requestBuffer” as


described in chapter Common interface parameters. Acyclic communication is
used to detect drive faults caused by the Safe Brake Test.
The input “axis” must be connected to the data block of the technology object of
the drive. Attach “statRecvBuf” of the data block “LDrvSafe_SinaTlg701Status_DB”
(SinaTlg701Status) to the signal “SinaTlg701_Status”. Additionally, the function
block “LDrvSafe_SinaTlg701Control” (SinaTlg701Control) must be called. At its
inputs, the brake test is set and the signals “selectBrakeTest” and “startBrakeTest”
are connected.
With a rising edge at block input “execute” the block is started. Afterwards, the
necessary Signals are set in order to execute the safe brake test. Further
information can be found in the SINAMICS S120 Safety Integrated Function
Manual Fehler! Verweisquelle konnte nicht gefunden werden..
When the signal at input “execute” is withdrawn before the order was executed, the
outputs “done” and “error” are set for only one cycle, the block execution is not
aborted.
As long as the block is executing the order, the output “busy” is set. Once the block
has finished execution, the output “busy” is reset and the output “done” is set until
“execute” is withdrawn.
The output “error” is set when an error occurs in the acyclic communication. If this
is the case, the bit “busy” is reset. Faults are only acknowledged with a falling edge
at block input “execute”. If the output “safetyAckReq” is set, too, a failsafe
acknowledge must be done after a falling edge at the input “execute”.
At the output “status” the actual block status is given out.

Execution
To start the brake test, it must be ensured that the drive is at standstill, no errors
are present at the technology object, the drive is switched on via the
"MC_POWER" block and the brake is released. The function block can then be

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 80
2 Blocks of the library

started via a rising edge at the "execute" input. This selects the SBT via the
"selectBrakeTest" output. Subsequently, the warning buffer of the drive is read out
via acyclic communication. If a warning occurred when selecting the SBT, the
brake test is deselected and the corresponding message is output at "status".
By selecting the SBT, the TO generates the technology alarm 550, which indicates
that the setpoints are to be tracked, since the drive executes drive-autonomous
movements because of the SBT. The message is automatically acknowledged by
reinitializing the TO via the "resetTo" output. For this purpose, the bit must be
connected to the "execute" input of the "MC-RESET" motion control module.
After the TO has been restarted, the brake test is performed. For this purpose, it is
started via the "startBrakeTest" output. The brake test procedure can be found in
the Safety Integrated S120 function manual (\4\)
If the brake test was completed successfully, the "done" output is set. If the brake
test failed, the "error" output is set and the cause of the error is displayed at
"status".

Interface
Table 2-51: Input parameters of block LDrvSafe_SafeBrakeTest
Parameter Data type Description
execute BOOL Execute
Starting the block with a rising edge.
Faults are acknowledged with a falling
© Siemens AG 2021 All rights reserved

edge.
A falling edge does not stop the
execution of the block.
axis TO_SpeedAxis Data block of the technology object of
the drive. The variable can also be of
another data type e.g.
TO_PositioningAxis..
driveObjectId USInt Drive Object No.
Identification of the drive via the object
number (Further information at \6\)
hardwareId HW_IO Hardware identifier
Identification of the drive via the
Hardware identifier (Further information
at /6/
SinaTlg701_Status LDrvSafe_typeSina Allocation of the PROFIsafe-telegram at
Tlg701Status the input of the block to the status of the
Safety Integrated functions.

Table 2-52: In-/Ouput parameters of block LDrvSafe_SafeBrakeTest


Parameter Data type Description
requestBuffer LAcycCom_typeRequestBuffer Connection to Request Buffer
data block

Table 2-53: Output parameters of block LDrvSafe_SafeBrakeTest


Parameter Data type Description
done BOOL Order completed
The block has executed the order successfully
busy BOOL Processing order

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 81
2 Blocks of the library

Parameter Data type Description


The block is busy. New output values can be
expected
error BOOL Fault
The error bit is set as soon as an error occurs in the
block.
status WORD Block status
Shows the actual status of the block. As soon as an
error occurs, the corresponding message code is
given out here
selectBrakeTest BOOL Allocation to the signal “selectBrakeTest” of SCC
startBrakeTest BOOL Allocation to the signal “startBrakeTest” of SCC
resetTo BOOL Allocation to the signal “execute” of Motion Control
block “MC_Reset”
safetyAckReq BOOL Safe acknowlede necessary
Indicates that a safe acknowledgement must be
executed by the operator

Table 2-54: Status- and error display of block LDrvSafe_SafeBrakeTest


Status Description Remedy/information
0000 Order completed
The current order is completed
© Siemens AG 2021 All rights reserved

7000 No call
The block is not executed
7001 First block call
First block call after setting “execute”
7002 Subsequent block calls
Subsequent block calls until the block
is terminated
8400 SBT When selected, the brake is Compare A01780 of the drive in the
closed list manual
8401 SBT brake opening time exceeded Compare A01781 of the drive in the
list manual
8402 SBT brake test incorrect control Compare A01782 of the drive in the
list manual
8403 SBT brake closing time exceeded Compare A01783 of the drive in the
list manual
8404 SBT brake test canceled with fault Compare A01784 of the drive in the
list manual
8405 SBT brake test configuration error Compare A01785 of the drive in the
list manual
8406 SCC signal source changed Compare F01786 of the drive in the
list manual
8407 SBT motor type different Compare F01787 of the drive in the
list manual
8611 Undefined state Reset “execute” and execute the
The block internal statemachine was order again.
stopped because of an unknown Also indicates undefined status of
error. the subordinate block
“WriteDriveSingleParam”.
86XX Error during acyclic write An error occurred during acyclic
communication. Check the correct

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 82
2 Blocks of the library

Status Description Remedy/information


integration of LAcycCom (Further
information at \6\; The following
block was used:
“WriteDriveSingleParam”)
© Siemens AG 2021 All rights reserved

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 83
2 Blocks of the library

2.6.5 SafeReferencing

Description
This function block is for setting a safe absolute position in the drive. The safe
absolute position is needed for the Safety Functions SLP, SP and SCA.

Principle of operation
Figure 2-46: Structure of block LDrvSafe_SafeReferencing
© Siemens AG 2021 All rights reserved

Interconnect the inputs "driveObjectId", "hardwareId" and "requestBuffer" as


described in chapter Common interface parameters
.Acyclic communication is used to write the necessary drive parameters as well as
to detect drive faults caused by safe referencing.

With the input "setReference", the position connected to "actPosition" is transferred


to the drive (p9572) and confirmed (p9573 = 89). When the position was
successfully confirmed, the output "referenced" is set. If the user agreement was
not given before, the bit "userAgreement1Required" is set additionally.

The user agreement is needed to safely reference the drive. Further information
about safely referencing the drive is found in the SINAMICS S120 Safety
Integrated Function Manual Fehler! Verweisquelle konnte nicht gefunden
werden.. The routine for setting the user agreement is as follows:
1. Check if output "userAgreement1Required" is active
2. When the output is set, generate a rising edge at input "userAgreement1"
(p9726 = AChex)
3. Check if output "userAgreement2Required" is active
4. When the output is set, there is a 4 second time window to generate a rising
edge at input "userAgreement2" (p9740 = AC hex). Otherwise an error message
is given out.
5. If the procedure was successful, the output "safelyReferenced" is set, the drive
is safely referenced

When an error occurs in the block, the output "error" is set; "status" shows the fault
number. Errors are only acknowledged with a negative edge at input "enable".

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 84
2 Blocks of the library

NOTE The drive state is not checked periodically. Switch on the block with "enable =
true" when you want to safely reference a drive. Afterwards switch it off with
"enable = false".

NOTE When the block Safe Referencing is used in conjunction with TOs, it is required
to convert the data type of the input connect to "actPosition" into "REAL".

NOTE For setting the user agreement, "setUserAgreement1" must be set first and
subsequently "setUserAgreement2".
Both signals must not be connected to the same source.

Figure 2-47: Procedure safe referencing


© Siemens AG 2021 All rights reserved

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 85
2 Blocks of the library

Interface
Table 2-55: Input parameters of block LDrvSafe_SafeReferencing
Parameter Data type Description
enable BOOL Activation
Activating the block with a rising edge.
Acknowledging faults with a falling edge.
actPosition REAL Actual position
Actual position of the drive as provided from the
controller
setReference BOOL Set reference position
Transferring the position "actPosition" to the drive
and confirming this position as new safe position
in the drive
setUserAgreement1 BOOL User agreement 1
Step 1 of user agreement
setUserAgreement2 BOOL User agreement 2
Step 2 of user agreement. This input has to be set
within four seconds after "setUserAgreement1"
was set, to safely reference the drive.
driveObjectId INT Drive Object No.
Identification of the drive via the object number
(Further information at \6\)
© Siemens AG 2021 All rights reserved

hardwareId HW_IO Hardware identifier


Identification of the drive via the Hardware
identifier (Further information at \6\)

Table 2-56: In-/Output parameters of block LDrvSafe_SafeReferencing


Parameter Data type Description
requestBuffer LAcycCom_type Connection to Request Buffer data block
RequestBuffer

Table 2-57: Output parameters of block LDrvSafe_SafeReferencing


Parameter Data type Description
valid BOOL Block active
The block is active, there are no faults and all
output signals are valid
busy BOOL Processing order
The block is busy. New output values can be
expected.
error BOOL Fault
The error bit is set as soon as an error occurs in
the block.
status DWORD Block status
Shows the actual status of the block. As soon as
an error occurs, the corresponding message code
is given out here
referenceRequired BOOL Referencing needed
The drive is not referenced; this can be started
with the input "setReference".
referenced BOOL Referenced
The drive is referenced.

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 86
2 Blocks of the library

Parameter Data type Description


userAgreement1 BOOL User agreement 1 required
Required To safely reference the drive, user agreement 1
"setUserAgreement1" must be given.
userAgreement2 BOOL User agreement 2 required
Required This output is set when the first user agreement is
given. The user has four seconds to give the
second user agreement with
"setUserAgreement2"
safelyReferenced BOOL Safely referenced
The drive is safely referenced. The safe position
is valid.

Table 2-58: Status- and error display of block LDrvSafe_SafeReferencing


Status Description Remedy/information
7000_0000 No call
The block is not executed
7001_0000 First block call
First block call after setting
"enable"
7002_0000 Subsequent block calls
Subsequent block calls until
© Siemens AG 2021 All rights reserved

the block is terminated


8001_03EA Safety message The second user agreement was not set
User agreement on both within four seconds.
inputs is different after Note that the rising edge at block input
expiration of the timer "setUserAgreement2" is only evaluated
when the output
"userAgreement2Required" is "TRUE"
8001_03EB Safety message The difference between the actual
Tolerance exceeded position and the last valid safe position
before switching off the SINAMICS
(remanently stored in the SINAMICS) is
greater than the parameterized tolerance
(p9544).
8001_03EC Safety message • The user agreement was given
Plausibility error at user again on a safely referenced drive
agreement • The user agreement was given
although the drive is not referenced.
8600_0000 Undefined state Reset "enable" and execute the order
The block internal again.
statemachine was stopped
because of an unknown
error.
8601_XXXX Error during acyclic read An error 87ccurred during acyclic
8602_XXXX Error during acyclic write communication. Check the correct
integration of LAcycCom (Further
information at \6\ The following blocks
were used: “ReadDriveParams” and
“WriteDriveSingleParam”)

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 87
2 Blocks of the library

2.6.6 HwAcknowledge

Description
This function block is used for adapting hardware checksums when using
Extended/Advanced Safety Functions and hardware is changed e.g. at series
commissioning.

Principle of operation
Figure 2-48: Structure of block LdrvSafe_HwAcknowledge

Interconnect the inputs “driveObjectId”, “hardwareId” and “requestBuffer” as


described in chapter Common interface parameters
© Siemens AG 2021 All rights reserved

The acyclic communication is used to detect drive faults caused by the Safe Brake
Test. The acyclic communication is used to write the necessary drive parameters
and to detect drive faults caused by the component exchange.

With a rising edge at block input “execute” the block is started. Subsequently the
sequence of acyclic write requests is started which is necessary to acknowledge
tha hardware change. Further information to this topic is found in SINAMICS S120
Safety Integrated Function Manual Fehler! Verweisquelle konnte nicht gefunden
werden..
When the signal at input “execute” is withdrawn before the order was executed, the
outputs “done” and “error” are set for only one cycle, the block execution is not
aborted.
In case the input “enableRamToRom” is set when a rising edge is detected at block
input “execute”, additionally the drive parameters are stored in the non-volatile
ROM.
As long as the block is executing the order, the output “busy” is set. Once the block
has finished execution, the output “busy” is reset and the output “done” is set until
“execute” is withdrawn.
The output “error” is set when an error occurs in the acyclic communication. If this
is the case, the bit “busy” is reset. Faults are only acknowledged with a falling edge
at block input “execute”.

At the output “status” the actual block status is given out.

NOTE If you acknowledge the exchange of several drive objects of a device, wait after
each RAM to ROM until “busy” is set to “false” again.
Alternatively, carry out a RAM to ROM of the entire device after all blocks.

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 88
2 Blocks of the library

Interface
Table 2-59: Input parameters of block LdrvSafe_HwAcknowledge
Parameter Data type Description
execute BOOL Execute
Starting the block with a rising edge. Faults are
acknowledged with a falling edge.
A falling edge does not stop the execution of the
block.
enableRamToRom BOOL Copy RAM to ROM
When this input is set, additionally all drive
parameters are saved in the non-volatile ROM
driveObjectId INT Drive Object No.
Identification of the drive via the object number
(Further information at \6\)
hardwareId HW_IO Hardware identifier
Identification of the drive via the Hardware identifier
(Further information at \6\)
mode BOOL Mode of hardware acknowledge
False: Hardware acknowledge with p9702
True: Hardware acknowledge with safety
commissioning
© Siemens AG 2021 All rights reserved

Table 2-60: In-/Ouput parameters of block LdrvSafe_HwAcknowledge


Parameter Data type Description
requestBuffer LAcycCom_type Connection to Request Buffer data block
RequestBuffer

Table 2-61: Output parameters of block LdrvSafe_HwAcknowledge


Parameter Data type Description
done BOOL Order completed
The block has executed the order successfully
busy BOOL Processing order
The block is busy. New output values can be expected.
Error BOOL Fault
The error bit is set as soon as an error occurs in the
block.
Status WORD Block status
Shows the actual status of the block. As soon as an
error occurs, the corresponding message code is given
out here

Table 2-62: Status- and error display of block LdrvSafe_HwAcknowledge


Status Description Remedy/information
0000 Order completed
The current order is completed
7000 No call
The block is not executed

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 89
2 Blocks of the library

Status Description Remedy/information


7001 First block call
First block call after setting
“execute”
7002 Subsequent block calls
Subsequent block calls until the
block is terminated
8600 Undefined state Reset “execute” and execute the
The block internal statemachine order again.
was stopped because of an Also indicates undefined status of the
unknown error. subordinate block
“WriteDriveSingleParam”.
86XX Error during acyclic write An error 90ccurred during acyclic
communication. Check the correct
integration of LAcycCom (Further
information at \6\; The following block
was used: “WriteDriveSingleParam”)
© Siemens AG 2021 All rights reserved

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 90
2 Blocks of the library

2.7 Winder application


2.7.1 Description

Winder applications involve feeding material (e.g. foil, rubber, paper) to a specific
process (e.g. printing, labeling, coating) with a constant web velocity.
Figure 2-49: Description winding application

If the material is being unwound, then as the radius of the roll decreases, the
speed setpoint of the unwinder must be increased so that the web velocity is kept
constant. The situation is the inverse when winding.

Safety requirements of this application:


© Siemens AG 2021 All rights reserved

• The maximum web velocity must be monitored


• Set-up operation where the web velocity is safely monitored
In both of these use cases, the web velocity is monitored and compared safely with
a parameterizable maximum value (SLS limit value). A parameterizable stop
response is initiated if the axis exceeds the currently valid SLS limit value.
The objective is to measure the roll radius in a failsafe way and, depending on the
roll radius, monitor the speed of the axis in a failsafe way. The application shall be
designed for PLd in accordance to EN ISO 13849-1.

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 91
2 Blocks of the library

2.7.2 Solution

The Safety concept involves measuring the roll radius using two redundant
distance sensors. The measured values are then read into the F-PLC via two
different diverse data paths.
In the F-PLC the safe speed limit is calculated depending on the roll radius and as
a function of this radius, the SLS limit of the SINAMICS S120 is adapted via
PROFIsafe.
Figure 2-50: Solution winding application
© Siemens AG 2021 All rights reserved

2.7.3 Requirements for the distance sensors

Two different distance sensors with different measuring ranges and measuring
principles (e.g. current and voltage) must be used to exclude common cause
failures (CCF according to EN ISO 13849-1).
When selection the distance sensors, make sure that the sensors have a
measuring range that is suitable for the application.

NOTICE Measuring range of the distance sensors


The distance sensors have to be designed in a way that all input values of the
blocks WinderRadius and WinderSLS are covered by the measuring ranges of
the distance sensors.

NOTICE Wiring of the distance sensors


Make sure that the distance sensors are wired correcty (current/voltage input);
otherwise fault-free operation can no longer be guaranteed.

In order to be able to calculate the safety chain, use sensors that provide safety-
related characteristic values (e.g. MTTFd). Information concerning those values can
be taken from the data sheet or requested from the manufacturer.
The distance sensors are not part of this application description and therefore not
considered any further.

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 92
2 Blocks of the library

2.7.4 Permissible hardware

The following hardware from SINAMICS is permitted:


Table 2-63: Permissible hardware
Permissible hardware SINAMICS Article number
Terminal Board 30 6SL3055-0AA00-2TA0
Terminal Module 31 6SL3055-0AA00-3AA1
Terminal Module 41 6SL3055-0AA00-3PA1
CU310-2 DP from firmware V4.5 6SL3040-1LA00-0AA0
CU310-2 PN from firmware V4.5 6SL3040-1LA01-0AA0
CU320-2 DP from firmware V4.5 6SL3040-1MA00-0AA0
CU320-2 PN from firmware V4.5 6SL3040-1MA01-0AA0
All versions of SIMOTION D

2.7.5 Permissible hardware setup

The hardware setup has to be diverse to exclude common cause failures (CCF
according to EN ISO 13849-1).
Therefore distance sensor 1 is connected to a central or decentral analog input
© Siemens AG 2021 All rights reserved

module of the SIMATIC series. The measured values are transferred to the F-PLC
via backplane bus or PROFIBUS/PROFINET.
Distance sensor 2 is connected to an analog input of SINAMICS S120 via TB30,
TM31, TM41 or onboard analog input of CU310-2. The measured values are
transferred to the F-PLC via PROFIBUS/PROFINET.
Diversity is therefore given up to the transfer via PROFIBUS/PROFINET or up to
the process image of the inputs of the F-PLC.

CAUTION Component replacement


When replacing components only components of the same type (manufacturer,
type number, same parameterization so both characteristics respectively scaled
values match) may be used.

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 93
2 Blocks of the library

Central setup with CU320-2 and TB30


Figure 2-51: Central setup with CU320-2 and TB30
© Siemens AG 2021 All rights reserved

Central setup with CU320-2 and TM31 or TM41


Figure 2-52: Central setup with CU320-2 and TM31 or TM41

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 94
2 Blocks of the library

Central setup with CU310-2


Figure 2-53: Central setup with CU310-2
© Siemens AG 2021 All rights reserved

Central setup with CU310-2 and TM31 or TM41


Figure 2-54: Central setup with CU310-2 and TM31 or TM41

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 95
2 Blocks of the library

Decentral setup with CU320-2 and TB30


Figure 2-55: Decentral setup with CU320-2 and TB30
© Siemens AG 2021 All rights reserved

Decentral setup with CU320-2 and TM31 or TM41


Figure 2-56: Decentral setup with CU320-2 and TM31 or TM41

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 96
2 Blocks of the library

Decentral setup with CU310-2


Figure 2-57: Decentral setup with CU310-2

Decentral setup with CU310-2 and TM31 or TM41


© Siemens AG 2021 All rights reserved

Figure 2-58: Decentral setup with CU310-2 and TM31 or TM41

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 97
2 Blocks of the library

2.7.6 General instructions

Manipulation of input data


Interconnet the physical input addresses directly. When using a coupling DB it is
CAUTION
not ensured that the manipulation is detected. In case of a direct interconnection
a change also affects the F-signature and is therefore detected.

No automated error reaction


The error reaction must be initiated by the user.
CAUTION If an error occurs on at least one component of the application, the radius and
the SLS value must no longer be evaluated. The error reaction must be initiated.

Re-parameterization of the distance sensors


If it is possible to re-parameterize the measuring system or there are special
functions (e.g. intermediate storage of values) which suspend require additional
WARNING
diagnostic measures they have to be excluded by the user. Otherwise the use in
a safety-related application is not permitted.
© Siemens AG 2021 All rights reserved

Overwriting of data areas


Data areas which contain the measured values must not be overwritten in any
case. Once configuration has been completed this has to be verified, e.g. with a
WARNING
cross reference check. The failsafe block cannot always detect specific
manipulation.

NOTICE Configuration control


Configuration control/option handling is not permissible in conjunction with this
application.

Passing the full measuring range


To exclude various fault models it is necessary to check the A-D converters of the
analog modules for correct function in a defined interval.
The determination of the test interval is the users responsibility. He has to decide
on varous criteria how often the test has to be performed.
• How often the measuring range is passed in regular operation?
• What are the MTBF-values of the used modules/sensors?
• Can stuck-at errors be excluded (frequent module exchange or similar)?
As lower limit, a duration of one year is set. At least once a year the entire
measuring range must be passed. It is mandatory to examine the upper and lower
limit.

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 98
2 Blocks of the library

In this measure the modules must be examined for a potentially available drift. For
this purpose it is possible to verify the measured value with known value and start
a (possibly necessary) calibration of the module.

CAUTION Disregarding the test interval


Within the scope of tets it is necessary to pass the entire measuring range of the
process to be monitored to exclude a drift of the modules.
© Siemens AG 2021 All rights reserved

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 99
2 Blocks of the library

2.7.7 Commissioning

Please use the Excel-file "LDrvSafe_Winder_Commissioning.xlsm", which supports


the commissioning of this application.
Enter all data (green marked cells) in worksheet "Parameter” (1). After confirming
the entered data with command button "Confirm” (2), the parameter values for the
function blocks (yellow marked cells) are calculated.
Furthermore you can reset all inputs to factory settings (3).
Figure 2-59: Commissioning example: Enter sensor values and calculation of block
interconnection
© Siemens AG 2021 All rights reserved

2 3

1 4

With the diagram you can have a look at the trend of the SLS limit and compare
with standard velocity.
The sequence of the program is shown in worksheet "Example" (4).

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 100
2 Blocks of the library

2.7.8 Function sequence

In the following all values which relate to distance sensor 1 are shown blue, all
values which relate to distance sensor 2 are shown in orange. This serves better
clarity.

CAUTION Wiring of the distance sensors


The distance sensor which has the smaller minimum measured value (see data
sheet of the sensors) must be connected to the analog input module of SIMATIC.

Scaling of distance sensors


In the standard user program of SINAMICS (e.g. Drive Control Chart or Structured
Text in SIMOTION, …) both distance sensors have to be scaled. Objective is that
both sensors give the same analog value for the same distance.
Figure 2-60: Characteristic curve distance sensor 1
© Siemens AG 2021 All rights reserved

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 101
2 Blocks of the library

Figure 2-61: Characteristic curve distance sensor 2

The measuring range of distance sensor 2 is scaled to the measuring range of


distance sensor 1 with the following formula:
© Siemens AG 2021 All rights reserved

𝑚𝑎𝑥𝑉𝑎𝑙𝑆2 − 𝑚𝑖𝑛𝑉𝑎𝑙𝑆2 27648


𝑎𝑐𝑡𝑉𝑎𝑙𝑆2𝑆𝑐𝑎𝑙𝑒𝑑 = (𝑎𝑐𝑡𝑉𝑎𝑙𝑆2 ∗ + 𝑚𝑖𝑛𝑉𝑎𝑙𝑆2 − minValS1) ∗
27648 maxValS1 − minValS1

Table 2-64: Formula for scaling the distance sensors – Explanation of the used
abbreviations
Abbreviation Description
actValS2Scaled Scaled value of distance sensor 2, referred to the measuring range of
distance sensor 1, so both sensors give the same analog value for
the same distance
actValS2 Current measured value of distance sensor 2
maxValS2 Maximum measured value of distance sensor 2 according to
datasheet
minValS2 Minimum measured value of distance sensor 2 according to
datasheet
maxValS1 Maximum measured value of distance sensor 1 according to
datasheet
minValS1 Minimum measured value of distance sensor 1 according to
datasheet

Masking the measured value of the distance sensor in SINAMICS


The measured value of the distance sensor connected to SINAMICS (in the
following distance sensor 2 or S2) is masked in the standard user program of
SINAMICS. This can be realized with the programming language Structured Text in
SIMOTION or DCC in SINAMICS.
There, the following conversion takes place:

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 102
2 Blocks of the library

𝑎𝑐𝑡𝑉𝑎𝑙𝑆2𝑆𝑐𝑎𝑙𝑒𝑑
𝑚𝑎𝑠𝑘𝑒𝑑𝑉𝑎𝑙𝑢𝑒 = + 𝑜𝑓𝑓𝑠𝑒𝑡
𝑓𝑎𝑐𝑡𝑜𝑟

Table 2-65: Formula for masking the distance sensors – Explanation of the used
abbreviations
Abbreviation Description
maskedValue Masked and scaled value of distance sensor 2
actValS2Scaled Scaled value of distance sensor 2, referred to the
measuring range of distance sensor 1
factor Is used for masking the measured value. Measured value
is divided by "factor"
offset Is used for masking the measured value. Previous result of
the division is added to "offset".

The parameters "factor" and "offset" are fixed values and must not be changed.
A sign change of the masked value "maskedValueS2" is expected after ever call of
the safety user program in the F-PLC. The standard user program of SINAMICS
has to evaluate that expectation to send the masked value to the F-PLC with a
positive or negative sign.
The scaled measured value of distance sensor 2 "actValS2Scaled" and the
masked value "maskedValue" are in each case transferred in a 16bit format to the
F-PLC with a cyclic standard telegram.
© Siemens AG 2021 All rights reserved

With these measures errors during the not safe data transmission between
SINAMICS and F-PLC can be detected.
Characteristics of parameter "factor":
• "factor" must be chosen greater than "1"
• The larger "factor" the less precise is the subsequently unmasked value. The
maximum deviation of the unmasked value "actValS2Scaled" and the masked
value "maskedValue" is "factor"
• Recommendation: Choose "factor" with value "2" to achieve the highest
accuracy
• When multiple sensors are connected to the SINAMICS, "factor" must be
unique for every sensor to exclude an interchange of sensors.
Characteristics of parameter "offset":
• "offset" must be chosen samller than (32767 – 32767/"factor"), otherwise the
limits of integer range are exceeded.
• The larger "offset" the smaller error factors are detected.
• Recommendation: Choose "offset" with values beginning from "2000" so that
errors from 0.1% of the analog measured value are detected.
• When multiple sensors are connected to the SINAMICS, "offset" must be
unique for every sensor to exclude an interchange of sensors.

Masking of the measured values


When monitoring more than one winder in a F-PLC, the interchanging of
measured values/distance sensors must be excluded.
WARNING
This can be achieved by e.g. different masking of the measured values of the
distance sensors. Every subsystem mus be masked with its own data set. The
data sets must be different in a way that an interchange of values is detected.

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 103
2 Blocks of the library

Evaluation of QBAD and value status in the safety part of the F-PLC

CAUTION Evaluation of QBAD and value status


The value status of the standard analog input module of SIMATIC as well as the
QBAD signal of the PROFIsafe telegram to the SINAMICS must be evaluated in
the failsafe user program.

To detect data loss or falsification during data transmission, the signals "QBAD" of
the PROFIsafe F-IO-DB of SINAMICS and the value status of the analog input
module to which the distance sensor is connected must be monitored in the failsafe
program of the F-PLC.
As soon as the "QBAD" signal delivers the value "true" or the value status returns
"false" there is an error. The error reaction must be definded from the user.
Figure 2-62: Evaluation QBAD and value status

You find the "QBAD" signal in the project unter the F-PLC "Program blocks >
System blocks > STEP 7 Safety > F-IO data blocks". In this example the
© Siemens AG 2021 All rights reserved

PROFIsafe F-IO-DB is called "F00010_DOSERVO_1". With the addition ".QBAD"


thus "F00010_DOSERVO_1.QBAD" you receive the signal.
Figure 2-63: QBAD

You enable the value status of the analg input module in the device configuration.
Click on the analog input module and select the tab "Properties > General >
Module parameters > AI configuration" and check the checkbox "Value Status".

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 104
2 Blocks of the library

Figure 2-64: Evaluation of value status


© Siemens AG 2021 All rights reserved

In the tab "IO tags" you find all input variables of the analog input module. The
value status is available for ever channel. Select the channel to which the distance
sensor is connected and assign a variable name. In this example channel 0 is used
and the variable "analogInputS1VS" is created.
Figure 2-65: Creating a variable for the value status

Unmasking the measured value of the distance sensor in the safety part of the F-PLC
To detect errors in data transmission of both values the masked value is unmasked
again in the safety user program of the F-PLC.
For this task the block UnmaskedValueCalculation is available.

Discrepancy monitoring
The transferred scaled and masked measured value of distance sensor 2
"maskedValue" and the unmasked value of distance sensor 2 "unmaskedValue"
are checked for equality minus a parameterizable tolerance. When both values are
different (both values differ more than the parameterizable tolerance) it can be
assumend that one measured value was falsified.

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 105
2 Blocks of the library

For this task the block DiscrepancyMonitoring is available.


The "tolerance" must be set to at least to the value of "factor" to compensate
inaccuracies from the division with integers. Are both values ("maskedValue" and
"actValS2Scaled") up do date when sending the telegram, this is the recommended
value.

Averaging the measured values of the distance sensors (optional)


The measured value of distance sensor 2 "unmaskedValue" and the measured
value of the distance sensor connected the the SIMATIC (in the following distance
sensor1 or S1) could show peaks or signal noise. Therefore over an user defined
duration the average value can be calculated.
For this task the block AverageValueCalculation is available.

Calculation of the current radius


From the unmasked value of distance sensor 2 "unmaskedValue" and the
measuring value of distance sensor 1 the current roll radius is calculated.
For this task the block WinderRadius is available.

Discrepancy Monitoring
The both calculated radii "calcRadiusS1" and "calcRadiusS2" are checked for
equality minus a parameterizable tolerance. When both values are different (both
values differ more than the parameterizable tolerance) it can be assumend that one
measured value was falsified.
© Siemens AG 2021 All rights reserved

For this task the block DiscrepancyMonitoring is available.


To detect a frozen distance sensor the discrepancy monitoring must be executed
until the values from the distance sensors have changed by at least the "tolerance",
set at the block input.

Calculation of SLS limit


Subsequently the SLS-Limit (Safety Integrated Function "Safely-Limited Speed of
the SINAMICS S120") is updated depending on the calculated current average
radius.
For this task the block WinderSLS is available.

Transferring the calculated SLS limit


The previously calculated SLS limt has to be transferred to the SINAMICS via
PROFIsafe.
For this task, the block SinaTlg902Control is available.

Setting SLS limit 1 of SINAMICS S120


To create an absolute reference with the previosely calculated SLS limit
"variableSLS", the Safety Function SLS (Safely-Limited Speed) of the SINAMICS
S120 must be parameterized as follows:

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 106
2 Blocks of the library

Figure 2-66: Parameterizing SLS limit 1

(1) Enabling the variable SLS limit 1 via PROFIsafe (p9501.24)


(2) Setting the time between selection SLS and SLS active (p9551)

Activating the new SLS limt value via PROFIsafe


When a lower SLS limit is transferred via PROFIsafe, the limit becomes active
after a delay time (p9551) (2) is expired.
© Siemens AG 2021 All rights reserved

WARNING
The delay time is restarted when a lower SLS limit is transferred.
This means that a continuous reduction of the SLS limit fron the user program of
the S7 continuously restarts the delay time (p9551) (2).
The delay time must be set to a value so the new SLS limit becomes active in
time. It may be useful setting the delay time to 0ms.

(3) Entering the SLS limit in limit 1 (p9531[0]), calculation according to formula:
𝑤𝑒𝑏𝑉𝑒𝑙𝑜𝑐𝑖𝑡𝑦
𝑝9531[0] =
2 ∗ 𝜋 ∗ 𝑚𝑖𝑛𝑅𝑎𝑑𝑖𝑢𝑠

Table 2-66: Formula for calculating the absolute SLS limit – Explanation of the used
abbreviations
Abbreviation Description
p9531[0] Parameter for the first SLS limit of SINAMICS S120
webVelocity Web velocity to be monitored, e.g. 15 m/min
minRadius Roll radius without material wound up, e.g. 0.1 m

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 107
2 Blocks of the library

2.7.9 UnmaskedValueCalculation

Description
This function block is used for unmasking signals of the data type integer. Thus,
previousely masked values can be unmasked to deteckt faults during unsafe data
transmission (Corruption, freezing).

Principle of operation
Figure 2-67: Structure of block LDrvSafe_UnmaskedValueCalculation

NOTICE Value range of the actual measuring value of the distance sensor
The actual unmasked value "unmaskedValue" must be in a value range of 1 to
© Siemens AG 2021 All rights reserved

32767, the negative values at the input "maskedValue" serve the purpose of
detecting a frozen process image on SIMATIC and SINAMCIS.

At the block input "maskedValue" the scaled and masked measuring value of
distance sensor 2 is interconnected by the user. This value is transferred via
standard protocol from SINAMICS to the F-PLC.
The block output "toggle" indicates wheter this value is transferred with a positive
or negative sign. This means the output "toggle" is transferred to the SINAMICS, at
the input "maskedValue" the scaled and masked value of distance sensor 2 arrives
with positive or negative sign from the SINAMICS.
• Expectation at "toggle" = false: Positive value at input "maskedValue"
• Expectation at "toggle" = true: Negative value at input "maskedValue"
The bit "toggle" is inverted after every pass of the function block.
The block internally executes the following calculation:
𝑢𝑛𝑚𝑎𝑠𝑘𝑒𝑑𝑉𝑎𝑙𝑢𝑒 = (|𝑚𝑎𝑠𝑘𝑒𝑑𝑉𝑎𝑙𝑢𝑒| – 𝑜𝑓𝑓𝑠𝑒𝑡) ∗ 𝑓𝑎𝑐𝑡𝑜𝑟
Table 2-67: Formula for unmasking the distance sensors – Explanation of the used
abbreviations
Abbreviation Description
unmaskedValue Unmasked value of distance sensor 2
maskedValue Masked and scaled value of distance sensor 2
offset Is used for unmasking the measured value of distance sensor 2,
"offset" is substracted from the masked value
factor Is used for unmasking the measured value of distance sensor 2,
previous result of the subtraction is multiplied with "factor"

The parameters "factor" and "offset" must be the same as the parameters from
masking

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 108
2 Blocks of the library

Masking the measured value of the distance sensor in SINAMICS.

NOTICE No error detection in data transmission


When the output "unmaskedValue" returns the value "0", corruption during data
transmission of the measured values from SINAMICS to the F-PLC cannot be
fully detected.
This is not covered by this function block! This fault can be detected by a
following discrepancy monitoring. For this task you can use the block
DiscrepancyMonitoring.

When the block detects an error, the output "error" is set. "toggle" takes the value
"false" and the output "unmaskedValue" returns the value "0". The error cause is
displayed at the output "diag".
The output "ackReq" is set when "error" is active an all conditions that led to that
error are remedied.
Acknowledgement is done with a rising edge on the input "ack" and only possible
when "error" is set.

Interface
Table 2-68: Input parameters of block LDrvSafe_UnmaskedValueCalculation
Parameter Data type Description
maskedValue INT Masked value
© Siemens AG 2021 All rights reserved

• Value which is unmasked by this block


• Permissible value range:
-32767 ≤ "maskedValue" ≤ 32767
factor INT Factor
• Formula with which the masked value is unmasked:
unmaskedValue = (|maskedValue| − 𝑜𝑓𝑓𝑠𝑒𝑡) ∗
𝑓𝑎𝑐𝑡𝑜𝑟
• Permissible value range:
1 ≤ "factor" ≤ 32767
• Default: "2"
offset INT Offset
• Formula with which the masked value is unmasked:
unmaskedValue = (|maskedValue| − 𝑜𝑓𝑓𝑠𝑒𝑡) ∗
𝑓𝑎𝑐𝑡𝑜𝑟
• Permissible value range:
1 ≤ "offset" ≤ 32767
• Default: "2000"
ack BOOL Acknowledgement
• Faults at the block are acknowledged with a rising
edge
• Acknowledgement is only possible when "error" is
set and a rising edge is detected at "ack"

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 109
2 Blocks of the library

Table 2-69: Output parameters of block LDrvSafe_UnmaskedValueCalculation


Parameter Data type Description
toggle BOOL Detecting a frozen process image of F-PLC and
SINAMICS
• Expectation at "toggle" = "false":
1 ≤ "maskedValue" ≤ 32767
• Expectation at "toggle" = "true":
-32767 ≤ "maskedValue" ≤ -1
Inverting of "toggle" after every pass of the function
block
unmaskedValue INT Unmasked value
Formula with which the masked value is unmasked:
unmaskedValue = (|maskedValue| − 𝑜𝑓𝑓𝑠𝑒𝑡) ∗ 𝑓𝑎𝑐𝑡𝑜𝑟
error BOOL Error
• This bit is set as soon as an error occurs in the
block
• Reset "toggle" to the value "false"
ackReq BOOL Acknowledgement necessary
Shows that "error" is pending and all causes which
led the the error are remedied
diag WORD Error diagnostics
Shows detailed information for the error
© Siemens AG 2021 All rights reserved

Table 2-70: Structure of diagnostic word LDrvSafe_UnmaskedValueCalculation


diag Description
Bit 0 Implausible value
Value "maskedValue" out of permissible value range
Remedy
Adapt value range -32767 ≤ "maskedValue" ≤ 32767
Bit 1 Implausible value
Value "factor" out of permissible value range
Remedy
Adapt value range 1 ≤ "factor" ≤ 32767
Bit 2 Implausible value
Value "offset" out of permissible value range
Remedy
Adapt value range 1 ≤ "offset" ≤ 32767
Bit 3 Process image frozen
• At "toggle" = "false" the value at input "maskedValue" is negative
• At "toggle" = "true" the value at input "maskedValue" is positive
Remedy
• Check that communication is established between F-PLC and SINAMICS
• Faster transmission of the masked value from SINAMICS to F-PLC
• Increasing the cycle time of the failsafe program in the F-PLC
• Replacement of the defective Hardware
Bit 4 Implausible value
Value "unmaskedValue" is negative
Remedy
• Check the masked value "maskedValue"
• Check that the parameter "offset" and "factor" at this block matches the
parameters for masking on the SINAMICS side

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 110
2 Blocks of the library

diag Description
Bit 5 Overflow detected
The unmasking unmaskedValue = (|maskedValue| − 𝑜𝑓𝑓𝑠𝑒𝑡) ∗ 𝑓𝑎𝑐𝑡𝑜𝑟 would
cause an overflow of the data type integer
Remedy
Check parameters "offset" and "factor"

NOTE Occurance of multiple errors:


Up to acknowledgement only the error which appeared first is displayed in the
diagnostic word. After acknowledgement the errors are shown in the diagnostic
word in order of priority.
Checking the input parameters for valid values has the highest priority in error
detection.
Other error detections are according to their order in the diagnostic word
descending in priority i.e. an error with higher priority disables the recognition of
an error with lower priority after the diagnostic word was updated via "ack". Only
the fault with the highest priority is displayed in the diagnostic information.
© Siemens AG 2021 All rights reserved

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 111
2 Blocks of the library

2.7.10 DiscrepancyMonitoring

Description
This function block is used for discrepancy monitoring of two integer values within a
user-defined period of time.

Principle of operation
Figure 2-68: Structure of block LDrvSafe_DiscrepancyMonitoring

With the two block inputs "value1" and "value2" the values to be monitored for
discrepancy are entered.
When "value1" and "value2" differ more that the specified "tolerance", the time
"toleranceTime" is started. When the difference between "value1" and "value2"
becomes smaller than the parameter "tolerance" before "toleranceTime" is expired,
© Siemens AG 2021 All rights reserved

the time "toleranceTime" is reset. Otherwise the "error" bit is set.

NOTICE Cyclic switching pulses


For cyclic switching pulses at the inputs "value1" or "value2" with pulse duration
shorter than the "toleranceTime", no discrepancy error is detected.

When the block detects an error, the output "error" is set. The error cause is
displayed at the output "diag".
The output "ackReq" is set when "error" is active an all conditions that led to that
error are remedied.
Acknowledgement is done with a rising edge on the input "ack" and only possible
when "error" is set.
InterfaceTable 2-71: Input parameters of block LDrvSafe_DiscrepancyMonitoring
Parameter Data type Description
value1 INT Monitored value 1
• Value that is checked for discrepancy with
"value2"
• Permissible value range:
-32767 ≤ "value1" ≤ 32767
value2 INT Monitored value 2
• Value that is checked for discrepancy with
"value1"
• Permissible value range:
-32767 ≤ "value2" ≤ 32767

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 112
2 Blocks of the library

Parameter Data type Description


tolerance INT Permissible tolerance
• Permissible tolerance between "value1" and
"value2"
• Permissible value range:
0 ≤ "tolerance" ≤ 32767
• Default: "10"
toleranceTime TIME Tolerance time
• When "value1" and "value2" differ more that
the specified "tolerance", the time
"toleranceTime" is started
• When both values "value1" and "value2" are
not within "tolerance" after the expiration of
"toleranceTime", a discrepancy error is
detected
• Permissible value range:
0 ≤ "toleranceTime"
• Default: "200ms"
ack BOOL Acknowledgement
• Faults at the block are acknowledged with a
rising edge
• Acknowledgement is only possible when "error"
is set and a rising edge is detected at "ack"
© Siemens AG 2021 All rights reserved

Table 2-72: Output parameters of block LDrvSafe_DiscrepancyMonitoring


Parameter Data type Description
error BOOL Error
This bit is set as soon as an error occurs in the block
ackReq BOOL Acknowledgement necessary
Shows that "error" is pending and all causes which led
the the error are remedied
diag WORD Error diagnostics
Shows detailed information for the error

Table 2-73: Structure of diagnostic word LDrvSafe_DiscrepancyMonitoring


diag Description
Bit 0 Implausible value
Value "value1" out of permissible value range
Remedy
Adapt value range -32767 ≤ "value1" ≤ 32767
Bit 1 Implausible value
Value "value2" out of permissible value range
Remedy
Adapt value range -32767 ≤ "value2" ≤ 32767
Bit 2 Implausible value
Value "tolerance" out of permissible value range
Remedy
Adapt value range 0 ≤ "tolerance" ≤ 32767

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 113
2 Blocks of the library

diag Description
Bit 3 Implausible value
Value "toleranceTime" out of permissible value range
Remedy
Adapt value range 0 ≤ "toleranceTime"
Bit 4 Overflow detected
The calculation |(𝑣𝑎𝑙𝑢𝑒1 − 𝑣𝑎𝑙𝑢𝑒2)|
would cause an overflow of the data type integer
Remedy
Check parameter "value1" und "value2"
Bit 5 Discrepancy detected
Both values "value1" und "value2" are not within the "tolerance" after the
"toleranceTime" expired
Remedy
• Check parameter "value1" and "value2"
• Increase "tolerance"

NOTE Occurance of multiple errors:


Up to acknowledgement only the error which appeared first is displayed in the
diagnostic word. After acknowledgement the errors are shown in the diagnostic
word in order of priority.
© Siemens AG 2021 All rights reserved

Checking the input parameters for valid values has the highest priority in error
detection.
Other error detections are according to their order in the diagnostic word
descending in priority i.e. an error with higher priority disables the recognition of
an error with lower priority after the diagnostic word was updated via "ack". Only
the fault with the highest priority is displayed in the diagnostic information.

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 114
2 Blocks of the library

2.7.11 AverageValueCalculation

Description
This function block is used to calculate the average value of an analog signal with
data type integer over a user-defined duration in a failsafe way.

Principle of operation
Figure 2-69: Structure of block LDrvSafe_AverageValueCalculation

The block calculates the average of the value which is connected to the input
"actValue". The average value is calculated over the number of block calls.
NOTE A value change at the input "numberOfCycles" only becomes active when the
block has calculated and given out a new average value "avgValue".
© Siemens AG 2021 All rights reserved

As soon as an average value is calculated, the output "avgValue" is updated and


the bit "updatedValue" is set for one cycle.
When the block detects an error, the output "error" is set. The output
"updatedValue" takes the value "false" and the output "avgValue" returns the value
"0". The error cause is displayed at the output "diag".
The output "ackReq" is set when "error" is active an all conditions that led to that
error are remedied.
Acknowledgement is done with a rising edge on the input "ack" and only possible
when "error" is set.

Interface
Table 2-74: Input parameters of block LDrvSafe_AverageValueCalculation
Parameter Data type Description
actValue INT Actual value
• Value from which the average value is calculated
• Permissible value range:
0 ≤ "actValue" ≤ 32767
numberOfCycles INT Number of Cycles
• Number of block calls over which the average
value of "actValue" is calculated
• Permissible value range:
2 ≤ "numberOfCycles" ≤ 32767
• Default: "3"
ack BOOL Acknowledgement
• Faults at the block are acknowledged with a
rising edge
• Acknowledgement is only possible when "error"
is set and a rising edge is detected at "ack"

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 115
2 Blocks of the library

Table 2-75: Output parameters of block LDrvSafe_AverageValueCalculation


Parameter Data type Description
avgValue INT Average value
Shows the average value of "actValue" over the
number of block calls "numberOfCycles"
updatedValue BOOL Average value updated
Indicates wheter a new average value is available
error BOOL Error
This bit is set as soon as an error occurs in the block
ackReq BOOL Acknowledgement necessary
Shows that "error" is pending and all causes which
led the the error are remedied
diag WORD Error diagnostics
Shows detailed information for the error

Table 2-76: Structure of diagnostic word LDrvSafe_AverageValueCalculation


diag Description
Bit 0 Implausible value
Value "actValue" out of permissible value range
Remedy
Adapt value range 0 ≤ "actValue" ≤ 32767
© Siemens AG 2021 All rights reserved

Bit 1 Implausible value


Value "numberOfCycles" out of permissible value range
Remedy
Adapt value range 2 ≤ " numberOfCycles" ≤ 32767

NOTE Occurance of multiple errors:


Up to acknowledgement only the error which appeared first is displayed in the
diagnostic word. After acknowledgement the errors are shown in the diagnostic
word in order of priority.

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 116
2 Blocks of the library

2.7.12 WinderRadius

Description
This function block is used to calculate the radius of a roll with two distance
sensors.

Principle of operation
Figure 2-70: Structure of block LDrvSafe_WinderRadius
© Siemens AG 2021 All rights reserved

Because the measured values of the distance sensors 1 and 2 can attain negative
values, the characteristic curve of the sensors has to be shifted into the zero point.
Figure 2-71: Shifting characteristic curve of distance sensor 1

At first the user has to calculate the offset by wich the characteristic curve has to
be switched. This is done with the following equation:
27648
𝑜𝑓𝑓𝑠𝑒𝑡𝐶ℎ𝑎𝑟𝑎𝑐𝑡𝑒𝑟𝑖𝑠𝑡𝑖𝑐𝑆1 = |27648 − ( ∗ 𝑚𝑎𝑥𝑉𝑎𝑙𝑆1)|
𝑚𝑎𝑥𝑉𝑎𝑙𝑆1−𝑚𝑖𝑛𝑉𝑎𝑙𝑆1

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 117
2 Blocks of the library

Table 2-77: Formula to shift the characteristic curve into the zero point – Explanation of the
used abbreviations
Abbreviation Description
offsetCharacteristicS1 Offset, um die Kennlinie von distance sensor 1 in den
Nullpunkt zu verschieben
maxValS1 Maximum measuring value of distance sensor 1 according to
data sheet
minValS1 Minumum measuring value of distance sensor 1 according to
data sheet

This way, all input values refer to the characteristic curve of distance sensor 1,
shifted into the zero point.
Subsequently the radius is calculated as follows:
Figure 2-72: Radius calculation
© Siemens AG 2021 All rights reserved

𝑐𝑎𝑙𝑐𝑅𝑎𝑑𝑖𝑢𝑠𝑆2 = 𝑚𝑎𝑥𝐷𝑖𝑠𝑡𝑎𝑛𝑐𝑒𝑆2 − 𝑎𝑐𝑡𝐷𝑖𝑠𝑡𝑎𝑛𝑐𝑒𝑆2 − 𝑜𝑓𝑓𝑠𝑒𝑡𝐶ℎ𝑎𝑟𝑎𝑐𝑡𝑒𝑟𝑖𝑠𝑡𝑖𝑐𝑆1 + 𝑚𝑖𝑛𝑅𝑎𝑑𝑖𝑢𝑠


𝑐𝑎𝑙𝑐𝑅𝑎𝑑𝑖𝑢𝑠𝑆1 = 𝑚𝑎𝑥𝐷𝑖𝑠𝑡𝑎𝑛𝑐𝑒𝑆1 − 𝑎𝑐𝑡𝐷𝑖𝑠𝑡𝑎𝑛𝑐𝑒𝑆1 − 𝑜𝑓𝑓𝑠𝑒𝑡𝐶ℎ𝑎𝑟𝑎𝑐𝑡𝑒𝑟𝑖𝑠𝑡𝑖𝑐𝑆1 + 𝑚𝑖𝑛𝑅𝑎𝑑𝑖𝑢𝑠
From both values the average value is calculated:
𝑐𝑎𝑙𝑐𝑅𝑎𝑑𝑖𝑢𝑠𝑆1 𝑐𝑎𝑙𝑐𝑅𝑎𝑑𝑖𝑢𝑠𝑆2
𝑎𝑣𝑔𝐶𝑎𝑙𝑐𝑅𝑎𝑑𝑖𝑢𝑠 = +
2 2
Table 2-78: Formula for calculating the radius – Explanation of the used abbreviations
Abbreviation Description
calcRadiusS1 Current radius, calculated on the basis of distance sensor 1
calcRadiusS2 Current radius, calculated on the basis of distance sensor 2
avgCalcRadius Average value of "calcRadiusS1" and "calcRadiusS2"
maxDistanceS1 Maximum distance of distance sensor 1 to the roll without
material wound up
maxDistanceS2 Maximum distance of distance sensor 2 to the roll without
material wound up
actDistanceS1 Aktuelle Entfernung distance sensor 1 to the roll, entspricht
dem Messwert des distance sensor 1 an der SIMATIC-
Baugruppe

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 118
2 Blocks of the library

Abbreviation Description
actDistanceS2 Aktuelle Entfernung distance sensor 2 to the roll, entspricht
dem Wert "unmaskedValue"
minRadius Roll radius without material wound up
Due to external influences it might happen that the current distance of both
distance sensors to the roll "actDistanceS1" and "actDistanceS2" is bigger than the
parameterized maximum distance "maxDistanceS1" and "maxDistanceS2". To
compensate those influnences the block input "minRadiusHysteresis" is available.
A plausibility error is only detected when:
actDistanceS1 + offsetCharacteristicS1 − 𝑚𝑖𝑛𝑅𝑎𝑑𝑖𝑢𝑠𝐻𝑦𝑠𝑡𝑒𝑟𝑒𝑠𝑖𝑠 > maxDistanceS1
or
𝑎𝑐𝑡𝐷𝑖𝑠𝑡𝑎𝑛𝑐𝑒𝑆2 + offsetCharacteristicS1 − 𝑚𝑖𝑛𝑅𝑎𝑑𝑖𝑢𝑠𝐻𝑦𝑠𝑡𝑒𝑟𝑒𝑠𝑖𝑠 > 𝑚𝑎𝑥𝐷𝑖𝑠𝑡𝑎𝑛𝑐𝑒𝑆2
When the block detects an error, the output "error" is set. The outputs
"calcRadiusS1", "calcRadiusS2" and "avgCalcRadius" take the value "0". The error
cause is displayed at the output "diag".
The output "ackReq" is set when "error" is active an all conditions that led to that
error are remedied.
Acknowledgement is done with a rising edge on the input "ack" and only possible
when "error" is set.

Interface
© Siemens AG 2021 All rights reserved

Table 2-79: Input parameters of block LDrvSafe_WinderRadius


Parameter Data type Description
maxDistanceS1 INT Maximum distance distance sensor 1
• Maximum distance of distance sensor 1 to
the roll without material wound up
• Permissible value range:
1 ≤ "maxDistanceS1" ≤ 32767
• Default: "13824"
maxDistanceS2 INT Maximum distance distance sensor 2
• Maximum distance of distance sensor 2 to
the roll without material wound up
• Permissible value range:
1 ≤ "maxDistanceS2" ≤ 32767
• Default: "13824"
actDistanceS1 INT Current distance distance sensor 1
• Current distance of distance sensor 1 to the
roll
• Permissible value range:
1 ≤ "actDistanceS1" ≤ 32767
actDistanceS2 INT Current distance distance sensor 2
• Current distance of distance sensor 2 to the
roll
• Permissible value range:
1 ≤ "actDistanceS2" ≤ 32767
offsetCharacteristicS1 INT Offset Kennlinie Distanzsensor 1
• Because "actDistanceS1" and
"actDistanceS2" can attain negative values,
the characteristic curve of the sensors has to
be shifted.
• Permissible value range:
0 ≤ "offsetCharacteristicS1" ≤ 32767

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 119
2 Blocks of the library

Parameter Data type Description


minRadius INT Minimum roll radius
• Roll radius without material wound up
• Permissible value range:
1 ≤ "minRadius" ≤ 32767
• Default: "150"
minRadiusHysteresis INT Hysteresis at minimum roll radius
• Due to external influences it might happen
that "actDistance" > "maxDistance". To
compensate this, a plausibility error is only
detected when ("actDistance" –
"minRadiusHysteresis") > "maxDistance"
• Permissible value range:
0 ≤ "minRadiusHysteresis" ≤ 32767
ack BOOL Acknowledgement
• Faults at the block are acknowledged with a
rising edge
• Acknowledgement is only possible when
"error" is set and a rising edge is detected at
"ack"

Table 2-80: Output parameters of block LDrvSafe_WinderRadius


Parameter Data type Description
© Siemens AG 2021 All rights reserved

calcRadiusS1 INT Calculated radius 1


Current radius, calculated on the basis of distance
sensor 1
calcRadiusS2 INT Calculated radius 2
Current radius, calculated on the basis of distance
sensor 2
avgCalcRadius INT Average radius
Average value of "calcRadiusS1" and "calcRadiusS2"
error BOOL Error
This bit is set as soon as an error occurs in the block
ackReq BOOL Acknowledgement necessary
Shows that "error" is pending and all causes which led
the the error are remedied
diag WORD Error diagnostics
Shows detailed information for the error

Table 2-81: Structure of diagnostic word LDrvSafe_WinderRadius


diag Description
Bit 0 Implausible value
Value "maxDistanceS1" out of permissible value range
Remedy
Adapt value range 1 ≤ "maxDistanceS1" ≤ 32767
Bit 1 Implausible value
Value "maxDistanceS2" out of permissible value range
Remedy
Adapt value range 1 ≤ "maxDistanceS2" ≤ 32767

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 120
2 Blocks of the library

diag Description
Bit 2 Implausible value
Value "actDistanceS1" out of permissible value range
Remedy
Adapt value range 1 ≤ "actDistanceS1" ≤ 32767
Bit 3 Implausible value
Value "actDistanceS2" out of permissible value range
Remedy
Adapt value range 1 ≤ "actDistanceS2" ≤ 32767
Bit 4 Implausible value
Value "offsetCharacteristicS1" out of permissible value range
Remedy
Adapt value range 0 ≤ "offsetCharacteristicS1" ≤ 32767
Bit 5 Implausible value
Value "minRadius" out of permissible value range
Remedy
Adapt value range 1 ≤ "minRadius" ≤ 32767
Bit 6 Implausible value
Value "minRadiusHysteresis" out of permissible value range
Remedy
Adapt value range 0 ≤ "minRadiusHysteresis" ≤ 32767
Bit 7 Overflow detected
© Siemens AG 2021 All rights reserved

The calculation "actDistanceS1" + "offsetCharacteristicS1" would cause an


overflow of the data type integer
Remedy
• Check parameter "actDistanceS1"
• Check parameter "offsetCharacteristicS1"
Bit 8 Overflow detected
The calculation "actDistanceS2" + "offsetCharacteristicS1" would cause an
overflow of the data type integer
Remedy
• Check parameter "actDistanceS2"
• Check parameter "offsetCharacteristicS1"
Bit 9 Implausible value
Current radii, calculated on the basis of distance sensor 1 or 2 are smaller
than the parameterized minimal roll radius "minRadius" at the block input
→ "maxDistanceS1" < "actDistanceS1" + "offsetCharacteristicS1" –
"minRadiusHysteresis" or
→ "maxDistanceS2" < "actDistanceS2" + "offsetCharacteristicS1" –
"minRadiusHysteresis"
Remedy
• Check parameter "actDistanceS1" and "actDistanceS2"
• Check parameter "offsetCharacteristicS1"
• Increase parameter "minRadiusHysteresis"
Bit 10 Overflow detected
The calculation "maxDistanceS1" - "actDistanceS1" + "offsetCharacteristicS1"
+ "minRadius" would cause an overflow of the data type integer
Remedy
• Check parameter "maxDistanceS1"
• Check parameter "offsetCharacteristicS1"
• Check parameter "minRadius"

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 121
2 Blocks of the library

diag Description
Bit 11 Overflow detected
The calculation "maxDistanceS2" – "actDistanceS2" + "offsetCharacteristicS1"
+ "minRadius" would cause an overflow of the data type integer
Remedy
• Check parameter "maxDistanceS2"
• Check parameter "offsetCharacteristicS1"
• Check parameter"minRadius"

NOTE Occurance of multiple errors:


Up to acknowledgement only the error which appeared first is displayed in the
diagnostic word. After acknowledgement the errors are shown in the diagnostic
word in order of priority.
Checking the input parameters for valid values has the highest priority in error
detection.
Other error detections are according to their order in the diagnostic word
descending in priority i.e. an error with higher priority disables the recognition of
an error with lower priority after the diagnostic word was updated via "ack". Only
the fault with the highest priority is displayed in the diagnostic information.
© Siemens AG 2021 All rights reserved

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 122
2 Blocks of the library

2.7.13 WinderSLS

Description
This function block is used to calculate the SLS limit depending on the previously
calculated roll radius.

Principle of operation
Figure 2-73: Structure of block LDrvSafe_WinderSLS

Depending on the calculated average current roll radius the SLS limit (Safety
Integrated Function "Safely-Limited Speed" of SINAMICS S120) is updated.
As long as the current roll radius does not exceed the current radius, the following
calculation takes place in the safety user program of the F-PLC:
© Siemens AG 2021 All rights reserved

32767
𝑣𝑎𝑟𝑖𝑎𝑏𝑙𝑒𝑆𝐿𝑆 = ∗ 𝑚𝑖𝑛𝑅𝑎𝑑𝑖𝑢𝑠
𝑎𝑣𝑔𝐶𝑎𝑙𝑐𝑅𝑎𝑑𝑖𝑢𝑠
Falls der aktuelle Radius größer als der maximale Rollenradius ist, so wird die
SLS-Grenze bei kleinstem Radius berechnet:
When the current radius is bigger than the maximum roll radius, the SLS limit is
calculated with the minimum radius:
32767
𝑣𝑎𝑟𝑖𝑎𝑏𝑙𝑒𝑆𝐿𝑆 = ∗ 𝑚𝑖𝑛𝑅𝑎𝑑𝑖𝑢𝑠
𝑚𝑎𝑥𝑅𝑎𝑑𝑖𝑢𝑠
In this case the output "fixedSLSvalue" is set.
The SLS limit must be transferred to the SINAMICS via PROFIsafe. Use the block
SinaTlg902Control for this task and connect the variable with the input
"variableSLS".
Table 2-82: Formula for calculating the relative SLS limit – Explanation of the used
abbreviations
Abbreviation Description
variableSLS SLS limit, depending on the current radius
avgCalcRadius Current radius, corresponds to the output "avgCalcRadius" of
block "WinderRadius"
minRadius Roll radius without material wound up
maxRadius Roll radius from which a fixed SLS limit is given out
(when "avgCalcRadius" ≥ "maxRadius")

When the block detects an error, the output "error" is set. "fixedSLSvalue" takes
the value "false" and the output "variableSLS" returns the value "32767". The error
cause is displayed at the output "diag".
The output "ackReq" is set when "error" is active an all conditions that led to that
error are remedied.

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 123
2 Blocks of the library

Acknowledgement is done with a rising edge on the input "ack" and only possible
when "error" is set.

Interface
Table 2-83: Input parameters of block LDrvSafe_WinderSLS
Parameter Data type Description
avgCalcRadius INT Current roll radius
• Corresponds to the average roll radius from block
"LDrvSafe_WinderRadius"
• Permissible value range:
1 ≤ "avgCalcRadius" ≤ 32767
minRadius INT Minimal roll radius
• Roll radius without material wound up
• Corresponds to the minimal roll radius from block
"LDrvSafe_WinderRadius"
• Permissible value range:
1 ≤ "minRadius" ≤ 32767
• Default: "150"
maxRadius INT Roll radius from which a substitute value is put out
• When the current radius "avgCalcRadius" ≥
"maxRadius", a substitute value is given out
• Permissible value range:
2 ≤ "maxRadius" ≤ 32767
© Siemens AG 2021 All rights reserved

• Default: "13000"
scalingFactor INT Scaling factor
Radius • This parameter is provided to compensate
inaccuracies resulting from the integer division
• All input parameters of data type integer are divided
by this value
• Permissible value range:
1 ≤ "scalingFactorRadius" ≤ 27648
• Default: "100"
ack BOOL Acknowledgement
• Faults at the block are acknowledged with a rising
edge
• Acknowledgement is only possible when "error" is
set and a rising edge is detected at "ack"

Table 2-84: Output parameters of block LDrvSafe_WinderSLS


Parameter Data type Description
variableSLS INT Calculated SLS limit
Calculated SLS limit, depending on the current radius
fixedSLSvalue BOOL Substitute value
• When current radius "avgCalcRadius" ≥
"maxRadius", this output is set
• The output "variableSLS" gives out a constant
value depending on the maximum radius
error BOOL Error
This bit is set as soon as an error occurs in the block
ackReq BOOL Acknowledgement necessary
Shows that "error" is pending and all causes which led
the the error are remedied

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 124
2 Blocks of the library

Parameter Data type Description


diag WORD Error diagnostics
Shows detailed information for the error
Table 2-85: Structure of diagnostic word LDrvSafe_WinderSLS
diag Description
Bit 0 Implausible value
Value "avgCalcRadius" out of permissible value range
Remedy
Adapt value range 1 ≤ "avgCalcRadius" ≤ 32767
Bit 1 Implausible value
Value "minRadius" out of permissible value range
Remedy
Adapt value range 1 ≤ "minRadius" ≤ 32767
Bit 2 Implausible value
Value "maxRadius" out of permissible value range
Remedy
Adapt value range 2 ≤ "maxRadius" ≤ 32767
Bit 3 Implausible value
• Value "scalingFactorRadius" out of permissible value range
• "scalingFactorRadius" > "minRadius"
Remedy
© Siemens AG 2021 All rights reserved

• Adapt value range 1 ≤ "scalingFactorRadius" ≤ 27648


• Check that "scalingFactorRadius" ≤ "minRadius"
Bit 4 Implausible value
"maxRadius" ≤ "minRadius"
Remedy
Check that "maxRadius" > "minRadius"
Bit 5 Implausible value
"avgCalcRadius" < "minRadius"
Remedy
Check that "avgCalcRadius" ≥ "minRadius"

NOTE Occurance of multiple errors:


Up to acknowledgement only the error which appeared first is displayed in the
diagnostic word. After acknowledgement the errors are shown in the diagnostic
word in order of priority.
Checking the input parameters for valid values has the highest priority in error
detection.
Other error detections are according to their order in the diagnostic word
descending in priority i.e. an error with higher priority disables the recognition of
an error with lower priority after the diagnostic word was updated via "ack". Only
the fault with the highest priority is displayed in the diagnostic information.

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 125
3 Functional test

3 Functional test
3.1 Information for checking the Safety functionality of the
machine

CAUTION Function test


The perfect functioning of all Safety Functions of the programmed user program
must be carefully checked and documented by carrying out a complete function
check at the machine.

The plausibility of the failsafe monitoring times of the I/O and the control must be
checked corresponding to the SIMATIC Safety Configuring and Programming
Manual.
The configuration must be documented by printing it out.

3.2 Examples for checking the Safety functionality of the F


blocks
In this chapter, using examples, it is shown how the interaction between the
hardware wiring and software evaluation can be tested for the individual blocks.
These function tests only involve individual tests for the particular block. They do
© Siemens AG 2021 All rights reserved

not replace the function test of the user program on the machine.

3.2.1 PROFIsafe control words

SinaGT30Control
Table 3-1: Function test of block LdrvSafe_SinaGT30Control
Execution Expected response Result
Select one of the Safety The selected Safety Function becomes
Functions being used at the active at the addressed drive
block input. (r9773.x or r9720.x = 0).
Then deselect this Safety The selected Safety Function becomes
Function being used at the block inactive at the addressed drive
input. (r9773.x or r9720.x = 1).
Repeat these two steps for all of See the previous lines.
the Safety Functions being
used.

SinaST30Control
See SinaGT30Control

SinaT31Control
See SinaGT30Control

SinaT900Control
See SinaGT30Control

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 126
3 Functional test

SinaT901Control
Table 3-2: Function test of block LdrvSafe_SinaT901Control
Execution Expected response Result
See SinaGT30Control

Enter any value between 1 and The SLS limit value in level 1 (p9531[0])
32,767 at input “variableSLS” is changed and becomes active after
and select the SLS Safety the delay time in p9551 has expired:
Function with level 1. r9714[2] = “variableSLS” / 32,767 *
p9531[0]

SinaT902Control
See SinaGT30Control
and SinaT901Control

SinaT903Control
See SinaGT30Control
and SinaT901Control
© Siemens AG 2021 All rights reserved

PdcTlg30Control
See SinaGT30Control

PdcTlg31Control
See SinaGT30Control

3.2.2 PROFIsafe status words

SinaGT30Status
Table 3-3: Function test of block LdrvSafe_SinaGT30Status
Execution Expected response Result
Select one of the Safety The feedback signal of the selected
Functions being used and wait Safety Function becomes active (“1”) in
until this Safety Functions the corresponding block.
becomes active
(r9773.x or r9722.x = 1).
Then deselect this Safety The feedback signal of the selected
Function being used and wait Safety Function becomes inactive (“0”)
until this Safety Functions in the corresponding block.
becomes inactive
(r9773.x or r9722.x = 0).
Repeat these two steps for all of See the previous lines.
the Safety Functions being
used.

SinaST30Status
See SinaGT30Status

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 127
3 Functional test

SinaT31Status
See SinaGT30Status

SinaT900Status
See SinaGT30Status

SinaT901Status
Table 3-4: Function test of block LdrvSafe_SinaT901Status
Execution Expected response Result
See SinaGT30Status

Vary the value for SLS level 1 The value of “variableSLSvalue”


dynamically and select the SLS receives this value:
Safety Function with level 1. “variableSLSvalue” = r9714[2] /
To do that, you can use input p9531[0] * 32.767
“variableSLS” of function block
“LdrvSafe_SinaT901Control”.
- The value “cycleCounter” at block
output is incremented in the clock cycle
of the Safety Integrated Functions
© Siemens AG 2021 All rights reserved

(p9500).
- The value “safePosition” at block output
corresponds to parameter r9713[4].

SinaT902Status
See SinaT901Status

SinaT903Status
Table 3-5: Function test of block LdrvSafe_SinaT903Status
Execution Expected response Result
See SinaGT30Status

Vary the value for SLS level 1 The value of “variableSLSvalue”


dynamically and select the SLS receives this value:
Safety Function with level 1. “variableSLSvalue” = r9714[2] /
To do that, you can use input p9531[0] * 32.767
“variableSLS” of function block
“LdrvSafe_SinaT903Control”.

PdcTlg30Status
See SinaGT30Status

PdcTlg31Status
See SinaGT30Status

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 128
3 Functional test

3.2.3 Winder application

UnmaskedValueCalculation
Table 3-6: Function test of block LdrvSafe_UnmaskedValueCalculation
Execution Expected response Result
Interconnect the block inputs Verify that the unmasked value
according to the description “unmaskedValue” corresponds with the
UnmaskedValueCalculation. actual unmasked value.

DiscrepancyMonitoring
Table 3-7: Function test of block LdrvSafe_DiscrepancyMonitoring
Execution Expected response Result
Interconnect the block inputs The block identifies a discrepancy error
according to the description and sets the “error” bit. At output “diag”
DiscrepancyMonitoring. Bit 5 is set.
Initiate a discrepancy error by
e.g. affecting the detection
range of one sensor (connected
to inputs “value1” or “value2”)

AverageValueCalculation
Table 3-8: Function test of block LdrvSafe_AverageValueCalculation
© Siemens AG 2021 All rights reserved

Execution Expected response Result


Interconnect the block inputs The value “avgValue” is updated when
according to the description the number of cycles run through
AverageValueCalculation. reaches the number of cycles specified
at “numberOfCycles”.
At this time the output “updatedValue”
is set for one cycle.
You can verify the behavior with the
trace functionality.

WinderRadius
Table 3-9: Function test of block LdrvSafe_WinderRadius
Execution Expected response Result
Interconnect the block inputs At the block output the current radius
according to the description “avgCalcRadius” is given out.
WinderRadius. This calculated radius must match the
Equip the winder with an empty parameterized minimal radius
roll. “minRadius”.

Equip the winder with a roll that At the block output the current radius
has material wound up or wind “avgCalcRadius” is given out.
up material on the empty roll. This calculated radius (converted in the
physical units) must correspond to the
actual radius.

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 129
3 Functional test

WinderSLS
Table 3-10: Function test of block LdrvSafe_WinderSLS
Execution Expected response Result
Interconnect the block inputs The SLS limit r9714[2] is updated
according to the description continuously depending on the current
WinderSLS. radius of the roll.
Wind the roll with wound up The distance to the standard speed
material. fulfills the requirement from the risk
Start a trace measurement with evaluation.
the current standard speed and
the calculated SLS limit r9714[2]
Wind the material until the The block output “fixedSLSvalue”
current radius “avgCalcRadius” assumes the value “1” as long as
exceeds the maximum radius “avgCalcRadius” ≥ “maxRadius”
“maxRadius”.
(Only required if the application
actually permits this).

3.2.1 SafeVelocity

Note Carefully observe Chapter 11 "System acceptance" in the "SIMATIC Safety -


Configuring and Programming" Manual.
© Siemens AG 2021 All rights reserved

The plausibility of the F-monitoring times of the I/O and the open-loop control must
be carefully tested as described in the "SIMATIC Safety - Configuring and
Programming" Manual.
The configuration must be printed-out for documentation purposes.

Examples for performing a block function test:


Table 3-11
Procedure Expected response Result
Traverse the axis with different The block outputs the corresponding
velocities/speeds. value.
For modulo axes, perform the test for several The block outputs the correct velocity
revolutions. value.

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 130
4 Working with the library

4 Working with the library


This chapter consists of instructions for integrating the LdrvSafe library into your
TIA project and instructions for using the library blocks.

4.1 Integrating the library into TIA Portal


The table below lists the steps for integrating the LdrvSafe library into your TIA
project. Subsequently, you can use the blocks of the LdrvSafe library.
NOTE The following section assumes that a TIA project exists.

Table 4-1: Integration of the library


No. Action Note
1. First of all, depack the delivered application.
Therefore klick on the application with right mouse button and depack the file.

2. Open the “TIA Portal” engineering tool.


© Siemens AG 2021 All rights reserved

3. Search for your existing project and open it.

4. Click on the “Libraries” tab at the right-hand


edge of the screen (1).

Then click on button “Open global library” (2).

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 131
4 Working with the library

No. Action Note


5. Enter the path in which the LdrvSafe library is saved and open the unzipped library.

6. The library is now opened. You can now use all


of the blocks in the LdrvSafe library in the
“Master copies” subfolder in your project.
© Siemens AG 2021 All rights reserved

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 132
4 Working with the library

4.2 Integrating the library blocks into TIA Portal


The table below lists the steps for integrating the blocks of the LdrvSafe library into
your TIA program.
Table 4-2: Integration of the library blocks
No. Action Note
1. You can now drag the blocks from the library and drop them into your project.
• In this diagram the folder “S7-1500F” is dragged to folder “Program blocks”
• The same folder is also dragged to the folder “PLC data types”
As a result, all the blocks of the library are available in your project.
© Siemens AG 2021 All rights reserved

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 133
4 Working with the library

4.3 Downloading the blocks to the S7 CPU


The table below lists the steps for downloading all blocks of your user program to
the S7 CPU.
Table 4-3: Loading the blocks
No. Action Note
1. In the project tree, select the F-PLC that you wish to load (1).
Then click on the download symbol (2).
© Siemens AG 2021 All rights reserved

2. When loading the safety program to the control, the following window is displayed.
In column “Action” (1), set all lines so that there is a blue checkmark set in every line (2).
Enter your password to access failsafe data.

2 1

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 134
4 Working with the library

4.4 Online help


For all function blocks of this library, there exists an online help, which contains
information relating to principle of operation and meaning of all in- and outputs.
Note The help files are available in German and English language and open
accordingly to the user interface language of TIA-Portal. If neither German nor
English is chosen as user interface language, always the English version opens
by the call of a help file.

Table 4-4 Open the online help out of the library directory
No. Action Note
1. To open the help for a block directly out of the library, you have to mark a block and
press “Shift + F1” on the keyboard. At first a security warning appears, which you
have to confirm with “Yes”.
© Siemens AG 2021 All rights reserved

2. Now an overview site opens in your web browser. On this site you can click on the
link of the block you want the help to open.

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 135
5 Versioning of library LDrvSafe

5 Versioning of library LDrvSafe


The steps listed below show you how to check if your library is up-to-date.
Table 5-1: Actuality of the library
No. Action Note
1. To check the version of the LdrvSafe library,
proceed as follows:
(6) Click on the “Libraries” tab at the right-
hand edge of the screen

(2) Under “Global libraries”, select the library


and press the right-hand mouse key (3).

(4) Now click on “Properties”.


© Siemens AG 2021 All rights reserved

2. The library version is shown (2) under menu item “Library” (1).

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 136
6 Appendix

6 Appendix
6.1 Application Support

Siemens AG
Digital Industries
Factory Automation
Production Machines
DI FA PMA APC
Frauenauracher Str. 80
91056 Erlangen, Germany
mailto : tech.team.motioncontrol@siemens.com

6.2 Links and Literature


Table 6-1: Literature
No. Topic
\1\ Siemens Industry Online Support
https://support.industry.siemens.com
© Siemens AG 2021 All rights reserved

\2\ Link to this entry page of this application example


https://support.industry.siemens.com/cs/ww/en/view/109485794
\3\ SIMATIC Industrial Software SIMATIC Safety – Configuring and Programming
https://support.industry.siemens.com/cs/ww/en/view/54110126
\4\ SINAMICS S120 Safety Integrated Function Manual
https://support.industry.siemens.com/cs/ww/en/view/109781722
\5\ Safety Integrated Function Manual for SINAMICS G110M, G120, G120C, G120D
and SIMATIC ET 200pro FC-2
https://support.industry.siemens.com/cs/ww/en/view/109782490
\6\ SIMATIC S7-1200/S7-1500 and SIMOTION: Acyclic Data Exchange
https://support.industry.siemens.com/cs/ww/de/view/109479553/en
\7\ SIMATIC STEP 7 Basic/Professional V16 and SIMATIC WinCC V16
https://support.industry.siemens.com/cs/ww/en/view/109773506
\8\ SINAMICS S210/SIMOTICS S-1FK2 and S-1FT2
https://support.industry.siemens.com/cs/ww/en/view/109794211
\9\ SIMATIC MICRO-DRIVE Drive controller PDC
https://support.industry.siemens.com/cs/ww/en/view/109774126

6.3 Change documentation


Table 6-2: History
Version Date Modifications
V1.0 03/2016 First version
V1.1 10/2016 Addition of blocks for PROFIsafe control
V1.2 01/2017 Addition of blocks for Software controller S7-1500F and
revision documentation of function block
“LdrvSafe_WinderRadius”

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 137
6 Appendix

Version Date Modifications


V1.3 06/2017 Adaption of documentation to new layout, minor changes
Adapting of the blocks for usage of PLCSIM Advanced
Removal of block “LdrvSafe_WinderRadius”
V2.0 02/2018 Revision of all blocks according to style guide
Revision of winder application
V2.1 06/2018 Addition of blocks:
• SafeReferencing
• HwAcknowledge
V2.2 08/2018 Addition of blocks for control via SIC / SCC
V2.2.1 10/2018 Adapted folder names
V2.2.2 08/2019 • Improvements and corrections in manual and online
help
• Improvements in blocks SafeReferencing and
HwAcknowledge. Ram2Rom now works on DO level,
not device level
V2.2.3 11/2019 • Fault correction in block SafeReferencing
• Fault corrections in documentation
V3.0 11/2019 • Upgrading the LDrvSafe to V15
• Improvement of block HwAcknowledge
• Addition of block SafeVelocity

© Siemens AG 2021 All rights reserved

V4.0 07/2021 Upgrading the LDrvSafe to V16


• Addition of block SafeBrakeTest
• Addition of SINUMERIK ONE

LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 138

You might also like