Professional Documents
Culture Documents
LDrvSafe Manual V40
LDrvSafe Manual V40
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
LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 3
Table of contents
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.
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
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
LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 6
2 Blocks of the library
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
LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 7
2 Blocks of the library
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
LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 8
2 Blocks of the library
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
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
LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 12
2 Blocks of the library
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
LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 14
2 Blocks of the library
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
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
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
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
LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 22
2 Blocks of the library
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
LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 25
2 Blocks of the library
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
LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 29
2 Blocks of the library
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
LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 30
2 Blocks of the library
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
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
LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 32
2 Blocks of the library
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
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
LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 34
2 Blocks of the library
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
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
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
LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 39
2 Blocks of the library
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
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
LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 43
2 Blocks of the library
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
LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 47
2 Blocks of the library
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
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
LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 50
2 Blocks of the library
LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 51
2 Blocks of the library
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
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
LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 55
2 Blocks of the library
LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 56
2 Blocks of the library
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
LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 57
2 Blocks of the library
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).
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
LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 60
2 Blocks of the library
LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 61
2 Blocks of the library
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
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
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).
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
LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 65
2 Blocks of the library
LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 66
2 Blocks of the library
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
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).
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
LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 69
2 Blocks of the library
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
LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 71
2 Blocks of the library
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
LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 72
2 Blocks of the library
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
LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 74
2 Blocks of the library
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
LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 76
2 Blocks of the library
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
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
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
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
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.
LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 81
2 Blocks of the library
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
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
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.
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
LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 86
2 Blocks of the library
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
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”.
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
LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 89
2 Blocks of the library
LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 90
2 Blocks of the library
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.
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
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.
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
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.
LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 93
2 Blocks of the library
LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 94
2 Blocks of the library
LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 95
2 Blocks of the library
LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 96
2 Blocks of the library
LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 97
2 Blocks of the library
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.
LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 99
2 Blocks of the library
2.7.7 Commissioning
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
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.
LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 101
2 Blocks of the library
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
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.
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
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
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
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
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
LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 106
2 Blocks of the library
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
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
LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 109
2 Blocks of the library
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"
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
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
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"
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
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
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
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
LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 119
2 Blocks of the library
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
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"
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"
LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 124
2 Blocks of the library
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
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.
not replace the function test of the user program on the machine.
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
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
(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
PdcTlg30Status
See SinaGT30Status
PdcTlg31Status
See SinaGT30Status
LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 128
3 Functional test
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
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
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.
LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 130
4 Working with the library
LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 131
4 Working with the library
LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 132
4 Working with the library
LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 133
4 Working with the library
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
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
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
LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 137
6 Appendix
LDrvSafe
Entry-ID: 109485794, V4.0, 07/2021 138