Professional Documents
Culture Documents
Fehlersichere Funktionsbausteine FR Regalbediengerte v4.0 en
Fehlersichere Funktionsbausteine FR Regalbediengerte v4.0 en
Legal information
Using the application examples
The application examples illustrate the solution of automation tasks with the interaction of several
components in the form of text, graphics and/or software blocks. The application examples are a
free-of-charge service provided by Siemens AG and/or a subsidiary company of Siemens AG
("Siemens"). They are non-binding and do not claim to be complete and functional with regard to
configuration or equipment. The application examples do not represent customer-specific
solutions but are merely designed to provide help for typical tasks. You yourself are responsible
for the proper and safe operation of products in compliance with the applicable regulations. You
must check the function of the respective application example and adapt it specifically to your
system.
Siemens grants you the non-exclusive, non-sublicensable and non-transferable right of use of the
application examples by professionally trained personnel. Any change to the application examples
is made purely at your own risk. Transfer to third parties or duplication of the application examples
or extracts thereof is only permitted in combination with your own products. The application
examples do not necessarily undergo the usual tests and quality checks of a paid product, may
contain functional and performance defects and may be subject to errors. You are responsible for
ensuring that the application examples are used in such a way that any malfunctions do not lead
to property damage or personal injury.
Disclaimer of liability
Siemens excludes any liability, irrespective of the legal grounds, in particular for the usability,
availability, completeness and freedom from defects of the application examples, as well as
associated notes, configuration data and performance data and any damage caused by these.
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, injury or health
impairment, non-compliance with a guarantee, fraudulent non-disclosure of a defect or culpable
breach of material contractual obligations. The claims for compensation for the breach of essential
contractual obligations are, however, limited to the foreseeable damage typical for the type of
© Siemens AG 2022 All rights reserved
contract, except in the event of intent or gross negligence or injury to life, body or health. The
above provisions do not entail a change in the burden of proof to your detriment. You exempt
Siemens from any third-party claims that may exist or arise in this connection, unless Siemens is
compulsorily liable by law.
By using the application examples, you acknowledge that Siemens cannot be made liable for any
claims beyond the liability clause described.
Additional notes
Siemens reserves the right to make changes to these application examples at any time without
prior notice. In cases of discrepancies between the suggestions in the application examples and
other Siemens publications, such as catalogs, then the content of the other documentation shall
have precedence.
In addition to this, the Siemens terms and conditions of use apply
(https://support.industry.siemens.com).
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 only one element of such a concept.
Customers are solely 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.
Additionally, Siemens recommendations relating to appropriate security measures should be
taken into account. For more information about Industrial Security, please visit:
https://www.siemens.com/industrialsecurity.
At Siemens, our products and solutions undergo continuous development to make them even
more secure. Siemens expressly recommends that updates are carried out as soon as they
become available and that only the current product version is always used. Use of product
versions that are no longer supported, and failure to apply 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.
Table of contents
Legal information ......................................................................................................... 2
1 Storage and retrieval machines and safety functions ................................... 5
1.1 General design for safe position sensing ............................................. 5
1.2 Supported encoder combinations and configuration variants .............. 6
1.2.1 Safety-relevant motor encoder with safety-related mounting and
positive locking mechanical system ..................................................... 6
1.2.2 Safety-related motor encoder with safety-related mounting,
positive locking mechanical system and reference switch
mounted in a safety-related fashion ..................................................... 6
1.2.3 Two-encoder system with connection via SINAMICS S120 ................ 7
1.2.4 Two encoder system with connection by the distributed I/O ................ 8
1.2.5 Three-encoder system ......................................................................... 8
1.2.6 Summary of the encoder variants ...................................................... 10
1.2.7 Safety-related characteristic values of the encoder variants ............. 11
2 System and software requirements ............................................................... 16
2.1 General information ............................................................................ 16
2.2 Safety requirements ........................................................................... 16
2.3 Software ............................................................................................. 16
2.4 Safety aspects when creating blocks ................................................. 17
2.4.1 Delimitation EN 528:2021 with respect to the ASRM block
library .................................................................................................. 17
© Siemens AG 2018 All rights reserved
S7-1500F ET200SP
SINAMICS S120
E
SIN/COS Maschinentisch
Geber
E I
SSI-Geber Innitiator für
Geberabgleich oder
Referenznocken
The block package covers several variants of encoder combinations, see also
Table 1-1. The following scenarios relating to additional components required are
obtained that can deviate depending on the specific application; however, they
must be comparable from a safety-related perspective:
Data acquisition:
• Safety-related SIN/COS motor encoder with safety-related mounting via
PROFIsafe telegram 902 from a SINAMICS S120.
• The absolute position is transferred to the F-CPU e.g. via a standard telegram
from SINAMICS S120.
SI determines the absolute position actual value of the motor encoder, and is
transferred to the F-CPU using a safety-related telegram. The motor encoder must
be a safety-related encoder (safety-related motor encoder with safety-related
mounting).
The signal flow of the safety function therefore looks like this:
© Siemens AG 2018 All rights reserved
Fig. 1-2: Variant 1: Safety-related motor encoder with positive locking mechanical system
Motorgeber
SMC20 F 32bit Wert F
(sin/cos)
Safety note
The safety-related motor encoder must be safely homed using the Safety
Integrated functions of the SINAMICS S120. The safe absolute position actual
value, the validity of the encoder and the status of the safe home position must
be directly used from the PROFIsafe telegram 902. The mechanical system of
the application must be designed so that it is positive locking. The signals must
be interconnected according to the interconnection example in Chapter 4.4.1.
Data acquisition:
• Safety-related SIN/COS motor encoder with safety-related mounting via
PROFIsafe telegram 902 from a SINAMICS S120.
• Reference switch mounted in a safety-related fashion
SI determines the position actual value of the motor encoder, and is transferred to
the F-CPU using a safety-related telegram. The motor encoder must be a safety-
related encoder (safety-related motor encoder with safety-related mounting).
The signal flow of the safety function therefore looks like this:
Fig. 1-3: Variant 1: Safety-related motor encoder with positive locking mechanical system
Motorgeber
SMC20 F 32bit Wert F
(sin/cos)
Safety note
The reference switch must be read-in at a fail-safe input and must be mounted in
a safety-related fashion. The motor encoder must be mounted in a safety-related
fashion and the mechanical system of the application must be designed so that it
is positive locking.
Data acquisition:
• The SIN/COS motor encoder is connected e.g. via an SMC20 or a DRIVE-
CLiQ Interface (SMI) with the direct measuring system (SSI) e.g. via an
SMC30 with the SINAMICS S120. The closed-loop position control is realized
via the direct measuring system.
To achieve two-channel data transfer to the F-CPU, the position actual value of the
direct encoder is transferred via the standard telegram. SI determines the position
actual value of the motor encoder, and is transferred to the F-CPU using a safety-
related telegram. The motor encoder must conform with the requirements of
SINAMICS Safety Integrated. Safety-related mounting is not required, as in this
case possible faults are monitored and detected through the cross comparison with
the second encoder.
Motorgeber
SMC20 F 32bit Wert F
(sin/cos)
Data acquisition:
a) SIN/COS motor encoder (safety-related mounting is not required)
corresponding to the requirements of SINAMICS Safety Integrated (e.g. via
SMC20 or DQI/SMI) via PROFIsafe telegram from SINAMICS S120, direct
measuring system via standard telegram from SSI module (e.g. TM PosInput
2) to the F-CPU.
Fig. 1-5: Variant 3 a): Two-encoder system, connected via distributed I/O
SINAMICS S120 F-CPU
Peripherie
Standard Standard (z.B. ET200MP/ direkter Geber
ET200SP)
Motorgeber
SMC20 F 32bit Wert F
(sin/cos)
Fig. 1-6: Variant 3 b): Two-encoder system, connected via direct encoder
SINAMICS S120 F-CPU
Motorgeber
SMC20 F 32Bit Wert F
(sin/cos)
Data acquisition:
a) SIN/COS motor encoder (safety-related mounting is not required)
corresponding to the requirements of SINAMICS Safety Integrated (e.g. via
SMC20 or DQI/SMI) via PROFIsafe telegram from SINAMICS S120.
Two direct measuring systems via standard telegram (Fig. 1-7):
• Position 1 via SINAMICS S120
• Position 2 from the distributed I/O with secure communication via F-
module
Alternatively:
• Position 1 via SINAMICS S120 with secure communication via
PROFIsafe telegram of the converter
• Position 2 from distributed I/O
Fig. 1-7: Variant 4 a): Three-encoder system, position encoder via SINAMCS 120 and
distributed PLC I/O, secure communication via F-module
SINAMICS S120 F-CPU
Peripherie
(z.B. ET200MP/
direkter Geber SMC30 Standard Standard ET200SP mit direkter Geber
fehlersicherem
Modul)
Fig. 1-8: Variant 4 b): Three-encoder system, position encoder via distributed PLC I/O,
secure communication via F-module.
© Siemens AG 2018 All rights reserved
Peripherie
(z.B. ET200MP/
Motorgeber ET200SP mit direkter Geber
SMC20 F 32Bit Wert F
(sin/cos) fehlersicherem
Modul)
QBAD des fehlersichern Moduls
Safety note
To achieve the specified diagnostic coverage, the two direct measuring systems
must be installed in opposite directions.
Safety note
To detect a "frozen" bus driver, i.e. communication is no longer active between
the measuring system and CPU, a fail-safe module is inserted in at least one
channel in the station, via which the direct measuring system is read. If
communication now becomes inadmissibly slow or fails completely, then the F-
module involved signals a communication error. This is then evaluated in the
safety program and must be used to initiate a stop response.
The following table summarizes the encoder combinations that are in principle
possible and their ability to be actually implemented. pos1, pos2 as well as possi
make reference to the interconnection at the "LFASRS_SafePosition" block
described in more detail in Chapter 3.2. Legend, see below.
A motor encoder (MSSI or MNSI) is always required to acquire the safe position
and velocity; the motor encoder data is acquired via the SI part of the drive.
The following encoder combinations should be provided depending on the specific
application scenario:
Legend:
MSSI(A): Motor encoder, safety-related mounting, via SI F-telegram 32 bit absolute
safety position actual value
MSSI(R): Motor encoder, safety-related mounting, via SI F-telegram 32 bit relative
safe position actual value
MNSI(R): Motor encoder, no safety-related mounting, via SI F-telegram 32 bit
relative safe position actual value
LD-SMx-NS: Position actual value Epos from the direct measuring system via
SMC/SMI via standard telegram 32 bit, not safety-related
LD-DP-NS: Position actual value from the direct measuring system via distributed
I/O, no safety-related communication (e.g. PROFINET encoder, TM PosInput 2).
LD-DP-KS: Position actual value from the direct measuring system via distributed
I/O, safety-related communication using F-module at the backplane bus.
RSS: Fail-safe reference switch, safety-related mounting
Safety note
When the safely transferred relative position actual value (MSSI(R)) of the
SINAMICS S120 is used in the control system, then the following FAQ should be
taken into consideration:
https://support.industry.siemens.com/cs/ww/de/view/109746390
The reference to the absolute position at the control system level is established
using block LFASRS_SafePosition described in Chapter 3.2.
In variant 1, the use of the safely transferred relative position actual value
(MSSI(R)) is not permissible. In this case, the safely transferred absolute position
actual value (MSSI(A)) of the SINAMICS S120 must be used in the control
system.
To be able to use the safety function integrated in the drive, for the subsequently
described software architecture, it is assumed that all motor encoders are SIN/COS
encoders and these are read in from the safety program using a fail-safe telegram.
A second encoder is used for the plausibility check based on the configuration
variants described above.
© Siemens AG 2018 All rights reserved
The various encoder variants are listed in Chapter 1.2. Which variant is used
depends on the particular application. When using the subsequently described
drive software solution in a safety-related application, it is absolutely necessary that
one of the described variants is used.
As a result of the various encoder variants and the resulting wide range of
hardware variants that can be used, the safety integrity level (SIL) of the safety
functions are defined by the user. In order to comply with EN 528:2021, as a
minimum this must correspond to SIL2/PLr d over the complete safety function
(Acquire-> Evaluate -> Respond).
To provide verification, this section describes the parameters that the software
solution has a direct influence on when calculating the safety integrity level based
on EN 62061:2015. Only block "Acquire" is described. Block "Evaluate"
corresponds to a SIMATIC F-CPU with STEP7 Safety Advanced, certified up to
SIL3/PL e, block "React", a SINAMICS S120, certified up to SIL2/PL d. The precise
characteristic values of blocks Evaluate and React are specified in the appropriate
data sheets.
While variants 2, 3a), 3b), 4a) and 4b) comply with the requirements according to
subsystem D, variant 1 complies with the requirements according to subsystem C,
as subsequently shown:
2. The failure of a subsystem element does not result in the loss of the SRCF, as this error would be detected as a result of the comparison
value as well as the plausibility check (due to the redundant architecture). It follows immediately from this that HFT = 1.
3. According to EN 62061:2015 Table 5, for HFT = 1 and SFF ≥ 0.99 a SIL CL of 3 is obtained.
The assessment of common cause failures according to EN 62061:2015 Annex F.1 is shown in the following table. In some instances, measures
against common cause failure are as a result of the solution implemented in the ASRM block library, and in some instances users must take the
appropriate measures. The measures that the user must always apply are appropriately marked in the subsequent table. If additional measures
should be applied, which are shown in gray in the table, then this can improve the CCF factor and/or β value; conversely, measures that are not
applied reduce the CCF factor and/or β value.
Table 1-3: Assessing common cause errors according to EN 62061:2015 Annex F.1
Feature Reference Points Reason
Separation/isolation
Are SRECS signal cables for the individual channels routed separately from 1a 5
other channels at all positions or are they sufficiently protected?
Where information coding/decoding is used, is it sufficient for detecting signal 1b 10 Given as a result of the solution implemented
transfer errors? in the ASRM block library
Are SRECS signal cables and power cables separate at all positions or 2 5
adequately protected?
If subsystem elements can contribute to a CCF, are they provided as physically 3 5 Request that the user installs the sensor
© Siemens AG 2018 All rights reserved
The fail-safe function blocks for storage and retrieval machines were developed for
individual subfunctions in order to ensure that the blocks can be used in a modular
fashion.
automation system:
Safety Integrity Level SIL1 to SIL3 acc. to IEC 61508 2nd Edition
2.3 Software
The following Siemens SIMATIC software must be installed on the PC/PG in order
to use the fail-safe function blocks for storage and retrieval machines:
2.4.2 The ASRM block package was developed according to the following
standards:
• EN 528:2021
• EN ISO 13849-1:2015
• EN ISO 13849-2:2012
• EN 62061:2015
As shown in Chapter 2.4, the fail-safe function blocks for storage and retrieval
machines comply with the requirements as laid down in EN 528:2021.
The safety integrity of the particular safety function is only obtained through the
correct interconnection. This is the reason that the correct interconnection of each
fail-safe function block of this library and the overall functionality of the safety
functions must be validated with the application-specific hardware and software
using both positive and negative tests.
The tests should initially be performed in an area of the system that has sufficient
clearance to fixed end stops and limits. Further, it must be carefully ensured that
when performing any test the system can be safely stopped in the case of an
emergency.
© Siemens AG 2018 All rights reserved
For example, using trace recordings, the tests should be documented so that limit
value violations, shutdown conditions and stopping distances can be clearly
identified, so that a statement can be made about the correct function of each
individual safety function.
Safety note
Measures must be applied to protect against unauthorized changes and
manipulation. For at least online access, writing (fail-safe and standard), a CPU
password should be parameterized in the device settings. In the Safety
Administration, the safety program is password-secured against offline access
operations.
Safety note
Using non-fail-safe values from the standard part of the CPU in the fail-safe
program requires that these values are seamlessly consistent. Accordingly, it must
be ensured that the correlation does not influence non-fail safe programming or its
modification. After each program change, the integrity of these values must be
carefully checked as to whether writing cross-access operations occur.
It is recommended that the complete system, including fail-safe and non-fail-safe
parts, are protected against unauthorized external access according to the
relevant IT security guidelines.
LFASRS_LoadMonitor Function block for overload and slack rope detection with
the possibility of testing the measuring equipment
The following fail-safe blocks of the STEP7 Safety Advanced library are also
required:
F_TP (V1.4) Generates a pulse with a specific duration
Note The library blocks listed under SIMATIC STEP 7 Safety Advanced must be set to
the respective version releases before the ASRM library is integrated. In the
Safety Administration, the elements of the system library used must also be set
to Version 2.1. Otherwise, error messages can occur when compiling the safety
program.
Note To control the Safety Integrated functions of the SINAMICS drive family, the
LDrvSafe fail-safe library can also be used, which simplifies interconnecting the
relevant signals:
https://support.industry.siemens.com/cs/ww/de/view/109485794
For fail-safe blocks, a few special characteristics must be taken into account
regarding
block connections:
Note Although connections EN and ENO of the library blocks appear in the FBD/LAD
editor, they are neither evaluated nor supplied by the program code of the F-
block and may neither be interconnected nor parameterized.
Safety note
The specific configuration of the cycle time of the safety program depends on the
requirements obtained from the risk assessment for the machine for which the
blocks are used. The user is responsible for correctly performing the risk
assessment and appropriately configuring the times.
Note ASRM blocks can be called as multi-instance blocks without any restrictions.
The response times required should be taken from the applicable risk assessment.
This involves a package of blocks that can be universally used; as a consequence,
a specific value for the response times of the individual safety functions cannot be
specified.
Safety note
Depending on the required response time, parameters sampleTime (and
therefore the call interval of the safety program) as well as possiSampleTime
should be parameterized in the ASRM blocks so that they are always shorter
than the maximum permitted response time. It should be carefully taken into
consideration that the hardware components used also influence the response
time. The achieved response time from sensor to actuator can be calculated
using table s7safety_rttplus.
© Siemens AG 2018 All rights reserved
3.1.8 Runtimes
The runtime values of the fail-safe ASRM blocks on the supported F-CPUs
required to calculate the response time can be taken from the table in Attachment
I).
Safety note
The user is obliged to ensure that the ASRM blocks are only interconnected and
parameterized in compliance with the standards applicable for the application.
This especially applies to the test rates for the brake test and the overload/slack
rope detection (slack condition protection) as well as all load and velocity limits.
Safety note
All of the position limits must be selected so that when these are exceeded the
particular axis can come to a standstill before the end of the travel range. The
value to be parameterized is also dependent on the maximum velocity to be
expected for the specific application as well as the maximum possible and
permissible deceleration.
3.2 LFASRS_SafePosition
3.2.1 Introduction
positions between the motor encoder and the second encoder used for the
plausibility check must not deviate from each other by more than the slip tolerance
so that the velocity value can be regarded as safe. The safe position and velocity
form the basis for the other blocks described in this document.
A redundant position acquisition is always required if the position cannot be
uniquely acquired using the motor encoder from Safety Integrated (SI) in the drive.
This is the case if the encoder cannot be mounted in a safety-related fashion or the
mechanical system manifests slip or elongation (e.g. travel gear with wheel-rail
system or hoisting gear with a cable winch). The position-referred safety functions
in SI of the SINAMICS S120 can then no longer be used. A direct measuring
system must be used for position monitoring. This is realized in the F-CPU via this
block. The motor measuring system can then only serve to check the plausibility of
the direct position actual value.
For applications where a higher degree of slip can be expected, or a higher degree
of availability is demanded, then the block provides the option of deriving the safe
position based on a discrepancy comparison from two direct measuring systems.
Note When using this block, block F_BO_W (FC 176) must be in the block folder. It is
not permissible that these are renumbered!
© Siemens AG 2018 All rights reserved
3.2.2 Connections
All variables, type bool listed in the following table are preassigned FALSE, all
integer variables are preassigned 0 and all word variables are preassigned
W#16#0.
Inputs
Table 3-2
Data
Name Description
type
sampleTime DInt Block sampling time [ms]
Call interval of the safety program
posConfig Bool Configuration word for encoder interconnection
1: two direct measuring systems + motor encoder
0: one direct measuring system + motor encoder
1st direct measuring system - measured value
pos1 DInt
[mm]
1st direct measuring system - encoder signal
pos1Valid Bool
status
1: Encoder signal valid
0: Encoder fault
2nd direct measuring system - measured value
pos2 DInt
[mm]
2nd direct measuring system - encoder signal
pos2Valid Bool
status
1: Encoder signal valid
0: Encoder fault
Motor encoder Safety Integrated - measured
possi DInt
value [µm]
Motor encoder Safety Integrated - encoder signal
possiValid Bool
status
1: Encoder signal valid
0: Encoder fault
possiSampleTime DInt SINAMICS Safety Integrated - sampling time [ms]
Sampling time of SI configured in the drive
possiCount DInt SINAMICS Safety Integrated - cycle counter [ms]
cyclic counter value of telegram 902
posMin DInt min. permissible position [mm]
posMax DInt max. permissible position [mm]
max. permissible encoder deviation pos1 to
discrepancyAfterFailure DInt
© Siemens AG 2018 All rights reserved
Outputs
Table 3-3
Name Data type Description
safePos DInt safe position actual value [mm]
safe position (for all additional blocks of this block package)
© Siemens AG 2018 All rights reserved
Structure of DIAG
Table 3-4
Bit Description Reset condition
1 <= possi_sampleTime <= 1023
vSyncIntervall > 0
0 < sampleTime <=
2 * possi_sampleTime
vDiscWindow >= 0
0 Value range violation of the input variables
discrepancyAfterFailure >= 0
discrepancyPos1PossiMax >=
discrepancyPos1PossiMin
discrepancyPos1Pos2 >= 0
discrepancyStartupPos1 >= 0
Relationship of the input variables with respect
vSyncIntervall / sampleTime are an integer
1 to one another cannot be represented as integer
multiple of one another
multiple
vMax >= vStandstill
incorrect reference of the input variables with
2
respect to one another posMax >= posMin
at ack
Actual position >= posMin and pos. signal edge
4 Actual position < posMin
at ack
Actual velocity <= vMax and pos. signal edge at
5 Actual velocity > vMax
ack
Velocity discrepancy <= vDiscWindow and
6 max. permissible velocity discrepancy exceeded
positive signal edge at ack
Reference point approach and positive signal
7 Initial referencing is missing
edge at reference
pos1 – possi > discrepancyPos1PossiMax pos. Signal edge at sync
8
(2-encoder system)
9 pos1Valid/possiValid/pos2Valid == 0 dependent on diag bits 10 - 12
After an encoder fault: "Position actual value pos1" – "Last valid
"Actual position actual value pos1" – "Last valid position actual value pos1" <=
10 position actual value pos1" > discrepancyStartupPos1 and pos. signal edge at
discrepancyStartupPos1 ack or pos. signal edge at sync
(2-encoder system)
After an encoder fault: pos1 – possi <= discrepancyAfterFailure and
11 pos1 – possi > discrepancyPos1PossiMax pos. signal edge at ack or pos. signal edge at
(2/3-encoder system) sync
After an encoder fault: pos1 – pos2 <= discrepancyAfterFailure and
12 pos1 – pos2 > discrepancyPos1Pos2 pos. signal edge at ack or pos. signal edge at
(3-encoder system) sync
13 Internal calculation error pos. Signal edge at ack if the error has gone
14 Reserved ---
15 Reserved ---
3.2.3 Interrelationship between the assignment of the block inputs and the
drive configuration
The safe absolute position actual value from the drive is transferred as a 32 bit
value in unit µm via PROFIsafe telegram 902. For this purpose, in the converter
"Extended functions via PROFIsafe" must be set and the safety functions enabled.
The drive type must then be set to linear axis, the monitoring cycle is subsequently
important for the parameterization at the block.
Fig. 3-3: Safety Integrated configuration
1-encoder variant
Here, the safe position as well as the safe absolute position must be enabled for
transfer. The safe position value must be valid and the axis must have been safely
referenced. Function SLP can be activated and used in the drive. Alternatively, this
monitoring can be realized using block LFASRS_SLPMonitor of this library.
Note When using block LFASRS_SafePosition, the safety note from 1.2.1 must be
carefully taken into consideration. Outputs safePos, posValid and referenced are
not permissible and only safe velocity safeV may be used.
Note
The following parameters must be parameterized corresponding to the
specifications (Chapter 1.2.1) even if they are not relevant for a pure safe
velocity calculation:
- posMin
- posMax
- discrepancyAfterFailure
- discrepancyPos1PossiMin
- discrepancyPos1PossiMax
- discrepancyStartupPos1
Note The encoder values at pos1 and pos2 must always be positive.
Safety note
The signals interconnected at pos1 and pos2 must originate from two independent
sources. If a signal source is jumpered at both inputs, then non-plausible values
of this channel cannot be detected, for example. The safety integrity of the block
is then no longer guaranteed.
Safety note
Encoder value possi moves in the range between -737280mm and +737280mm.
An overflow can occur if possi assumes values higher than +737280mm or
values less than-737280mm. As a result of the high value change as well as the
resulting discrepancy, the enable signals are reset and the system initiates the
shutdown response specified by the user. This is why possi must be monitored
for excessively low/excessively high values.
© Siemens AG 2018 All rights reserved
Parameterization
Safety note
For an error-free exchange of the actual position value for pos1/pos2 between the
DB of the technology object and the safety program, the conversion from the real
data type to DInt in OB1 (or another OB that has a lower priority than the F-OB)
must be implemented directly or in a lower-level block. Only in this way can the
integrity of the safety program be guaranteed. The converted position actual value
should be saved in a transfer DB, which is only used for transferring data between
the standard and safety program.
Safety note
The block must be parameterized with fixed values, and must not be performed
via variables during the CPU runtime.
vSyncIntervall / sampleTime
Further, the following relationships between the input variables must exist:
vMax >= vStandstill
posMax >= posMin
Sampling rates
To calculate the velocity, the SI cycle in the drive (possiSampleTime) is used as
time base, and not the block cycle of the LFASRS_SafePosition block on the
CPU (sampleTime, generally the call interval of the safety program). To avoid
inadmissibly high subsampling, it must be ensured that the ratio sampleTime =>
2x possiSampleTime. Likewise, sampleTime must be an integer multiple of
possiSampleTime.
The permissible value ranges of the individual inputs should be taken from the
table describing the inputs.
The block detects if not all of the specified preconditions are satisfied, and signals
this by setting the appropriate diag bits.
Note
The block only checks the parameterization for the 1st call. This increases the
performance for further operation of the block.
As a consequence, changing the parameterization is not possible while the
system is operational. The safety program must be regenerated and loaded each
time that the operating parameters of the block are changed.
Starting behavior
© Siemens AG 2018 All rights reserved
Note When considering differences between position actual values pos1 and possi or
pos1 and pos2, reference is always made to the position actual values (with
offset) with reference to the reference point.
An alignment of possi to pos1 or pos2 to pos1 is always made to the position
actual value (with offset) (with reference to the reference point) of pos1.
11. After a CPU restart, outputs vValid, posValid and referenced initially have a
signal of 0.
12. To be able to travel to the reference point, posValid must be set to 1 by
aligning both encoders using a positive signal edge at sync. The position actual
value is now valid and can be used for making statements regarding the
relative position; however, a safe absolute evaluation of the position is still not
permissible as long as referenced signals a 0.
As long as referenced supplies a 0 signal, then the position is only suitable for a
relative reference, an absolute evaluation is only permissible for referenced = 1.
Depending on the specific application, for referenced = 0, the system must only
WARNING
travel with a safely reduced velocity.
13. If the axis is located at the reference point defined using input referencePos,
then the block is referenced using a positive signal edge at reference,
referenced changes to 1. The position actual value output at safePos is now
also suitable for absolute value evaluation.
Note
An encoder fault should always result in the withdrawal of input signal pos1Valid
or possiValid/pos2Valid. As a consequence, the safety-related actual value is
immediately declared to be invalid and the position tolerance monitoring hidden.
As a consequence, an encoder fault does not mean that the safety-related
reference is immediately lost and the safe position can be reproduced after the
encoder returns.
15. The safe position actual value is output via output safePos. A 1 signal at output
posValid indicates that the safe position actual value is valid. A 1 signal at
output referenced indicates that the safe position actual value may be used as
safe absolute position actual value. For a 0 signal at output referenced, the
safe position actual value may only be used as safe, relative position actual
value.
16. If an invalid position actual value is signaled at inputs pos1Valid and/or
possiValid using a 0 signal, or a step in the position actual value of pos1 is
detected (position change > 2x maximum velocity vMAx), then outputs
posValid, referenced and vValid are reset to 0, output error is set to 1, and in
output word diag bit 9 is set to 1 and depending on the cause, bit 10 or 11 is
set to 1. In addition, the last valid position actual value from pos1 is internally
saved.
17. If position actual values are signaled as again being valid at inputs pos1Valid
and possiValid using a 1 signal, the block checks whether the safety-related
© Siemens AG 2018 All rights reserved
reference is still valid. For this purpose, safe referencing must have been
already performed.
18. One of the following conditions must be satisfied in order to declare that a
safety-related reference is still valid:
a. If the difference between position actual values from pos1 and possi
(with the associated position offset (see Point 15)) lies within the
parameterized tolerance window discrepancyAfterFailure and the
value of possi is greater than ‚0‘, then the reference is declared to be
still valid.
b. If the difference between the position actual value of pos1 and the last
valid saved position actual value from pos1 lies within the
parameterized tolerance window discrepancyStartupPos1, then the
reference is declared to be still valid. For deviations, bit 10 in output
word diag is set to 1.
19. If, using the techniques described in Points 18a and/or 18b, the safety-related
reference can still be declared valid, then output ackReq is set to 1 and the
error state can be acknowledged using a positive signal edge at input ack.
Outputs posValid, referenced and vValid are again set to 1, outputs error and
ackReq are reset to 0, and bits 9, 10 and 11 are reset to 0 in output word diag.
Position actual value possi is aligned with respect to position actual value pos1
as described under Point 13.
20. If, using the technique described in Points 18a and/or 18b, the safety-related
reference cannot be declared as still valid, then a new safety-related reference
must be performed using a reference point approach. For this purpose, using a
positive signal edge at input sync, as described under Point 52, the encoder
can be aligned (output ERROR is reset to 0 and in output word DIAG, bits 9,
10 and 11 are reset to 0), and after the reference point approach as described
under Point 13, the safety-related referencing is carried out.
21. If the difference between the position actual values of pos1 and possi (with the
associated position offset) for position actual values that are signaled valid
25. If safePos falls below the value of posMin, then output error is set to 1 and bit 4
is set to 1 in output word diag. Output posvalid is reset to 0.
© Siemens AG 2018 All rights reserved
26. If safePos again exceeds the value of posMin, then output ackReq is set to 1,
and the error state can be acknowledged using a positive signal edge at input
ack. Output error and ackReq are reset to 0, bit 4 is set to 0 in output word
diag. Output posValid is again set to 1.
27. To generate the safe position, the position actual values must be valid, which is
signaled to the block using a 1 signal at inputs pos1Valid, possiValid and
pos2Valid.
Note
An encoder fault should always result in the withdrawal of input signal pos1Valid,
possiValid or pos2Valid. As a consequence, the safe position actual value is
immediately declared as invalid. As a consequence, an encoder fault does not
mean that the safety-related reference is immediately lost but can be reproduced
after the encoder returns.
28. The safe position actual value is output via output safePos. A 1 signal at output
posValid signals that the safe position actual value is valid. A 1 signal at output
referenced indicates that the safe position actual value may be used as safe
absolute position actual value. For a 0 signal at output referenced, the safe
position actual value may only be used as safe, relative position actual value.
29. If the position actual values are valid, then output syncReq is set to 1, and
using a positive signal edge at sync, the encoders can be aligned, i.e. any
existing or initial discrepancy between the position actual values of encoders
pos1 and possi as well as pos1 and pos2 (only if no safety-related reference is
available) is set to 0 with respect to the position actual value of pos1. The
outputs posValid and vValid are set to 1.
30. If the system has still not been referenced, or it was not possible to restore the
internal block safety-related reference, then bit 7 is set to 1 in output word diag.
31. If the position actual value is valid and the system is at the reference point, a
safe reference can be performed in the block with a positive signal edge at
reference, where for pos1, possi and pos2, a separate position offset relative to
the value specified at input referencePos is determined, which is then stored
internally. Outputs posValid, referenced and vValid are set to 1 if referencing
was successful. Bit 7 is reset to 0 in output word diag.
32. The block itself does not provide any retraction logic. Using a suitable logic
interconnection outside the block, it must be ensured that for a 0 signal at input
referenced the axis can only travel with a safely reduced velocity.
© Siemens AG 2018 All rights reserved
38. If, using the technique described in Point 36, the safety-related reference
cannot be declared as still valid, then a new safety reference must be
performed using a reference point approach. The For this purpose, using a
positive signal edge at input sync, as described under Point 29, the encoder
can be aligned (output error is reset to 0 and in output word diag, bits 9 and 12
are reset to 0). As the safety-related reference is no longer available, in
addition to position actual value possi, position actual value pos2 is also
aligned with respect to position actual value pos1. The safety-related reference
can be performed after the reference point approach, as described under Point
31.
39. If safePos exceeds the value of posMax, then output error is set to 1 and bit 3
is set to 1 in output word diag. Output posValid is reset to 0.
40. If safePos again falls below the value of posMax, then output ackReq is set to
1, and the error state can be acknowledged using a positive signal edge at
input ack. Output error and ackReq are reset to 0, bit 3 is set to 0 in output
word diag. Output posValid is again set to 1.
41. If safePos falls below the value of posMin, then output error is set to 1 and bit 4
is set to 1 in output word diag. Output posValid is reset to 0.
42. If safePos again exceeds the value of posMin, then output ackReq is set to 1,
and the error state can be acknowledged using a positive signal edge at input
© Siemens AG 2018 All rights reserved
ack. Output error and ackReq are reset to 0, bit 4 is set to 0 in output word
diag. Output posValid is again set to 1.
As long as referenced has a 0 signal, then the position is only suitable for a relative
reference, an absolute evaluation is only permissible for referenced = 1.
Depending on the specific application, for referenced = 0, the system must only
WARNING
travel with a safely reduced velocity.
The position actual value is not safely generated as long as posValid has a 0
signal. For a falling signal edge, a stop response should be initiated on an
application-for-application basis.
WARNING
43. The safe velocity calculated by the block from the absolute actual position
value of the motor encoder interconnected at possi is output at output safeV.
Note To increase the resolution, the velocity is output in unit [mm/min] instead of
[mm/s].
44. If safeV falls below the value parameterized at vStandstill, then at output
standstill this standstill is signaled using a 1 signal.
45. If safeV is higher/equal to vStandstill, then a 1 signal is output at
movesPositive, if safePos assumes increasingly higher values over time or a 1
signal is output at movesNegative if the values of safePos assume increasingly
lower values over time.
46. If safeV exceeds the value parameterized at vMAx, error and diag bit 5 are set
to 1. vValid is reset to 0.
47. If safeV again falls below the value parameterized at vMax, then ackReq is set
to 1, and the error state can be acknowledged using a positive signal edge at
input ack. Error and ackReq are reset to 0 and bit 5 is reset to 0 in output word
diag. Output vValid is again set to 1.
© Siemens AG 2018 All rights reserved
48. To what extent (specified in [mm]) the values of pos1 and possi may deviate
from one another within the vSyncIntervall (data in [ms]) without resulting in a
velocity error is parameterized at input vDiscWindow.
49. After the time parameterized at vSyncIntervall, the discrepancy of the relative
position from pos1 to possi, which has accumulated in the block, is reset in
order to facilitate a specific slip tolerance.
50. If the offset between pos1 and possi exceeds the value parameterized at input
vDiscWindow, then output error is set to 1, and bit 6 is set to 1 in output word
diag. Output vValid is reset to 0.
51. If the offset between pos1 and possi falls below the value parameterized at
input vDiscWindow, then output ackReq is set to 1, and the error state can be
acknowledged with a positive signal edge at input ack. Outputs error and
ackReq are reset to 0, and bit 6 in output word diag is reset to 0. Output vValid
is again set to 1.
As long as vValid supplies a 0 signal, then the velocity actual value has not been
safely generated.
WARNING
Referencing
52. If the system has still not been referenced, or it was not possible to restore the
internal block safety-related reference, then bit 7 is set to 1 in output word diag.
53. With a positive signal edge at reference, in the block a safety adjustment is
performed, where for the two raw position values, a separate position offset
relative to the value specified at input referencePos is determined and saved.
Output referenced is set if referencing was successful.
54. For successful referencing, both encoder actual values must be valid
(pos1Valid & possiValid (for posConfig = 0) or pos1Valid & pos2Valid &
possiValid = 1 (for posConfig = 1)
55. referenced is then set with a rising edge at input reference and the offsets are
internally saved.
56. referenced is withdrawn as soon as one of the tolerances defined in the
particular encoder variant is violated.
Note After an encoder fault, the block is able to reproduce the safe position safePos
without having to perform a reference point approach. If pos1Valid and
possiValid or pos2Valid (depending on whether posConfig= 0/1) have a rising
edge after the encoder returns, then after acknowledgment, the reference is
declared as being valid again in the block, as described for the particular
encoder variant.
© Siemens AG 2018 All rights reserved
Safety note
The signal for reference must be generated in a safety-related fashion, e.g. by
using reference mark switches. When referencing, the user must make a visual
inspection to ensure that the mechanical position corresponds to the reference
position, and referencing is performed using user acknowledgment at input
reference.
Note An encoder fault should always result in the withdrawal of input signal pos1Valid
or possiValid/pos2Valid. As a consequence, the safety-related actual value is
immediately declared to be invalid and the position tolerance monitoring hidden.
As a consequence, an encoder fault does not mean that the safety-related
reference is immediately lost and the safe position can be reproduced after the
encoder returns.
Synchronizing encoders
57. Output syncReq is set to 1 if synchronization is required. If the position actual
values are valid, using a positive signal edge at sync, the encoders can be
aligned, i.e. a discrepancy that has been established or an initial discrepancy
between the position actual values of encoder pos1 and possi as well as pos1
and pos2 (only for 3-encoder systems) is set to 0 with respect to the position
actual value of pos1. The outputs posValid and vValid are set to 1.
Cyclic synchronization means that the two channel architecture is overridden for
the position actual value processing and is therefore not permissible. When
synchronization is permissible, depends on the specific application and the user
WARNING is responsible for applying the correct logic interconnection.
Acknowledging errors
58. Assuming that an error is no longer active, diag and error are reset to 0 via a
positive signal edge. As soon as the block can be acknowledged, this is
indicated by a 1 signal at output ackReq. ackReq is reset to 0 after a positive
signal edge at ack.
Safety note
It is only permissible that qualified technical personnel acknowledge faults who
can assess the reason for the failure and the subsequent safety integrity.
A separate acknowledgment possibility must be provided to acknowledge this
error.
discrepancy from the instance DB of the block can be read-out for diagnostic
purposes.
For the position discrepancy, static variable "statPos1Pos2Delta" or
"statPos1PossiDelta", for the velocity discrepancy, static variable
"statVDiscrepancy".
3.3 LFASRS_SLPMonitor
3.3.1 Introduction
Note When using this block, block F_BO_W (FC 176) must be in the block folder. It is
not permissible that this is renumbered!
3.3.2 Connections
All variables, type bool listed in the following table are preassigned FALSE, all integer
variables are preassigned 0, and all word variables are preassigned W#16#0, unless
explicitly listed otherwise in the following table
Inputs
Table 3-5
Name Data type Description
safePos DInt Safety-related actual position [mm]
is supplied from the LFASRS_SafePosition
block.
posValid Bool Actual position valid
is supplied from the LFASRS_SafePosition
block.
1: Position plausible
0: Position not plausible, e.g. discrepancy
between the two encoders is outside the
specified tolerance.
If a 0 signal is present here, then bit diag. No.
5 is set.
referenced Bool Safe position is referenced
is supplied from LFASRS_SafePosition block
© Siemens AG 2018 All rights reserved
Outputs
© Siemens AG 2018 All rights reserved
Table 3-6
Name Data type Description
slsThreshold DInt SLS limit [mm/min]
The maximum traversing velocity
that is presently permissible is
output at this output. In normal
operation, this is 2147483647;
vMaxRelease is output here if the
user performs a retraction operation.
If vMaxRelease should be
parameterized <= 0, then substitute
value 1 is output here.
slsOk Bool Status SLS limit
1: safeV is less than/equal to
slsThreshold
0: safeV has exceeded the
slsThreshold value.
A stop response should be initiated
if this output should switch to 0.
xNegativeOk Bool Minimum position status
1: safePos is greater than/equal to
xNegative
0: safePos has fallen below the
value of xNegative.
A stop response should be initiated
if this output should switch to 0.
xPositiveOk Bool Maximum position status
1: safePos is less than/equal to
xPositive
0: safePos has exceeded the value
of xPositive.
Structure of diag
Table 3-7
Bit No. Description Reset condition
0 Lower end position was fallen below While retracting safePos >=
xNegative and positive signal edge at
ack
1 Upper end position was exceeded While retracting safePos <= xPositive
and positive signal edge at ack
2 Actual velocity higher than the retraction safeV <= slsThreshold and pos.
velocity signal edge at ack
3 Reserved ---
4 Parameterization error retraction velocity 0 < vMaxRelease <= 2147483647
parameterized
5 Actual position invalid Actual position again valid
6 Actual velocity invalid Actual velocity is again valid
7 Actual position valid however not Actual position valid and referenced
referenced
8 Reserved ---
9 Reserved ---
10 Reserved ---
11 Reserved ---
12 Reserved ---
13 Reserved ---
© Siemens AG 2018 All rights reserved
14 Reserved ---
15 Reserved ---
Parameterization
1. The user must interconnect the safety-related position actual value of the
system to be monitored at the safePos input and its validity AND'ed with the
valid reference (referenced) at input posValid. Block "LFASRS_SafePosition"
(Chapter 3.2) provides the three signals as output.
2. Inputs safeV and vValid, which refer to the safe actual velocity, respond in the
same way.
3. The permitted range for the travel distance is parameterized by specifying the
upper and lower limit at inputs xPositive and xNegative.
4. vMaxRelease must lie in the range 1 – 2147483647. If values less than 1 or
values higher than 2147483647 are parameterized, then the block detects this
and diag bit 4 is set. error changes to 1.
The block detects if not all of the specified preconditions are satisfied, and signals
this by setting the appropriate diag bits.
Note
The block only checks the parameterization for the 1st call. This increases the
performance for further operation of the block.
With the exception of xNegative and xPositive, this means that
reparameterization is not possible when the system is operational. The safety
program must be regenerated and loaded each time that the operating
parameters of the block are changed.
Position monitoring
5. As long as the position actual value is valid and is in the parameterized range,
the block does not signal an error, i.e. outputs error and diag supply a 0 signal.
6. If the position actual value is in the permissible range, but is however marked
as being invalid due to posValid = 0, then an error code is also output to diag.
error remains in the current state until acknowledgment, assuming that no
additional faults are received as a result of an additional active monitoring
function. All other outputs keep their current status up until acknowledgment or
until release is deselected. In this case diag bit No. 5 is set.
7. As soon as posValid changes back to 1, then diag bit No. 5 again indicates a 0
signal.
8. As soon as safePos lies outside the parameterized travel range, depending on
the direction in which this was exited, then xPositiveOk or xNegativeOk is set
to 0. A stop response in the drive must then be initiated in the user
interconnection.
9. In addition, diag bit No. 0 is set when the lower end position is fallen below or
© Siemens AG 2018 All rights reserved
diag bit No. 1 is set when the upper end position is exceeded. error is set to 1.
10. Monitoring in the positive direction can be deactivated with
enableMonitoringPositive = false; if the input = false, then the position specified
at xPositive can be exceeded without the block indicating a response at the
enable outputs. Monitoring in the negative direction can be bypassed with
enableMonitoringNegative = 0; if the input = false, then the position specified at
xNegative can be undershot without the block indicating a response at the
enable outputs.
11. The monitoring functions are reactivated by setting the inputs (= true). At the
time of activation, if a limit value is violated, the retract function (12) must be
used to move from this state back into the defined range. In this state, the
bypass cannot be reactivated.
Safety note
Block LFASRS_SafePosition signals a 0 signal at posValid via output error = 1.
When posValid drops out, then a stop response in the drive must be initiated via
a user interconnection. All other blocks indicate this status using an error code;
however, to avoid a flood of messages, error is not again set here to a 1 signal.
The end positions are no longer monitored. Active errors of the end position
monitoring can be immediately acknowledged xNegativeOk, xPositiveOk and
slsOk are set again.
If a 1 signal is again available at posValid, then the associated diag bit 5 is reset
and the end position monitoring continued.
Retraction
12. To return from the end position into the permitted travel range, the retraction
function of the block can be activated with a positive signal edge at release.
The velocity parameterized at vMaxRelease is then output at slsThreshold, and
depending on the direction of the end range violation, movePositiveOk or
moveNegativeOk is set to 0 to prevent additional motion that goes beyond the
end position. By establishing an interconnection with the associated SDI
signals of the drive (see Chapter 4.4), with movePositiveOk = 0, motion can be
inhibited in the positive direction and with moveNegativeOk = 0, motion can be
inhibited in the negative direction.
© Siemens AG 2018 All rights reserved
Note When using the SDI function of the drive, signals movePositiveOk and
moveNegativeOk can be used. The outputs of block LFASRS_SLPMonitor
indicate that motion in the positive or negative direction is enabled. For SDI+ and
SDI-, SDI inhibits the respective direction. This is the reason that
movePositiveOk must be interconnected with SDI- and moveNegativeOk with
SDI+.
Note The signal for release must be generated in a safety-related fashion, e.g. by
using a key switch or similar.
19. To exit this state, initially vValid must be set back to a 1 signal by
acknowledging via block LFASRS_SafePosition.
20. Retraction can then be continued. Alternatively, a jump can be made back to
the initial state by deselecting release and then acknowledging. If safePos still
lies outside the parameterized travel range, then the system responds
corresponding to Point 8.
Safety note
Block LFASRS_SafePosition signals a 0 signal at vValid via output error = 1.
When vValid drops out, then a stop response in the drive must be initiated using
an appropriate user interconnection. All other blocks indicate this status using an
error code; however, to avoid a flood of messages, error is not again set here to
a 1 signal. The retraction velocity is no longer monitored. Active errors for the
retraction monitoring can be immediately acknowledged, slsOk is set again.
Retraction via release can be normally exited, movePositiveOk and
moveNegativeOk are set again. If the axis is not in the valid position range at this
point in time, then xPositiveOk or xNegativeOk is withdrawn and error is set.
If a 1 signal is again available at vValid, then the associated diag bit 6 is reset,
and a possibly active retraction travel is again monitored.
Safety note
© Siemens AG 2018 All rights reserved
Acknowledging errors
21. Assuming that an error is no longer active, diag and error are reset to 0 via a
positive signal edge. As soon as the block can be acknowledged, this is
indicated by a 1 signal at output ackReq. ackReq is reset to 0 after a positive
signal edge at ack.
3.4 LFASRS_Endzone
3.4.1 Introduction
The fail-safe LFASRS_Endzone function block is used to safety monitor the end
positions of a travel range or to monitor for collisions between two systems. If the
monitored system approaches the parameterizable positive and/or negative end
position, then its maximum permitted velocity, dependent on the current position
along a parameterizable curve, is monitored down to standstill to ensure that it
does not exceed the set limit. The curve is parameterized using a fail-safe array
with up to 10,000 interpolation points (maximum permissible velocity referred to a
position). Input SCALE allows the end zone to be scaled as integer number up to
100 meters.
If the axis travels beyond the end position, or the maximum permitted velocity is
exceeded, then the block signals this and, depending on the user interconnection,
a stop response initiated.
The block offers retraction logic so that after an end position has been passed, the
axis can return to the permitted travel range. Using this, the axis can be moved
away from the end position at a safe low velocity that can be parameterized at the
block. To inhibit traversing further towards the end stop, the block provides two
© Siemens AG 2018 All rights reserved
Note When using this block, block F_BO_W (FC 176) must be in the block folder. It is
not permissible that this is renumbered!
3.4.2 Connections
All variables, type bool listed in the following table are preassigned FALSE, all
integer variables are preassigned 0 and all word variables are preassigned
W#16#0.
Inputs
Table 3-8
Data
Name Description
type
scaleFactor DInt Scaling factor for the end zone
The factor allows the end zone to be extended to a
range of up to 100 meters
scaleFactor must be parameterized in the range 0 <
scaleFactor <= 10
safePos DInt Safety-related actual position [mm]
is supplied from the LFASRS_SafePosition block.
posValid Bool Actual position valid
is supplied from the LFASRS_SafePosition block.
1: Position plausible
0: Position not plausible, e.g. discrepancy between
© Siemens AG 2018 All rights reserved
Data
Name Description
type
is stopped as soon as a 0 signal is present at this
input while retracting.
enableMonitoringNegative Bool Activating monitoring in the negative limit range
0 = Monitoring for falling below position and velocity
limits at xNegative is deactivated
1 = Monitoring for falling below position and velocity
limits at xNegative is activated.
Default assignment = 1
enableMonitoringPositive Bool Activating monitoring in the positive limit range
0 = Monitoring for exceeding position and velocity
limits at xPositive is deactivated
1 = Monitoring for exceeding position and velocity
limits at xPositive is activated.
Default assignment = 1
ack Bool Acknowledgment
If an error has occurred in normal operation, then
this must be reset using ack before the system is
restarted.
The acknowledgment is only realized for a positive
signal edge at ack; in normal operation this has no
effect.
© Siemens AG 2018 All rights reserved
InOut
Table 3-9
Name Data type Description
end zone Array of F-array with interpolation points to define the end
DInt zone
Outputs
Table 3-10
Name Data type Description
slsThreshold DInt SLS limit [mm/min]
The maximum traversing velocity that is presently
permissible is output at this output. These are
cyclically calculated in the block by the parameterized
ramp function.
slsOk Bool Status SLS limit
1: safeV is less than/equal to slsThreshold
0: safeV has exceeded the slsThreshold value.
A stop response should be initiated if this output
should switch to 0.
xNegativeOk Bool Minimum position status
1: safePos is greater than/equal to xNegative
0: safePos has fallen below the value of xNegative.
A stop response should be initiated if this output
should switch to 0.
xPositiveOk Bool Maximum position status
1: safePos is less than/equal to xPositive
0: safePos has exceeded the value of xPositive.
A stop response should be initiated if this output
should switch to 0.
moveNegativeOk Bool Negative movement permitted
Structure DIAG
Table 3-11
Bit No. Description Reset condition
0 Lower end position was fallen below While retracting SAFE_POS <=
X_NEGATIVE and positive signal
edge at ACK
1 Upper end position was exceeded While retracting SAFE_POS <=
X_POSITIVE and positive signal
edge at ACK
2 Retraction velocity exceeded SAFE_V <= SLS_THRESHOLD
and pos. signal edge at ACK
3 Parameterization error envelope curve, Envelope curve according to
for remaining distance 0 the velocity is Chapter 3.4.3
not 0
4 Parameterization error retraction velocity 0 < VMAX_RELEASE <=
ENDZONE[9999].
5 Actual position invalid Actual position again valid
6 Actual velocity invalid Actual velocity is again valid
7 Reserved ---
8 Reserved ---
9 Actual velocity is too high regarding SAFE_V <= SLS_THRESHOLD
current position and direction and pos. signal edge at ACK
10 Reserved ---
11 Internal calculation error pos. Signal edge at ACK when the
error has gone
12 Reserved ---
13 Reserved ---
14 Reserved ---
Parameterization
1. The user must interconnect the safety-related actual position value of the
system to be monitored at input safePos, its validity is interconnected at input
posValid and the state of the referencing is interconnected at input referenced.
Block "LFASRS_SafePos" (Chapter 3.2) provides the three signals as output.
2. Inputs safeV and vValid, which refer to the safe actual velocity, respond in the
same way.
3. The lower end stop is parameterized using input xNegative and the positive
end stop using xPositive.
4. The velocity envelope curve of the end zone to be monitored is parameterized
using a max. 10,000 interpolation points (velocity with respect to distance)
using F-ARRAY "endzone[]" referred to the remaining distance to an end
position/end stop. Correspondingly, the velocity envelope curves in the positive
and negative end zones are symmetrical with respect to one another.
5. With scaleFactor == 1, every endzone[x] interpolation point emulates a mm
travel range. By increasing scaleFactor to a maximum factor of 10, for 10,000
possible interpolation points, the end position that can be mapped increases
from 10 m up to 100 m.
6. Interpolation point endzone[0] must be parameterized with endzone[0] := 0
© Siemens AG 2018 All rights reserved
mm/min. If not all 10.000 interpolation points are to be monitored over the
complete end zone range, then the remaining interpolation points must be
parameterized with the maximum velocity.
Value from
endzone[9
999]
X
0
xNegative xPositive
0 mm remaining distance ‚x‘ 9.999 mm
The block detects if not all of the specified preconditions are satisfied, and signals
this by setting the appropriate diag bits.
Safety note
The user must validate the parameterized envelope curve himself, and the
correct functionality must be verified by making the appropriate traces and tests
(see Chapter 3.1.1).
© Siemens AG 2018 All rights reserved
Note The requirements relating to monotonic increase and gradient of the envelope
curve depend on the specific application and the associated risk assessment.
Note
The block only checks the parameterization for the 1st call. This increases the
performance for further operation of the block.
With the exception of xNegative and xPositive, this means that
reparameterization is not possible when the system is operational. The safety
program must be regenerated and loaded each time that the operating
parameters of the block are changed.
Safety note
Block LFASRS_SafePosition signals a 0 signal at posValid via output error = 1.
When posValid drops out, then a stop response in the drive must be initiated via
a user interconnection. All other blocks indicate this status using an error code;
however, to avoid a flood of messages, error is not again set here to a 1 signal.
The maximum velocity and the envelope curve are no longer monitored. Active
errors for the maximum velocity and envelope curve monitoring can be
immediately acknowledged, slsOk is set again. Retraction via release can be
normally exited, movePositiveOk and moveNegativeOk are set again. If the axis
is not in the valid position range at this point in time, then xNegativeOk or
xPositiveOk is withdrawn and ERROR is set.
If a 1 signal is again available at posValid, then diag bit 5 is reset and the end
position and envelope curve monitoring continued.
Safety note
Block LFASRS_SafePosition signals a 0 signal at vValid via output error = 1.
When vValid drops out, then a stop response in the drive must be initiated using
an appropriate user interconnection. All other blocks indicate this status using an
error code; however, to avoid a flood of messages, error is not again set here to
a 1 signal. The maximum velocity and the envelope curve are no longer
monitored. Active errors for the maximum velocity and envelope curve
monitoring can be immediately acknowledged, slsOk is set again. Retraction via
release can be normally exited, movePositiveOk and moveNegativeOk are set
again. If the axis is not in the valid position range at this point in time, then
xNegativeOk or xPositiveOk is withdrawn and error is set.
If a 1 signal is again available at vValid, then diag bit 6 is reset and the maximum
velocity and envelope curve monitoring continued.
Retraction
© Siemens AG 2018 All rights reserved
20. The retraction function of the block can be activated by selecting release. If the
system is located within the permissible travel range, movePositiveOk and
moveNegativeOk are reset to 1, the velocity parameterized at vMaxRelease is
output at slsThreshold and this is internally monitored. The velocity envelope
curve is still monitored. If this supplies a value for the permitted velocity lower
than that parameterized at vMaxRelease, then the permitted velocity is limited
to the lower value. If the permitted travel range is exited, then the block
responds as described under Point 19.
21. To return from the end position into the permitted travel range, the retraction
function of the block can be activated by selecting release. The velocity
parameterized at vMaxRelease is then output at slsThreshold, and depending
on the direction of the end range violation, movePositiveOk or
moveNegativeOk is set to 0 to prevent additional motion in the end zone. By
establishing an interconnection with the associated SDI signals of the drive
(see Chapter 4.4), with movePositiveOk = 0, motion can be inhibited in the
positive direction and with moveNegativeOk = 0, motion can be inhibited in the
negative direction.
Note When using the SDI function of the drive, signals movePositiveOk and
moveNegativeOk can be used. The outputs of block LFASRS_SLPMonitor
indicate that motion in the positive or negative direction is enabled. For SDI+ and
SDI-, SDI inhibits the respective direction. This is the reason that
movePositiveOk must be interconnected with SDI- and moveNegativeOk with
SDI+.
Note The signal for release must be generated in a safety-related fashion, e.g. by
using a key switch or similar.
22. vMaxRelease must lie in the range 1 – endzone[9999]. If values less than 1 or
values higher than endzone[9999] are parameterized, then the block detects
this and signals it using diag bit 4. error changes to 1.
23. To facilitate retraction, xPositiveOk or xNegativeOk are reset to 1 when release
is selected; the stop response of the drive should then be deselected using a
suitable user circuit.
24. If, while retracting, safeV exceeds the value of vMaxRelease or the permissible
velocity of the opposing end zone, assuming that this lies below vMaxRelease,
then slsOk changes to 0 and diag bit 2 is set.
25. A velocity error can always be acknowledged if the actual velocity safeV lies
below slsThreshold.
26. As soon as safePos is back in the parameterized permitted range, after
acknowledgment, the axis can again be moved with the full velocity, i.e. the
permitted velocity of the envelope curve monitoring is output at slsThreshold
and monitored.
error and diag change back to 0.
27. While safePos is outside the parameterized traversing range, if vValid = 0, then
the retraction velocity can no longer be safely monitored. As a consequence,
selection via release = 1 has no effect.
28. To continue retraction, a 1 signal must be again set at block
LFASRS_SafePosition by acknowledging vValid.
29. Retraction can then be continued. Alternatively, a jump can be made back to
the initial state by deselecting release and then acknowledging. If safePos still
lies outside the parameterized travel range, then the system responds
© Siemens AG 2018 All rights reserved
Safety note
The parameterization of input vMaxRelease must be adapted to the safely
reduced speed permitted according to the application-specific risk assessment.
Acknowledging errors
Assuming that an error is no longer active, diag and error are reset to 0 via a
positive signal edge. As soon as the block can be acknowledged, this is indicated
by a 1 signal at output ackReq. ackReq is reset to 0 after a positive signal edge at
ack.
3.5 LFASRS_SBRMonitor
3.5.1 Introduction
Note When using this block, block F_BO_W (FC 176) must be in the block folder. It is
not permissible that this is renumbered!
3.5.2 Connections
All variables, type bool listed in the following table are preassigned FALSE, all
integer variables are preassigned 0 and all word variables are preassigned
W#16#0.
Exceptions:
Name Initial value
ramp_ok TRUE
limit_ok TRUE
Inputs
Table 3-12
Name Data type Description
sampleTime DInt Sampling time [ms]
Outputs
Table 3-13
Name Data type Description
SBROk Bool Braking ramp monitoring status
1: Brake ramp is maintained or no monitoring function
active.
0: Drive does not brake, at least not along the
configured down ramp
If this output changes to 0, either STO should be
initiated or a mechanical brake applied.
ramping Bool Braking ramp status
1: Braking active
busy Bool Ramp monitoring status
1: Monitoring for position and velocity limit active
positionThreshold DInt Position limit value [mm]
effective limit for the ramp monitoring regarding position
change
velocityThreshold DInt Velocity limit value [mm/min]
effective limit for the ramp monitoring regarding velocity
ackReq Bool Acknowledgment request
If an error has occurred, which is however no longer
active and can therefore be acknowledged, then this
block indicates this using a 1 signal at ackReq.
© Siemens AG 2018 All rights reserved
Structure diag
Table 3-14
Bit
Description Reset condition
No.
0 SS1 braking ramp not maintained safeV falls below vStopMonitoring
and positive signal edge at ack
1 Parameterization error rampTime: is not an the ratio rampTime to
integer multiple of sampleTime sampleTime is an integer multiple
2 Reserved ---
3 Parameterization error vMax: vMax and the number of cycles
vMax / (rampTime / sampleTime) cannot be specified by rampTime and
represented as integer multiple sampleTime for the braking ramp
are an integer multiple of one
another
4 sampleTime <= 0 sampleTime parametrized > 0
5 maxToleranceV > vMax maxToleranceV parameterized
<= vMax
6 rampTime < 0 rampTime parametrized >= 0
7 Reserved ---
8 Reserved ---
9 Reserved ---
10 Reserved ---
Bit
Description Reset condition
No.
11 Internal calculation error pos. Signal edge at ack if the
error has gone
12 Reserved ---
13 Reserved ---
14 Reserved ---
Parameterization
1. The actual velocity, calculated by block safeV, is interconnected at input
LFASRS_SafePosition.
2. In the block, the brake ramp gradient is defined using rampTime and vMax. To
do this, sampleTime and rampTime are used to determine the number of
cycles that are required in order to brake from vMax down to standstill. In each
cycle, the maximum permissible velocity calculated in the block is appropriately
reduced.
rampTime / sampleTime
vMax / (rampTime/sampleTime)
Further, the following relationships between the input variables must exist:
The permissible value ranges of the individual inputs should be taken from the
table describing the inputs.
The block detects if not all of the specified preconditions are satisfied, and signals
this by setting the appropriate diag bits.
Safety note
vMax and rampTime must be parameterized so that when it is detected that the
permitted travel range has been exited, and the resulting stop reaction is
triggered, when an STO is initiated, the axis can always be braked to a standstill
before the physical end of the travel range
Note
The block only checks the parameterization for the 1st call. This increases the
performance for further operation of the block.
As a consequence, re-parameterization is not possible while the system is
operational. The safety program must be regenerated and loaded each time that
the operating parameters of the block are changed.
Ramp monitoring
3. With a rising edge at execute, after delay time monitorDelayTime elapses, the
braking ramp monitoring is activated.
4. If safeV exceeds the internally calculated maximum permissible value, then
output SBROk changes to 0, error to 1 and diag bit 0 is set.
5. SBROk is also set to 0 if safePos changes per cycle by more than the
maximum position change per cycle calculated in the block. This means that
the ramp is monitored through two channels.
© Siemens AG 2018 All rights reserved
WARNING
Acknowledging errors
9. Assuming that an error is no longer active, diag and error are reset to 0 via a
positive signal edge.
As soon as the block can be acknowledged, this is indicated by a 1 signal at
output ackReq. ackReq is reset to 0 after a positive signal edge at ack.
10. After SBROk changed to a 0 signal, i.e. the braking ramp was not maintained,
the block can only be acknowledged if the actual velocity at safeV falls below
the value at vStopMonitoring. ackReq then changes to a 1 signal.
3.6 LFASRS_BrakeTest
3.6.1 Introduction
Note When using this block, blocks F_BO_W (FC 176), F_W_BO (FC 177) and F_TP
(FB 184) must be in the block folder. It is not permissible that these are
renumbered!
3.6.2 Connections
All variables, type bool listed in the following table are preassigned FALSE, all
integer variables are preassigned 0, all TIME variables are preassigned T#0ms and
all word variables are preassigned W#16#0.
Inputs
Table 3-15
Name Data type Description
testIntervalTime Time Test interval
After this time elapses, the block requests that a brake test
is performed. This is signaled at output testRequired with a
1 signal.
sampleTime DInt Sampling time [ms]
The block sampling time, i.e. the call interval of the safety
program (cyclic interrupt OB interval of the F-OB) is
parameterized here in ms.
sequenceBrake1 Word Configuration parameters
The test pattern to be performed and the brake type for
brake 1 are defined according to the following schematic
via this input:
Bit 0: Test with test sequence 1 positive
Bit 1: Test with test sequence 1 negative
© Siemens AG 2018 All rights reserved
0: Open
1: Closed
feedbackBrake2 Bool Feedback signal, brake 2
0: Open
1: Closed
ZSW3B WORD S120 Safety Info Channel – status word 3 (r10234)
Bit 00: sbtSelected
Drive feedback signal - select SBT
1: SBT selected
0: Function not selected
Bit 02: sbtActiveBr
Drive feedback signal - active brake
The number of the currently tested brake is signaled back from
the drive here:
0: Brake 1
1: Brake 2
Bit 03: sbtActive
Drive feedback signal - SBT status
1: Test running; drive establishes torque against a closed brake
0: Test not active; drive passive
Bit 04: sbtResult
Drive feedback signal – test result
0: Brake fault
1: Brake successfully tested
Bit 05: sbtFinished
Drive feedback signal - test sequence status
0: Test running
1: Test completed
Bit 06: sbtCloseBr
Brake control SBT for external brake
The drive issues the command to open/close the external brakes
via this input.
0: open external brake
Outputs
Table 3-16
Name Data type Description
slsThreshold DInt SLS limit [mm/min]
© Siemens AG 2018 All rights reserved
Structure of DIAG
Table 3-17
Bit
Description Reset condition
No.
0 Runtime error pos. Signal edge at ack, restart test, reset if
open/closeBrake1Time not test successfully completed
complied with
1 Runtime error pos. Signal edge at ack, restart test, reset if
open/closeBrake2Time not test successfully completed
complied with
2 SLS monitoring initiated safeV <= vMaxRelease and vValid == 1 and
safeV exceeds vMaxRelease or pos. signal edge at ack
vValid == 0 while the axis moves
for a test that was not successfully
completed
3 Reserved ---
4 Parameterization error value range sampleTime >= 1 and
openBrake1Time >= 1 and
Bit
Description Reset condition
No.
closeBrake1Time >= 1 and
openBrake2Time >= 1 and
closeBrake2Time >= 1 and
positionTolerance >= 0
and vMaxRelease >= 1
5 Parameterization error integer openBrake1Time / sampleTime can be
multiple ratio represented as integer multiple and
closeBrake1Time / sampleTime can be
represented as integer number
openBrake2Time / sampleTime can be
represented as integer multiple and
closeBrake2Time / sampleTime can be
represented as integer number
6 unplausible feedback signal from pos. Signal edge at ack, restart test, reset if
SBT: test successfully completed
7 Drive enable missing for an active pos. Signal edge at ack, restart test, reset if
brake test test successfully completed
8 Reserved ---
9 Time monitoring: No feedback pos. Signal edge at ack, restart test, reset if
signal sbtSelected within the test successfully completed
monitoring time after selecting SBT
10 Time monitoring external brake pos. Signal edge at ack, restart test, reset if
© Siemens AG 2018 All rights reserved
Parameterization
When parameterizing, it must be ensured that the following relationships can
be represented as integer multiple:
openBrake1Time / sampleTime
closeBrake1Time / sampleTime
openBrake2Time / sampleTime
closeBrake2Time / sampleTime
The permissible value ranges of the individual inputs should be taken from the
table describing the inputs.
The block detects if not all of the specified preconditions are satisfied, and signals
this by setting the appropriate diag bits.
Note
The block only checks the parameterization for the 1st call. This increases the
performance for further operation of the block.
As a consequence, re-parameterization is not possible while the system is
operational. The safety program must be regenerated and loaded each time that
the operating parameters of the block are changed.
Note When testing an internal brake, the status feedback of the brake
feedbackBrake1/feedbackBrake2 from the drive status word (ZSW1) bit 12 can
be used.
© Siemens AG 2018 All rights reserved
The sequence in which the brakes should be tested must match what is configured
in the SINAMICS S120 and at the LFASRS_BrakeTest. Otherwise, the block and
the SINAMICS S120 signal an error when performing the test.
The test sequence parameters are set in the SINAMICS S120, which test
sequences are to be performed and how are specified at LFASRS_BrakeTest.
16. If the test is started via execute = 1, then initially, the block signals this at
output busy. The SCC/SIC (Safety Control Channel/Safety Information
Channel) is interconnected as word, directly at the particular input and/or
output of the block. The internal signal processing in the block uses the
corresponding bits from the SIC for the brake test (for an easier understanding,
these are subsequently assigned symbols) and appropriately processes these.
The corresponding control signals for the brake test are then output together
using word SCC. To provide a better understanding, the internal signals from
the SCC or SIC words are designated with sbt....
17. In the block, depending on the parameterized test sequence, outputs
sbtBrSelect, sbtTorqueDir and sbtSequence are switched.
18. If the test was started, then the associated feedback signal from the drive must
be available at input sbtSelected.
19. The drive provides feedback about the brake that has just been tested at input
sbtActiveBr. This feedback is used to check the plausibility. If a contradiction
occurs regarding the control signals, the block sets error and diag bit 6.
Safety note
The parameterization of the retraction velocity at input vMaxRelease must be
adapted to the safely reduced velocity permitted according to the application-
specific risk assessment.
Safety note
Parameter "testIntervalTime" defines at which intervals a brake test is required.
The value that should be configured here depends on the specific application
and is also dependent on the risk assessment and the hardware architecture of
the safety function that has been implemented. Further, the time specifies the
© Siemens AG 2018 All rights reserved
maximum time between the test intervals; even if the interval time has still not
elapsed, the test can always be initiated. Depending on the application and risk
assessment, the test can be automatically performed during operation if the axis
to be tested is stationary (at a standstill).
Test completed
34. If the configured sequences for brake 1 have been performed without any
error, and the test for brake 2 has still not been completed, then Brake1Ok has
© Siemens AG 2018 All rights reserved
Acknowledging errors
37. Assuming that an error is no longer active, diag and error are reset to 0 via a
positive signal edge.
As soon as the block can be acknowledged, this is indicated by a 1 signal at
output ackReq. ackReq is reset to 0 after a positive signal edge at ack.
38. If a brake test was unsuccessful, then acknowledgment is first required with a
positive signal edge at ack before a new test can be started via execute.
In the following function example, the external brakes should be controlled at F-DO
channel A30.0 ("brake1") and A30.1 ("brake2") by the LFASRS_BrakeTest block
for the brake test and also when initiating safety function STO.
The signal for STO (here designated as "STO_selection") is low-active; i.e. a 1
means that STO is not active, 0 means that at least one safety function is
requesting STO.
The feedback signals of the brakes are wired to the two standard inputs I2.0
("FeedbackBrake1") and I2.1 ("FeedbackBrake2"); a 1 signal indicates that the
brake is closed and a 0 signal indicates that the brake is open.
In this example, 100ms is used as monitoring time for opening/closing the brakes.
This time also depends on the response time specified in the risk assessment for
your safety functions.
Safety note
The parameterization of inputs openBrake(1/2)Time and closeBrake(1/2)Time as
well as feedbackTime used in this example, must be adapted to the required
response time of the safety function for the specific application.
The monitoring time must not exceed the required response time.
For reasons of transparency, in the following code example, only the relevant
interconnections for the above description of the application have been realized.
© Siemens AG 2018 All rights reserved
Fig. 3-11
© Siemens AG 2018 All rights reserved
In the 2nd and 3rd networks, these signals are fed together with signal "STO" to a
FDBACK function block. Block FDBACK is included in the STEP7 Safety Advanced
library under number FB216 and monitors the feedback circuit. You can find
additional information about this block in the online help in the TIA Portal.
The brakes are only opened at output A30.0 ("brake1") and A30.1 ("brake2") if the
brake feedback circuit has no error and the logic operation at the ON input of the
FDBACK has a 1 signal.
Fig. 3-12
© Siemens AG 2018 All rights reserved
3.7 LFASRS_LoadMonitor
3.7.1 Introduction
Safety note
The encoders and evaluation units used should be assessed according to how
they are used.
Retraction logic (to bring the machine back into the safe state) is provided when
identifying a slack condition or overload during operation. When identifying a slack
rope condition, retraction is monitored so that retraction is only permissible in the
upward direction with reduced velocity. For an overload condition, only retraction in
the downward direction is possible.
© Siemens AG 2018 All rights reserved
The block offers the option of making a distinction between static and dynamic
loads, as occurs when quickly lifting loads.
To check the correct functionality of the measuring equipment, after an interval that
can be parameterized elapses, the block requests that a calibration run is
performed.
Note When using this block, block F_BO_W (FC 176) and block F_TP (FB 184) must
be in the block folder. It is not permissible that these are renumbered!
3.7.2 Connections
All variables, type bool listed in the following table are preassigned FALSE, all
integer variables are preassigned 0, all TIME variables are preassigned T#0ms and
all word variables are preassigned W#16#0.
Inputs
Table 3-20
Data
Name Description
type
load1 DInt Load channel 1 [user-defined unit]
1-2147483647
load2 DInt Load channel 2 [user-defined unit]
1-2147483647
maxTolLoad DInt Tolerance window load monitoring [user-defined unit]
1-2147483647
maxLoadMode Bool Monitoring mode
0: Monitoring for static load
1: Monitoring for dynamic load
© Siemens AG 2018 All rights reserved
Data
Name Description
type
verificationMaxTol DInt Calibration tolerance 1 [user-defined unit]
1-2147483647
verificationMode Bool Test mode
0: Test with a constant load value
1: Test with a defined load step
verificationStart Bool Starting the measuring equipment test
Calibration is started using a positive signal edge at this
input. After the test has been successfully completed, the
time for the test interval is restarted.
release Bool Retraction
If an overload/underload condition was detected by the
block, after a positive edge at this input, it is possible to
move in the direction still enabled by the block via
movePositiveOk/moveNegativeOk at the velocity configured
at vMaxRelease. Motion is stopped as soon as a 0 signal is
present at this input while retracting.
ack Bool Acknowledgment
If an error has occurred in normal operation, then this must
be reset using ack before the system is restarted.
The acknowledgment is only realized for a positive signal
edge at ack; in normal operation this has no effect.
© Siemens AG 2018 All rights reserved
Outputs
Table 3-21
Name Data type Description
slsThreshold DInt SLS limit [mm/min]
The maximum travel velocity that is presently permissible is
output at this output. In normal operation, this is
2147483647; when an overload/underload condition is
detected, then vMaxRelease is output here. If vMaxRelease
should be parameterized <= 0, then substitute value 1 is
output here.
slsOk Bool Status SLS limit
1: safeV is less than/equal to slsThreshold
0: safeV has exceeded the slsThreshold value.
A stop response should be initiated if this output should
switch to 0.
testRequired Bool Request to test the measuring equipment
1: testIntervalTime elapsed
0: no test required
busy Bool Test status
1: Test running
0: Test not selected
testOk Bool Test result status
0: Test error
© Siemens AG 2018 All rights reserved
Structure of diag
Table 3-22
Bit
Description Reset condition
No.
0 Discrepancy error load monitoring load1 and load2 within maxTolLoad and
positive signal edge at ack
1 Overload detected load1 and load2 less than maxLoadStat or
maxLoadDyn (depending on maxLoadMode)
– maxTolLoad and positive signal edge at
ack
2 Slack rope detected load1 and load2 greater than minLoad +
maxTolLoad and positive signal edge at ack
3 Parameterization error minLoad < maxLoadStat <= maxLoadDyn
4 The calibration settling operation Restart test
takes an inadmissibly long time
5 Inadmissibly large load fluctuations Restart test
during calibration
6 Parameterization error test times testDuration > settleDuration > 0 and both
times an integer multiple of sampleTime
7 Retraction velocity exceeded safeV <= slsThreshold and pos. signal edge
at ack
8 Parameterization error value range 0 < vMaxRelease <= 2147483647
and
© Siemens AG 2018 All rights reserved
The block expects that load limits or the actual values of the load are specified as
numerical value without units. The user must scale the input values corresponding
to the reference variable of the module that is being used. For F-AI modules, the
reference quantity is 27648, for example. Block "SCALE" is available in the STEP7
Safety Advanced F-library specifically for this purpose. If hardware with other
reference variables is used, then the user must program this scaling himself.
Safety note
The user must always correctly calculate the load limit values corresponding to
the requirements laid down in EN 528:2008. The user must correspondingly
interconnect the limit values that have been calculated at the block.
Parameterization
When parameterizing, it must be ensured that the following relationships can
be represented as integer multiple:
testDuration / sampleTime
settleDuration / sampleTime
Further, the following relationships between the input variables must exist:
The permissible value ranges of the individual inputs should be taken from the
table describing the inputs.
The block detects if not all of the specified preconditions are satisfied, and signals
this by setting the appropriate diag bits.
© Siemens AG 2018 All rights reserved
Note
The block only checks the parameterization for the 1st call. This increases the
performance for further operation of the block.
As a consequence, re-parameterization is not possible while the system is
operational. The safety program must be regenerated and loaded each time that
the operating parameters of the block are changed.
Load monitoring
1. If two independent sources are used to measure the force, then after scaling
these must be interconnected to inputs load1 and/or load2. If one
measurement source is sufficient, then this is interconnected to both inputs.
2. If the difference between the two inputs is greater than the value
parameterized at maxTolLoad, then error = 1 und diag bit 0 is set
3. In addition, the velocity parameterized at vMaxRelease is output at
slsThreshold.
4. If both values are again within the window that can be parameterized using
maxTolLoad, with a positive signal edge at ack, output error and diag bit 0 are
again reset to 0.
5. Input maxLoadMode can be used to make a distinction between monitoring for
static overload (maxLoadMode = 0) or dynamic overload (maxLoadMode = 1).
6. For maxLoadMode =0, as soon as the value at load1 or load2 exceeds the
value parameterized at maxLoadStat, then this error is signaled at statLoadOk
using a 0 signal.
7. Further, error is set to 1 and diag bit 1 is set
8. For maxLoadMode =1, as soon as the value at load1 or load2 exceeds the
value parameterized at maxLoadDyn, then this error is signaled at dynLoadOk
using a 0 signal.
9. Further, error is set to 1 and diag bit 1 is set
10. As long as one of these errors is active, the velocity parameterized at
vMaxRelease is output at slsThreshold.
11. The response when minLoad is fallen below is equivalent
Retraction
12. The retraction function of the block can be activated using a 1 signal at input
release. Further travel in the positive direction is no longer permissible; the
block signals this using a 0 signal at movePositiveOk. With the appropriate
interconnection with the drive, the user must ensure that in this case the only
retraction direction that is possible is downward.
13. To facilitate retraction, dynLoadOk and/or statLoadOk are reset to 1 with a
rising edge at release; using a suitable user interconnection, the stop response
of the drive should then be deselected.
14. If, while retracting, safeV exceeds the value of vMaxRelease, then slsOk
changes to 0.
15. If in both cases load1 and load2 are again less than the active limit -
maxTolLoad, then error and diag bit 1 can be reset to 0 using a positive signal
edge at ack.
16. The maximum velocity is then again output at slsThreshold. (maximum DInt
value = 2147483647)
17. vMaxRelease must lie in the range 1 – 2147483647; if values lower than 1 are
parameterized, then the block detects this and signals it using diag bit 8. error
changes to 1. 1 is then output as substitute value for the retraction velocity.
18. If, while retracting vValid = 0, then the retraction velocity can no longer be
monitored in a safety-related fashion. As a consequence, selection via release
= 1 has no effect, an active retraction is stopped. diag bit 9 as well as error
change to 1, a 0 signal is available at slsOk.
19. To exit this state, initially vValid must be set back to a 1 signal by
© Siemens AG 2018 All rights reserved
Safety note
The signal for release must be generated in a safety-related fashion, e.g. by
using a key switch or similar.
Safety note
The parameterization of input vMaxRelease must be adapted to the safely
reduced speed permitted according to the application-specific risk assessment.
Using a defined load step (load jump) the sensor test can be used to verify that the
sensor detects a load; the sensor value changes and as a result of the load step, the
sensor value changes by the expected offset. During the sensor verification, maximum
limit maxLoad is itself not monitored during the settling phase and the test itself in order
to facilitate a step even if the sensor is under load. The requirement is that input
standstill =1, which means that the axis is stationary.
Safety note
Parameter "testIntervalTime" defines in which cyclic intervals a measurement
equipment test is required. The value that should be configured here depends on
the specific application and is also dependent on the risk assessment and the
hardware architecture of the safety function that has been implemented.
the measured load at load1 and load2 must assume the calibration value that
can be parameterized at verificationValue taking into account the tolerance
parameterized at verificationMaxTol.
24. If this is not the case, then error changes to a 1 signal and at diag bit 4 is set.
25. For the time parameterized at testDuration, the measured load value at load1
and load2 must not deviate from the verificationValue by more than
verificationMaxTol.
26. If this is not the case, then error changes to a 1 signal and at diag bit 5 is set.
27. After testDuration has elapsed and there is a valid load value, busy is reset to
0 and output verificationOk is set to a 1 signal.
28. If testDuration is parameterized <= settleDuration, then diag bit 5 and error are
set to 1.
29. If sensor verification cannot be successfully completed, then this is displayed
at error and diag as described in Point 26. The test that was not successful can
then be acknowledged with a positive signal edge at ack. Output verificationOk
remains =0 until a successful test was performed.
35. After testDuration has elapsed and there is a valid value for the load jump,
busy is reset to 0 and output testOk is set to a 1 signal.
36. If testDuration is parameterized <= settleDuration, then diag bit 6 and error are
set to 1.
37. If sensor verification cannot be successfully completed, then this is indicated at
error and diag as described in Point 31. The test that was not successful can
be acknowledged with a positive signal edge at ack; however, output
verificationOk remains = 0
38. A successful test is signaled using a 1 signal at output testOk. busy is reset to
0. testOk remains set to 1 until the next time that testRequired changes to 1 or
a new test is started.
Note A measurement equipment test is requested at each stop-start transition of the
CPU.
Acknowledging errors:
39. Assuming that an error is no longer active, diag and error are reset to 0 via a
positive signal edge.
40. As soon as the block can be acknowledged, this is indicated by a 1 signal at
output ackReq.
41. ackReq is reset to 0 after a positive signal edge at ack.
© Siemens AG 2018 All rights reserved
3.8 LFASRS_PositionSingleEnc
3.8.1 Introduction
The block generates a safety-related actual position value for a load handling device
based on recurring plausibility checks of a safety-related, relative actual position value
of the motor encoder from Safety Integrated (SI) against a safely attached reference
mark. A position is calculated from the motor encoder value, and is verified based on
the position actual value comparison with respect to a reference mark. At the time that
the reference mark is detected, the position of the safety-related, relative motor encoder
must not deviate from the reference position of the reference mark by more than the
parameterizable tolerance.
Note When using this block, block F_BO_W (FC 176) must be in the block folder. It is
not permissible that these are renumbered!
Note To use the block, an encoder mounted in a safety-related fashion must be used
as well as a reference sensor that is also mounted in a safety-related fashion.
© Siemens AG 2018 All rights reserved
3.8.2 Connections
Inputs
Table 3-23
Data
Name Description
type
Block sampling time [ms]
sampleTime DInt
Call interval of the safety program
possi DInt Motor encoder Safety Integrated - measured value [µm]
Motor encoder Safety Integrated - encoder signal status
possiValid Bool 1: Encoder signal valid
0: Encoder fault
SINAMICS Safety Integrated - sampling time [ms]
possiSampleTime DInt
cyclic counter value of telegram 902
SINAMICS Safety Integrated - cycle counter [ms]
possiCount DInt
cyclic counter value of telegram 902
posMin DInt min. permissible position [mm]
posMax DInt max. permissible position [mm]
vStandstill DInt Velocity limit for standstill detection [mm/min]
max. permissible velocity to check the plausibility
vMax DInt
[mm/min]
referenceSensor Bool Reference sensor
Reference position [mm]
© Siemens AG 2018 All rights reserved
Outputs
Table 3-24
Name Data type Description
safe position actual value [mm]
safePos DInt safe position (for all additional blocks of this block
package)
Position actual value status
posValid Bool
1: safePos was safely generated
Referencing status
referenced Bool 1: The encoder is calibrated with respect to the reference
mark
safe velocity actual value [mm/min]
safeV DInt safe velocity (for all additional blocks of this block
package)
Velocity actual value status
vValid Bool
1: safeV was safely generated
Zero speed detection
standstill Bool
1: Actual velocity less than vStandstill
Structure of diag
Table 3-25
Bit
Description Reset condition
No.
0 1 <= possiSampleTime <= 1023
Value range violation of the input 0 < sampleTime <=
variables 2 * possiSampleTime
discrepancyStartup >= 0
1 Reserved ---
2 incorrect reference of the input vMax >= vStandstill
© Siemens AG 2018 All rights reserved
3.8.3 Interrelationship between the assignment of the block inputs and the
drive configuration
The safe absolute position actual value from the drive is transferred as a 32 bit
value in unit µm via PROFIsafe telegram 902. For this purpose, in the converter
"Extended functions via PROFIsafe" must be set and the safety functions enabled.
The drive type must then be set to linear axis, the monitoring cycle is subsequently
important for the parameterization at the block.
Fig. 3-16: Safety Integrated configuration
© Siemens AG 2018 All rights reserved
It is only permissible that the transfer of "Safe position" is enabled. "Safe absolute
position" should remain inhibited. A safety-related, relative position actual value is
sufficient, as block LFASRS_PositionSingleEnc establishes the absolute position
actual value reference, as explained in the function description.
Parameterization
© Siemens AG 2018 All rights reserved
1. The block sampling time, e.g. the configured call interval of the F-OB, which
calls the safety program, is parameterized at input sampleTime.
2. The sampling rate of Safety Integrated in the drive is parameterized at
possiSampleTime, and possiCount should be interconnected with the counter
value from telegram 902.
3. sampleTime is relevant for internal block calculations.
4. The safety-related relative position actual value of the motor encoder from
telegram 902 in [µm] is interconnected at input possi.
5. If the block is incorrectly parameterized, safety-related substitute values are
issued at the outputs. The outputs safePos and safeV assume the highest DInt
value (2147483647), the outputs posValid, referenced and vValid are reset to 0
and output error is set to 1. Depending on the cause of the incorrect
parameterization, the bits are set as follows to 1 in output word diag:
a. Value range violation of the input quantities => bit 0
b. Relationship of the input variables with respect to one another cannot
be represented as integer multiple => bit 1
c. Incorrect reference of the input variables with respect to one another
=> bit 2
Safety note
The block must be parameterized with fixed values, and must not be performed
via variables during the CPU runtime.
vSyncIntervall / sampleTime
Further, the following relationships between the input variables must exist:
vMax >= vStandstill
posMax >= posMin
Sampling rates
To calculate the velocity, the SI cycle in the drive (possiSampleTime) is used as
time base, and not the block cycle of the LFASRS_SafePosition block on the
CPU (sampleTime, generally the call interval of the safety program). To avoid
inadmissibly high subsampling, it must be ensured that the ratio sampleTime =>
2x possiSampleTime. Likewise, sampleTime must be an integer multiple of
possiSampleTime.
Example: possiSample Time in the drive = 12ms (default value)
In this case, sampleTime can be parameterized to the following values:
24 ms = 2x possiSampleTime
48 ms = 4x possiSampleTime
© Siemens AG 2018 All rights reserved
72 ms = 6x possiSampleTime
96 ms = 8x possiSampleTime
The permissible value ranges of the individual inputs should be taken from the
table describing the inputs.
The block detects if not all of the specified preconditions are satisfied, and signals
this by setting the appropriate diag bits.
Note
The block only checks the parameterization for the 1st call. This increases the
performance for further operation of the block.
As a consequence, changing the parameterization is not possible while the
system is operational. The safety program must be regenerated and loaded each
time that the operating parameters of the block are changed.
6. To generate the safe position, the position actual value must be valid, which is
signaled to the block using a 1 signal at input possiValid.
7. The safe position actual value is output via output safePos. A 1 signal at output
posValid signals that the safe position actual value is valid. A 1 signal at output
referenced indicates that the safe position actual value may be used as safe
absolute position actual value. For a 0 signal at output referenced, the safe
position actual value may only be used as safe, relative position actual value.
Safety note
As long as output referenced delivers a 0 signal, the position output at safePos
can only be used for a relative reference. An absolute evaluation is only
permissible if output referenced supplies a 1 signal.
8. If the system has still not been homed, then bit 7 is set to 1 in output word diag.
9. If the position actual value is valid and the system is at the reference point, a
safe internal reference be performed with a positive edge at reference, where
possi determines a separate position offset relative to the value specified at
input referencePos; this is then stored internally. Outputs posValid, referenced
and vValid are set to 1 if referencing was successful. Bit 7 is reset to 0 in
output word diag.
Safety note
The signal for reference must be generated in a safety-related fashion, e.g. by
using reference mark switches. When referencing, the user must make a visual
inspection to ensure that the mechanical position corresponds to the reference
position, and referencing is performed using user acknowledgment at input
reference.
10. The block itself does not provide any retraction logic. Using a suitable logic
© Siemens AG 2018 All rights reserved
19. The safety-related velocity is output at safeV, which is calculated using the
safety-related relative position actual value of the motor encoder at input possi
via the cycle counter safely transferred at input possiCount.
20.
21. If safeV falls below the value parameterized at input vStandstill, then at output
standstill this standstill is signaled using a 1 signal.
22. If safeV is higher than vStandstill, then a 1 signal is output at movesPositive, if
safePos assumes increasingly higher values or at movesNegative a 1 signal is
output if the values of safePos assume lower values over time.
23. If safeV exceeds the value parameterized at input vMax, then output error is
set to 1 and in output word diag, bit 5 is set to 1. Output vValid is reset to 0.
24. If safeV again falls below the value parameterized at input vMax, then output
ackReq is set to 1, and the error state can be acknowledged using a positive
signal edge at input ack. Outputs error and ackReq are reset to 0, and bit 5 in
output word diag is reset to 0. Output vValid is again set to 1.
25. Assuming that an error is no longer active, diag and error are reset to 0 via a
positive signal edge. As soon as the block can be acknowledged, this is
indicated by a 1 signal at output ackReq. ackReq is reset to 0 after a positive
signal edge at ack.
© Siemens AG 2018 All rights reserved
3.9 LFASRS_MinMax
3.9.1 Introduction
3.9.2 Connections
Inputs
Table 3-26
Name Data type Description
in1 DInt Operand 1 for evaluation
in2 DInt Operand 2 for evaluation
in3 DInt Operand 3 for evaluation
in4 DInt Operand 4 for evaluation
in5 DInt Operand 5 for evaluation
in6 DInt Operand 6 for evaluation
in7 DInt Operand 7 for evaluation
in8 DInt Operand 8 for evaluation
mode Bool Select min/max evaluation
0: Minimum evaluation
1: Maximum evaluation
Outputs
Table 3-27
Name Data type Description
q DInt Depending on the mode, minimum or maximum value of
the 8 inputs
Parameterization
1. The block is implemented as function. This means that when calling, all inputs
must be interconnected. If a minimum/maximum value evaluation is to be
performed from effectively fewer than 8 signals, then the signal sources must
be interconnected several times so that all block inputs are assigned.
If additional functions are required to specifically control your application, then you
must create these yourself by adding additional fail-safe functions. The signals of
these functions are then interconnected with the ASRM blocks.
Note To control the Safety Integrated functions of the SINAMICS drive family, the
LDrvSafe fail-safe library can also be used, which simplifies interconnecting the
relevant signals:
© Siemens AG 2018 All rights reserved
https://support.industry.siemens.com/cs/ww/de/view/109485794
Safety note
The safety-related times and the interconnection of the inputs and outputs must
be parameterized according to the directives applicable for the specific system
and must be checked at the system to ensure that they precisely match the
specific requirements.
The hoisting gear is still monitored for overload and/or slack rope (slack condition
protection) via LFASRS_LoadMonitor.
Block LFASRS_BrakeTest is responsible for testing the correct functioning of the
hoisting gear brakes.
If LFASRS_LoadMonitor, LFASRS_BrakeTest or
LFASRS_SLPMonitor/LFASRS_Endzone identifies that a limit value has been
violated, then the SLS threshold is set to the value parameterized at the block.
Block LFASRS_SBRMonitor is used to monitor whether after SS1 has been
selected, the drive brakes along the configured down ramp. If this is not the case,
then a signal to initiate STO is generated.
By ANDing all relevant enable signals of the block, the signal to initiate a stop
response (e.g. SS1) for the drive can be generated.
For the retraction function of blocks LFASRS_Endzone, LFASRS_LoadMonitor and
LFASRS_SLPMonitor, by ANDing the corresponding
movePositiveOk/moveNegativeOk signals only the direction is permitted that
moves the system away from the end zone.
For block LFASRS_BrakeTest, the output releaseBothDirections can prevent the
hoisting gear from moving upward in the case of a failed brake test.
invalid input assignment as a result of the process, then this is signaled by every
library block - with the exception of LFASRS_MinMax - using error = 1.
In addition, the library blocks, with the exception of LFASRS_MinMax, have a diag
output that permits more precise diagnostics based on the error code output there.
SAFE_POS
POS_VALID
POS_SI skal REFERENCED
true SAFE_V
V_VALID
POS_SI
true AND SS1
© Siemens AG 2018 All rights reserved
AND SDI_NEG
Quit.
AND SS1
SAFE_V SAFE_V
V_VALID
REFERENCED
V_VALID
STO
AND SDI_POS
SAFE_POS
Quit. SAFE_V
Telegramm 902 POS_VALID SAFE_V
SS1 akt. V_VALID
REFERENCED
Quit.
SAFE_POS
AND SDI_POS
AND SS1 SS1
POS_VALID
V_VALID AND SS1
Freifahr.
AND SDI_POS
SDI_POS Quit.
SAFE_POS
POS1 REFERENCED
POS1 gültig SAFE_V
V_VALID
AND SS1
SAFE_V
Quit.
V_VALID
SAFE_POS
POS_VALID
REFERENCED
SAFE_V AND SDI_POS
V_VALID STO
Quit.
SAFE_POS
SAFE_V
SS1 akt.
Quit. Quit. AND SS1
SAFE_V
V_VALID
AND SS1 SS1
POS_VALID
V_VALID AND SS1 AND SDI_POS
AND SDI_POS
SDI_POS
Freifahr.
Quit.
The following blocks of the STEP7 Safety Advanced library are called in the fail-
safe function blocks and therefore must be available in the block folder:
5 Abbreviations
Table 5-1
Abbreviation Meaning
6 Support
Application Center
mailto:tech.team.motioncontrol@siemens.com
http://www.automation.siemens.com/partner/
Training Center
Siemens offers a number of training courses to familiarize you with the SIMATIC
S7 automation system. Contact your regional Training Center, or the central
© Siemens AG 2018 All rights reserved
http://www.sitrain.com/
You can find the documentation free of charge on the Internet at:
https://support.industry.siemens.com/
Use the Knowledge Manager listed there to quickly find the required
documentation.
7 Appendix
Runtime and memory utilization of the blocks, based on the CPU 1516F-3 PN/DP
Table 7-1 Runtime and memory utilization of the blocks, based on the CPU 1516F-3 PN/DP
Load Main memory
Block Runtime
memory code
LFASRS_SafePosition 345 µs 204.6 kB 4.3 kB
LFASRS_SLPMonitor 20 µs 61.5 kB 1.4 KB
LFASRS_Endzone 250 µs 134.1 kB 2.8 kB
LFASRS_BrakeTest 300 µs 195.6 kB 4.9 kB
LFASRS_SBRMonitor 260 µs 123.4 kB 2.0 kB
LFASRS_LoadMonitor 320 µs 148.0 kB 3.4 kB
LFASRS_PositionSingleEnc 137 µs 124.8 kB 2.3 kB
LFASRS_MinMax 10 µs 33.4 kB 0.4 KB
Total without 1.485 µs 555.0 kB 17.8 kB
LFASRS_SLPMonitor
Total without 1.255 µs 509.8 kB 16.4 kB
LFASRS_Endzone
© Siemens AG 2018 All rights reserved
8 References
Table 8-1
Subject
\1\ Siemens Industry Online Support
https://support.industry.siemens.com
\2\ Download page of the article
https://support.industry.siemens.com/cs/ww/de/view/101167223
9 History
Table 9-1
Version Date Change
V1.0 07/2014 First Edition
V2.0 02/2016 Migration to TIA Portal
© Siemens AG 2018 All rights reserved