S7F FHSystemsManual
S7F FHSystemsManual
S7F FHSystemsManual
Contents
SIMATIC
Programmable Controllers
S7 F/FH Systems
Manual
Product Overview
Getting Started
Safety Mechanisms
Configuration
Programming
Safety
Appendices
Check Lists
References
Glossary, Index
Edition 02/2003
A5E00085588-03
Safety Guidelines
This manual contains notices intended to ensure personal safety, as well as to protect the products and
connected equipment against damage. These notices are highlighted by the symbols shown below and
graded according to severity by the following texts:
Safety Note
Warning
Caution
Contains important information on the acceptance and safety-related use of the product.
indicates that death, severe personal injury or substantial property damage can result if proper
precautions are not taken.
indicates that minor personal injury can result if proper precautions are not taken.
Note
draws your attention to particularly important information on the product, handling the product, or to a
particular part of the documentation.
Qualified Personnel
Only qualified personnel should be allowed to install and work on this equipment. Qualified persons are
defined as persons who are authorized to commission, to ground and to tag circuits, equipment, and
systems in accordance with established safety practices and standards.
Correct Usage
Note the following:
Warning
This device and its components may only be used for the applications described in the catalog or the
technical description, and only in connection with devices or components from other manufacturers
which have been approved or recommended by Siemens.
This product can only function correctly and safely if it is transported, stored, set up, and installed
correctly, and operated and maintained as recommended.
Trademarks
SIMATIC, SIMATIC HMI and SIMATIC NET are registered trademarks of SIEMENS AG.
Some of the other designations used in these documents are also registered trademarks; the owners rights
may be violated if they are used by third parties for their own purposes.
Disclaimer of Liability
Siemens AG
Automation and Drives
Industrial Automation Systems
Postfach 4848, D- 90327 Nuernberg
Siemens AG 2003
Technical data subject to change.
Siemens Aktiengesellschaft
A5E00085588-03
Important Information
Purpose of the Manual
The information contained in this manual enables you to configure and program S7
F/FH Systems using S7 F Systems V5.2.
Target Group
This manual is intended for system planners, configuration engineers and
programmers. Knowledge of STEP 7 and CFC is assumed in most areas.
Contents
This manual describes how to work with the S7 F/FH Systems using S7 F-Systems
V5.2 software. It consists of instructive chapters and reference chapters
(descriptions of the fail-safe function blocks and check lists for acceptance). The
manual covers the following topics:
Safety Mechanisms
Configuration
Programming
Maintenance
Safety
Fail-Safe Blocks
Order Number
As of Version
V5.2
F-Copy License
V5.0
Fail-Safe Systems
A5E00085588-03
iii
Important Information
Whats New?
The following changes are new in the S7 F Systems V5.2:
Topic
Chapter
Fail-Safe Blocks
Getting Started
Throughout the
document
Enhanced usability
Programming
Documentation Package
Programmable Controllers,
S7 F/FH Systems
Order Number
6ES7988-8FB10-8BA0
CD-ROM
You can also obtain all the SIMATIC S7 documentation as a dedicated SIMATIC
S7 collection on CD-ROM.
iv
Fail-Safe Systems
A5E00085588-03
Important Information
Following the appendices, you will find a glossary in which important technical
terms used in the manual are defined.
At the end of the manual you will find a detailed index, which makes it easy for
you to find the information you are looking for.
Additional Support
For any unanswered questions about the use of products presented in this manual,
contact your local Siemens representative:
http://www.siemens.com/automation/partner
Training Center
We offer courses to help you get started with the S7 automation system. Contact
your regional training center or the central training center in Nuremberg (90327),
Federal Republic of Germany.
Telephone:
http://www.sitrain.com
H/F Competence Center
The H/F Competence Center in Nuremberg offers special workshops on SIMATIC
S7 fail-safe and fault-tolerant automation systems. The H/F Competence Center
can also provide assistance with onsite configuration, commissioning, and
troubleshooting.
Telephone:
Fax:
Fail-Safe Systems
A5E00085588-03
Important Information
Nuernberg
Beijing
Johnson City
Worldwide (Nuremberg)
Technical Support
Local time: 24 hours per day/365 days
per year
Telephone: +49 (0) 180 5050222
Fax:
E-mail:
adsupport@
siemens.com
GMT:
+1:00
Europe/Africa (Nuremberg)
Asia/Australia (Beijing)
Authorization
Fax:
Fax:
E-mail:
isd-callcenter@
E-mail:
adsupport@
siemens.com
GMT:
+1:00
sea.siemens.com
GMT:
Telephone: +86 10 64 75 75 75
Fax:
+86 10 64 74 74 74
E-mail:
adsupport.asia@
siemens.com
-5:00
GMT:
+8:00
In general, English and German are spoken by Technical Support and Authorization staff.
vi
Fail-Safe Systems
A5E00085588-03
Important Information
Exact documents for your requirements, which you can access by performing
an online search in Service & Support
Your local Automation & Drives contact, who can be accessed in our Contacts
database
Information about local service, repair, and replacement parts. Much more
information can be found under "Services.
Fail-Safe Systems
A5E00085588-03
vii
Important Information
viii
Fail-Safe Systems
A5E00085588-03
Safety Notes
Keep Safety and Standard Functions Separate .............................................................1-19
Public Network Safety F-CPU Communication Not Allowed..........................................3-12
Safety Rules for Safety Operation ....................................................................................4-2
CPU containing safety program must have a password ..................................................4-3
I/O Group Diagnosis .........................................................................................................4-5
Modify Variables can cause Shutdown ............................................................................4-7
Limiting Access through ES..............................................................................................4-8
Password Protection.........................................................................................................4-8
Safety Program and CPU Passwords should be different ...............................................4-9
Authorized use of Password...........................................................................................4-10
Compiler Generated Values off-limits...............................................................................5-5
Comparison Changes Signature ......................................................................................5-6
Symbol Table Entries for F-Blocks cannot be changed .................................................5-10
Do not change automatically inserted F-Control Blocks. ...............................................5-11
Incorrect changes to fail-safe blocks input parameters may result in the
Safety Program and its outputs being disabled. .............................................5-12
During simulation of Input Channels the Simulation value is always available
on the blocks output. ......................................................................................5-22
Automatic Reintegration may not always be possible ....................................................5-25
Startup Protection to handle short power failures in the F-I/O. ......................................5-26
Automatic Reintegration through F_QUITES .................................................................5-27
Default MAX_CYC ..........................................................................................................5-30
Safety Program must be re-compiled if S7 connections used for CPU-CPU
Communication have changed........................................................................5-32
Use F_LIM_R for plausibility check of standard to F-data conversion ...........................5-37
When Deactivating Safety Mode ....................................................................................5-40
F-Blocks outputs always use the preset initial values. ..................................................5-44
Safety Program on Memory Card...................................................................................5-48
Downloading ...................................................................................................................5-49
OB Cycle Times Changes Restricted .............................................................................5-50
Password Protection Level .............................................................................................5-54
Download Operation Aborted .........................................................................................5-55
Safety Program disable if change to failsafe outputs .....................................................5-56
ES changes can change signature.................................................................................5-56
Simulation Warning (V5.0 and below) ............................................................................5-59
Simulation Warning (V5.1 and above)............................................................................5-61
Allowable F Control Block comparison changes ............................................................5-75
Checking online comparison output ...............................................................................5-76
Simulation of PROFIsafe devices not permitted...............................................................6-1
Duplicate Masters must be avoided .................................................................................6-2
Safety measures must be followed...................................................................................6-2
Pulse Detection.................................................................................................................7-9
Archive STEP 7 Projects ................................................................................................7-14
Do Not Change PAR_ID and COMPLEM parameters .....................................................8-2
Do not change automatically supplied FB inputs .............................................................8-4
Fail-safe FB numbers .......................................................................................................8-7
Fail-Safe Systems
A5E00085588-03
ix
Safety Notes
Fail-Safe Systems
A5E00085588-03
Contents
Product Overview
1.1
1.2
1.3
1.4
1.5
1.6
1.6.1
1.6.2
1.7
Overview ...........................................................................................................1-1
Basic Configuration Variants.............................................................................1-4
Components of an S7 F System .......................................................................1-7
Hardware Components .....................................................................................1-8
Software Components.....................................................................................1-10
Installing the S7 F Systems Optional Package ...............................................1-11
Getting Started Information Applicable to All Use-Case-Scenarios................1-11
Use-case-scenarios ........................................................................................1-12
Working with F-Systems .................................................................................1-19
Getting Started
2.1
2.2
2.2.1
2.2.2
2.2.3
2.2.4
2.2.5
2.3
2.3.1
2.3.2
2.3.3
2.3.4
2.3.5
3.9.2
3.9.3
3.9.4
Fail-Safe Systems
A5E00085588-03
2-1
Introduction........................................................................................................2-1
S7 F System - Getting Started ..........................................................................2-4
S7 F System, Setting up the Hardware.............................................................2-4
Configuring the S7 F System ............................................................................2-6
S7 F System, Creating a Fail-Safe User Program ............................................2-8
Starting Up the S7 F System ..........................................................................2-11
S7 F System, Monitoring Errors ......................................................................2-12
Fault-Tolerant S7 FH System - Getting Started ..............................................2-13
Fault-Tolerant S7 FH System, Setting Up the Hardware................................2-13
Configuring the Fault-Tolerant S7 FH System ................................................2-15
Fault-Tolerant S7 FH System, Creating a Fail-Safe User Program................2-16
Starting Up a Fault-Tolerant S7 FH System ...................................................2-16
Fault-Tolerant S7 FH System, Monitoring Errors............................................2-17
Safety Mechanisms
3.1
3.2
3.3
3.4
3.5
3.6
3.7
3.8
3.9
3.9.1
1-1
3-1
xi
Contents
Configuration
4.1
4.2
4.3
4.4
4.5
4.6
4.7
4.8
4.8.1
4.8.2
4.8.3
4.9
xii
Overview ...........................................................................................................4-1
Hardware Configuration and Parameter Assignment .......................................4-1
CPU Parameter Assignment .............................................................................4-3
Parameter Assignment of F-I/Os.......................................................................4-4
Configuring Redundant F-I/Os ..........................................................................4-6
Configuring the Networks and Connections......................................................4-6
Programming Device Functions in STEP 7......................................................4-7
Setting up, Modifying and Cancelling Access Rights........................................4-8
Setting up Access Rights for the CPU ..............................................................4-8
Entering/Changing the Password for the Safety Program ................................4-9
Cancelling Access Rights for the Safety Program ..........................................4-10
Configuration in Run .......................................................................................4-11
Programming
5.1
5.1.1
5.1.2
5.2
5.2.1
5.2.2
5.2.3
5.2.4
5.2.5
5.3
5.3.1
5.3.2
5.3.3
5.3.4
5.3.5
5.3.6
5.3.7
5.3.8
5.3.9
5.3.10
5.4
5.4.1
5.4.2
5.4.3
5.4.4
5.4.5
5.4.6
5.4.7
5.4.8
5.4.9
5.4.10
5.4.11
5.4.12
5.4.13
5.4.14
5.4.15
5.4.16
5.4.17
4-1
5-1
Overview ...........................................................................................................5-1
Structure of the Safety Program .......................................................................5-1
Blocks of the Safety Program............................................................................5-2
Creating Safety Programs.................................................................................5-4
Creating a Safety Program - Basic Procedure.................................................5-4
Safety Notes for Programming..........................................................................5-5
Defining the Program Structure.........................................................................5-7
Inserting CFC Charts ........................................................................................5-8
Inserting Run-Time Groups...............................................................................5-9
Inserting and Interconnecting Fail-Safe Blocks...............................................5-10
Inserting Fail-Safe Blocks ...............................................................................5-10
Automatically Inserted F-Blocks......................................................................5-11
Interconnecting and Assigning Parameters to F-Blocks .................................5-12
Defining the Run Sequence ............................................................................5-14
Interconnecting F-Driver Blocks ......................................................................5-16
Passivation and Reintegration of the Input and Output Channels ..................5-24
Programming Startup Protection.....................................................................5-28
Example: Reintegration after Startup of the Safety Program..........................5-29
Assigning Parameters to the F Cycle Time Monitoring...................................5-30
Interconnecting F Communication Blocks.......................................................5-31
Processing of the Safety Program ..................................................................5-39
Managing Safety Programs.............................................................................5-39
Deactivating Safety Mode ...............................................................................5-40
Activating Safety Mode ...................................................................................5-42
Compiling a Safety Program ...........................................................................5-43
Creating Fail-Safe Block Types.......................................................................5-44
Downloading a Safety Program ......................................................................5-47
Downloading the Entire Safety Program .........................................................5-48
Changes to the Safety Program in RUN Mode ..............................................5-49
Downloading Changes ....................................................................................5-54
Testing the Safety Program ............................................................................5-56
Testing a Safety Program Offline with S7-PLCSim.........................................5-57
Changing Fail-Safe Constants in CFC Test Mode..........................................5-62
Displaying Information.....................................................................................5-65
Saving reference data .....................................................................................5-66
Comparing Safety Programs...........................................................................5-67
Logging the Safety Program ...........................................................................5-76
Printing the Safety Program ............................................................................5-77
Fail-Safe Systems
A5E00085588-03
Contents
Safety
7.1
7.2
7.3
7.4
7.4.1
7.4.2
7.5
7.5.1
7.5.2
7.5.3
7.5.4
7-1
Standards, Certificates and Approvals..............................................................7-1
Safety Requirements.........................................................................................7-4
System Configuration........................................................................................7-7
Monitoring Times...............................................................................................7-8
Configuring the Monitoring Times for F/FH Systems........................................7-8
Calculation of the Minimum Monitoring Times ................................................7-10
Acceptance of an F-System ............................................................................7-14
Initial Acceptance of a Safety Program...........................................................7-15
Acceptance of Changes to the Safety Program..............................................7-20
Acceptance of F-Block Types .........................................................................7-22
Responsibilities and Qualifications .................................................................7-22
Fail-Safe Blocks
8.1
8.1.1
8.1.2
8.1.3
8.1.4
8.1.5
8.2
8.2.1
8.2.2
8.2.3
8.2.4
8.3
8.3.1
8.3.2
8.3.3
8.3.4
8.4
8.4.1
8.4.2
8.4.3
8.4.4
8.4.5
8.4.6
8.4.7
8.4.8
8.4.9
8.4.10
8.5
8.5.1
8.5.2
8.5.3
8.5.4
Fail-Safe Systems
A5E00085588-03
6-1
8-1
Overview ...........................................................................................................8-1
Fail-Safe Blocks ................................................................................................8-1
F-Data Types.....................................................................................................8-2
Block I/Os ..........................................................................................................8-4
Block Numbers..................................................................................................8-6
Installation in Cyclic Interrupt OBs ....................................................................8-8
Driver Blocks for F-I/Os.....................................................................................8-9
F_CH_DI .........................................................................................................8-10
F_CH_DO........................................................................................................8-13
F_CH_AI..........................................................................................................8-16
Common Features of the Driver Blocks ..........................................................8-22
Blocks for F Communication Between CPUs..................................................8-25
F_SENDBO .....................................................................................................8-27
F_RCVBO .......................................................................................................8-29
F_SENDR........................................................................................................8-31
F_RCVR ..........................................................................................................8-33
Blocks for Converting Data .............................................................................8-35
F_BO_FBO......................................................................................................8-36
F_I_FI ..............................................................................................................8-37
F_R_FR...........................................................................................................8-38
F_TI_FTI..........................................................................................................8-39
F_FBO_BO......................................................................................................8-40
F_FI_I ..............................................................................................................8-41
F_FR_R...........................................................................................................8-42
F_FR_FI ..........................................................................................................8-43
F_FTI_TI..........................................................................................................8-44
F_QUITES.......................................................................................................8-45
F-System Blocks .............................................................................................8-47
F_S_BO...........................................................................................................8-48
F_R_BO ..........................................................................................................8-49
F_S_R .............................................................................................................8-51
F_R_R .............................................................................................................8-52
xiii
Contents
8.5.5
8.6
8.6.1
8.6.2
8.6.3
8.6.4
8.6.5
8.6.6
8.6.7
8.6.8
8.6.9
8.6.10
8.6.11
8.6.12
8.6.13
8.6.14
8.6.15
8.6.16
8.6.17
8.7
8.7.1
8.7.2
8.7.3
8.7.4
8.7.5
8.7.6
8.8
8.8.1
8.8.2
8.8.3
8.8.4
8.9
8.9.1
8.9.2
8.10
8.10.1
8.10.2
8.10.3
8.10.4
8.11
8.11.1
8.11.2
8.11.3
8.12
8.12.1
8.13
8.13.1
8.13.2
8.13.3
8.13.4
8.13.5
8.13.6
8.13.7
8.13.8
xiv
F_START ........................................................................................................8-54
F Control Blocks ..............................................................................................8-55
F_CYC_CO .....................................................................................................8-56
F_M_DI8..........................................................................................................8-58
F_M_DI24........................................................................................................8-61
F_M_DO8........................................................................................................8-64
F_M_DO10......................................................................................................8-66
F_M_AI6..........................................................................................................8-68
F_PLK .............................................................................................................8-70
F_PLK_O.........................................................................................................8-71
F_SHUTDN .....................................................................................................8-72
F_TEST ...........................................................................................................8-77
F_TESTC ........................................................................................................8-78
F_TESTM ........................................................................................................8-79
DB_RES ..........................................................................................................8-80
DB_INIT...........................................................................................................8-81
FAIL_MSG.......................................................................................................8-82
RTG_LOGIC....................................................................................................8-83
SFC F_CTRL...................................................................................................8-84
Logic Blocks with the BOOL Data Type..........................................................8-85
F_AND4...........................................................................................................8-85
F_OR4.............................................................................................................8-87
F_XOR2 ..........................................................................................................8-88
F_NOT.............................................................................................................8-89
F_2OUT3.........................................................................................................8-89
F_XOUTY........................................................................................................8-91
Comparison Blocks for Two Input Values of the Same Type .........................8-92
F_LIM_HL........................................................................................................8-92
F_LIM_LL ........................................................................................................8-94
F_2oo3_R........................................................................................................8-96
F_1oo2_R........................................................................................................8-98
Flip-Flop Blocks.............................................................................................8-100
F_RS_FF.......................................................................................................8-100
F_SR_FF.......................................................................................................8-102
IEC Pulse and Counter Blocks......................................................................8-103
F_CTUD ........................................................................................................8-103
F_TP..............................................................................................................8-105
F_TON...........................................................................................................8-107
F_TOF ...........................................................................................................8-109
Pulse Blocks..................................................................................................8-111
F_F_TRIG .....................................................................................................8-111
F_R_TRIG .....................................................................................................8-112
F_LIM_TI .......................................................................................................8-113
Arithmetic Blocks with the INT Data Type.....................................................8-114
F_LIM_I .........................................................................................................8-114
Arithmetic Blocks with the REAL Data Type .................................................8-115
F_ADD_R ......................................................................................................8-115
F_SUB_R ......................................................................................................8-116
F_MUL_R ......................................................................................................8-117
F_DIV_R........................................................................................................8-118
F_ABS_R ......................................................................................................8-119
F_MAX3_R....................................................................................................8-120
F_MID3_R .....................................................................................................8-121
F_MIN3_R .....................................................................................................8-122
Fail-Safe Systems
A5E00085588-03
Contents
8.13.9
8.13.10
8.13.11
8.13.12
8.14
8.14.1
8.15
8.15.1
8.15.2
8.15.3
8.15.4
8.16
8.16.1
A
Check Lists
A.1
A.2
A.3
A.4
F_LIM_R........................................................................................................8-123
F_SQRT ........................................................................................................8-124
F_AVEX_R ....................................................................................................8-125
F_SMP_AV....................................................................................................8-127
Multiplex Blocks ............................................................................................8-128
F_MUX2_R....................................................................................................8-128
Error Handling ...............................................................................................8-129
Error Handling of Driver Blocks.....................................................................8-130
Error Information at the Outputs of the Driver Blocks ...................................8-132
Errror Information in the Diagnostic Buffer....................................................8-134
Error Information at the Output RETVAL ......................................................8-140
Run Times .....................................................................................................8-141
Run Times of the Fail-Safe Blocks................................................................8-141
References
Glossary
Index
Fail-Safe Systems
A5E00085588-03
A-1
B-1
Glossary-1
Index-1
xv
Contents
xvi
Fail-Safe Systems
A5E00085588-03
1.1
Product Overview
Overview
Safety Requirements
The S7 F/FH System fulfills the following safety requirements:
Fail-Safe Systems
A5E00085588-03
1-1
Product Overview
1-2
Fail-Safe Systems
A5E00085588-03
Product Overview
PC
...
PC
PC
Standard Ethernet
Industrial Ethernet or PROFIBUS
S7 F Sys
S7-400H
F-SMs
F-SMs
Standard SMs
Standard SMs
S7 FH Sys
F-SMs
ET 200M
ET 200M
S7-400 Standard
ET 200M
ET 200M
Standard SMs
Boiler prot.
Emerg. stop
ET 200S
Burner,
coal mill
Fail-Safe Systems
A5E00085588-03
1-3
Product Overview
1.2
Fail-safe S7 F System
S7 F System
The S7 F System is a fail-safe automation system consisting of at least the
following components:
An F-capable CPU module such as CPU 417-4 H that can run a fail-safe (F)
user program
Programmable controller
S7 F System
Programming device
ET 200M distributed I/O device
Fail-safe signal modules
(optionally redundant)
1-4
Fail-Safe Systems
A5E00085588-03
Product Overview
S7 FH System
The S7 FH System is a fail-safe, fault-tolerant automation system consisting of at
least the following components:
Operator station
(System visualization)
Programmable controller
S7 FH System
Redundant
PROFIBUS-DP
Fail-Safe Systems
A5E00085588-03
1-5
Product Overview
The fact that fail-safe (F), fault-tolerant (H) and standard components can be
combined has the following advantages:
1-6
You can set up a fully integrated automation system in which you can make
use of the innovation of the standard CPUs and, at the same time, use fail-safe
components independently of standard components such as FMs or CPs. You
can configure and program the whole system using standard tools such as
HWCONFIG and CFC.
The fact that you can combine standard and fail-safe program parts in a single
CPU reduces acceptance costs because only fail-safe program parts are
subject to acceptance procedures. Maintenance costs can also be reduced by
locating as many functions as possible in the standard section, which can be
modified during operation.
Fail-Safe Systems
A5E00085588-03
Product Overview
1.3
Components of an S7 F System
The figure below shows the hardware and software components required for the
configuration and operation of the S7 F.
S7 F programmable controller
F user program
F run - time license
Programming device
Optional package
S7 F Systems with
Configuration tool
F library
Safety program
editing
F - I /Os
Fail-Safe Systems
A5E00085588-03
1-7
Product Overview
1.4
Hardware Components
An F System consists of hardware components that fulfill certain safety
requirements, such as:
F-I/Os
F-Capable CPUs
For S7 F/FH Systems, the CPU (e.g. the CPU 417-4 H as of V2.0) with an F-Copy
License is used either individually or as a fault-tolerant master/standby system.
The F-Copy License permits you to use the CPU as an F-CPU (i.e. to run a failsafe user program on it).
An F-capable CPU is a CPU that is approved for use in the S7 F/FH. It only
becomes an F-CPU if there is an F user program running on it. Otherwise, a
standard S7 program runs on the CPU. A combination of standard and F user
programs is possible because the safety-related data of the F user program is
protected from the influence of non-safety-related data. The CPU must be
configured as an F-CPU in this case as well.
Safety-relevant sections of the user program must be password-protected on the
CPU and in the ES/programming device against unauthorized access. In addition,
comprehensive self-tests run on the CPU. These ensure a high rate of fault
detection.
F-I/Os
The following F-I/Os are available:
For ET 200M:
1-8
Fail-Safe Systems
A5E00085588-03
Product Overview
For ET 200S:
Please refer to the manual: ET 200S Distributed I/O System, Fail-Safe Modules
Standard Components
The restrictions for fault-tolerant systems apply to the use of standard components.
You will find the restrictions for standard components in safety mode of fail-safe
signal modules in the safety information in Chapter 3 of the "S7-300 Programmable
Controller, Fail-Safe Signal Modules".
Additional Information
You can find detailed descriptions of the hardware components for the S7 F/FH
Systems in the following manuals:
Fail-Safe Systems
A5E00085588-03
1-9
Product Overview
1.5
Software Components
The S7 F Systems have the following software components:
S7 F Systems (Programming)
The "Failsafe Blocks" library for the programming of fail-safe user programs.
Support for the processing of the F user program and for the integration of fault
detection functions in the F user program.
Additional Information
You can find detailed information in the following sections.
Configuration
Programming
Fail-Safe Blocks
1-10
Fail-Safe Systems
A5E00085588-03
Product Overview
1.6
the three use-case-scenarios are as follows, please select the one that best
suits your needs:
1.6.1
Fail-Safe Systems
A5E00085588-03
1-11
Product Overview
Authorization
Authorization is required for the S7 F Systems optional package. Authorization can
be installed in the same way as STEP 7 and the optional packages. You can find
information on how to install and work with the authorization component in the
readme file and in STEP 7s main help system.
Note
SIMATIC S7 F Systems V5.0 license also supports V5.2
F-Copy License
An F-Copy License permits you to use the CPU as an F-CPU (e.g. to run a Safety
Program on it).
1.6.2
Use-case-scenarios
1-12
Fail-Safe Systems
A5E00085588-03
Product Overview
Software Requirements
The following software packages must be installed on the PC/programming device
in order to use, modify, or create projects based on Failsafe Blocks (V1_1) library
with S7 F Systems V5.2:
S7 F Systems V5.2
CFC V5.2.4
Procedure
If S7 F Systems V5.1 is already installed, the projects based on Failsafe Blocks
(V1_1) library are supported without any additional procedures.
Software Requirements
The following software packages must be installed on the PC/programming device
in order to use, modify, or create projects based on Failsafe Blocks (V1_1) library
with S7 F Systems V5.2:
S7 F Systems V5.2
CFC V5.2.4
Procedure
1. If S7 F Systems V5.2 is installed, uninstall it.
2. Install S7 F Systems V5.1
3. Install S7 F Systems V5.2
4. If you had PCS7 Driver Blocks or PCS7 Library installed, you must also install
these.
Fail-Safe Systems
A5E00085588-03
1-13
Product Overview
Software/Firmware Requirements
The following software packages must be installed on the PC/Programming
Device/Workstation in order to upgrade projects based on Failsafe Blocks (V1_1)
library to Failsafe Blocks (V1_2):
S7 F Systems V5.2
CFC V5.2.4
ET 200S fail-safe module drivers are available, but this requires CFC V6.0.
1-14
Fail-Safe Systems
A5E00085588-03
Product Overview
c.
Open the library within SIMATIC Manager by choosing File > Open and
press the Browse button.
Fail-Safe Systems
A5E00085588-03
1-15
Product Overview
1-16
Fail-Safe Systems
A5E00085588-03
Product Overview
Important Note
You must Import the new Block Type after upgrading the library to insure all blocks
are up to date. Failure to Import new block types may result in a failed compile.
Important Note
Unplaced F-Blocks from the block container are automatically deleted when the
safety program is compiled.
Important Note
Run-time groups containing F-Blocks in task OB1 must be moved to OB3x
because OB1 is no longer supported.
Fail-Safe Systems
A5E00085588-03
1-17
Product Overview
Software/Firmware Requirements
The following software packages must be installed on the PC/Programming
Device/Workstation in order to modify or create projects based on Failsafe Blocks
(V1_2) library:
S7 F Systems V5.2
CFC V5.2.4
ET 200S fail-safe module drivers are available, but this requires CFC V6.0.
Procedure
There are no additional procedures beyond this.
1-18
Fail-Safe Systems
A5E00085588-03
Product Overview
1.7
Fail-Safe Systems
A5E00085588-03
1-19
Product Overview
Basic Procedure
Configure system
Parameterize CPU for safety program
Parameterize F-I/Os according to safety class and circuit diagram
Maintain system
Replace hardware components
Change Safety Program
Update operating system
1-20
Fail-Safe Systems
A5E00085588-03
Product Overview
Compiling as a Program
To compile the Safety Program, proceed as follows:
1. Carry out a consistency check by choosing the Chart > Check Consistency
>Charts as Program menu command. (This step is optional.)
2. Choose the Chart > Compile > Charts as Program menu command.
3. Select one of the following options in the "Compile Charts as Program" dialog
box:
4. If the F module drivers are not yet placed, select the "Generate Module
Drivers" check box in the "Compile Charts as Program" dialog box. This
automatically inserts and interconnects the required F module drivers in
separate charts @Fx.
Result: The Safety Program is compiled and can be downloaded to the CPU.
Safety functions are added to the charts of the Safety Program automatically. The
automatically added elements, such as additional blocks and interconnections, are
partially visible in the CFC charts, but must on no account be changed or deleted.
Graphical moving of blocks within the same chart is permissible
Fail-Safe Systems
A5E00085588-03
1-21
Product Overview
1-22
Fail-Safe Systems
A5E00085588-03
2.1
Getting Started
Introduction
This introduction uses concrete examples to walk you through the steps required to
create a working application, which will enable you to discover how a fail-safe
automation system works, and how it behaves in the event of a fault/error.
The following two systems will be used as examples to lead you through the initial
commissioning phase to an actual working application.
Terminology
The following table describes terminology used in the example projects.
F_SHUTDN
F-run-time
group
This is a run-time group that has F-Blocks within it. The Step 7
definition of run-time groups: (Run-time groups are used to
structure tasks. The blocks are installed sequentially in the runtime groups. Run-time groups can be activated and deactivated
separately. If a run-time group is deactivated, the blocks it
contains will no longer be activated.)
Safety
Program
Force Full
Shutdown
The user may force the manual shutdown of the entire Safety
Program through the RQ_FULL input of the F_SHUTDN function
block.
Full
Shutdown
Partial
Shutdown
Fail-Safe Systems
A5E00085588-03
2-1
Getting Started
Restart
Shutdown
You can force a manual shutdown of the entire Safety Program or you can
restart the shutdown Safety Program.
You can use the SHUTDOWN input to set either Full Shutdown or Partial
Shutdown.
You can use the FAILURE input of the F_SHUTDN function block to identify
that a failure occurs and observe the FULL_SD output if a failure is detected
while SHUTDOWN = Full Shutdown.
The F_SHUTDN block also has an input F_PRG_SI to provide you with the overall
Safety Program Signature, and an output SAFE_M to provide you with the current
safety mode status of the Safety Program.
The F_SHUTDN function block also reports error events to the Diagnostic Buffer.
The events reported are Restart, Full Shutdown, and Partial Shutdown. Similarly,
alarm messages are also reported to WinCC under these three conditions.
Basic Procedure
Carry out the following tasks step by step:
2-2
Fail-Safe Systems
A5E00085588-03
Getting Started
You can use the examples to check the results of similar project sessions
described below.
Passwords
The passwords for the projects provided are:
Fail-Safe Systems
A5E00085588-03
2-3
Getting Started
2.2
2.2.1
S7 F programmable
controller
Single-channel, one-sided
ET 200M Distributed I/O
Fail-safe
signal modules
Profibus DP Cable
Safety Protector
Module
1 CPU 417-4H
An ET 200M distributed I/O device with an active backplane bus consisting of:
-
Other accessories
-
2-4
Fail-Safe Systems
A5E00085588-03
Getting Started
If you comply with the requirements of safety class SIL 2 or use a safety
protector in SIL 3 in ET 200M, you can use all the available IM 153-2 interface
modules and you can set up the PROFIBUS-DP with the copper cable (as in
standard mode).
If you dont use a safety protector in SIL 3 in ET 200M, you must connect the
PROFIBUS-DP lines - the S7 F System and the S7 400H programmable
controllers with fiber optic cables as described in the S7 F/FH Programmable
Controllers.
Additional Information
You can find detailed descriptions of the hardware components in the following
manuals:
Fail-Safe Systems
A5E00085588-03
2-5
Getting Started
2.2.2
Procedure
1. Open SIMATIC Manager, and create a new project called "FProject" using the
File > New menu command.
2. Insert a new S7-400 station: Insert > Station > SIMATIC 400 Station.
3. Open the hardware configuration (HWCONFIG) of the SIMATIC 400(1) station
created (you can change the name) by double-clicking the hardware object (or
right-click the Open Object pop-up menu command).
4. Insert the individual hardware components of the SIMATIC 400 from the
"Hardware Catalog" window (you can open the catalog with View > Catalog)
by dragging and dropping them to the station window.
5. First place the UR2 mounting rack from the RACK 400 catalog.
6. Insert the standard power supply (PS 407 10 A) in slot 1 of the mounting rack.
7. Place the CPU 417-4H V3.1 in slot 3: Create a subnet (which will subsequently
be connected to the ET 200M) in the "Properties - PROFIBUS Interface DP
Master" dialog box by clicking New.
2-6
Fail-Safe Systems
A5E00085588-03
Getting Started
8. Select the CPU, and choose the Edit > Object Properties menu command (or
double-click the CPU): The "Properties - CPU 417-4H" dialog box appears:
Enter a password for the CPU on the "Protection" tab, and select the
"CPU Contains Safety Program" check box.
9. From the PROFIBUS-DP catalog, insert the IM 153-2 directly in the
"PROFIBUS(1): DP Master System (1)" in the station window: Enter the
address 3 on the "Parameters" tab in the "Properties - Profibus Interface ET
200M IM153-2" dialog box.
10. Insert the input module SM 326F DI24xDC24V from the DI-300 catalog of the
IM 153-2 in slot 4 of the ET 200M (you can see a detailed view in the lower
part of the station window).
11. Select the module. Right-click to choose Edit Symbols from the pop-up menu
and enter symbolic names for all the channels: You will need the symbolic
names for the channels to create the user program.
12. Double-click to open the properties dialog box, and select "Enable Diagnostic
Interrupt" and "Safety Mode" with "1oo1 Evaluation" on the "Inputs" tab.
13. Insert the output module SM 326F DO10xDC24V/2A from the DO-300 catalog
of the IM 153-2 in slot 5 of the ET 200M.
14. Assign symbolic names to all the channels (e.g. by using "Add to Symbol").
15. Open the properties dialog box, select "Safety Mode in Accordance with SIL2 /
AK4" on the "Outputs" tab.
This completes hardware configuration.
16. Save the current configuration by choosing the Station > Save and Compile
menu command: The system blocks are generated and stored in the program
container.
17. Download the hardware configuration to the CPU by means of the PLC >
Download to Module menu command.
Fail-Safe Systems
A5E00085588-03
2-7
Getting Started
2.2.3
2-8
Fail-Safe Systems
A5E00085588-03
Getting Started
Inserting F-Blocks
1. Close the Run Sequences either by closing the window within CFC editor, or
pressing Control-F11.
2. Insert user logic such as F_ADD_R, F_LIM_R etc Refer to section Inserting
and Interconnecting Fail-Safe Blocks for details.
Note 1
The fail-safe blocks of the Failsafe Blocks library are yellow to differentiate them
from standard blocks.
Note 2
Previously a chart needed to be added manually by the user with the F_CYC_CO.
This is no longer necessary or allowed. The Placement of the F_CYC_CO blocks
is now a system function.
3. Insert two F_CH_DI F channel drivers to read in the fail-safe input module,
channels 0 and 1 (input value is at the Q output of the F_CH_DI FB).
4. Interconnect the VALUE input with the symbolic names for channel 0 (e.g.
E24.0) and channel 1 (e.g. E24.1) using the right mouse button and
Interconnection to Address.
5. Assign a value of 1 to the ACK_NEC input: in the event of an error, user
acknowledgment (at ACK_REI) is required for reintegration.
6. Place two F_CH_DO F channel drivers (values are at the I input) to write to the
fail-safe output module.
7. Interconnect the VALUE output with the symbolic name for channel 0 (e.g.
A.8.0) and channel 1 (e.g. A.8.1).
8. Assign the value 1 to the ACK_NEC input.
9. Connect the Q outputs of the two F_CH_DI with the I inputs of the
corresponding F_CH_DOs.
10. Insert the F_QUITES block (fail-safe acknowledgment) from the library and
connect the OUT output to the ACK_REI inputs of the two F_CH_DI and the
two F_CH_DOs.
Fail-Safe Systems
A5E00085588-03
2-9
Getting Started
11. Check again in the run-time group overview whether all the F-blocks are in the
F-blocks run-time groups as required.
2-10
Fail-Safe Systems
A5E00085588-03
Getting Started
All the required error OBs have also been inserted in the block container in
SIMATIC Manager.
Note
The CFC charts with fail-safe blocks are yellow and marked with an "F" to
distinguish them from standard charts.
2.2.4
Fail-Safe Systems
A5E00085588-03
2-11
Getting Started
2.2.5
Additional Errors
Trigger the following two errors, and display the diagnostic buffer of the CPU:
2-12
Fail-Safe Systems
A5E00085588-03
Getting Started
2.3
2.3.1
Single-channel, switched
ET 200M Distributed I/O
Fail-safe
signal modules
Redundant DP
master systems
Profibus DP Cable
Safety Protector
Module
2 CPU 417-4H
4 synchronization modules
2 fiber-optic cables
An ET 200M distributed I/O device with an active backplane bus consisting of:
-
Other accessories
-
Fail-Safe Systems
A5E00085588-03
2-13
Getting Started
Set the mounting rack numbers 0 and 1 for the synchronization modules.
Connect actuators, or alternatively terminating resistors, to the output module (e.g.
between 12 and 3.4 k with 1 watt), or disable group diagnosis for unused
channels in the hardware configuration.
If you comply with the requirements of safety class SIL 2 or use a safety
protector in SIL 3 in ET 200 M, you can use the IM 153-2 for S7 F/FH
Systems or the IM 153-3 only for the S7 FH Systems and you can set up the
PROFIBUS-DP with the copper cable (as in standard mode).
If you dont use a safety protector in SIL 3 in ET 200M, you must connect the
PROFIBUS-DP lines of the S7 F/FH Systems with fiber optic cables. You can
only use the IM 153-2FO.
Additional Information
You can find detailed descriptions of the hardware components in the following
manuals:
2-14
Fail-Safe Systems
A5E00085588-03
Getting Started
2.3.2
Procedure
1. Create a new project called "FHProject".
2. Insert a new SIMATIC H Station.
3. Open the hardware configuration of the SIMATIC H station(1).
2-15
Getting Started
2.3.3
Procedure
1. Create the same fail-safe CFC user program as described for the S7 F
Systems.
2. After the charts have been compiled, download them to CPU0.
2.3.4
2-16
Fail-Safe Systems
A5E00085588-03
Getting Started
2.3.5
Fail-Safe Systems
A5E00085588-03
2-17
Getting Started
2-18
Fail-Safe Systems
A5E00085588-03
3.1
Safety Mechanisms
The safety-related functions for fault detection and fault reaction are mainly located
in the Safety Program and in the F-I/Os. These functions are implemented by
means of appropriate fail-safe blocks and supported by the hardware and the CPU
operating system.
The safety-related functions of the F-I/Os are described in manual /1/. (Please
refer to the references in Appendix B.)
Fail-Safe Systems
A5E00085588-03
3-1
Safety Mechanisms
3.2
Safety Mode
The safety-related functions for fault detection and fault reaction are activated in
safety mode.
In the F-I/Os
You can find additional information on standard mode and safety mode in manual
/1/. (Please refer to the references in Appendix B.) You can find information on the
parameter assignment of the F-I/Os in the online help system and in the section
"Configuring, Parameter Assignment of F-I/Os".
3-2
Fail-Safe Systems
A5E00085588-03
Safety Mechanisms
3.3
Fault Reactions
Safe State
The basis of the safety concept is that there must be a safe, neutral position for all
process variables. In the case of binary signal modules, this is always the value
"0".
Note
When a failure is detected, Full Shutdown occurs and all F-run-time groups in the
Safety Program are disabled.
When a failure is detected, Partial Shutdown occurs and an F-run-time group
(where the failure occurs) is disabled, leaving other run-time groups activated.
Fail-Safe Systems
A5E00085588-03
3-3
Safety Mechanisms
3.4
Startup of an F-System
Startup Characteristics
The startup characteristics are determined by the Safety Program as follows. After
each interruption of the user program, by means of power off CPU STOP, or Safety
Program disable, startup of the Safety Program is only possible with the initial
values of the fail-safe blocks.
If a warm restart is requested during startup, a warm restart is only carried out for
the standard section of the user program. A warm restart for the fail-safe section of
the user program is not possible; the Safety Program starts up with the initial
values of the fail-safe blocks in the same way as after a cold restart.
To handle Warm or Cold Start of the Safety Program, additional blocks (DB_RES)
and calls that must not be changed are automatically inserted in the OB 100 and
blocks DB_INIT are automatically placed into @F_DbInit at compile time.
Startup Protection
A startup of the Safety Program using the initial values can also be triggered by a
handling error or an internal error. If the process does not permit this, a reaction to
this must be programmed in the Safety Program. The F_START block is available
to signal a startup of the Safety Program with the initial values (see the section
entitled "Programming the Startup Characteristics).
HOLD Mode
HOLD mode is not supported for the S7 F/FH systems. If the execution of the user
program is stopped by a HOLD request, the F-I/Os go to failsafe (Outputs
disabled). Once the CPU is back in RUN mode, the Safety Program performs a
Full Shutdown. The Shutdown logic must be Restarted and the F-I/Os
reintegrated.
See Also
Programming the Startup Characteristics
3-4
Fail-Safe Systems
A5E00085588-03
Safety Mechanisms
3.5
Self-Tests
Self-tests are carried out in the S7 F/FH system to detect faults. The duration of the
cyclic self-tests can be set during configuration (the default is 90 mins).
Note
Only settings of up to 12 hours are permitted for the S7 F/FH Systems.
You cannot modify safety-relevant self-tests for the S7 F/FH Systems with the
SFC 90 "H_CTRL". If you do, the Safety Program will become disabled at the
latest after 24 hours. It is not permitted to switch test components off or on
(submode 0 .. 5 from mode 20, 21 and 22).
For the same reason, you must not disable updating with SFC 90 "H_CTRL" for
too long.
Execution (program run, entire safety-related hardware) and the test result are
checked in the Safety Program by an F test block (F_TESTC) that is inserted
automatically when the Safety Program is compiled.
Command Tests
Some commands are tested in the quickest cycle of the Safety Program. These
command tests are implemented in the F_TEST block, which is included
automatically when the Safety Program is compiled.
3.6
Fail-Safe Systems
A5E00085588-03
3-5
Safety Mechanisms
When a hazardous fault is detected, the logical program execution check performs
the following:
The maximum F cycle time (cyclic interrupt time for OBs with F-run-time groups) is
assigned in CFC as an input parameter of the F-Block F_CYC_CO. An F_CYC_CO
F-Block must be present in each F cycle (i.e. in each cyclic interrupt OB with FBlocks). This Block is placed automatically during compilation.
In the event of an F cycle time overrun, the associated F-run-time groups will
become disabled causing all associated outputs to revert to the safe state.
The fail-safe blocks F_R_BO and F_R_R used for RTG to RTG
communications, output parameterizable substitue values.
After the problem has been eliminated, user acknowledgment on the F channel
driver block or the F-Block F_RCVBO or F_RCVR or a Restart of the Shutdown
Logic is required. The fail-safe blocks F_R_BO and F_R_R, used for RTG to RTG
communications, are automatically reintegrated.
See Also
Interconnecting F Cycle Time Monitoring
F_PLK_O, F_PLK, F_CYC_CO
3-6
Fail-Safe Systems
A5E00085588-03
Safety Mechanisms
3.7
To
Max. Inaccuracy
10 ms
50 s
5 ms
> 50 s
100 s
10 ms
...
...
...
> n* 50 s
(n+1)*50 s
(n+1)*5 ms
The actual inaccuracy is considerably less than this. Also note the time inaccuracy
that occurs due to processing in the cyclic interrupt scan cycle.
Fail-Safe Systems
A5E00085588-03
3-7
Safety Mechanisms
3.8
User Requested
Password
Validity
User Input
Password
Validity
An hour after the password has been entered or until the access rights are
explicitly canceled
You can find additional information on password protection in the section on setting
up, changing and canceling access rights.
3-8
Fail-Safe Systems
A5E00085588-03
Safety Mechanisms
3.9
Safety-Related Communication
Communication Overview
The following figure shows the communication options available to an F-system:
Standard or F-CPU
F-CPU
Standard program
Standard program
6
1
F-Programm
Safety
Program
F-CPU
F-run-time
F-Ablaufgruppe
group
F-Programm
Safety
Program
3
F-run-time
F-Ablaufgruppe
group
F-Treiber
F
driver
Legend:
Safety-related
Non-safety-related
F-SM
F-I/O
Number
Communication Between
And
Safety-Related
1
2
Standard program
No
Standard program
Safety Program
No
F-I/O
Yes
Yes
Fail-Safe Systems
A5E00085588-03
No
3-9
Safety Mechanisms
3.9.1
F-CPU
Safety Program
Non-safety-related
Standard program
From
To
Block
SafetyRelated
Safety Program
Standard program
No
Standard program
Safety Program
No
The following data types are supported: BOOL, REAL, INT and TIME.
Parameters are passed as safety-related F-data types in the Safety Program. If the
standard user program has to process data from the Safety Program, for
monitoring purposes, for example, then a block for the conversion of data (F_Fdata
type_data type) must be inserted in CFC to convert the F-data types to standard
data types.
These blocks can be found in the Failsafe Blocks, User Blocks library.
The F_Fdata type_data type blocks must be called in the standard user program
(CFC chart, standard run-time group).
If data from the standard user program has to be processed in the Safety Program,
safety-related F-data types must be created from the standard data types using
F_data type_Fdata type blocks for data conversion and, if necessary, then
subjected to a plausibility check programmed using fail-safe blocks. The F_data
type_Fdata type data conversion blocks must only be used in the Safety Program
(CFC chart, F-run-time group).
See Also
Programming Communication Between F User Programs and Standard User
Programs
3-10
Fail-Safe Systems
A5E00085588-03
Safety Mechanisms
3.9.2
See Also
Programming Communication Between F Run-Time Groups Within a CPU
3.9.3
Fail-Safe Systems
A5E00085588-03
3-11
Safety Mechanisms
See Also
Interconnecting F-Driver Blocks and Driver Blocks for F-Signal Modules
3.9.4
Communication Options
1
S7 FH Systems
S7-400FH
S7 FH Systems
S7-400FH
S7 F Systems
S7 F Systems
Number Communication
From...
To
Connection Type
SafetyRelated
S7 FH Systems
S7 FH Systems
S7 connection, fault-tolerant
Yes
S7 F/FH Systems
S7 F Systems
S7 connection, fault-tolerant
Yes
S7 F Systems
S7 F Systems
S7 connection
Yes
The fail-safe blocks F_SENDBO <-> and F_RCVBO or F_SENDR <-> F_RCVR are
available for safety-related communication between safety programs on different FCPUs. This means a fixed number of parameters of BOOLs or REALs can be safely
transferred.
3-12
Fail-Safe Systems
A5E00085588-03
Safety Mechanisms
Note
Multiproject is a new feature of STEP7 V5.2, with this feature, you do not need to
maintain all CPUs in the same project; and you may have several projects in which
CPU to CPU communication is shared between them.
See Also
Programming Communication Between Safety Programs on Different CPUs
Fail-Safe Systems
A5E00085588-03
3-13
Safety Mechanisms
3-14
Fail-Safe Systems
A5E00085588-03
4.1
Configuration
Overview
This section describes the main differences between the configuration of a fail-safe
system and that of a standard S7 system. It also deals with the special features of
the programming device functions that you must watch out for when working with a
fail-safe system.
4.2
The individual steps required for configuration are also largely identical with those
of the S7-400. Authorization is always required to change the parameter
assignment of an F-System.
In safety mode, fail-safe signal modules can only be used in an ET 200M with
the IM 153-2 FO or a Safety Protector Module. Exception: The S7-300
standard module SM 331; AI 2 x 12Bit (order no. 6ES7 331-7TB00-0AB0) can
be used together with fail-safe signal modules in safety mode in an ET 200M.
Fail-safe operation of the F-SMs is only possible in the address area 8 to 8191.
The address used must be set on the F-SM by means of switches and must
match the configured address.
To run a CPU with a Safety Program, the appropriate option must be activated
for the CPU and a password configured.
If the configuration of an F-I/O or the CPU (cycle times of the cyclic interrupt
OBs) is changed, the Safety Program must be compiled again and downloaded
to the CPU.
Fail-Safe Systems
A5E00085588-03
4-1
Configuration
Before downloading the Safety Program, you must download the configuration
to the CPU.
If you use a safety protector in the ET 200M, then you can operate fail-safe
signal modules with the S7-300 standard signal modules in an ET 200M even
in safety mode in SIL 3.
The safety protector protects the fail-safe signal modules from possible
overvoltage in the event of a fault. To do this, the fail-safe signal modules
must be inserted in the ET 200M configuration to the right of the safety
protector, and all the standard signal modules must be inserted to the left of
the safety protector.
The ET 200M components which can be used in safety mode depends on the
safety class and the use of a safety protector in the ET 200M configuration:
If you comply with the requirements of safety class SIL 2 or use a safety
protector in SIL 3 in ET 200M, you can use the IM 153-2 for S7 F/FH Systems
or the IM 153-3 only for the S7 FH Systems and you can set up the
PROFIBUS-DP with the copper cable (as in standard mode).
If you dont use a safety protector in SIL 3 in ET 200M, you must connect the
PROFIBUS-DP lines of the S7 F/FH Systems with fiber optic cables, you can
only use the IM 153-2FO.
Additional Information
You can find a full description of the safety protector in the S7-300 Programmable
Controller, Fail-Safe Signal Modules; A5E00048969-03; edition 02/2001.
4-2
Fail-Safe Systems
A5E00085588-03
Configuration
4.3
You must make these settings via the CPUs object properties in HWCONFIG.
Procedure
1. Select the desired CPU in HWCONFIG, and then choose the Edit > Object
Properties menu command.
2. Select the protection level you want for the CPU, and then enter a password in
the text boxes provided.
3. Select the "CPU Contains Safety Program" option on the "Protection" tab.
Fail-Safe Systems
A5E00085588-03
4-3
Configuration
4.4
You can select between safety mode (different levels to a certain extent) and
standard mode.
An F-I/O cannot be addressed directly in safety mode. It can only be addressed via
the fail-safe driver blocks.
Only in the F-I/O can you choose between Safety and Standard-Mode, but not in
the ET 200S F modules.
Dynamic parameter assignment by means of SFC calls is only possible in standard
mode for the F-SM. It is not possible to change to safety mode in this way.
You can find more information on the parameter assignment of F-I/Os in manual /1/
(refer to the references in Appendix B) and in the context-sensitive help information
in HWCONFIG.
Symbolic Names
Note
Enter a symbolic name for each input or output channel of the configured F-I/Os.
In the case of F-I/Os in safety mode, in CFC you must assign the symbolic name of
the associated channel to the VALUE input of each F channel driver block.
This enables automatic assignment between the module parameters configured in
HWCONFIG (addresses, monitoring times, etc.) and the I/Os of the associated F
channel driver blocks in CFC.
If you configure 1oo2 sensor evaluation for the digital input modules, we
recommend that you mark the channels that are unavailable (4 to 7 in the SM 326;
DI 8 x NAMUR and 12 to 23 in the SM 326; DI 24 x DC 24 V and the
corresponding channel in the 4/8 F-DI 24 VDC PROFIsafe) as reserved in the
symbol table.
4-4
Fail-Safe Systems
A5E00085588-03
Configuration
The CPU does not receive a diagnostic message, and the outputs are not
passivated, depending on the setting on the F-driver block.
Fail-Safe Systems
A5E00085588-03
4-5
Configuration
4.5
That the two modules are of the same type and have the same parameter
assignment.
4.6
4-6
Fail-Safe Systems
A5E00085588-03
Configuration
4.7
Setting Breakpoints
Note
After the HOLD mode has been requested, a Restart of the Shutdown Logic is
required.
Fail-Safe Systems
A5E00085588-03
4-7
Configuration
4.8
4.8.1
People with authorization must explicitly cancel the authorization when they
exit the ES/programming device. If this is not rigorously adhered to, a screen
saver with a password accessible only to authorized people must also be used.
When the standard program is changed in safety mode, access rights should not
be obtained using the CPU password because otherwise the Safety Program can
also be changed. The protection level must instead be set accordingly.
After access rights have been canceled, check, if safety mode is active, whether
the overall signature of the Safety Program online and the overall signature of the
accepted Safety Program are identical. If not, download the correct Safety
Program to the CPU again (see sections "Downloading Changes" and "Comparing
Safety Programs".
4-8
Fail-Safe Systems
A5E00085588-03
Configuration
4.8.2
Enter the password for the Safety Program for the first time. In this case,
ignore the "Old Password" field.
Change the existing password for the Safety Program. You must enter the
existing password in the "Old Password" field.
Use the Cancel Access Rights button to immediately stop the one-hour persistence
of Access Rights since the last time the password was entered. Following this, any
user must provide the Safety Program Password explicitly for any operation that
normally requires it, regardless of how much time has passed since the last entry
of the password.
If you havent already entered a password, you will be requested to enter one when
you compile the Safety Program for the first time (see below, "Request for the
Password for the Safety Program".)
You can change the password in the same way as usual under Windows 95/98/NT
by entering the old password once and the new password twice.
The password for the Safety Program is stored offline in the ES/programming
device together with the safety program.
Fail-Safe Systems
A5E00085588-03
4-9
Configuration
4.8.3
Downloading of changes to the data of the Safety Program when safety mode
is switched off
People with authorization must explicitly cancel the authorization when they
exit the ES/programming device. If this is not rigorously adhered to, a screen
saver with a password accessible only to authorized people must also be used.
4-10
Fail-Safe Systems
A5E00085588-03
Configuration
4.9
Configuration in Run
There are process control systems that may not be switched off during operation,
e.g. due to the complexity of the automated process, or expensive restart costs.
Nevertheless, a change or expansion of the process control system may be
required. Configuration in Run (CiR) makes this possible. The program execution
will be stopped for a certain time up to 2500 ms. During this time, the process
outputs keep their current value. In particular, in process control systems, this has
no effect on the process.
Before using the information below, please review the CiR procedures in the
manual How to Modify the System during Operation with CiR.
reduce the amount of input and output bytes of the master system
reduce the amount of changing master systems within one CiR event
Fail-Safe Systems
A5E00085588-03
4-11
Configuration
Configure the new F-I/O within HWCONFIG according to the manual, How to
Modify the System during Operation wth CiR (handle it like a standard module)
Calculate the Monitoring Time for this F-Module (see Calculate the Monitoring
Time for Communication between the F-CPU and the F-I/O) and use it to
update the Monitoring Time for this F-Module in HWCONFIG.
Modify your safety program (add safety logic, channel driver and module driver
for this module)
Delete the F-I/O within HWCONFIG according to the manual, How to Modify
the System during Operation with CiR (handle it like a standard module)
Modify your safety program (delete safety logic, channel driver and module
driver for this module)
Note
You can only delete an existing F-I/O via CiR if the module was added to the
system via CiR.
Changing of an exisiting configuration of an F-I/O is not possible.
4-12
Fail-Safe Systems
A5E00085588-03
5.1
5.1.1
Programming
Overview
Structure of the Safety Program
The following figure illustrates the structure of a Safety Program in the
programming device/ES and CPU schematically:
Programming device / ES
User
STEP 7 project
Safety
Program
Hardware
CFC
Standard
F-System
S7 F System
Standard
Program
Control Blocks
Simulation Blocks
F Users
User Blocks
Charts
Libraries
F-SMs
Standard
SMs
The user program in the CPU is usually made up of a standard and a fail-safe
section. The safety functions are programmed in CFC using fail-safe blocks.
Fail-Safe Systems
A5E00085588-03
5-1
Programming
5.1.2
Fail-Safe Blocks
A Safety Program can contain the following fail-safe blocks:
F User Blocks
Function
F-Driver
F_CH_DI
F_CH_AI
F_CH_DO
Channel driver for the input and output signals of the F-I/Os
Conversion
F_BO_FBO
F_I_FI
F_R_FR
F_TI_FTI
F_FBO_BO
F_FI_I
F_FR_R
F_FTI_TI
F_QUITES
F_FR_FI
RTG RTG
Communication
F_S_BO, F_S_R
F_R_BO, F_R_R
CPU CPU
Communication
5-2
F_SENDBO,
F_SENDR
F_RCVBO, F_RCVR
F_START
Fail-Safe Systems
A5E00085588-03
Programming
In addition, fail-safe blocks are also available for standard functions such as
arithmetic, logic, multiplexing, etc. You can find a complete list of the fail-safe
blocks in Appendix.
F Control blocks are automatically inserted during compilation and are never
to be inserted by user.
F Control Blocks
Function
F_CYC_CO
F_M_DI4
F_M_DI8
F_M_AI6
F_M_DO10
F_M_DO8
F_PLK
F_PLK_O
F_TESTC
F_TEST
F_TESTM
F_SHUTDN, DB_INIT,
RTG_LOGIC,
FAIL_MSG
Simulation blocks (F-simulation blocks) that are used in the offline simulation
of the Safety Program with PLCSim 5.0. PLCSim 5.1 does not use the
simulation blocks.
Fail-Safe Systems
A5E00085588-03
5-3
Programming
5.2
5.2.1
Prerequisites
The hardware components of the project and, in particular, the CPU and the Fsignal modules must be configured and assigned parameters.
Basic Procedure
The following basic procedure applies when creating a Safety Program:
Define program structure
No
Change Safety
Program
5-4
Fail-Safe Systems
A5E00085588-03
Programming
5.2.2
The Safety Program must be created in CFC using special F-Blocks from the
Failsafe Blocks library. The name of the library must not be changed.
During compilation the Safety Program is changed automatically, and Fspecific sections are added. These are modified parameter values and
additional blocks. These modifications are visible in the CFC chart.
The COMPLEM and PARID structural components of F-data types must not be
manipulated.
Parameters not visible in F blocks and parameters marked as noninterconnectable (UDA s7_visible, s7_link) must not be interconnected or
parameterized.
Fail-safe blocks must not be manipulated (deleted, inserted) offline or online in the
block container.
Online modifications of the fail-safe I/Os in SIMATIC Manager made, for example,
by controlling variables or forcing are not permissible and will result in a Safety
Progam disable if fail-safe blocks (V1.2) or greater is used.
You must not operate Safety Programs directly when safety mode is activated! You
can enter safety parameters for unconnected inputs:
If you dont comply with these safety guidelines, you also risk the Safety Program
becoming disabled.
Fail-Safe Systems
A5E00085588-03
5-5
Programming
The fail-safe blocks in the Fail-safe Blocks library are highlighted in color in the
CFC chart. They are colored yellow to indicate that it is a safety program.
The CFC charts and run-time groups with F-Blocks are yellow and marked with an
"F" to differentiate them from the charts and run-time groups of the standard
program.
5-6
Fail-Safe Systems
A5E00085588-03
Programming
5.2.3
You can combine standard and Safety Program sections within a CPU.
Multiple charts with fail-safe blocks are permissible for each priority class (task
or OB).
Run-time groups with fail-safe blocks can only be assigned to OB3x cyclic
interrupts (OB 30 to OB 38).
It is recommended to place all the blocks in a chart, with the exception of the
module driver, in the same run-time group whenever possible. A run-time
group can, however, contain blocks from several charts.
A chart may contain both F-blocks and standard blocks, as long as the Fblocks are in separate run-time groups from the standard blocks, and as long
as the charts are not compiled as block types.
You can only access the F-I/Os in the Safety Program via the F channel
drivers, which make the process signals available in the safe data format.
As of about 1000 blocks, you have to distribute the Safety Program to several
F-run-time groups; otherwise, it cant be compiled.
Which OB3x cyclic interrupts do the fail-safe sections of the user program have
to be assigned to? With which priorities and cycle times?
You must configure these OBs for the CPU.
Note
You can improve the performance by removing the non-safety-related functions
from the Safety Program section and leaving them in the standard program
section. This particularly includes functions such as reporting, monitoring etc.
When distributing functions between the standard and fail-safe section of the
program, note that it is easier to change the standard section of the program and
download it to the CPU. Changes to the standard section do not normally require
acceptance.
Fail-Safe Systems
A5E00085588-03
5-7
Programming
5.2.4
Procedure
You can create individual CFC charts in the chart folder in the usual way:
By choosing the Insert > S7 Software > CFC menu command in SIMATIC
Manager
By choosing the Chart > New menu command in the CFC editor
Chart in Chart
In order to structure a program according, for example, to process-related aspects,
you can use a CFC chart within a CFC chart (Chart in Chart). This enables you to
use solutions already in existence as often as you want. You can find out how to
create Chart in Chart charts, assign them I/Os and insert them in other CFC charts
in the CFC online help system.
Note
If you nest a chart in another chart, you must make sure that the blocks of the
lower-level chart are in the same run-time group as those of the higher-level chart
(of the basic chart). If necessary, move them. Otherwise, you will receive an error
message when the Safety Program is compiled.
Chart outputs of a lower-level chart that are not interconnected internally cannot be
interconnected further in the higher-level chart.
5-8
Fail-Safe Systems
A5E00085588-03
Programming
5.2.5
The F-blocks must not be inserted directly in tasks/OBs; instead, they must be
inserted in run-time groups.
A separate CFC chart containing the F_CYC_CO block is required for F cycle
time monitoring. In every cyclic interrupt OB to which F-run-time groups are
assigned, this chart must be in a separate run-time group. In the run sequence
of an OB, this run-time group must be called before all the other run-time
groups with F-Blocks of this OB. This is created automatically during
compilation.
Note
A Failsafe Run-time group must keep the default values for the Scan and Offset
Run-Time Properties as follows:
Scan = 1
Offset = 0
It is unsafe to change these values, therefore attempting to do this will cause an
error to be posted.
Procedure
Insert the run-time groups in the CFC run sequence editor in the usual way:
by choosing the pop-up menu command Insert Run-Time Group (right mouse
button)
Fail-Safe Systems
A5E00085588-03
5-9
Programming
5.3
5.3.1
Note
If a block type has already been inserted from the library, it can be inserted more
quickly the next time from the "CFC Catalog". Note that although fail-safe blocks
and conversion blocks that convert F-data types to standard data types are
distributed to the usual block groups, they are easy to recognize because they are
colored yellow and their names always begin with F_.
Fail-safe blocks must be inserted in separate charts in which there must not be
any standard blocks.
The F blocks in the F Control Blocks folder are automatically inserted when
the chart is compiled; you must not insert these blocks. Exception: Manual
insertion of the F module drivers.
You must not use the names of the fail-safe blocks for other blocks or rename
the fail-safe blocks.
See Also
Fail-Safe Blocks
5-10
Fail-Safe Systems
A5E00085588-03
Programming
5.3.2
F_SHUTDN
DB_INIT
RTG_LOGIC
DB_RES
F_CYC_CO
F_PLK
F_PLK_O
F_TEST
F_TESTC
F_TESTM
F_M_DI24
F_M_DI8
F_M_AI6
F_M_DO8
F_M_DO10
Fail-Safe Systems
A5E00085588-03
5-11
Programming
5.3.3
Online changes made to F-data types when safety mode is activated or by means
other than CFC test mode, will result in a Safety Program and its outputs being
disabled.
Certain inputs and outputs of the fail-safe blocks are automatically supplied
when the charts are compiled. By default, these I/Os are not visible, but they
can be made visible.
You must not change the I/Os that are supplied automatically. You can find out
whether an I/O is automatically supplied in the block description under FailSafe Blocks or in the online help system.
EN/ENO I/Os of the F-blocks and run-time group enables must not be
interconnected. EN must not be assigned the value 0 (FALSE).
We recommend that you do not configure a phase offset or a scan rate for runtime groups. If you do, you must take this into consideration when configuring
the monitoring times.
Only I/Os with standard data types can be interconnected using global
operands.
The F-data types are implemented in the program as structures in which only
the first component, Data, has the relevant value.
Note
When you assign parameters to an I/O to which an F-data type is assigned, you
can only assign a value to the first component, DATA. The other components of
the structure are automatically supplied with values during compilation of the
program.
5-12
Fail-Safe Systems
A5E00085588-03
Programming
3. Double-click the first structure element in the "Select Structure Element" dialog
box.
Result: The "Properties Inputs/Outputs" dialog box appears.
4. Enter the desired value in the "Value" text box and confirm with "OK".
Fail-Safe Systems
A5E00085588-03
5-13
Programming
See Also
F-Data Types
5.3.4
Run-Time Properties
The run-time properties of a block define the position of this block in the
chronological processing sequence within the overall structure of the PLC. These
properties are decisive in the behavior of the PLC with regard to response times,
dead times or the stability of time-dependent structures such as control loops.
Each block receives default run-time properties when it is inserted. To do this, you
put it into a task at a position you can set. You can change this installation position
and other attributes to suit your requirements at a later date.
F-System Blocks
After the program is compiled for the first time (or modified), the CFC editor will
automatically place (or adjust) system level run-time groups necessary for the
Safety Program operation. These run-time groups have the @ symbol preceding
the name of the run-time groups. These run-time groups contain the following
function blocks that are placed automatically:
5-14
Fail-Safe Systems
A5E00085588-03
Programming
Note
Please note that although the CFC Editor automatically creates the necessary
logic for the users Safety Program, it may not delete it once the user deletes the
Safety Program. If the user wishes to delete the Safety Program, the user may
have to manually delete the Safety Programs system level run-time groups.
You may arrange your fail-safe user logic in any run-time order (following the
above guidelines). You may mix standard and fail-safe run-time groups, as shown
in the graphic below. In the example below, there are three user standard run-time
groups, which are S1, S2, and S3. There are two fails-afe user run-time groups
that are placed and the CFC Editor automatically places the @ run-time groups.
You should place the fail-safe run-time groups before the standard run-time groups
in the run sequence if possible. This will avoid any variable amounts of delay
encountered when executing the standard run-time groups before the execution of
the fail-safe diagnostics.
Fail-Safe Systems
A5E00085588-03
5-15
Programming
Note
Please be aware that by mixing standard and fail-safe run-time groups, you
could possibly jeopardize your MAX_CYC maximum cycle time. The more
logic you add to the other run-time groups in the fail-safe OB3xs, the greater
the chance of encountering a scan overrun if care isnt taken.
5.3.5
F Module Drivers
F Channel Drivers
SM 326 DI 8xNAMUR
F_M_DI8
F_CH_DI
SM 326 DI 24xDC24V
F_M_DI24
F_CH_DI
SM 336 AI 6x13Bit
F_M_AI6
F_CH_AI
SM 326 DO 10xDC24V/2A
F_M_DO10
F_CH_DO
ET 200S F-DI
F_M_DI8
F_CH_DI
ET 200S F-DO
F_M_DO8
F_CH_DO
ET 200S PM-E F
F_M_DO8
F_CH_DO
ET 200S PM-DF
F_M_DO8
F_CH_DO
The F channel drivers must be interconnected with the associated F module driver
via the CHADDRxx I/O. One MOD_D1/D2 module diagnostic block can also be
inserted for each F module driver (see the figures below).
5-16
Fail-Safe Systems
A5E00085588-03
Programming
F module driver
F_CH_DI
F_M_DI8
TIMEOUT
Logical address
of the module
LADDR
LADDR_R
CHADDR00
...
CHADDR07
Symb. addr.
Chan. 00
DIAG_1
DIAG_2
Channel 00
CHADDR
VALUE
QN
...
F_CH_DI
Symb. addr.
Chan. 07
Channel 07
CHADDR
VALUE
QN
MOD_D1
Module
diagnostic
The F-drivers for the digital input module SM 326 DI 24xDC24V and for the analog
input module SM 336 AI 6x13Bit normally have the same configuration with the
corresponding number of channels.
F module driver
F_CH_DO
Channel 00
F_M_DO10
CHADDR
VALUE
CHADDR00
...
Symb. addr.
Chan. 00
CHADDR09
...
TIMEOUT
F_CH_DO
Channel 09
LADDR
LADDR_R
CHADDR
VALUE
DIAG_1
DIAG_2
Symb. addr.
Chan. 09
Logical addr.
of modules
Module
diagnostic
You can find descriptions of the blocks under "Driver Blocks for F-I/Os" or in the
online help system.
Fail-Safe Systems
A5E00085588-03
5-17
Programming
The VALUE I/O of the F channel driver must be interconnected with the
symbolic address of the channel. In the case of redundant channels, the
VALUE I/O must be interconnected with the symbolic address of the channel
with the lower address .
Prerequisite
Symbolic names: Enter a symbolic name for each channel used. You must
allocate this name to the VALUE I/O of the associated F channel driver. We
recommend, for the sake of clarity, that you also enter the unused channels in the
symbol table as reserved or not used.
Procedure
When working with F-driver blocks, proceed as follows:
1. Insert the correct F channel driver for each configured input/output channel.
You only have to insert one F channel driver for each pair of redundant
channels.
2. Interconnect the VALUE I/O in each F channel driver with the symbolic name
of the associated channel. This step is required for all F channel drivers
placed. In the case of redundant modules, interconnect the VALUE I/O with the
lower channel address.
3. Interconnect the following with the required signals:
- the I inputs of the F channel drivers F_CH_DO
- the Q outputs of the F channel drivers F_CH_DI
- the V outputs of the F channel drivers F_CH_AI
These I/Os are F_BOOL or F_REAL types and should only be interconnected with I/Os of
the same type belonging to other fail-safe blocks.
4. Set the relevant ACK_NEC input to "1" if user acknowledgment is required with
automatic reintegration of the channel. The ACK_NEC input is preset with "0"
(optional, see "Passivation and Reintegration").
5. Optional: Evaluate the ACK_REQ output in the standard program or on the OS
to find out if user acknowledgment is required.
5-18
Fail-Safe Systems
A5E00085588-03
Programming
6. Optional: Interconnect the QBAD output to find out if a substitute value or valid
process value is output. Value status (quality code) of the process value
7. Optional: Evaluate the QUALITY output in the standard program or on the OS
to obtain or find out the quality code of the process value.
8. Interconnect the relevant ACK_REI input with the signal for the
acknowledgment of reintegration (see "Passivation and Reintegration").
9. Interconnect the simulation I/Os (optional, see "Simulation Mode").
10. Interconnect the diagnostic outputs DIAG_1/DIAG_2 of the F module drivers
F_M_DI8 or F_M_DI24 if you want to evaluate in the standard program
whether discrepancy errors have occurred (optional, see Descriptions of the F
Driver Blocks). You can use this information to program messages about
discrepancy errors to the OS.
11. Place and interconnect the F module drivers manually or automatically.
Note
You can read out byte 0 of DIAG_1/DIAG_2 for service purposes in the event of an
error in CFC test mode.
Fail-Safe Systems
A5E00085588-03
5-19
Programming
5-20
Fail-Safe Systems
A5E00085588-03
Programming
In both cases, the necessary F module drivers and module diagnostic blocks are
automatically inserted into separate CFC charts called @F1, @F2, ... and
interconnected. The instances of the F module drivers automatically receive the
name you have entered in HWCONFIG for the associated F-I/O (F_Name_x). See
the chapter entitled "Parameterization of the F-I/Os".
Simulation Mode
For each input channel, you can specify a simulation value instead of the current
one received from the F-I/O. At an output, a simulation value can also be output
instead of the value at input I (e.g. for hardware tests). To output simulation values
on a channel, proceed as follows:
1. Activate the output of simulation values by interconnecting the SIM_ON input
with a constant 1 or a signal.
2. Interconnect the SIM_I input for F_CH_DI or F_CH_DO and SIM_V for
F_CH_AI with the desired signal, or parameterize it with the desired value.
Substitute Values
If the F-I/O or an F-driver block detects an error, substitute values are output from
the F-driver or from the F-I/O. In the case of digital input and digital output drivers,
the substitute value 0 is output, and the output QBAD=1 is set. In the case of
analog input drivers, depending on the parameter assignment, the substitute value
SUBS_V or the last valid value is output, and the output QBAD=1 is set (see the
description of F_CH_AI).
Fail-Safe Systems
A5E00085588-03
5-21
Programming
5-22
Fail-Safe Systems
A5E00085588-03
Programming
Configuring Messages
The same module diagnostic blocks are used for the F-I/Os as for the standard
modules. The following MOD, SUBNET and RACK blocks are inserted
automatically when you choose the Options > Charts > Generate Module
Drivers menu command:
Block
No.
SM 326F DI 8xNAMUR
MOD_D1
FB 93
SM 326F DI 24xDC24V
MOD_D2
FB 93
SM 336F AI 6x13Bit
MOD_D1
FB 93
SM 326F DO 10xDC24V/2A
MOD_D1
FB 93
SUBNET
FB 106
RACK
FB 107
In contrast to the standard drivers, the F-driver blocks are not interconnected with
the PCS 7 blocks.
Note
Messages about the following are issued from the MOD, SUBNET and RACK
blocks: parameter assignment errors, module removed, module errors, channel
errors, rack failures and DP master system failures. I/O access errors cannot be
detected and reported by the diagnostic blocks.
Fail-Safe Systems
A5E00085588-03
5-23
Programming
5.3.6
Passivation
Passivation means that, in the event of a fault/error, one or more channels of an FI/O are switched to the safe state.
When a channel fault occurs (e.g. sensor defective), only the affected channel is
passivated. In the event of a module fault/error (e.g. communication error), all the
channels of the F-I/O are passivated. The messages on the ES/OS indicate
whether all channels or only specific channels of a fail-safe module are passivated.
Passivation can be triggered by the F-I/O, the F module driver or F channel driver
or by the user in the safety program.
If an F-I/O detects a fault/error, it switches the affected channel or all its channels
to the safe state. In other words, channels of this module are passivated. The F-I/O
reports detected error to the F driver block.
Via the input PASS_ON, you can also switch the passivation of a channel on and
off in the safety program (e.g. depending on certain conditions in the execution of
the program). If PASS_ON = 1 is set, the channel is passivated as described
above. If PASS_ON = 0, passivation is canceled.
Group Passivation
In the event of a fault or error, other channels (of the same or different modules)
can be passivated by interconnecting the input PASS_ON with the output
PASS_OUT of another channel. For a group shutdown of several channels, all the
PASS_OUT outputs of the channels in this group are ORed, and the result is sent
to the PASS_ON inputs of all the channels in this group.
A group shutdown by means of PASS_OUT/PASS_ON can also be used to force a
simultaneous switchover to process values after a startup (cold or warm restart).
5-24
Fail-Safe Systems
A5E00085588-03
Programming
Valid process values are output again on the output channels of the fail-safe
output modules.
The F channel drivers of the fail-safe input modules forward valid process
values to the safety program again.
Automatic Reintegration
If the input ACK_NEC is not set, after the correction of the fault/error (with the
exception of communication errors) reintegration (depassivation) of the affected
channel is carried out automatically:
In the case of output modules - within minutes, due to the need for test signal
application
Note
After PROFIsafe communication errors, a user acknowledgement is always
required for reintegration (output ACK REQ set), even when ACK NEC is not set.
Fail-Safe Systems
A5E00085588-03
5-25
Programming
Safety Note Startup Protection to handle short power failures in the F-I/O.
Following a power failure in the F-I/O that is shorter than the watchdog time set for
the F-I/O in HW Config (See Safety Engineering in SIMATIC S7 system
description), automatic reintegration can occur, as is the case when ACK NEC = 0,
regardless of your setting for ACK NEC. If automatic reintegration for the affected
process is not permitted for this case, you must program startup protection by
evaluating the variables QBAD or PASS_OUT (see Programming Startup
Protection).
When a power failure occurs in the F-I/O and lasts longer than the watchdog time
set for the F-I/O in HW Config, the F-system detects a communication error (see
Passivation and Reintegration of the F-I/O after Communication Errors).
Note
In the event of a PROFIsafe communication error on the fail-safe input module with
the hardware switch, manual acknowledgment of the input ACK_REI is no longer
possible. This can lead to blocking, which can only be corrected by means of a
startup (cold or warm restart).
We therefore recommend that the acknowledgment is also always possible via
ES/OS.
5-26
Fail-Safe Systems
A5E00085588-03
Programming
See Also
Error_Handling_of_Driver Blocks
Fail-Safe Systems
A5E00085588-03
5-27
Programming
5.3.7
Note
When the Safety Program is compiled, additional blocks and calls that must not be
changed are inserted automatically at the beginning of the run sequence in OB
100.
If the process doesnt permit the Safety Program to start up with the initial values
after an error automatically, a response to startup must be programmed. The
F_START fail-safe block is available to signal a startup of the Safety Program with
the initial values.
The COLDSTRT output parameter signals the occurrence of a startup (cold restart
or warm restart).
Examples
Possible measures for responding to a startup of the Safety Program with the initial
values are as follows:
5-28
Programming of a wait loop so that the internal states of the Safety Program
correspond to the process state again (see the example of reintegration after
startup of the Safety Program).
Fail-Safe Systems
A5E00085588-03
Programming
5.3.8
The substitute value 0 is output from the F channel driver for digital input.
The parameterized substitute value is output from the F channel driver for
analog input
The substitute value 0 is transferred from the F channel driver for digital output
to the F-I/O.
The output of substitute values is signaled at the output QBAD=1 and can last up
to 3 cyclic interrupt cycles.
The following example shows you how, using group passivation and/or a wait loop,
you can ensure that all the F channel drivers in a group output substitute values for
an identical length of time after startup of the Safety Program with the initial values
(see also group passivation).
If you dont want group passivation, dont interconnect PASS_OUT outputs with
F_OR4, and only use the wait loop via F_START and F_TP. If you use group
passivation, you only need the wait loop via F_START and F_TP if the substitute
values are to be output after the last channel has switched over to process values.
F_START
COLDSTRT
F_CH_DO
F_TP
PASS_ON
IN
Q
PT
PASS_OUT
F_CH_DO
PASS_ON
F_OR4
IN1
PASS_OUT
IN2
F_OR4
IN3
IN4
OUT
F_CH_DO
IN1
PASS_ON
IN2
IN3
IN4
OUT
PASS_OUT
Set the minimum time at the PT input for which substitute values are to be output
after a cold restart. F_START, F_TP and F_OR4 must be called before the F
channel drivers.
Fail-Safe Systems
A5E00085588-03
5-29
Programming
5.3.9
5-30
Fail-Safe Systems
A5E00085588-03
Programming
5.3.10
Blocks for communication between the F user program and the standard user
program
Description
F_SENDBO/F_RCVBO
F_SENDR/F_RCVR:
Prerequisites
The following prerequisites must be fulfilled for communication between F-capable
CPUs:
The two CPUs must be configured as F-CPUs: The "CPU Contains Safety
Program" option must be selected and the password set.
Fail-Safe Systems
A5E00085588-03
5-31
Programming
Procedure
Proceed as follows:
1. Insert the send block (F_SENDBO/F_SENDR) in the Safety Program from
which data is to be transferred.
2. Insert the receive block (F_RCVBO/F_RCVR) in the Safety Program to which
data is to be transferred.
3. Assign parameters to the ID inputs with the relevant identifiers of the
configured S7 connections.
4. Assign parameters to the R_ID inputs. This establishes that the send and
receive blocks belong together: The associated fail-safe blocks contain the
same (freely selectable, odd) value for R_ID. Note that the value R_ID+1 is
filled automatically when this happens.
5. Interconnect the SD_BO_xx and SD_R_xx inputs of the F_SENDBO and
F_SENDR F blocks with the send signals.
6. Interconnect the RD_BO_xx and RD_R_xx outputs of the F_RCVBO and
F_RCVR F blocks with the F-Blocks for further processing the receive signals.
7. Assign parameters to the TIMEOUT inputs of the send and receive blocks with
the desired monitoring time.
You can find information on how to calculate this in the section entitled
"Configuring the Monitoring Times for S7 F/FH Systems".
Note
It can only be guaranteed (with fail safety) that a signal level to be transferred will
be detected on the sender side and transferred to the recipient if it is present for at
least as long as the specified monitoring time (TIMEOUT).
5-32
Fail-Safe Systems
A5E00085588-03
Programming
Examples:
Receive Block:
Send Block:
Fail-Safe Systems
A5E00085588-03
5-33
Programming
Description
F_S_R / F_R_R
F_S_BO / F_R_BO
Procedure
1. Insert an F-Block of the type F_S_x (F_S_R or F_S_BO) in the F-run-time
group from which data is to be transferred.
2. Insert an F-Block of the type F_R_x (F_R_R or F_R_BO) in the F-run-time
group to which data is to be transferred.
3. Interconnect the SD_R_xx input of the F_S_R or the SD_BO_xx input of the
F_S_BO with the send data.
4. Interconnect the RD_R_xx outputs of the F_R_R or the RD_BO_xx outputs of
the F_R_BO with the inputs of the F-Blocks for further processing of the
received data.
5. Interconnect the S_DB output of the send block with the S_DB input of the
corresponding receive block.
6. Assign parameter to the TIMEOUT inputs of the F_R_R and F_R_BO receive
blocks with the desired monitoring time.
You can find information on how to calculate this in the section entitled
"Configuring the Monitoring Times for S7 F/FH Systems".
5-34
Fail-Safe Systems
A5E00085588-03
Programming
Fail-Safe Systems
A5E00085588-03
5-35
Programming
Description
F_BO_FBO
F_I_FI
F_R_FR
F_TI_FTI
F_FBO_BO
F_FR_R
F_FI_I
F_FTI_TI
5-36
The F-Blocks used to convert F-data types into standard data types
(F_FBO_BO, F_FR_R, F_FI_I or F_FTI_TI) must be placed in the standard
program.
The blocks used to convert standard data types to F-data types (F_BO_FBO,
F_I_FI, F_R_FR, F_TI_FTI) must be placed in the Safety Program.
You can only operate the Safety Program by means of F conversion blocks,
which you must insert explicitly.
Fail-Safe Systems
A5E00085588-03
Programming
Procedure
Proceed as follows:
1. Insert the F-Blocks of the type F_FBO_BO, F_FR_R, F_FI_I or F_FTI_TI in the
charts of the standard user program.
2. Insert the blocks of the type F_BO_FBO, F_I_FI, F_TI_FTI or F_R_FR in the
charts of the Safety Program. These blocks can also be found in the Fail-safe
Blocks library.
3. Interconnect the inputs and outputs of the type F_data type with the same
types of signals from the Safety Program in each case.
4. Interconnect the inputs and outputs of the standard data type with the same
type of signals from the standard user program in each case.
Plausibility Checking
The simplest form of plausibility check is a specified range with fixed upper and
lower limits. Not all input parameters can be checked for plausibility simply
enough. These input parameters cannot be changed during operation.
Fail-Safe Systems
A5E00085588-03
5-37
Programming
5-38
Fail-Safe Systems
A5E00085588-03
Programming
5.4
5.4.1
Downloading Changes
Displaying Information
Fail-Safe Systems
A5E00085588-03
5-39
Programming
5.4.2
You should deactivate safety mode for test purposes, commissioning, etc.
When safety mode is deactivated, the safety of the system must be ensured by
means of other organizational measures (e.g. monitored operation and manual
safety shutdown).
When you make changes to the Safety Program in RUN mode with safety mode
deactivated, switchover effects can occur. The information on the downloading
sequence for download changes in the section entitled "Changing the Safety
Program in RUN Mode" will give you an overview of this.
Wherever possible, the standard program and the Safety Program should only
be changed separately, and the changes downloaded, because otherwise an error
could be downloaded at the same time into the standard program, and the required
protection function in the Safety Program could be destroyed, or switchover effects
could occur in both programs.
Deactivation of safety mode must be detectable. Logging is necessary, if
possible by recording messages to the OS, or if necessary by means of
organizational measures. It is also recommended that deactivation of safety mode
should be indicated on the OS.
Safety mode can only be deactivated CPU-wide. In the case of safety-related
CPU-CPU communication, note that the data sent by an F_SENDBO or F_SENDR
with safety mode deactivated and the outputs obtained from must be included in
monitored operation.
Note
If simulation mode is activated, you cannot deactivate safety mode or download
changes.
Prerequisites
5-40
Fail-Safe Systems
A5E00085588-03
Programming
Procedure
1. Select the CPU or its S7 program in SIMATIC Manager.
2. Choose the Options > Edit Safety Program menu command.
3. Select the online view in the dialog box that appears.
Note
If the validity time of one hour has elapsed, the password for the safety program is
requested again the next time safety mode is deactivated and is then valid after
entry for another hour or until access rights are explicitly canceled.
Fail-Safe Systems
A5E00085588-03
5-41
Programming
7. If the password is entered correctly, a further request is made (next step); if the
password is invalid, safety mode is not switched off and remains active.
8. Confirm that safety mode is to be deactivated with OK.
Result: Safety mode is deactivated.
You can then download changes to the Safety Program to the CPU during
operation (RUN).
5.4.3
Procedure
1. Select the CPU or its S7 program in SIMATIC Manager.
2. Choose the Options > Edit Safety Program menu command.
3. Select the online view in the dialog box that appears.
4. Enter the CPU password, if it is requested.
5. Check whether "Inactive" is displayed in the "Safety Mode" text box. If yes,
continue to the next step; if not, terminate the procedure because safety mode
is already active.
6. Click the "Safety Mode" button.
7. Confirm that safety mode is to be activated again with OK.
Result: Safety mode is activated again and "Active" is displayed in the "Safety
Mode" box.
Note
If you are unable to reactivate safety mode using the procedure described, either
switch the line voltage off and then on or switch the CPU to STOP and then to
RUN.
5-42
Fail-Safe Systems
A5E00085588-03
Programming
5.4.4
Compile all the CFC charts as a program. The charts are converted into
machine code that you can download to the CPU and run there.
Note
Use hierarchical CFC charts or create new block types to use existing charts
repeatedly.
At compilation of the Safety Program, the password for the safety program is
requested when changes are detected in fail-safe blocks.
Unplaced F-Blocks from the block container are automatically deleted when the
safety program is compiled.
If the password entered is correct, the entire Safety Program is compiled or,
alternatively, only the changes. Authorization is valid for an hour after the
password has been entered.
Fail-Safe Systems
A5E00085588-03
5-43
Programming
5.4.5
The new block type can only contain fail-safe blocks. Standard blocks are not
permissible.
The fail-safe blocks that are to be called in the new block type and the FBlocks of the entire Safety Program in which the block type is to be used must
come from one and the same library version. Blocks from different versions of
the "Fail-safe Blocks" library are not permitted.
Note
If the run sequence is different to the data flow due to feedback, for example, an
error is reported when the F-Block type is compiled.
5-44
The chart I/Os of the new block type can be F-data types and standard data
types.
You can use the following names for F-Blocks that are called in a block type:
-
Safety Note F-Blocks outputs always use the preset initial values.
When F-block types are created, none of the initial values at outputs of fail-safe
blocks may be changed. CFC will permit them to be changed and will display the
change, but the preset initial values, as specified in the library, are always used.
Fail-Safe Systems
A5E00085588-03
Programming
Procedure
1. Create the CFC chart in a separate S7 program assigned to an F-capable
CPU.
2. Open the chart you want.
3. Choose the Chart > Compile > Chart as Block menu command. A dialog box
for entering the block properties appears.
4. Enter the properties of the new block type. Select the options "Compile for PLC
- S7 400" and "Optimize Code for - Downloading Changes in RUN Mode" and
confirm with OK.
Result: A new block type is created that can be used in safety programs.
5. Insert the new block type in a Safety Program and test it there.
6. Accept the Safety Program of the new F-Block type.
Fail-Safe Systems
A5E00085588-03
5-45
Programming
5-46
Fail-Safe Systems
A5E00085588-03
Programming
5.4.6
CPU in
STOP
Possible
Not possible
Not possible
Of changes to the
standard program
Not
possible
Possible
Possible
Of changes to the
Safety Program
Not
possible
Not possible
Possible
Prerequisites
The Safety Program can only be downloaded from CFC, not from SIMATIC
Manager.
In the S7 FH Systems, the two CPUs must have the same (F) user program.
Both CPUs have either a RAM or a flash EPROM memory card.
When an accepted Safety Program is downloaded, you must check the overall
signature after downloading in the same way as you must after acceptance
(see "Checking the Overall Signatures" in the section entitled "Initial
Acceptance of a Safety Program").
Fail-Safe Systems
A5E00085588-03
5-47
Programming
5.4.7
Procedure
To download the Safety Program to the PLC, proceed as follows:
1. Switch the CPU to STOP mode.
2. Choose the PLC > Download > Entire Program menu command in CFC.
Note
Before the Safety Program is downloaded, the CPU password is requested if
changes are detected in the fail-safe program section.
Result: If you enter the correct password, the Safety Program is downloaded to the
CPU to which the program container is assigned. If the password is entered
incorrectly, the download operation is not executed.
After the program has been downloaded to the CPU, you have to compare the
overall signature of the program in the CPU with the overall signature in the
accepted printout (see "Checking the Overall Signatures" in the section entitled
"Initial Acceptance of a Safety Program"). In the case of S7 FH systems, you have
to make this comparison for both CPUs.
5-48
Fail-Safe Systems
A5E00085588-03
Programming
5.4.8
Change the CFC charts, and compile and download the changes to the CPU.
Change fail-safe constants (I/Os that are interconnected ) in CFC test mode.
All complete blocks are downloaded first. These are newly placed blocks, new
instance DBs or newly generated FCs (for modified run-time groups or tasks).
These blocks are downloaded in sequence in such a way that called blocks are
available for every phase (i.e. the CPU continues to run). (For example, new
run-time group FCs are only downloaded when newly called blocks in them
have already been downloaded.)
All blocks that are no longer required are deleted during this downloading
phase.
All changed input or output parameters of blocks are then downloaded. These
changes are downloaded by only writing the parameters that have been
changed (not the whole block) to the CPU. This can take several cyclic
interrupt cycles. The order in which the parameters are written cannot be
predicted. Make sure that parameters are not changed in such a way that
downloading across several cyclic interrupt cycles and/or in a particular order
can result in temporary dangerous states. You can avoid this by separating
control functions (in the standard program) from protection functions (in the
Safety Program) and by making changes to standard and Safety Programs
separately.
Fail-Safe Systems
A5E00085588-03
5-49
Programming
Permissible Changes
Below you can find a list of the permissible program changes. These changes can
be downloaded when safety mode is deactivated, without the Safety Program
going into shutdown mode. The restrictions listed below, however, continue to
apply:
Some operations require several steps because the new Safety Program cannot
be activated all at once. Instead, it has to be activated in several steps (see below).
5-50
Fail-Safe Systems
A5E00085588-03
Programming
Note: If the MAX_CYC parameter of the F_CYC_CO is invalid, a new value will be
requested at compile time.
Moving run-time groups: This corresponds to changing the OB cycle time for
the run-time group to be moved (see above).
Direct changing of monitoring times for F-Blocks: The monitoring times must fit
the OB cycle time. In the case of F-driver blocks, it is not possible to make
changes during operation (see "Impermissible Changes").
Fail-Safe Systems
A5E00085588-03
5-51
Programming
The data sources and sinks can be changed (i.e. the interconnections from/to
the output/input parameters of the blocks). Such a change should, however,
never be made for a data value at the same time for the sender and the
receiver because simultaneous activation of the new interconnections cannot
be guaranteed. If it is absolutely necessary, proceed as follows:
5-52
In the next step, the new interconnection on the receiver side can be made
using the new output parameter of the receiving block rather than the old
one as the source. This change can be downloaded and results in a
consistent switch to the new data paths.
Configure the new connection in NetPro and download the connection data
in RUN mode (this step is required only for CPU-CPU communication)
Place new communication blocks on the sending side and assign the data
of the new connection (ID, R_ID). Interconnect, compile and download the
data to be sent to the send block.
Place new communication blocks on the receiving side, assign the data of
the new connection (ID, R_ID), and then compile and download them. The
data of the old and new sender is now available in the receiver.
The interconnections can now be switched over from the old to the new
receive block and the old receive block can be deleted. When the changed
program is downloaded, a switchover immediately takes place to the new
sender.
Finally, the now superfluous send block of the old sender can be deleted
and perhaps also the corresponding connection from NetPro.
Fail-Safe Systems
A5E00085588-03
Programming
Move, compile and download the run-time group to the new task.
Then delete, compile and download the run-time group of the F_CYC_CO
from the old task.
Impermissible Changes
Some changes must not be carried out even when safety mode is deactivated,
because continuous (bumpless) execution of the user program cannot be
guaranteed. The following changes can cause the execution of the user program to
be interrupted or the Safety Program to shutdown, or even prevent the changes to
the Safety Program from being downloaded:
Deletion and reinsertion of the automatically inserted F control blocks and the
F_CYC_CO F-system block will result in Safety Program disable.
The same thing applies to F_S_BO and F_S_R: If such an F-Block is deleted,
reinserted and interconnected, the associated F_R_BO or F_R_R F-Block
outputs substitute values.
Fail-Safe Systems
A5E00085588-03
5-53
Programming
5.4.9
Downloading Changes
Note
If you make changes to the fail-safe section of the user program, you cant
download changes for the standard section in safety mode either. A change to the
fail-safe program that is reversed is also considered to be a change.
Note
If simulation mode is activated, you cannot switch off safety mode or download
changes.
Before downloading, a check is carried out to find out if there are any simulation
blocks in the Safety Program. If there are, downloading is terminated.
5-54
Fail-Safe Systems
A5E00085588-03
Programming
Procedure
1. Change the Safety Program and compile it (see "Compiling a Safety
Program").
2. If simulation mode is activated, deactivate it (see "Testing a Safety Program
Offline with S7-PLCSim").
3. Deactivate safety mode (see Deactivating Safety Mode).
4. Choose the PLC > Download > Changes Only menu command in CFC.
Always respond with "Yes" when you are asked to confirm that you want to
register the CPU for a test.
5. If necessary, repeat steps 1 to 4 to download changes step by step, for
example.
6. Activate safety mode (see "Activating Safety Mode").
7. Choose the Options > Edit Safety Program menu command in SIMATIC
Manager.
In the "Safety Program S7 Program" dialog box, activate the "Online" and
"Offline" options one after another and check whether the overall signatures (online
and offline) match (see "Checking the Overall Signatures" in the section entitled
"Initial Acceptance of a Safety Program"). If they match, downloading has been
successfully completed. If not, repeat step 4 of the download operation. In the case
of S7 FH systems you must carry out this comparison for the two CPUs.
Fail-Safe Systems
A5E00085588-03
5-55
Programming
5.4.10
5-56
You can observe the Safety Programs in CFC test mode and change noninterconnected inputs of fail-safe blocks. Online changes to fail-safe outputs and
automatically assigned I/Os are not permitted and result in a Safety Program
disable.
When you use the ES, changes to non-safety-related parameters can result in a
change to the overall signature of the offline Safety Program. This means that the
Safety Program might have to be accepted again after the test. To ensure that the
overall signature of the Safety Program remains unchanged, you must undo any
parameter changes by reassigning the original values to the parameters.
Fail-Safe Systems
A5E00085588-03
Programming
5.4.11
Starting Simulation
Proceed as follows:
1. Select the program folder (e.g. S7 Program) in SIMATIC Manager.
2. Choose the Options > Edit Safety Program menu command.
Fail-Safe Systems
A5E00085588-03
5-57
Programming
5-58
Fail-Safe Systems
A5E00085588-03
Programming
You can find information on working with S7-PLCSim in manual /12/. (Please
refer to the references in Appendix B.)
To carry out a test, download the Safety Program to the virtual CPU of PLCSim.
Changes to the Safety Program can only be downloaded with the whole program
when the virtual CPU is in STOP mode. In test mode, the Safety Program can be
monitored as with a real CPU.
Note
If the virtual CPU of PLCSim goes into STOP mode or the Safety Program
becomes disabled, you must do the following:
When the simulation is switched on, all the F-Blocks in the offline block container of
the program are replaced with a simulation-capable version from the Fail-safe
Blocks: F-Simulation Blocks library. The blocks in this library are only suitable for
simulation purposes and must not be downloaded to the CPU.
These blocks have the same interface as the normal F-Blocks, but they have
limited functionality determined by the functional scope of PLCSim.
When you carry out program changes in simulation mode, you can only place new
blocks from the "F-Simulation Blocks" library. A combination of F and simulation
blocks is not permissible and is reported at the next compilation of the Safety
Program.
The driver blocks do not access the I/O.
Input signals of F input modules can be modified in the process input image (PII) of
PLCSim.
Communication between CPUs cannot be simulated.
In the "Edit Safety Program" dialog box, a CRC is not displayed for the simulation
blocks. An overall signature is not calculated for the Safety Program if the Safety
Program contains simulation blocks.
Fail-Safe Systems
A5E00085588-03
5-59
Programming
Starting Simulation
Proceed as follows:
on the
1. Activate the simulation by clicking the button for simulation
toolbar of SIMATIC Manager or by choosing the Options > Simulate Modules
menu command. PLCSim then processes all the programming device
functions, such as downloading, module status, etc., instead of the real
modules. You can find information on working with S7-PLCSim in manual /12/.
2. The system data must be downloaded to PLCSIM via HWCONFIG.
3. When downloading the Safety Program into PLCSim, a Setup Access Rights
dialog box will appear requesting a password for the CPU. You MUST enter
plcsim (all lower case) regardless of the password you assigned the CPU in
HWCONFIG.
Changes to the Safety Program can only be downloaded with the whole program
when the virtual CPU is in STOP mode. In test mode, the Safety Program can be
monitored as with a real CPU.
Note
If the virtual CPU of PLCSim goes into STOP mode or the Safety Program
becomes disabled, you must do the following:
This also applies to either a Partial (isolated F Run-time groups shutdown) or Full
(entire Safety Program shutdown).
5-60
Fail-Safe Systems
A5E00085588-03
Programming
Fail-Safe Systems
A5E00085588-03
5-61
Programming
5.4.12
In the case of parameters in the safety data format, you can only change the
DATA components, not COMPLEM or PARID.
You must not change output parameters and automatically supplied I/Os.
Prerequisites
Before you switch on CFC test mode, make sure that the following prerequisites
are met:
Safety mode of the Safety Program must be deactivated. If it is not, you will be
requested to deactivate safety mode when you try to change the first
parameter.
Note
Changing fail-safe constants in safety mode will always result in a safe state
(Safety Program disabled).
To change fail-safe constants, you must enter the F password. The password is
the same one used for the compilation and downloading of changes. Irrespective of
the protection level set for the CPU, it might be necessary to provide legitimation
for the online connection to the CPU.
5-62
Fail-Safe Systems
A5E00085588-03
Programming
Fail-Safe Systems
A5E00085588-03
5-63
Programming
6. Close the "Select Structure Element" dialog box. If the change is possible, a
check box appears with the changed value, which you have to confirm with
OK.
7. If the change is not possible, you will receive a message requesting you to
eliminate the cause of the error. You then have to repeat steps 3 to 6.
Result: The new value is downloaded to the CPU and displayed at the I/O.
It is not possible to compile and download changes after CFC test mode has been
deactivated until safety mode has been activated, because all the necessary
changes were made when each individual parameter was changed.
5-64
Fail-Safe Systems
A5E00085588-03
Programming
5.4.13
Displaying Information
To display information on the Safety Program
1. Select the program folder (e.g. "S7 Program") in SIMATIC Manager.
2. Choose the Options > Edit Safety Program menu command.
Result: The "Safety Program S7 Program" dialog box appears. The following
information on the online (on the CPU) or offline (in the programming device/ES)
Safety Program is displayed:
A list of all the blocks with signatures and signatures of the initial values
Date and signature of the last compilation and the most recently saved
reference data
An indication of whether the source code, load memory and working memory
match
Fail-Safe Systems
A5E00085588-03
5-65
Programming
5.4.14
Procedure
To save the reference data of a Safety Program, proceed as follows:
1. Select the program folder (e.g. "S7 Program") in SIMATIC Manager.
2. Choose the Options > Edit Safety Program menu command. The "Safety
Program S7 Program" dialog box appears.
3. Click the "Save Reference" button. You will then be asked again if you want to
save the reference data. You have two options:
5-66
Confirm with "Yes" if you want all the information on the blocks of the
current project to be saved as reference information. Any existing
reference data will be overwritten.
Fail-Safe Systems
A5E00085588-03
Programming
5.4.15
Program/Reference
Choose one of these option buttons to specify whether the current program or the
reference program is to be compared.
Fail-Safe Systems
A5E00085588-03
5-67
Programming
Compare with:
Use this drop-down selection box to choose the second program to compare.
If you selected the Program option button above, choose one from the following:
Reference
Online
Other Project
If you selected the Reference option button, choose one from the following:
Current Project
Online
Other Project
Browse Button
Use this button and the Open dialog box to select the offline program of any
project that you want to compare.
Start Button
Click this button to start the comparison.
View Options
If both of the compared programs are offline, you can toggle between these two
options by selecting the appropriate option button:
5-68
Chart view: a hierarchical view showing Task, Runtime Group, Block and
parameter for all differences. With this view option, the Go To button is
enabled.
Fail-Safe Systems
A5E00085588-03
Programming
An indication is given of whether the overall signatures across all blocks are
identical or different.
Difference Display, Block View:
Any blocks whose signatures have changed are displayed, along with the signature
of each. No task or run-time group information is available.
Difference Display, Chart View:
The differences between the two charts are displayed in a hierarchical structure, as
in Explorer. All the blocks in this structure are displayed under the assigned task
and run-time group. Information on possible differences is displayed for each block.
These differences refer to the task/run-time group in which the block is used, the
parameterization and interconnection of the block and the run sequence.
Only tasks, run-time groups, blocks and parameters in which differences were
found are displayed.
Fail-Safe Systems
A5E00085588-03
5-69
Programming
Meaning
Deleted
Added
Interface changed
5-70
Fail-Safe Systems
A5E00085588-03
Programming
As with the offline Block View, a window shows any blocks whose signatures differ.
View option Show unconnected F-FB input parameter differences:
This option forces a complete comparison of values of constants connected to the
inputs of F-Blocks between the online and an offline program, and displays
differences in an upper pane in the dialog.
Note that normally this option is only used when the overall signatures already
match, indicating that the offline program has not changed since the last download
to the F-CPU. Checking this option allows the more thorough check for any
parameters that may have been changed online by a method other than compile
and download.
View option Filter F-System checksums
This option suppresses the display of expected differences that will occur when the
F-CPU writes to input parameters of certain F-Blocks (e.g. checksum values at
inputs of F_PLK, F_PLK_O). This option is only valid when you have checked the
option for Show unconnected F-FB input parameter differences.
Fail-Safe Systems
A5E00085588-03
5-71
Programming
5-72
Fail-Safe Systems
A5E00085588-03
Programming
Program name: A string combining the project name, the CPU type, and the
program name.
The words, IDENTICAL or NOT IDENTICAL, are appended to the caption of this
group of windows, to indicate clearly whether the overall signatures of the two
programs match or differ.
Print Button
Click this button to print the result of the comparison.
Go to Button
When Chart View is selected, you may select any block or parameter in the
displayed differences window, and click this button to go to the block in question in
the CFC editor.
Overall signature
Individual signatures
Parameter values
Fail-Safe Systems
A5E00085588-03
5-73
Programming
Compare with
Reference
Reference
Online
Program
Compare with
Current project
(Offline program)
5-74
Online
Program
Fail-Safe Systems
A5E00085588-03
Programming
Procedure
To compare two Safety Programs, proceed as follows:
1. Select the program folder (e.g. "S7 Program") in SIMATIC Manager.
2. Choose the Options > Edit Safety Program menu command. The "Safety
Program S7 Program" dialog box appears.
3. Select the "Compare..." button. The "Compare Programs" dialog box appears.
4. Select the programs you want to compare. If necessary, use the "Browse..."
button to enter the path.
5. Select the "Start" button.
The result is displayed in a dialog box at block or chart level and can be printed out
using the "Print" button. The signatures of the individual blocks are displayed in the
block view. The changes to charts, blocks and run-time groups are displayed in the
chart view. You can also see here if the signatures of the F-Blocks have changed.
Block
I/O
F_TESTC
TESTM_DB, CYC_DB
F_PLK
F_PLK_O
SIG_O, SIG_O_I
The overall signature still changes, of course, and differences must be taken into
consideration at acceptance.
The overall signature is visible at the F_SHUTDN function blocks F_PRG_SIG
input.
Fail-Safe Systems
A5E00085588-03
5-75
Programming
5.4.16
Only errors
All
5. Click the "Page Setup" button to specify the print format (optional).
6. If necessary, print out the desired log using the "Print" button.
5-76
Fail-Safe Systems
A5E00085588-03
Programming
5.4.17
The fail-safe program (all F-blocks and all data blocks from the F-run-time
groups).
Chart data: all the charts of the program are printed graphically
Fail-Safe Systems
A5E00085588-03
Blocks in the Safety Program (as shown in the dialog list box)
5-77
Programming
The overall signature and the date of the last compilation appear in the printout of
the fail-safe program, which is important for the on-site acceptance of the Safety
Program (e.g. by an outside expert). The overall signature of the compiled Safety
Program appears twice in the printout: once in the program information section as
a value of the block container and once in the footer as a value from the source
(see "Checking the Overall Signatures" in the section entitled "Initial Acceptance of
a Safety Program").
5-78
Fail-Safe Systems
A5E00085588-03
6.1
6.2
PROFIsafe Nodes
Fail-Safe Systems
A5E00085588-03
6-1
6.3
6-2
You must not operate Safety Programs directly when safety mode is activated!
You can enter safety parameters:
-
Fail-Safe Systems
A5E00085588-03
6.4
The following changes to the Safety Program can be made during operation
(RUN) only if safety mode is deactivated:
-
Changing the CFC charts, compiling and downloading the changes to the
CPU.
Batch Programming
Parameters that are not safety-related can be changed in the standard program in
a batch process. Safety-related checks of these parameters (e.g. permissible
range, consistency of parameter sets, etc.) must be carried out in the Safety
Program.
Fail-Safe Systems
A5E00085588-03
6-3
See Also
You can find additional information on modifying the Safety Program in the
following sections:
6.5
Downloading Changes
6-4
Fail-Safe Systems
A5E00085588-03
6.6
Fail-Safe Systems
A5E00085588-03
6-5
6-6
Fail-Safe Systems
A5E00085588-03
7.1
Safety
Safety Certification
When you order an F-Copy License, a copy of the TV certificate for the fail-safe
components of the S7 F/FH System will be included with the product.
You can obtain additional copies of the certificate, the accompanying report and
Annex 1 of the certificate report entitled
"Safety-Related Programmable Systems SIMATIC S7-400F and S7-400FH"
on request from:
Ms. Petra Bleicher
A&D AS RD 423
Fax no.: ++49 9621 80 3146
Note
Annex 1 of the certificate report contains permissible version numbers and
signatures of fail-safe components of the S7 F/FH System that have to be checked
when the program is accepted.
The certificate report contains conditions that currently have to be complied with
when using the S7 F/FH System.
Fail-Safe Systems
A5E00085588-03
7-1
Safety
Title/Description
DIN V 19250
Including modification A1
IEC 61508 - 1 to 7
prEN 50159-1
prEN 50159-2
Process Engineering
Standard
Title/Description
DIN V 19251
Process and Control Technology - MC Protection Equipment Requirements and Measures for Safeguarded Function
NE 31
NAMUR recommendation
Equipment Safety Using Process Instrumentation and Control
Technology
ISA S 84.01
Furnace Engineering
7-2
Standard
Title/Description
Automatic Gas Burner Control Systems for Gas Burners and Gas
Burning Appliances with or without Fans
pr EN 50156-1
Fail-Safe Systems
A5E00085588-03
Safety
Safety of Machinery
Standard
Title/Description
EN 60204-1
EN 954-1 cat. 2 to
4
Title/Description
DIN EN 61131-2
EN 50178
EN 60068
Environmental Testing
EN 55011
EN 50081-2
EN 50082-2
Fail-Safe Systems
A5E00085588-03
7-3
Safety
7.2
Safety Requirements
W3 W2 W1
S1
S2
A1
A2
S3
S1-4
A1-2
G1-2
W1-3
7-4
G1
G2
G1
G2
A1
A2
S4
Extent of damage
Length of stay
Avoidance of danger
Probability of undesired
event occurring
Fail-Safe Systems
A5E00085588-03
Safety
Risk Parameters
The risk parameters have the following meaning in accordance with DIN V 19250:
Parameters
Meaning
Extent of injury or
damage
S1
S2
S3
Several fatalities;
Lasting, seriously harmful effects on the environment
S4
A2
Frequent to continuous
G2
Rarely possible
Very low
W2
Low
W3
Relatively high
10 to < 10
-4
10 to < 10
-8
10 to < 10
-3
10 to < 10
-7
10 to < 10
-2
10 to < 10
-6
10 to < 10
-1
10 to < 10
-5
-5
-4
-3
-2
-9
-8
-7
-6
The actuators and sensors generally contribute most to these failure probabilities.
Each safety function always comprises the entire chain, from the collection and
processing of information to the intended action.
The equipment involved, such as the S7 F/FH programmable controller, sensors
and actuators, must in its entirety fulfill the AK and SIL determined as a result of
risk assessment.
If control functions and associated protection functions are implemented together in
the same S7 F/FH, this is said to be high-demand or continuous mode.
Fail-Safe Systems
A5E00085588-03
7-5
Safety
The following table lists the probability values of individual components of the S7
F/FH Systems:
Low Demand Mode of
Operation
(Average probability of
failure to perform its
design function on
demand)
High Demand or
Continuous Mode
of Operation
Proof test
interval
(Probability of a
dangerous failure
per hour)
F-capable CPU
1,24E-04
1,42E-09
10 years
SM 326; DO 10 x DC
24V/2A; with diagnostic
interrupt
6,97E-06
7,96E-11
10 years
10 years
ET 200S EM 4 F-DO 24
VDC/2 A PROFIsafe Digital
Electronic Module
<<1.00 E-05
<<1.00 E-10
10 years
<<1.00 E-05
<<1.00 E-10
10 years
SM 326; DI 24 x DC 24V;
with diagnostic interrupt
1,55E-06 at SIL 2
1,77E-11 at SIL 2
10 years
4,99E-08 at SIL 3
5,70E-13 at SIL 3
2,74E-06 at SIL 2
3,13E-11 at SIL 2
4,83E-08 at SIL 3
5,51E-13 at SIL 3
4,96E-08 at SIL 3
5,66E-13 at SIL 3
1,00E-05
1,00E-09
6ES7 326-2BF00-0AB0
6ES7 326-1BK00-0AB0
SM 326; DI 8 x NAMUR;
with diagnostic interrupt
10 years
6ES7 326-1RF00-0AB0
SM 336; AI 6 x 13Bit;
with diagnostic interrupt
10 years
6ES7 336-1HE00-0AB0
Safety-related
communication
You can obtain the contribution of the S7 F/FH System to the failure probability of a
safety function by adding up the failure probabilities of all the CPUs and F-SMs of
the S7 F/FH System that are involved. Redundant CPUs are counted singly
redundant F-SMs are counted double. The contribution of safety-related
communication must then be added. Several S7 F/FH Systems can be involved in
a safety function.
7-6
Fail-Safe Systems
A5E00085588-03
Safety
Example:
A safety function is implemented with an S7 FH System. The CPUs and F-SMs
involved in the safety function are listed in the table below. These CPUs and FSMs are used in a redundant configuration. Their proof test interval is 10 years.
The F-SMs are in safety mode for SIL 3. Operation is in high demand mode:
CPUs, F SMs and SafetyRelated Communication
Equipment Involved in the
Safety Function.
Number
Redundancy
Probability of a
Hazardous Failure
per Hour
F-capable CPU
Yes
1,42E-09
SM 326; DO 10 x DC 24V/2A;
with diagnostic interrupt
Yes
1,59E-10
Yes
2,28E-12
6ES7 326-2BF00-0AB0
SM 326; DI 24 x DC 24V; with
diagnostic interrupt
6ES7 326-1BK00-0AB0
7.3
Safety-related communication
1,00E-09
Total
2,58E-09
System Configuration
The limits for the system configuration of the S7 F/FH System are set mainly by the
CPU used. You can find the relevant values in the technical specifications of the
CPU in /3/, Chapter 5.
You will find any restrictions that apply to the S7 FH System in the readme file in
the "S7 H Systems" optional package.
In Appendix A you will find the certified hardware and software components of an
F-system in the form of check lists.
Fail-Safe Systems
A5E00085588-03
7-7
Safety
7.4
7.4.1
Monitoring Times
Configuring the Monitoring Times for F/FH Systems
Availability: To ensure that the temporal monitoring is not triggered when there
is no error, the monitoring times selected must be sufficiently long.
Safety: To ensure that the process safety time is not exceeded, the monitoring
times selected must be sufficiently short.
Monitoring
Block
Parameter
F_CYC_CO
MAX_CYC
F_R_R
TIMEOUT
F_RCVR,
F_RCVBO
F_R_BO
TIMEOUT
F_SENDR,
F_SENDBO
7-8
Monitoring
Parameter
Fail-Safe Systems
A5E00085588-03
Safety
Basic Procedure
To configure the monitoring times, proceed as follows:
1. Configure the standard or fault-tolerant system. You can find the necessary
information in the relevant hardware manuals and online help systems.
2. Configure the specific monitoring times of the F-system with regard to
availability: The times should be considerably longer than the minimum
monitoring times. You can find approximation formulas in the information on
calculating the minimum monitoring times or in the Excel table
STEP7\S7BIN\S7ftimeb.xls.
3. Use the Excel table STEP7\S7BIN\S7ftimeb.xls to calculate the maximum
response time, and check whether the maximum fault tolerance time for the
process has been exceeded.
Fail-Safe Systems
A5E00085588-03
7-9
Safety
7.4.2
7.4.2.1
In the F system
Description
TCI
TP15
TCiR
HWCONFIG
CPU Properties, "H Parameters"
Note
To activate the monitoring of the maximum disabling time for priority classes > 15,
you must assign this parameter a value in HWCONFIG (CPU properties, "H
Parameters" tab).
7-10
Fail-Safe Systems
A5E00085588-03
Safety
7.4.2.2
Description
TCI
HWCONFIG
CPU properties, "Cyclic Interrupt,
Execution"
TCImax
TTR
TDP_FD
TDP_SO
TSLAVE_SO
TF-I/O, ACK
TDP_DLY
Fail-Safe Systems
A5E00085588-03
7-11
Safety
Note
To check during operation whether the configured PROFIsafe monitoring times are
too short, you can insert in an ET 200M with fail-safe signal modules in safety
mode additional fail-safe signal modules in safety mode in which the configured
PROFIsafe monitoring time is lower. This is particularly advisable if the configured
PROFIsafe monitoring time that has to be checked is not much longer than the
minimum possible PROFIsafe monitoring time.
See Also
Configuring the Monitoring Times for F/FH Systems
7.4.2.3
Description
TCI,F_SEND
TCI,F_RCV
TDelay,F_SEND
TDelay,F_RCV
TUSEND
7-12
Fail-Safe Systems
A5E00085588-03
Safety
Time
Description
TCiR,F_SEND
TCiR,F_RCV
Finding TUSEND
You can download a tool for calculating the TUSEND value from the Internet at:
http://www4.ad.siemens.de/view/cs/de/1651770
Contribution ID 1651770
Note
To activate the monitoring of the maximum communication delay
when the standby in the FH system is updated, you must assign this
parameter a value in HWCONFIG (CPU properties, "H Parameters"
tab).
Simultaneous updating in both CPUs is not assumed.
7.4.2.4
Description
TCImax, F_S
TCImax, F_R
Fail-Safe Systems
A5E00085588-03
7-13
Safety
7.5
Acceptance of an F-System
An F system is usually accepted by an independent expert.
During acceptance of an F-System you are supported by special functions in
SIMATIC Manager. This enables you to:
You can archive all data relevant to the acceptance of the F-System in SIMATIC
Manager (File > Archive) and print it out, as required.
7-14
Check list for the life cycle of the fail-safe programmable controllers contains
a summary of the activities in the life cycle of S7 F/FH Systems, as well as
references to the requirements and rules that must be complied with.
Fail-Safe Systems
A5E00085588-03
Safety
7.5.1
12345
54321
Fail-Safe Systems
A5E00085588-03
7-15
Safety
F-I/Os that are supposed to have the same safety-relevant module parameters can
be copied during configuration. Their safety-relevant module parameters no longer
have to be checked individually: It is enough to compare the Parameter CRC
(without address) of the copied F-I/Os with the Parameter CRC (without address)
of the already checked F-I/Os and to check the logical start addresses.
The printout contains the overall signature as a reference. The overall signature
appears twice in the printout, once in the program information section as the value
of the block container and once in the footer as a value from the source. The
values must match up.
The version number of the S7 F Systems optional package appears in the footer of
the printout and must be checked.
If the overall signature is not printed in the footer, this means that the Safety
Program or the configuration (HWCONFIG or NetPro) has changed. In this case
the Safety Program has to be recompiled.
7-16
Fail-Safe Systems
A5E00085588-03
Safety
Configuration
F-I/Os that are supposed to have the same safety-relevant module parameters
can be copied during configuration. Their safety-relevant module parameters
no longer have to be checked individually: It is enough to compare the
Parameter CRC (without address) of the copied F-I/Os with the Parameter
CRC (without address) of the already checked F-I/Os and to check the logical
start addresses.
Programming
The following parameters of fail-safe blocks must be checked in the printout:
Any safety-related input parameters that are not automatically assigned must
be checked in the printout either in the CFC charts or in the section on
safety-related parameters. Input parameters that are not visible in the CFC
charts are printed out in the section on safety-related parameters. If it is easier
to check the parameters in the chart than in the section on safety-related
parameters, the parameters should not be hidden.
Fail-Safe Systems
A5E00085588-03
7-17
Safety
The specified I/Os must be checked in the case of the following fail-safe
blocks:
Fail-Safe Block
I/O
Description
F_CYC_CO
MAX_CYC
Maximum permissible
F cycle time
F_SENDBO, F_RCVBO
TIMEOUT
F_R_R, F_R_BO
TIMEOUT
F_M_DI8
TIMEOUT
LADDR
LADDR_R
F_M_AI6
MODE_00 to MODE_05
F_CH_DI,
ACK_NEC
Acknowledgment required
for reintegration
F_SENDR, F_RCVR
F_M_DI24
F_M_DO10
F_M_DO8
F_M_AI6
F_M_DI8
F_M_DI24
F_M_DO10
F_M_DO8
F_M_AI6
F_CH_DO, F_CH_AI
F_LIM_HL
QH
F_LIM_LL
QL
F_RS_FF
Output
F_SR_FF
Output
F_CTUD
CV
Switched output parameters are marked with an asterisk (*) on the printout.
7-18
Fail-Safe Systems
A5E00085588-03
Safety
You can obtain the overall signature of the program and the signatures of the
blocks in the CPU by choosing the Options > Edit Safety Program menu
command. When a comparison with the online program is made, it is indicated
whether the source, load memory and working memory match up (this enables
impermissible data manipulation to non-interconnected fail-safe input parameters
in the working memory to be detected).
You can check whether a Safety Program in the CPU is really the one you
expected by carrying out the following steps:
1. Choose the Options > Edit Safety Program menu command in SIMATIC
Manager and activate "Online" in the dialog box. The signature displayed in the
dialog box must match the signatures in the accepted printout (in the text and
in the footer).
2. To detect impermissible manipulation (e.g. via test mode in CFC) in the
working memory of the CPU, choose "Compare..." and compare the accepted
program with the online program in the dialog box. Any manipulated
parameters are displayed there. This step is imperative for acceptance.
3. In the case of fault-tolerant S7 FH systems, the above steps must be carried
out for both CPUs in the online view of SIMATIC Manager.
When you repeat downloading or repeat checks of the Safety Program, carry
out this overall signature check again.
Please note that the overall signature is also available from F_PRG_SI input the
F_SHUTDN function block within the @F_ShutDn CFC.
Fail-Safe Systems
A5E00085588-03
7-19
Safety
7.5.2
The accepted program must be saved in another project. Click "Browse", and enter
the path of the accepted program.
Changes to the safety-relevant configuration of F-I/Os can be recognized by the
change to the CRC_IMP1 and CRC_IMP2 parameters of the relevant F module
driver (F_M_xx).
7-20
Fail-Safe Systems
A5E00085588-03
Safety
Fail-Safe Systems
A5E00085588-03
7-21
Safety
7.5.3
Initial Acceptance
A newly created F-Block type is accepted for the first time in the same way as a
Safety Program. The function test of the F-Block type must take place in a different
Safety Program to the test environment.
At the acceptance of new F-Block types, the signature and initial-value signature of
the new F-Block are relevant. These signatures must be compared with the
acceptance printout. The signatures and initial-value signatures of the called FBlocks must also be checked.
The overall signatures in the footers of the printouts of the safety program and the
CFC chart of the F-Block type must match up or the block type will have to be
recompiled.
Acceptance of Changes
Acceptance of changes to an F-Block type is carried out in the same way as for a
Safety Program. All the points in the F test program at which the new F-Block type
is called must also be checked by means of a function test. Changed signatures of
F-Blocks are displayed in the chart view when the Safety Program s are compared.
7.5.4
7-22
The process experts and the operators for the safety concept of the system,
including the definition of safety-relevant and non-safety-relevant functions.
The planners of the S7 F/FH Systems for the implementation of the safety
concept of the system in function, configuration and wiring charts/diagrams, for
the planning of the interfaces of the F-System, the compliance with and
implementation of regulations from the report on the certificate, and the entry of
passwords in STEP 7.
The installation and commissioning technicians of the S7 F/FH Systems for the
implementation of and compliance with the requirements placed on the
environment at the installation location, the error-free implementation of the
wiring charts/diagrams, the downloading of the enabled Safety Program to the
CPU, and the assignment of a password to the CPU.
The commissioning technician of the S7 F/FH Systems for the functional tests
of the acceptance with simulation of the switch-off criteria in accordance with
the safety concept of the system and measurement of the required safety
times.
Fail-Safe Systems
A5E00085588-03
8.1
8.1.1
Fail-Safe Blocks
Overview
Fail-Safe Blocks
All the fail-safe blocks are contained in the Failsafe Blocks library in the catalog of
libraries
If possible, the F-Blocks are assigned to the existing families of standard blocks in
the catalog of the blocks used
. Since the names of the F-Blocks always
begin with "F_", they appear together as a group.
Fail-safe blocks are available in the following block families:
DRIVER
COM_FUNC
F_SYSTEM
F system blocks
CONVERT
F_CTRL
F Control Blocks
BIT_LGC
COMPARE
FLIPFLOP
Flipflop blocks
IEC_TC
IMPULS
Pulse blocks
MATH_INT
MATH_FP
MULTIPLX
Multiplex blocks
Fail-Safe Systems
A5E00085588-03
8-1
Fail-Safe Blocks
8.1.2
F-Data Types
Special F-data types in a safety data format are used for fail-safe block I/Os. The
safety data format is used to expose data and address corruptions.
The F-data types are programmed as structures and appear in the CFC chart with
the prefix "ST". The structures always consist of three components, of which the
first component, DATA, determines the data type. The PAR_ID and COMPLEM
components are included for safety reasons and are automatically assigned values
at compilation of the CFC chart.
For example, in the structure of the F_BOOL data type, DATA is of the type BOOL:
F_BOOL:
STRUCT
DATA
BOOL
PAR_ID
WORD
COMPLEM
WORD
END_STRUCT
Note
Only I/Os with the same F-data type can be interconnected.
Note
Output parameters of the types F_TIME and F_INT can be converted by
conversion blocks into the associated elementary data types for further processing
in the standard program. Conversely, elementary data types of the types TIME and
INT can be converted into F data types and processed further in the Safety
Program with the appropriate plausibility check.
8-2
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
Default
The default only specifies the first structural component, DATA. The other two
structure elements required for safety are automatically added when CFC charts
are compiled.
The same applies to the assignment of constants.
See Also
Blocks for Converting Data Between Standard and Safety Sections
Fail-Safe Systems
A5E00085588-03
8-3
Fail-Safe Blocks
8.1.3
Block I/Os
In the case of fail-safe blocks, there are some points to note concerning the block
I/Os:
Although the I/Os EN and ENO appear in the CFC chart, they are neither
evaluated nor assigned by the program code of the F-Block and you must not
interconnect them.
Each F-Block has three inputs (DB_ID, DB_INIT and PLK_DB) that are
required to ensure safety. These inputs are automatically supplied with
constants at compilation. You must not change these settings either.
The F-Blocks have additional inputs or outputs, which are switched to invisible
in the CFC chart. There are some that you must not change. Some of the
others must be switched to visible for input, for modification or monitoring (e.g.
for diagnostic purposes).
Note
You must not change any I/Os that have the entry "Supplied Automatically" in the
"Default" column. You can rectify any changes made to I/Os that are supplied
automatically by recompiling the Safety Program.
Description of the EN, ENO, DB_ID, DB_INIT and PLK_DB Block I/Os
The following description explains the block I/Os of the individual fail-safe blocks.
The block I/Os that cannot be changed (EN, ENO, DB_ID, DB_INIT and PLK_DB)
are not listed or mentioned again.
Note
Although the I/Os EN and ENO appear in the CFC chart, they are neither
evaluated nor assigned by the program code of the F block and you must not
interconnect them.
EN must not be assigned the value 0 or FALSE!
8-4
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
Signal State 1 or 0
Signal state 1 at the block I/O of the data type BOOL always means that the event
described (e.g. error on channel x) is active.
Fail-Safe Systems
A5E00085588-03
8-5
Fail-Safe Blocks
8.1.4
8-6
Block Numbers
Block Number
Block Name
FC 180
DB_INIT
FC 181
FAIL_MSG
FC 301
DB_RES
FC 303
F_FBO_BO
FC 304
F_FR_R
FC 305
F_FI_I
FC 306
F_FTI_TI
FB 301
F_AND4
FB 302
F_OR4
FB 303
F_XOR2
FB 304
F_NOT
FB 305
F_2OUT3
FB 306
F_XOUTY
FB 307
F_RS_FF
FB 308
F_SR_FF
FB 314
F_LIM_HL
FB 315
F_LIM_LL
FB 321
F_ADD_R
FB 322
F_SUB_R
FB 323
F_MUL_R
FB 324
F_DIV_R
FB 325
F_ABS_R
FB 326
F_MAX3_R
FB 327
F_MID3_R
FB 328
F_MIN3_R
FB 329
F_LIM_R
FB 330
F_SQRT
FB 331
F_AVEX_R
FB 332
F_MUX2_R
FB 333
F_SMP_AV
FB 341
F_CTUD
FB 342
F_TP
FB 343
F_TON
FB 344
F_TOF
FB 345
F_LIM_TI
FB 346
F_R_TRIG
FB 347
F_F_TRIG
FB 350
F_LIM_I
FB 361
F_BO_FBO
FB 362
F_R_FR
FB 367
F_QUITES
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
Block Number
Block Name
FB 368
F_TI_FTI
FB 369
F_I_FI
FB 370
F_SENDBO
FB 371
F_RCVBO
FB 372
F_SENDR
FB 373
F_RCVR
FB 377
F_CH_DI
FB 378
F_CH_DO
FB 379
F_CH_AI
FB 384
F_M_DI8
FB 385
F_M_DI24
FB 386
F_M_DO10
FB 387
F_M_AI6
FB 388
F_M_DO8
FB 390
F_S_BO
FB 391
F_R_BO
FB 392
F_S_R
FB 393
F_R_R
FB 394
F_START
FB 395
F_CYC_CO
FB 396
F_PLK
FB 397
F_PLK_O
FB 398
F_TEST
FB 399
F_TESTC
FB 400
F_TESTM
FB 456
F_2oo3_R
FB 457
F_1oo2_R
FB 458
F_SHUTDN
FB 459
RTG_LOGIC
FB 461
F_FR_FI
Fail-Safe Systems
A5E00085588-03
8-7
Fail-Safe Blocks
8.1.5
8-8
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
8.2
F Channel Drivers
Block
Description
F_CH_DI
F_CH_DO
F_CH_AI
F Module Drivers
Block
Description
F_M_DI8
F_M_DI24
F_M_DO10
F_M_DO8
F_M_AI6
See Also
Common Features of the Driver Blocks
Fail-Safe Systems
A5E00085588-03
8-9
Fail-Safe Blocks
8.2.1
F_CH_DI
Function
The block reads the digital value of the input channel whose symbolic name is
linked to the input VALUE from the associated F module driver (F_M_DIx). The F
module driver has read the digital value via a safety frame from the digital input
module (or possibly a module that is redundant to this one). The connection to the
associated F module driver (F_M_DIx) is automatically established by means of the
interconnection at the input CHADDR.
If the digital value is valid, it is made available at the output Q.
If the digital value is invalid, the substitute value 0 is output at the output Q. For the
reintegration of a process value after an error is corrected, a user acknowledgment
is required depending on the parameterization and error type.
Alternatively, a simulation value can be output at the output Q.
For the process value at the output Q, a value status (quality code) is generated at
the output QUALITY that can take on the following states:
State
Quality Code
Valid value
16#80
16#48
I/Os
Name
Inputs:
Default
ADDR_CODE DWORD
Supplied
automatically
CHADDR
F_WORD
Interconnected
automatically
VALUE
BOOL
SIM_I
F_BOOL
Simulation value
SIM_ON
F_BOOL
F_BOOL
1= activate passivation
0= deactivate passivation
ACK_NEC
F_BOOL
1 = required
0 = not required
ACK_REI
8-10
F_BOOL
Reintegration acknowledgment
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
Name
Outputs:
Default
PASS_OUT
F_BOOL
Passivation output
QBAD
F_BOOL
QSIM
F_BOOL
1=simulation active
F_BOOL
Process value
QN
F_BOOL
Q_DATA
BOOL
QUALITY
BYTE
ACK_REQ
BOOL
Addressing
You must assign the symbol of the corresponding digital input channel to the input
VALUE of the F channel driver.
Normal Value
The digital value is output at the output Q with the quality code (QUALITY) 16#80.
Simulation Value
A simulation value can be output at the output Q instead of the normal value read
from the module.
When the input parameter SIM_ON = 1, the value of the input parameter SIM_I is
output with the quality code (QUALITY) 16#60 and the output QSIM = 1 is set.
In the event of an error, the output of the simulation value takes precedence over
the output of the substitute value.
Substitute Value
In the case of an invalid digital value as a result of a communication error
(PROFIsafe) or channel fault (e.g. wire break), in the case of passivation and
during a startup (cold or warm restart), the substitute value 0 is output with the
quality code (QUALITY) 16#48 and the output QBAD = 1 is set. If the substitute
value is not caused by passivation, the output PASS_OUT = 1 is set as well to
passivate other channels.
Fail-Safe Systems
A5E00085588-03
8-11
Fail-Safe Blocks
Startup Characteristics
After a startup (cold restart or warm restart), communication must first be
established between the F module driver and the digital input module. In this time,
the substitute value 0 is output with the quality code (QUALITY) 16#48, and the
outputs QBAD = 1 and PASS_OUT = 1 are set as well.
Error Handling
In the event of an error that is critical to safety, the system function SFC F_CTRL
is called. This records the event in the Diagnostic Buffer and requests a switch to
the reserve CPU if the error occurred only on the master CPU. For non-redundant
systems or a common-cause error occurring in both CPUs, the shutdown logic can
be configured to either disable the erred F-run-time group or the entire Safety
Program.
Description
75DAH
Report Characteristics
The block has no reporting behavior.
See Also
Common Features of the Driver Blocks
Passivation and Reintegration
8-12
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
8.2.2
F_CH_DO
Function
The F channel driver makes the process value at the input I available to the
associated F module driver (F_M_DOx). The F module driver reads the value from
the F channel driver F_CH_DO and writes it via a safety frame to the channel of
the digital output module addressed via the output VALUE (and possibly of a
module that is redundant to this). The connection to the associated F module driver
(F_M_DOx) is automatically established by means of the interconnection at the
output CHADDR.
If the F channel driver detects at the next call that errors have occurred, the
substitute value 0 is made available for the associated F module driver at the next
call instead of the process value at the input I. For the reintegration of the process
value after an error is corrected, a user acknowledgment is required depending on
the parameterization and error type.
Alternatively, a simulation value can be output at the module output if there is no
error.
For the digital value I output to the module, a value status (quality code) is
generated at the QUALITY output that can take on the following states:
State
Quality Code
Valid value
16#80
Simulation value
16#60
Substitute Value
16#48
I/Os
Name
Inputs:
Default
ADDR_CODE DWORD
Supplied
automatically
F_BOOL
Process value
SIM_I
F_BOOL
Simulation value
SIM_MOD
F_BOOL
SIM_ON
F_BOOL
0= deactivate simulation
value
PASS_ON
F_BOOL
ACK_NEC
F_BOOL
1= activate passivation
0= deactivate passivation
User acknowledgment for
reintegration after error
1 = required
0 = not required
ACK_REI
Fail-Safe Systems
A5E00085588-03
F_BOOL
Reintegration
acknowledgment
8-13
Fail-Safe Blocks
Name
Outputs:
Default
PASS_OUT
F_BOOL
Passivation output
QBAD
F_BOOL
QSIM
F_BOOL
1=simulation active
CHADDR
F_WORD
Interconnected
automatically
VALUE
BOOL
QUALITY
BYTE
ACK_REQ
BOOL
Acknowledgment required
for reintegration
Addressing
You must assign the symbol of the corresponding digital output channel to the
output VALUE of the F channel driver.
Normal Value
The process value at the input I is made available for the associated F module
driver (F_M_DOx). 16#80 is output as the quality code (QUALITY).
Simulation Value
At the output, a simulation value can be output instead of the value at the input I
(e.g. for hardware tests).
When the input parameter SIM_ON = 1, the value of the input parameter SIM_I is
made available to the associated F module driver (F_M_DOx). 16#80 is output as
the quality code (QUALITY), and the output QSIM = 1 is set.
When SIM_MOD=0, the output of the simulation value takes precedence over the
output of the normal value and passivation, but not over the substitution value 0 in
the event of an error.
When SIM_MOD=1, the output of the simulation values always takes precedence
over the output of the normal value and passivation, regardless of any module
error. (QBAD=0) This mode would be useful to simulate error-free operation even
without the hardware DO modules.
8-14
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
Substitute Value
In the event of communication errors (PROFIsafe) or channel faults (e.g. wire
break), in the case of passivation and during a startup (cold or warm restart), the
substitute value 0 is made available for the associated F module driver
(F_M_DOx). 16#48 is output as the quality code (QUALITY), and the output QBAD
= 1 is set.
If the substitute value is not caused by passivation, the output PASS_OUT = 1 is
set as well to passivate other channels. In the event of an error, the output of the
substitute value has the highest priority.
Startup Characteristics
After a startup (cold restart or warm restart), communication must first be
established between the F module driver and the digital output module. In this time,
the substitute value 0 is output with the quality code (QUALITY) 16#48, and the
outputs QBAD = 1 and PASS_OUT = 1 are set as well. At ACK_REQ = 1 the
ACK_REI acknowledgement must follow, even if ACK_NEC = 0.
Error Handling
In the event of an error that is critical to safety, the system function SFC F_CTRL
is called. This records the event in the Diagnostic Buffer and requests a switch to
the reserve CPU if the error occurred only on the master CPU. For non-redundant
systems or a common-cause error occurring in both CPUs, the shutdown logic can
be configured to either disable the erred F-run-time group or the entire Safety
Program.
Description
75DAH
Report Characteristics
The block has no reporting behavior.
See Also
Common Features of the Driver Blocks
Passivation and Reintegration
Fail-Safe Systems
A5E00085588-03
8-15
Fail-Safe Blocks
8.2.3
F_CH_AI
Function
The block reads the analog non-linearized value of the input channel whose
symbolic name is linked to the input VALUE from the associated F module driver
(F_M_AIx). The F module driver has read the non-linearized value via a safety
frame from the analog input module (or possibly a module that is redundant to this
one). The connection to the associated F module driver (F_M_AIx) is automatically
established by means of the interconnection at the input CHADDR.
If the non-linearized value is valid, it is adapted to its physical size and made
available at the output V as a process value.
If the non-linearized value is invalid, a substitute value or the last valid value is
output at the output V, depending on the parameterization. For the reintegration of
a process value after an error is corrected, a user acknowledgment is required
depending on the parameterization and error type.
Alternatively, a simulation value can be output at the output V.
For the process value at the output V, a value status (quality code) is generated at
the output QUALITY that can take on the following states:
State
Quality Code
Valid value
16#80
Simulation value
16#60
Substitute value
16#48
16#44
I/Os
Name
Inputs:
8-16
Default
ADDR_CODE DWORD
Supplied
automatically
CHADDR
F_WORD
Interconnected
automatically
VALUE
WORD
VHRANGE
F_REAL
0.0
VLRANGE
F_REAL
0.0
CH_F_ON
F_BOOL
CH_F_HL
F_REAL
0.0
CH_F_LL
F_REAL
SIM_V
F_REAL
Simulation value
0.0
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
Name
Default
SIM_ON
F_BOOL
SUBS_ON
F_BOOL
SUBS_V
F_REAL
Substitute value
0.0
PASS_ON
F_BOOL
1= activate passivation
ACK_NEC
F_BOOL
0= deactivate passivation
User acknowledgment for
reintegration after error
1 = required
0 = not required
Outputs:
ACK_REI
F_BOOL
Reintegration acknowledgment
PASS_OUT
F_BOOL
Passivation output
QCHF_HL
F_BOOL
QCHF_LL
F_BOOL
QBAD
F_BOOL
QSIM
F_BOOL
1=simulation active
QSUBS
F_BOOL
OVHRANGE
F_REAL
0.0
OVLRANGE
F_REAL
0.0
F_REAL
Process value
0.0
V_DATA
REAL
0.0
QUALITY
BYTE
ACK_REQ
BOOL
Addressing
You must assign the symbol of the corresponding analog input channel to the input
VALUE of the F channel driver.
Fail-Safe Systems
A5E00085588-03
8-17
Fail-Safe Blocks
Note
The selectable limit values must be under the upper limit of the overrange and
above the lower limit of the underrange of the module. Values outside the NAMUR
range are thus also possible, unless the module automatically limits the measured
values.
8-18
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
Normal Value
The non-linearized value is adapted to its physical size using the input parameters
VLRANGE and VHRANGE and the measurement range and measurement type
(MODE) set in HWCONFIG. To enable the settings for VLRANGE and VHRANGE
to be switched to other block parameters, these are written to the outputs
OVLRANGE and OVHRANGE.
The conversion algorithm assumes a linear input signal.
When VLRANGE = 0.0 and VHRANGE = 100.0, you receive a percentage value.
When VHRANGE = VLRANGE is set, you receive the input signal of the analog
input module (e.g. mA) in accordance with the MODE setting.
16#80 is output as the quality code (QUALITY).
4-wire measuring
transducer
4 to 20 mA
515 / 16#0203
2-wire measuring
transducer
4 to 20 mA
771 / 16#0303
Simulation Value
A simulation value can be output at the output V instead of the normal value.
When the input parameter SIM_ON = 1, the value of the input parameter SIM_V is
output with the quality code (QUALITY) 16#60 and the output QSIM = 1 is set.
The output of the simulation value has the highest priority.
If a simulation value is selected that would result from a non-linearized value below
the rated range of the module, the output parameter QCHF_LL = 1 is set. If a
corresponding non-linearized value would exceed the rated range, the output
parameter QCHF_HL = 1 is set. In the event of overflow or underflow or violation of
the active limits, the output QBAD = 1 is also set, and then, depending on the
parameter assignment for the input SUBS_ON, a substitute value or the last valid
value is output.
Fail-Safe Systems
A5E00085588-03
8-19
Fail-Safe Blocks
Startup Characteristics
After a startup (cold restart or warm restart), communication must first be
established between the F module driver and the analog input module. In this time,
regardless of the parameter assignment at the input SUBS_ON, the substitute
value SUBS_V is output with the quality code (QUALITY) 16#48, and the outputs
QBAD = 1, QSUBS = 1 and PASS_OUT = 1 are set.
Error Handling
If the value for measurement range and measurement type (MODE) is invalid, an
invalid non-linearized value is assumed.
In the event of an error that is critical to safety, the system function SFC F_CTRL
is called. This records the event in the Diagnostic Buffer and requests a switch to
the reserve CPU if the error occurred only on the master CPU. For non-redundant
systems or a common-cause error occurring in both CPUs, the shutdown logic can
be configured to either disable the erred F-run-time group or the entire Safety
Program.
8-20
Description
75DAH
75D9H
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
Report Characteristics
The block has no reporting behavior.
See Also
Common Features of the Driver Blocks
Passivation and Reintegration
Fail-Safe Systems
A5E00085588-03
8-21
Fail-Safe Blocks
8.2.4
F Module Drivers
Safety frame
Fail-safe data exchange between a Safety Program and an F-I/O occurs via safety
frames. In addition to user data (i.e. process values), information on safety is also
transferred.
Redundancy
The driver blocks support the following types of redundancy:
Module redundancy: The F module drivers are able to address two redundant
signal modules.
The settings necessary for this are made when parameters are assigned to the
modules in HWCONFIG.
Module redundancy
The processing of redundant modules comprises the following functions:
8-22
In the case of digital input modules, the input signals are ORed per
channel.
In the case of digital output modules, the digital value at I/O I of the
channel driver is forwarded to both modules in parallel.
In the case of analog input modules, the input signals of the module that is
available first after startup are forwarded to the F channel drivers.
In the case of digital output modules, the substitute value 0 is sent to the
channel with the fault.
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
In the case of digital input modules, the substitute value 0 is output on the
F channel driver.
In the case of digital output modules, the substitute value 0 is sent to both
channels.
In the case of analog input modules, the substitute value or the last valid
value is output on the F channel driver, depending what is configured.
Note
In the case of analog input modules, after a problem is corrected there is no switch
back to the channel of the original module. This can lead to the presence of active
channels on both modules.
When an analog input modules is replaced, a switchover to the second module
takes place automatically.
Fail-Safe Systems
A5E00085588-03
8-23
Fail-Safe Blocks
Error Handling
The F module drivers can detect errors as well as respond to errors reported by the
module. Each block has several options for signaling and handling errors.
F Channel Drivers
Installation in Cyclic Interrupt OBs
Every F channel driver block must be installed in a cyclic interrupt OB3x. Multiple
installation of an instance in different cyclic interrupts is not permissible. The cyclic
interrupt interval must be coordinated with the monitoring time configured for the
module in HWCONFIG.
When the Safety Program is compiled, a check is carried out to establish whether
an F channel driver has been installed in more than one cyclic interrupt OB. If
appropriate, a corresponding error message is output.
All the F channel drivers that belong to a module must be integrated into the same
F-run-time group.
Startup Characteristics
After a startup (cold restart or warm restart), communication must first be
established between the F module driver and the F-I/O. Until this happens,
substitute values are output with the quality code (QUALITY) 16#48 and the
outputs QBAD and PASS_OUT of the F channel drivers are set.
As soon as PROFIsafe communication has been established without any errors
and no more module or communication faults/errors occur, valid process values
are output.
If PROFIsafe communication cannot be established within the configured
monitoring time, a TIMEOUT error is detected.
See Also
"Error Handling of Driver Blocks"
Passivation and Reintegration
8-24
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
8.3
Description
F_SENDBO
F_RCVBO
F_SENDR
F_RCVR
Via R_ID you can define that a sending and a receiving fail-safe block belong
together: The associated fail-safe blocks receive the same value for R_ID. The
value R_ID is a freely selectable odd number, but it must be unique for a
sending/receiving F block pair.
Note
The value R_ID + 1 is also assigned and must not be used.
TIMEOUT Parameter
All four blocks for F communication have the TIMEOUT parameter for vital-sign
monitoring of the communication between the CPUs. You can find out how to
calculate TIMEOUT in the section entitled "Configuring the Monitoring Times for
F/FH Systems".
Note
Data transfer takes place cyclically. It can only be guaranteed that a signal level to
be transferred will be detected on the sender side and transferred to the recipient if
it is present for at least as long as the configured monitoring time (TIMEOUT).
Fail-Safe Systems
A5E00085588-03
8-25
Fail-Safe Blocks
RETVAL Parameter
Return values (RET_VAL) of the system functions are indicated at the RETVAL
parameter of the blocks for F communication. The return values are error codes
that give you additional assistance in finding the error (see the section entitled
"Error Information at the Output RETVAL").
CRC_IMP Parameter
8-26
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
8.3.1
F_SENDBO
Function
This block safely sends 20 data items of the F_BOOL data type to another CPU.
The data can be received there by the F_RCVBO block.
The data to be sent (e.g. outputs from other blocks) is stored at the inputs
SD_BO_xx.
The data is transferred via safety frames.
If you want to temporarily switch off a data interchange that has been established
between two CPUs in order to reduce the load on the bus, you can assign the
value FALSE to the input EN_SEND. In this case, no more data is sent to the
recipient, and the recipient outputs the configured substitute values. If
communication between the connection partners was already established, when
data interchange restarted with EN_SEND = TRUE, an acknowledgment is
required on the recipients side before the values sent are output again.
Startup Characteristics
After a startup (cold restart or warm restart), communication must first be
established between the communication partners. F_SENDBO indicates this at the
SUBS_ON parameter with "1". The recipient (F_RCVBO) outputs substitute values
during this time until communication between F_SENDBO and F_RCVBO has
started up via the safety frame and any acknowledgment required for reintegration
at F_RCVBO has been made.
I/Os
Inputs:
Name
Data Type
Explanation
Default
EN_SEND
BOOL
1 = switch transmission on
WORD
ID addressing parameter
0000
R_ID
DWORD
00000000
SD_BO_00
F_BOOL
Send date 00
...
Outputs:
Fail-Safe Systems
A5E00085588-03
...
SD_BO_19
F_BOOL
Send date 19
CRC_IMP
DWORD
Supplied
automatically
TIMEOUT
F_TIME
ERROR
F_BOOL
Transmission error
SUBS_ON
F_BOOL
RETVAL
WORD
Error code
0000
8-27
Fail-Safe Blocks
TIMEOUT Parameter
The input TIMEOUT cannot be interconnected and must be assigned a constant
value. See "Monitoring Safety-Related Communication Between CPUs".
Error Handling
If a connection partner (recipient) acknowledges receipt via an invalid safety frame
(e. g. due to a check value error (CRC) or watchdog error) or does not
acknowledge it within the TIMEOUT monitoring time, the outputs ERROR and
SUBS_ON are set. The recipient (F_RCVBO) then outputs substitute values. An
error code is displayed at the output RETVAL. Communication between the
connection partners is reestablished.
Note
Once communication has been set up without errors, compliance with the assigned
monitoring time (TIMEOUT parameter) is checked.
In the event of an error that is critical to safety, the system function SFC F_CTRL
is called. This records the event in the Diagnostic Buffer and requests a switch to
the reserve CPU if the error occurred only on the master CPU. For non-redundant
systems or a common-cause error occurring in both CPUs, the shutdown logic can
be configured to either disable the erred F-run-time group or the entire Safety
Program.
8-28
Description
75DAH
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
8.3.2
F_RCVBO
Function
This block safely receives 20 data items of the F_BOOL data type sent by the
F_SENDBO block from another CPU.
The received data is stored at the outputs RD_BO_xx for further processing by
other blocks.
The data is transferred via safety frames.
Startup Characteristics
After a startup (cold restart or warm restart), communication must first be
established between the communication partners. As long as the recipient does not
receive a safety frame from the sender, it sets the output SUBS_ON and outputs
the substitute values at the outputs RD_BO_xx.
The substitute values can be stored at the inputs SUBBO_xx.
I/Os
Inputs:
Name
Data Type
Explanation
Default
ID
WORD
ID addressing parameter
0000
R_ID
DWORD
00000000
CRC_IMP
DWORD
Supplied
automatically
TIMEOUT
F_TIME
ACK_REI
F_BOOL
Acknowledgment for
0
reintegration of process values
after transmission errors
SUBBO_00
F_BOOL
...
Outputs:
...
SUBBO_19
F_BOOL
ACK_REQ
BOOL
Acknowledgment for
0
reintegration of process values
required
ERROR
F_BOOL
Transmission error
SUBS_ON
F_BOOL
RD_BO_00
F_BOOL
Receipt data 00
...
Fail-Safe Systems
A5E00085588-03
0
0
...
RD_BO_19
F_BOOL
Receipt data 19
RETVAL
WORD
Error code
0000
8-29
Fail-Safe Blocks
TIMEOUT Parameter
It can only safely be guaranteed that a signal level to be transferred will be
detected on the sender side and transferred to the recipient if it is present for at
least as long as the specified monitoring time (TIMEOUT).
The input TIMEOUT cannot be interconnected and must be assigned a constant
value. See "Monitoring Safety-Related Communication Between CPUs".
Error Handling
If a connection partner receives an invalid safety frame (e.g.: due to a check value
error (CRC) or watchdog error) or doesnt receive a valid safety frame within the
TIMEOUT monitoring time, the outputs ERROR and SUBS_ON are set and the
substitute values are output. An error code is displayed at the output RETVAL.
Note
Once communication has been set up without errors, compliance with the assigned
monitoring time (TIMEOUT parameter) is checked.
8-30
Description
75DAH
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
8.3.3
F_SENDR
Function
This block safely sends 20 data items of the F_REAL data type to another CPU. It
can be received there by the F_RCVR block.
The data to be sent (e.g. outputs from other blocks) is stored at the inputs
SD_R_xx.
The data is transferred via safety frames.
If you want to temporarily switch off a data interchange that has been established
between two CPUs in order to reduce the load on the bus, you can assign the
value 0 to the input EN_SEND. In this case, no more data is sent to the recipient,
and the recipient outputs the configured substitute values. If communication
between the connection partners was already established, when data interchange
restarted with EN_SEND = 1, an acknowledgment is required on the recipients
side before the values sent are output again.
Startup Characteristics
After a startup (cold restart or warm restart), communication must first be
established between the communication partners. The F_SENDR signals this at
the SUBS_ON parameter with "1". The recipient (F_RCVR) outputs substitute
values during this time until communication between F_SENDR and F_RCVR via
the safety frame has started up and any acknowledgment required for reintegration
at F_RCVR has been made.
I/Os
Inputs:
Name
Data Type
Explanation
Default
EN_SEND
BOOL
1 = switch transmission on
WORD
ID addressing parameter
0000
R_ID
DWORD
00000000
SD_R_00
F_REAL
Send date 00
...
Outputs:
Fail-Safe Systems
A5E00085588-03
...
SD_R_19
F_REAL
Send date 19
TIMEOUT
F_TIME
CRC_IMP
DWORD
Supplied
automatically
ERROR
F_BOOL
Transmission error
SUBS_ON
F_BOOL
RETVAL
WORD
Error code
0000
8-31
Fail-Safe Blocks
TIMEOUT Parameter
It can only safely be guaranteed that a signal level to be transferred will be
detected on the sender side and transferred to the recipient if it is present for at
least as long as the specified monitoring time (TIMEOUT).
The input TIMEOUT cannot be interconnected and must be assigned a constant
value. See "Monitoring Safety-Related Communication Between CPUs".
Error Handling
If a connection partner (recipient) acknowledges receipt via an invalid safety frame
(e. g. due to a check value error (CRC) or watchdog error) or does not
acknowledge it within the TIMEOUT monitoring time, the outputs ERROR and
SUBS_ON are set. The recipient (F_RCVR) then outputs substitute values. An
error code is displayed at the output RETVAL. Communication between the
connection partners is reestablished.
Note
Once communication has been set up without errors, compliance with the assigned
monitoring time (TIMEOUT parameter) is checked.
In the event of an error that is critical to safety, the system function SFC F_CTRL
is called. This records the event in the Diagnostic Buffer and requests a switch to
the reserve CPU if the error occurred only on the master CPU. For non-redundant
systems or a common-cause error occurring in both CPUs, the shutdown logic can
be configured to either disable the erred F-run-time group or the entire Safety
Program.
8-32
Description
75DAH
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
8.3.4
F_RCVR
Function
This block safely receives 20 data items of the F_REAL data type sent by the
F_SENDR block from another CPU.
The received data comes to the outputs RD_R_xx for further processing by other
blocks.
The data is transferred via safety frames.
Startup Characteristics
After a startup (cold restart or warm restart), communication must first be
established between the communication partners. As long as the recipient does not
receive a safety frame from the sender, it sets the output SUBS_ON and outputs
the substitute values at the outputs RD_R_xx.
The substitute values can be applied at the inputs SUBR_xx.
I/Os
Inputs:
Name
Data Type
Explanation
Default
ID
WORD
ID addressing parameter
0000
R_ID
DWORD
00000000
CRC_IMP
DWORD
Supplied
automatically
TIMEOUT
F_TIME
ACK_REI
F_BOOL
Acknowledgment for
0
reintegration of process values
after transmission errors
SUBR_00
F_REAL
...
Outputs:
...
SUBR_19
F_REAL
ACK_REQ
BOOL
Acknowledgment for
0
reintegration of process values
required
ERROR
F_BOOL
Transmission error
SUBS_ON
F_BOOL
RD_R_00
F_REAL
Receipt data 00
...
Fail-Safe Systems
A5E00085588-03
0
0
...
RD_R_19
F_REAL
Receipt data 19
RETVAL
WORD
Error code
0000
8-33
Fail-Safe Blocks
TIMEOUT Parameter
The input TIMEOUT cannot be interconnected and must be assigned a constant
value. See "Monitoring Safety-Related Communication Between CPUs".
Error Handling
If a connection partner receives an invalid safety frame (e.g.: due to a check value
error (CRC) or watchdog error) or doesnt receive a valid safety frame within the
TIMEOUT monitoring time, the outputs ERROR and SUBS_ON are set and the
substitute values are output. An error code is displayed at the output RETVAL.
Note
Once communication has been set up without errors, compliance with the assigned
monitoring time (TIMEOUT parameter) is checked.
8-34
Description
75DAH
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
8.4
Description
F_BO_FBO
F_I_FI
F_R_FR
F_TI_FTI
F_FBO_BO
F_FI_I
F_FR_R
F_FR_FI
F_FTI_TI
F_QUITES
Plausibility Checking
The simplest form of plausibility check is to specify a range with fixed upper and
lower limits, e.g. with the F_LIM_R block. Not all the input parameters can be
checked for plausibility simply enough. These input parameters cannot be
modified during operation.
Fail-Safe Systems
A5E00085588-03
8-35
Fail-Safe Blocks
8.4.1
F_BO_FBO
Function
This block converts the BOOL data type into the corresponding F_BOOL F data
type. This enables signals formed in the standard program section to be further
processed in the safety program section following a plausibility check.
I/Os
Name
Data Type
Explanation
Default
Input:
IN
BOOL
Input variable
Output:
OUT
F_BOOL
Output variable
Error Handling
None
8-36
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
8.4.2
F_I_FI
Function
This block converts the INT data type into the corresponding F_INT F data type.
This enables signals formed in the standard program section to be processed
further in the safety program section following a plausibility check (to be added by
the user with F-block F_LIM_I, for example).
I/Os
Name
Data Type
Explanation
Default
Input:
IN
INT
Input variable
Output:
OUT
F_INT
Output variable
Error Handling
None
Fail-Safe Systems
A5E00085588-03
8-37
Fail-Safe Blocks
8.4.3
F_R_FR
Function
This block converts the REAL data type into the corresponding F_REAL F data
type. This enables signals formed in the standard program section to be further
processed in the safety program section following a plausibility check (to be added
in the Safety Program with F-block F_LIM_R, for example).
I/Os
Name
Data Type
Explanation
Default
Input:
IN
REAL
Input variable
0.0
Output:
OUT
F_REAL
Output variable
0.0
Error Handling
None.
8-38
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
8.4.4
F_TI_FTI
Function
This block converts the TIME data type into the corresponding F_TIME F data
type. This enables signals formed in the standard program section to be further
processed in the safety program section following a plausibility check (to be added
by the user with F-block F_LIM_TI, for example).
I/Os
Name
Data Type
Explanation
Default
Input:
IN
TIME
Input variable
T#0 ms
Output:
OUT
F_TIME
Output variable
T#0 ms
Error Handling
None
Fail-Safe Systems
A5E00085588-03
8-39
Fail-Safe Blocks
8.4.5
F_FBO_BO
Function
This block converts the F-data type F_BOOL into the standard data type BOOL,
since individual structure elements of the F-data type cannot be accessed
separately in the CFC chart. This enables signals formed in the Safety Program
section to be further processed in the standard program section.
This block must be placed in the standard program section.
I/Os
Name
Data Type
Explanation
Default
Input:
IN
F_BOOL
Input variable
Output:
OUT
BOOL
Output variable
Error Handling
None
8-40
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
8.4.6
F_FI_I
Function
This block converts the F-data type F_INT into the standard data type INT, since
individual structure elements of the F-data type cannot be accessed separately in
the CFC chart. This enables signals formed in the Safety Program section to be
further processed in the standard program section.
This block must be placed in the standard program section.
I/Os
Name
Data Type
Explanation
Default
Input:
IN
F_INT
Input variable
Output:
OUT
INT
Output variable
Error Handling
None
Fail-Safe Systems
A5E00085588-03
8-41
Fail-Safe Blocks
8.4.7
F_FR_R
Function
This block converts the F-data type F_REAL into the standard data type REAL,
since individual structure elements of the F-data type cannot be accessed
separately in the CFC chart. This enables signals formed in the Safety Program
section to be further processed in the standard program section.
This block must be placed in the standard program section.
I/Os
Name
Data Type
Explanation
Default
Input:
IN
F_REAL
Input variable
0.0
Output:
OUT
REAL
Output variable
0.0
Error Handling
None
8-42
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
8.4.8
F_FR_FI
Function
The block converts the F data type F_REAL data type into the F_INT F data type.
This enables signals formed within the safety program section to be converted and
maintain the safety data format.
I/Os
Input:
Name
Data Type
Explanation
Default
IN
F_REAL
Input variable
0.0
F_INT
Output variable
...
Output:
OUT
Error Handling
None
Fail-Safe Systems
A5E00085588-03
8-43
Fail-Safe Blocks
8.4.9
F_FTI_TI
Function
This block converts the F-data type F_TIME into the standard data type TIME,
since individual structure elements of the F-data type cannot be accessed
separately in the CFC chart. This enables signals formed in the Safety Program
section to be further processed in the standard program section.
This block must be placed in the standard program section.
I/Os
Name
Data Type
Explanation
Default
Input:
IN
F_TIME
Input variable
T#0 ms
Output:
OUT
TIME
Output variable
T#0 ms
Error Handling
None
8-44
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
8.4.10
F_QUITES
Function
This block enables fail-safe acknowledgment from a non-fail-safe ES/OS. This
allows reintegration of F-I/Os to be controlled via the ES/OS, for example. An
acknowledgment comprises two steps:
1. Changing the input IN to the value 6
2. Changing the input IN from the value 6 to the value 9 within a minute
The block evaluates whether, after the input IN has changed to the value 6 after a
second at the earliest or a minute at the latest, a change to the value 9 has
taken place. The signal 1 is then output at the output OUT (output for
acknowledgment) for the duration of a single cycle.
If an invalid value is entered or if the change to 9 does not take place within a
minute or before a second has elapsed, the input IN is reset to 0 and the two steps
specified above have to be carried out again.
During the time in which the change from 6 to 9 must occur, the non-fail-safe
output Q is set to 1. As soon as the input IN has accepted the value 9, or if there
has not been a change within a minute, Q is reset to 0.
Note
Because the fail-safe output OUT is only set for one cycle, a separate F_QUITES
is required for each cyclic interrupt.
If there is only one block for different run-time groups in a cyclic interrupt, the
blocks F_S_BO and F_R_BO must be used for the exchange of data between the
run-time groups.
Fail-Safe Systems
A5E00085588-03
8-45
Fail-Safe Blocks
Timing Diagram
Min. 1s
Max. 1min
9
6
IN
Max. 1min
Q
One cycle
OUT
t
: Possible time for a signal change
I/Os
Name
Data Type
Explanation
Default
Input:
IN
INT
Outputs:
OUT
F_BOOL
BOOL
Error Handling
In the event of an error that is critical to safety, the system function SFC F_CTRL
is called. This records the event in the Diagnostic Buffer and requests a switch to
the reserve CPU if the error occurred only on the master CPU. For non-redundant
systems or a common-cause error occurring in both CPUs, the shutdown logic can
be configured to either disable the erred F-run-time group or the entire Safety
Program.
Description
75DAH
8-46
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
8.5
F-System Blocks
Block
Description
F_S_BO
F_R_BO
F_S_R
F_R_R
F_START
Fail-Safe Systems
A5E00085588-03
8-47
Fail-Safe Blocks
8.5.1
F_S_BO
Function
This block safely transfers 10 data items of the data type F_BOOL to another Frun-time group. It can be received there by the F_R_BO block.
The data to be sent (e.g. outputs from other blocks) is stored at the inputs
SD_BO_xx.
The output S_DB must be connected with the input of the same name in the
received block.
I/Os
Inputs:
Name
Data Type
SD_BO_00
F_BOOL
...
Output:
Explanation
Default
Send date 00
...
SD_BO_09
F_BOOL
Send data 09
S_DB
F_WORD
Error Handling
None
8-48
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
8.5.2
F_R_BO
Function
This block safely receives 10 data items of the data type F_BOOL sent from
another F-run-time group from the F_S_BO block.
The received data is stored at the outputs RD_BO_xx for further processing by
other blocks.
The input S_DB must be connected with the output of the same name of the
sending block.
The input TIMEOUT must be assigned a value for monitoring the safety-related
communication. If an updated frame is not received during this time, the system
function SFC F_CTRL is called. See "Monitoring Safety-Related Communication
Between F Run-Time Groups".
Startup Characteristics
In the first cycle after a cold or warm restart, the block outputs the substitute values
configured at the SUBBO_xx inputs. The output of the substitute values depends
on the configured execution times of the cyclic interrupts and occurs as long as the
value F_TRUE is at the output SUBS_ON, but only until the monitoring time
TIMEOUT elapses.
I/Os
Inputs:
Name
Data Type
Explanation
TIMEOUT
F_TIME
S_DB
F_WORD
SUBBO_00
F_BOOL
...
SUBBO_09
Outputs:
...
F_BOOL
SUBS_ON
F_BOOL
RD_BO_00
F_BOOL
Receipt data 00
...
RD_BO_09
Fail-Safe Systems
A5E00085588-03
Default
...
F_BOOL
Receipt data 09
8-49
Fail-Safe Blocks
Error Handling
In the event of an error that is critical to safety, the system function SFC F_CTRL
is called. This records the event in the Diagnostic Buffer and requests a switch to
the reserve CPU if the error occurred only on the master CPU. For non-redundant
systems or a common-cause error occurring in both CPUs, the shutdown logic can
be configured to either disable the erred F-run-time group or the entire Safety
Program.
8-50
Description
75DAH
75DCH
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
8.5.3
F_S_R
Function
This block safely transfers 5 data items of the data type F_REAL to another F-runtime group. It can be received there by the F_R_R block.
The data to be sent (e.g. outputs from other blocks) is stored at the inputs
SD_R_xx.
The output S_DB must be connected with the input of the same name in the
received block.
I/Os
Inputs:
Name
Data Type
SD_R_00
F_REAL
...
Output:
Explanation
Default
Send date 00
...
SD_R_04
F_REAL
Send data 04
S_DB
F_WORD
Error Handling
None
Fail-Safe Systems
A5E00085588-03
8-51
Fail-Safe Blocks
8.5.4
F_R_R
Function
This block safely receives 5 data items of the data type F_REAL sent from another
F-run-time group from the F_S_R block.
The received data comes to the outputs RD_R_xx for further processing by other
blocks.
The input S_DB must be connected with the output of the same name of the
sending block.
The input TIMEOUT must be assigned a value for monitoring the safety-related
communication. If an updated frame is not received during this time, the system
function SFC F_CTRL is called. See "Monitoring Safety-Related Communication
Between F Run-Time Groups".
Startup Characteristics
In the first cycle after a cold or warm restart, the block outputs the substitute values
configured at the SUBR_xx inputs. The output of the substitute values depends on
the configured execution times of the cyclic interrupts and occurs as long as the
value F_TRUE is at the output SUBS_ON, but only until the monitoring time
TIMEOUT elapses.
I/Os
Inputs:
Name
Data Type
Explanation
TIMEOUT
F_TIME
S_DB
F_WORD
SUBR_00
F_REAL
...
SUBR_04
Outputs:
...
F_REAL
SUBS_ON
F_BOOL
RD_R_00
F_REAL
Receipt data 00
...
RD_R_04
8-52
Default
...
F_REAL
Receipt data 04
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
Error Handling
In the event of an error that is critical to safety, the system function SFC F_CTRL
is called. This records the event in the Diagnostic Buffer and requests a switch to
the reserve CPU if the error occurred only on the master CPU. For non-redundant
systems or a common-cause error occurring in both CPUs, the shutdown logic can
be configured to either disable the erred F-run-time group or the entire Safety
Program.
Description
75DAH
75DCH
Fail-Safe Systems
A5E00085588-03
8-53
Fail-Safe Blocks
8.5.5
F_START
Function
In the first cycle of the cyclic interrupt cycle after a cold or warm restart, the block
indicates by means of a value of 1 at the output COLDSTRT that a startup (cold or
warm restart) has been carried out. COLDSTRT remains present until the next call
of F_START.
The F_START must be called before the evaluating blocks.
I/Os
Output:
Name
Data Type
Explanation
Default
COLDSTRT
F_BOOL
Error Handling
None
8-54
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
8.6
F Control Blocks
To ensure that a Safety Program is executable, the F control blocks are necessary
to check the program execution time. These F control blocks are automatically
inserted and interconnected at compilation of CFC charts.
Block
Description
F_CYC_CO
F_M_DI8
F_M_DI24
F_M_DO8
F_M_DO10
F_M_AI6
F_PLK
F_PLK_O
F_SHUTDN
F_TEST
F_TESTC
F_TESTM
DB_RES
DB_INIT
FAIL_MSG
RTG_LOGIC
Fail-Safe Systems
A5E00085588-03
8-55
Fail-Safe Blocks
8.6.1
F_CYC_CO
Function
This block monitors the cycle time of its priority class (cyclic interrupt OB 3x) and
provides a fail-safe time base for other F blocks.
At compilation, the block is inserted automatically into a F-run-time group named
@F_CycCo-OB3x, where x is 0 through 8 that correspond to the OB3x containing
F-Blocks, that contain the blocks F_TESTC and F_TEST.
If the value of MAX_CYC is invalid, a new value will be requested at compile time.
See "Configuring the Monitoring Times for F/FH Systems".
I/Os
Inputs:
Outputs:
Name
Data Type
Explanation
Default
MAX_CYC
F_TIME
Maximum permissible
F cycle time
T# 0s
PD OFF
F_BOOL
PD FLAG
F_BOOL
Power-off code
DIFF
F_DINT
CYC_SQ
F_INT
Sequence number
FAILED
BOOL
Error Handling
In the event of an error that is critical to safety, the system function SFC F_CTRL
is called. This records the event in the Diagnostic Buffer and requests a switch to
the reserve CPU if the error occurred only on the master CPU. For non-redundant
systems or a common-cause error occurring in both CPUs, the shutdown logic can
be configured to either disable the erred F-run-time group or the entire Safety
Program.
8-56
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
Description
75DAH
75E1H
Power failure
75E1H
...
75E1H
75E1H
75E1H
Fail-Safe Systems
A5E00085588-03
8-57
Fail-Safe Blocks
8.6.2
F_M_DI8
Function
The F module driver reads the digital values and error information of an 8-channel,
fail-safe digital input module and makes the data available to the associated F
channel driver (F_CH_DI).
If there is a redundant module, the digital values of both modules are evaluated.
The F module driver is automatically inserted at the beginning of the run-time
group which also contains the associated F channel driver F_CH_DI. The I/Os of
the F module driver are automatically interconnected and supplied with values.
The outputs DIAG_1 and DIAG_2, at which error information is output, are
important.
I/Os
Inputs:
Name
Data Type
Explanation
Default
CRC_IMP1
WORD
Supplied
automatically
CRC_IMP2
WORD
Supplied
automatically
DISC_ON
BOOL
DISCTIME
DINT
Discrepancy time in ms
TIMEOUT
F_DINT
SENS_RED
F_BOOL
Supplied
automatically
RED
F_BOOL
Module Redundancy
Supplied
automatically
0: SM configured as nonredundant
Supplied
automatically
1: SM configured as redundant
8-58
LADDR
INT
LADDR_R
INT
Supplied
automatically
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
Outputs:
Name
Data Type
Explanation
Default
CHADDR00
F_WORD
Interconnected
automatically
CHADDR07
F_WORD
Interconnected
automatically
DIAG_1
DWORD
DIAG_2
DWORD
PROFIsafe1
F_BOOL
PROFIsafe2
F_BOOL
...
DIAG_2
Byte 0
Byte 0
Bit 3: Reserved
Bit 3: Reserved
Bit 7: Reserved
Bit 7: Reserved
Byte 1
Byte 1
...
...
Byte 2
Byte 2
Reserved
Reserved
Byte 3
Byte 3
Reserved
Reserved
Note
In byte 0 of DIAG_1/2, the most recent error information remains stored until a new
error occurs, even if the error has already been eliminated.
Fail-Safe Systems
A5E00085588-03
8-59
Fail-Safe Blocks
Error Handling
In the event of an error that is critical to safety, the system function SFC_F_CTRL
is called. This records the event in the Diagnostic Buffer and requests a switch to
the reserve CPU if the error occurred only on the master CPU. For non-redundant
systems or a common-cause error occurring in both CPUs, the shutdown logic can
be configured to either disable the erred F-run-time group or the entire Safety
Program.
8-60
Description
75DAH
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
8.6.3
F_M_DI24
Function
The F module driver reads the digital values and error information of a 24-channel,
fail-safe digital input module and makes the data available to the associated F
channel driver (F_CH_DI).
If there is a redundant module, the digital values of both modules are evaluated.
The F module driver is automatically inserted at the beginning of the run-time
group which also contains the associated F channel driver F_CH_DI. The I/Os of
the F module driver are automatically interconnected and supplied with values.
The outputs DIAG_1 and DIAG_2, at which error information is output, are
important.
I/Os
Inputs:
Name
Data Type
Explanation
Default
CRC_IMP1
WORD
Supplied
automatically
CRC_IMP2
WORD
Supplied
automatically
DISC_ON
BOOL
DISCTIME
DINT
Discrepancy time in ms
TIMEOUT
F_DINT
SENS_RED
F_BOOL
Supplied
automatically
RED
F_BOOL
Module Redundancy
Supplied
automatically
0: SM configured as nonredundant
Supplied
automatically
1: SM configured as redundant
Fail-Safe Systems
A5E00085588-03
LADDR
INT
LADDR_R
INT
Supplied
automatically
8-61
Fail-Safe Blocks
Outputs:
Name
Data Type
Explanation
Default
CHADDR00
F_WORD
Interconnected
automatically
CHADDR23
F_WORD
Interconnected
automatically
DIAG_1
DWORD
DIAG_2
DWORD
PROFIsafe1
F_BOOL
PROFIsafe2
F_BOOL
...
DIAG_2
Byte 0
Byte 0
Bit 3: Reserved
Bit 3: Reserved
Bit 7: Reserved
Bit 7: Reserved
Byte 1
Byte 1
...
...
Byte 2
Byte 2
...
...
Byte 3
Byte 3
...
...
8-62
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
Note
In byte 0 of DIAG_1/2, the most recent error information remains stored until a new
error occurs, even if the error has already gone.
Error Handling
In the event of an error that is critical to safety, the system function SFC_F_CTRL
is called. This records the event in the Diagnostic Buffer and requests a switch to
the reserve CPU if the error occurred only on the master CPU. For non-redundant
systems or a common-cause error occurring in both CPUs, the shutdown logic can
be configured to either disable the erred F-run-time group or the entire Safety
Program.
Description
75DAH
Error in the safety data format (error due to online modification of the Safety
Program or internal CPU fault)
Fail-Safe Systems
A5E00085588-03
8-63
Fail-Safe Blocks
8.6.4
F_M_DO8
Function
The F module driver reads the digital output values from the associated F channel
drivers (F_CH_DO) and writes them to an 8-channel, fail-safe digital output
module. In addition, it reads the error information of the module and makes the
data available to the associated F channel driver (F_CH_DO).
If there is a redundant module, the digital values are written to both modules.
The F module driver is automatically inserted at the end of the run-time group
which also contains the associated F channel driver F_CH_DO. The I/Os of the F
module driver are automatically interconnected and supplied with values.
The outputs DIAG_1 and DIAG_2, at which error information is output, are
important.
I/Os
Inputs:
Name
Data Type
Explanation
Default
CHADDR00
F_WORD
Interconnected
automatically
CHADDR07
F_WORD
Interconnected
automatically
CRC_IMP1
WORD
Supplied
automatically
CRC_IMP2
WORD
Supplied
automatically
TIMEOUT
F_DINT
RED
F_BOOL
...
Module Redundancy
0: SM configured as nonredundant
Supplied
automatically
1: SM configured as redundant
8-64
LADDR
INT
LADDR_R
INT
Supplied
automatically
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
Outputs:
Name
Data Type
Explanation
Default
DIAG_1
DWORD
DIAG_2
DWORD
PROFIsafe1
F_BOOL
PROFIsafe2
F_BOOL
DIAG_2
Byte 0
Byte 0
Bit 3: Reserved
Bit 3: Reserved
Bit 7: Reserved
Bit 7: Reserved
Byte 1
Byte 1
Reserved
Reserved
Byte 2
Byte 2
Reserved
Reserved
Byte 3
Byte 3
Reserved
Reserved
Note
In byte 0 of DIAG_1/2, the most recent error information remains stored until a new
error occurs, even if the error has already gone.
Error Handling
In the event of an error that is critical to safety, the system function SFC F_CTRL
is called. This records the event in the Diagnostic Buffer and requests a switch to
the reserve CPU if the error occurred only on the master CPU. For non-redundant
systems or a common-cause error occurring in both CPUs, the shutdown logic can
be configured to either disable the erred F-run-time group or the entire Safety
Program.
Fail-Safe Systems
A5E00085588-03
8-65
Fail-Safe Blocks
Description
75DAH
Error in the safety data format (error due to online modification of the Safety
Program or internal CPU fault)
8.6.5
F_M_DO10
Function
The F module driver reads the digital output values from the associated F channel
drivers (F_CH_DO) and writes them to a 10-channel, fail-safe digital output
module. In addition, it reads the error information of the module and makes the
data available to the associated F channel driver (F_CH_DO).
If there is a redundant module, the digital values are written to both modules.
The F module driver is automatically inserted at the end of the run-time group
which also contains the associated F channel driver F_CH_DO. The I/Os of the F
module driver are automatically interconnected and supplied with values.
The outputs DIAG_1 and DIAG_2, at which error information is output, are
important.
I/Os
Inputs:
Name
Data Type
Explanation
Default
CHADDR00
F_WORD
Interconnected
automatically
CHADDR09
F_WORD
Interconnected
automatically
CRC_IMP1
WORD
Supplied
automatically
CRC_IMP2
WORD
Supplied
automatically
TIMEOUT
F_DINT
RED
F_BOOL
...
Module Redundancy
0: SM configured as nonredundant
Supplied
automatically
1: SM configured as redundant
8-66
LADDR
INT
LADDR_R
INT
Supplied
automatically
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
Outputs:
Name
Data Type
Explanation
Default
DIAG_1
DWORD
DIAG_2
DWORD
PROFIsafe1
F_BOOL
PROFIsafe2
F_BOOL
DIAG_2
Byte 0
Byte 0
Bit 3: Reserved
Bit 3: Reserved
Bit 7: Reserved
Bit 7: Reserved
Byte 1
Byte 1
Reserved
Reserved
Byte 2
Byte 2
Reserved
Reserved
Byte 3
Byte 3
Reserved
Reserved
Note
In byte 0 of DIAG_1/2, the most recent error information remains stored until a new
error occurs, even if the error has already gone.
Error Handling
In the event of an error that is critical to safety, the system function SFC F_CTRL
is called. This records the event in the Diagnostic Buffer and requests a switch to
the reserve CPU if the error occurred only on the master CPU. For non-redundant
systems or a common-cause error occurring in both CPUs, the shutdown logic can
be configured to either disable the erred F-run-time group or the entire Safety
Program.
Fail-Safe Systems
A5E00085588-03
8-67
Fail-Safe Blocks
8.6.6
Description
75DAH
F_M_AI6
Function
The F module driver reads the analog values (non-linearized values) and error
information of a 6-channel, fail-safe analog input module and makes the data
available to the associated F channel driver (F_CH_AI).
If there is a redundant module, the analog values of both modules are evaluated.
The F module driver is automatically inserted at the beginning of the run-time
group which also contains the associated F channel driver F_CH_AI. The I/Os of
the F block driver are automatically interconnected and supplied with values.
The outputs DIAG_1 and DIAG_2, at which error information is output, are
important.
I/Os
Inputs:
Name
Data Type
Explanation
Default
CRC_IMP1
WORD
Supplied
automatically
CRC_IMP2
WORD
Supplied
automatically
TIMEOUT
F_DINT
MODE_00
F_WORD
Supplied
automatically
MODE_05
F_WORD
Supplied
automatically
RED
F_BOOL
Module Redundancy
Supplied
automatically
...
0: SM configured as nonredundant
1: SM configured as redundant
8-68
LADDR
INT
LADDR_R
INT
Supplied
automatically
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
Outputs:
Name
Data Type
Explanation
Default
CHADDR00
F_WORD
Interconnected
automatically
CHADDR05
F_WORD
Interconnected
automatically
DIAG_1
DWORD
DIAG_2
DWORD
PROFIsafe1
F_BOOL
PROFIsafe2
F_BOOL
...
DIAG_2
Byte 0
Byte 0
Bit 3: Reserved
Bit 3: Reserved
Bit 7: Reserved
Bit 7: Reserved
Byte 1
Byte 1
Reserved
Reserved
Byte 2
Byte 2
Reserved
Reserved
Byte 3
Byte 3
Reserved
Reserved
Note
In byte 0 of DIAG_1/2, the most recent error information remains stored until a new
error occurs, even if the error has already gone.
Error Handling
In the event of an error, the system function SFC F_CTRL is called.
Fail-Safe Systems
A5E00085588-03
8-69
Fail-Safe Blocks
Description
75DAH
Error in the safety data format (error due to online modification of the Safety
Program or internal CPU fault)
8.6.7
F_PLK
Function
This block executes, among other things, logical program and data flow control
before the output blocks and provides a corresponding enable signal for this.
The block is inserted automatically into each F-run-time group before the output
blocks at compilation.
The block output FAILED is for internal use only.
I/Os
Outputs:
Name
Data Type
Explanation
Default
FAILED
BOOL
Error Handling
In the event of an error that is critical to safety, the system function SFC F_CTRL
is called. This records the event in the Diagnostic Buffer and requests a switch to
the reserve CPU if the error occurred only on the master CPU. For non-redundant
systems or a common-cause error occurring in both CPUs, the shutdown logic can
be configured to either disable the erred F-run-time group or the entire Safety
Program.
Description
75DAH
75E1H
75E1H
75E1H
75E1H
75E1H
8-70
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
8.6.8
F_PLK_O
Function
This block executes, among other things, logical program and data flow control
after the output blocks and provides a corresponding enable signal for this.
The block is inserted automatically into each F-run-time group after the output
blocks at compilation.
I/Os
The block has no visible I/Os.
Error Handling
In the event of an error that is critical to safety, the system function SFC F_CTRL
is called. This records the event in the Diagnostic Buffer and requests a switch to
the reserve CPU if the error occurred only on the master CPU. For non-redundant
systems or a common-cause error occurring in both CPUs, the shutdown logic can
be configured to either disable the erred F-run-time group or the entire Safety
Program.
Description
75E1H
75E1H
Fail-Safe Systems
A5E00085588-03
8-71
Fail-Safe Blocks
8.6.9
F_SHUTDN
Function
The F_SHUTDN function block, which is a standard function block packaged in the
Failsafe Blocks library, provides new functionality to control and manage F-run-time
group shutdown and reinitialization.
The F_SHUTDN function block:
has two separate interfaces: shutdown logic interface and restart logic
interface.
Note
No other logic shall be permitted to be placed within the @F_ShutDn CFC.
Connections may only be made to specified inputs and outputs of the F_SHUTDN
function block (see the table of I/Os below). Any logic placed within the
@F_ShutDn CFC will automatically be deleted during the compile.
I/Os
Inputs:
8-72
Name
Data Type
Explanation
Default
RESTART
BOOL
FAILURE
BOOL
Combination of logical OR of
all F Run-time group
Shutdown requests (FAILED
output of F_PLK, F_TEST,
F_TESTC, and F_CYC_CO).
This input cannot be
connected to external logic.
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
Outputs:
Fail-Safe Systems
A5E00085588-03
Name
Data Type
Explanation
Default
SHUTDOWN
BOOL
Full (1)
RQ_FULL
BOOL
F_PRG_SIG
DWORD
ALARM_EN
BOOL
FULL_SD
BOOL
EN_INIT
BOOL
SAFE_M
BOOL
MSG_ERR
BOOL
MSG_STAT
WORD
W#16#0000
MSG_ACK
WORD
W#16#0000
NFY_DONE
BOOL
NFY_ERR
BOOL
8-73
Fail-Safe Blocks
Name
Data Type
Explanation
Default
NFY_STAT
WORD
8-74
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
functions may take several seconds to complete. Upon completion, the disabled Frun-time groups will become reenabled and if the FULL_SD was TRUE indicating a
Safety Program shutdown, this output will be set to FALSE.
Note
After restarting the Safety Program, reintegration of your I/O may be necessary
through the use of the F_QUITES function block.
Note
If all Safety Programs are deleted except for the shutdown logic @F_ShutDn, the
@F_ShutDn will not be removed. This must be removed manually.
Full Shutdown Incoming (Alarm Message) F_SHUTDN block entered the Full
Shutdown state either through manual request of a full shutdown or an F-Block
tripped diagnostic.
Full Shutdown Outgoing (Alarm Message) F_SHUTDN block exited the Full
Shutdown state because of a user requested restart.
Restart Outgoing (Notify Message) The shutdown logic completed the restart
sequence.
Safety Mode Incoming (Notify Message) Safety Mode has been enabled
(Test Mode exited).
Safety Mode Outgoing (Notify Message) Safety Mode has been disabled
(Test Mode entered).
The F_SHUTDN function block calls the SFB 34 ALARM_8 to report the Alarm
Messages and SFB 31 NOTIFY_8P to report the Notify Messages. When an
Alarm Message is reported, the MSG_XXX outputs return the status of the
ALARM_8 SFB call. To obtain help on the ALARM_8 error outputs, obtain help for
Fail-Safe Systems
A5E00085588-03
8-75
Fail-Safe Blocks
the block by opening the Blocks folder of your F-Project and select the ALARM_8
block and press F1 for help.
Similarly, when a Notify Message is reported, the NFY_XXX outputs will return the
status of the NOTIFY_8P SFB call. To obtain help on the NOTIFY_8P error
outputs, obtain help for the block by opening the Blocks folder of your F-Project
and select the NOTIFY_8P block and press F1 for help.
Error Handling
Diagnostic events will be posted to the CPU Diagnostic Buffer when the transition
to a different shutdown logic state occurs: Partial shutdown, Full shutdown,
Restart, or Safety Mode Activated or Deactivated.
If the F_SHUTDN function block is configured with RQ_FULL set to FALSE (Partial
Shutdown), each detected shutdown F-run-time group will be reported as a
FAILURE. Those F-run-time groups that are shutdown may be restarted by
providing a rising edge to the RESTART input, which will also trigger an event to
be reported in the Diagnostic Buffer indicating a restart has been requested. If the
RQ_FULL is TRUE and a FAILURE is detected, the Safety Program will be
disabled through the FULL_SD output and this will also trigger an event indicating
a full system shutdown.
Startup Characteristics
The F_SHUTDN function block is intended to be available upon startup with the
entire Safety Program enabled.
Description
Full Safety Program shutdown state entered (one or more F-run-time groups
shutdown and the configured response of SHUTDOWN was Full
8-76
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
8.6.10
F_TEST
Function
This block executes a command test.
At compilation, the block is inserted automatically into a F-run-time group named
@F_CycCo-OB3x, where x is 0 through 8 that correspond to the OB3x containing
F-Blocks, that contain the blocks F_CYC_CO and F_TESTC.
Note
A project based on Fail-safe Blocks (V1_1) the user must follow the manual
procedure for creating a CFC chart with the F_CYC_CO function block. A Runtime group must also be created and the user must place the F_CYC_CO function
block within this new Run-time group.
Again, for a project based on Fail-safe Blocks (V1_2) or higher the manual
procedure has been eliminated. The user is no longer allowed to manually place
the F_CYC_CO function blocks it is now a system function.
I/Os
The inputs and outputs will not be explained here since this is logic that the system
automatically generates.
Error Handling
In the event of an error that is critical to safety, the system function SFC F_CTRL
is called. This records the event in the Diagnostic Buffer and requests a switch to
the reserve CPU if the error occurred only on the master CPU. For non-redundant
systems or a common-cause error occurring in both CPUs, the shutdown logic can
be configured to either disable the F-run-time group with the error or the entire
Safety Program.
Description
75E1H
Fail-Safe Systems
A5E00085588-03
8-77
Fail-Safe Blocks
8.6.11
F_TESTC
Function
This block checks whether the background self-tests of the CPU have been carried
out fully and without errors and that this did not take place more than 24 hours ago.
The tests must not be switched off by the SFC 90.
At compilation, the block is inserted automatically into a F-run-time group named
@F_CycCo-OB3x, where x is 0 through 8 that correspond to the OB3x containing
F-Blocks, that contain the blocks F_CYC_CO and F_TEST.
I/Os
The inputs and outputs will not be explained here since this is logic that the system
automatically generates.
Error Handling
In the event of an error that is critical to safety, the system function SFC F_CTRL
is called. This records the event in the Diagnostic Buffer and requests a switch to
the reserve CPU if the error occurred only on the master CPU. For non-redundant
systems or a common-cause error occurring in both CPUs, the shutdown logic can
be configured to either disable the F-run-time group with the error or the entire
Safety Program.
Description
75DAH
Error in the safety data format of the input F_CNT_W (error due to online
modification of the Safety Program or internal CPU fault)
75E1H
...
75E1H
8-78
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
8.6.12
F_TESTM
Function
This block is for activating/deactivating safety mode.
At compilation, the block is inserted automatically into a F-run-time group named
@F_TestMode.
I/Os
The block has no visible I/Os.
Error Handling
None
Report Characteristics
When safety mode is activated/deactivated, the block issues the message "PLC
not in safety mode" to the OS using SFB 33 (ALARM).
The messages can be switched off via the (invisible) input EN_MSG = 0
(MSG_STAT output parameter remains unchanged) if a suitable report system is
not available.
The ALARM block is called if message suppression is not activated. ALARM error
information (messages cannot be issued) is displayed in the (invisible) MSG_STAT
output parameter.
Error information of the MSG_STAT output parameter is described in detail in the
online help system for SFB 33 (ALARM).
General message text: Safety program is not in safety mode
Message class: process message with acknowledgment
Fail-Safe Systems
A5E00085588-03
8-79
Fail-Safe Blocks
8.6.13
DB_RES
Function
This block supports the startup characteristics in the event of a cold restart/warm
restart of the CPU.
The block is inserted automatically at compilation.
I/Os
The block has no visible I/Os.
8-80
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
8.6.14
DB_INIT
Function
The DB_INIT function, which is a standard function packaged in the Failsafe
Blocks library, provides new functionality to initialize F-run-time groups at the
direction of the F_SHUTDN function block.
The DB_INIT function block is automatically placed by the compiler in a CFC chart
named @F_DbInit. Connections between the DB_INIT function and the shutdown
logic are also created automatically.
Note
No other logic shall be permitted to be placed within the @F_DbInit CFC.
Connections may not be made to any inputs or outputs of these blocks. Any logic
placed within the @F_DbInit CFC will automatically be deleted during the
compile.
I/Os
The inputs and outputs will not be explained here since this is logic that the system
automatically generates.
Fail-Safe Systems
A5E00085588-03
8-81
Fail-Safe Blocks
8.6.15
FAIL_MSG
Function
This block is used by the RTG_LOGIC block type.
The block is inserted automatically at compilation.
I/Os
The inputs and outputs will not be explained here since this is logic that the system
automatically generates.
8-82
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
8.6.16
RTG_LOGIC
Function
The RTG_LOGIC function block, which is a standard function packaged in the
Failsafe Blocks library, provides new functionality to interface the F-run-time groups
and the shutdown logic.
The RTG_LOGIC function block is automatically placed by the compiler in a CFC
chart named @F_ShutDn.
Note
No other logic shall be permitted to be placed within the @F_ShutDn CFC.
Connections may not be made to any inputs or outputs of these blocks. Any logic
placed within the @F_ShutDn CFC will automatically be deleted during the
compile.
I/Os
The inputs and outputs will not be explained here since this is logic that the system
automatically generates.
Fail-Safe Systems
A5E00085588-03
8-83
Fail-Safe Blocks
8.6.17
SFC F_CTRL
SFC F_CTRL is a System Function Call in the CPU that is called in the event an
internal diagnostic determines there is a failure of the hardware or a diagnostic
used to determine timeouts is tripped. SFC F_CTRL is called from function blocks
that have diagnostics for such conditions. These include, but are not limited to, the
function blocks F_M_DO10, F_M_DO8, F_M_DI8, F_M_DI24, F_M_AI6, F_PLK,
F_PLK_O, etc. SFC F_CTRL has two purposes.
1. To report a diagnostic failure to the diagnostic buffer for users to observe as
the cause of failure
2. In an S7 F/H system, to force a switchover if the fault is detected in the master
only
As you can see from the two purposes above, SFC F_CTRL is used for diagnostic
purposes and for availability by forcing the CPU with the detected failure to
become the reserve CPU.
SFC F_CTRL is not responsible for any switchover actions in an S7 F (single
CPU), in a redundant S7 F/H in which the fault occurs on both CPUs (common
cause), or in the case of the detected failure in the reserve CPU in a redundant S7
F/H system.
The shutdown logic located in the @F_Shutdn chart is responsible for disabling the
F-run-time group with the detected failure.
8-84
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
8.7
Description
F_AND4
F_OR4
F_XOR2
F_NOT
F_2OUT3
F_XOUTY
8.7.1
F_AND4
Function
This block links the inputs by means of AND. The output OUT is 1 if all the inputs
are 1. Otherwise, the output is 0. The output OUTN corresponds to the negating
output OUT.
Truth Table
IN1
IN2
IN3
IN4
OUT
OUTN
Fail-Safe Systems
A5E00085588-03
8-85
Fail-Safe Blocks
I/Os
Inputs:
Output:
Name
Data Type
Explanation
Default
IN1
F_BOOL
Input 1
IN2
F_BOOL
Input 2
IN3
F_BOOL
Input 3
IN4
F_BOOL
Input 4
OUT
F_BOOL
Output
OUTN
F_BOOL
Negating output
Error Handling
None
8-86
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
8.7.2
F_OR4
Function
This block links the inputs by means of OR. The output OUT is 1 if at least one
input is 1. If all outputs are 0, the output is 0. The output OUTN corresponds to the
negating output OUT.
Truth Table
IN1
IN2
IN3
IN4
OUT
OUTN
I/Os
Inputs:
Output:
Name
Data Type
Explanation
Default
IN1
F_BOOL
Input 1
IN2
F_BOOL
Input 2
IN3
F_BOOL
Input 3
IN4
F_BOOL
Input 4
OUT
F_BOOL
Output
OUTN
F_BOOL
Negating output
Error Handling
None
Fail-Safe Systems
A5E00085588-03
8-87
Fail-Safe Blocks
8.7.3
F_XOR2
Function
This block links the inputs by means of XOR (exclusive OR). The output OUT is 1 if
exactly one input is 1. The output OUTN corresponds to the negating output OUT.
Truth Table
IN1
IN2
OUT
OUTN
I/Os
Inputs:
Output:
Name
Data Type
Explanation
Default
IN1
F_BOOL
Input 1
IN2
F_BOOL
Input 2
OUT
F_BOOL
Output
OUTN
F_BOOL
Negating output
Error Handling
None
8-88
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
8.7.4
F_NOT
Function
The block inverts the input.
Truth Table
IN
OUT
I/Os
Name
Data Type
Explanation
Default
Input:
IN
F_BOOL
Input
Output:
OUT
F_BOOL
Output
Error Handling
None
8.7.5
F_2OUT3
Function
This block monitors three binary inputs for signal state 1. The output OUT is 1 if at
least two inputs are 1. Otherwise, the output is 0. The output OUTN corresponds to
the negating output OUT.
Truth Table
IN1
IN2
IN3
OUT
OUTN
Fail-Safe Systems
A5E00085588-03
8-89
Fail-Safe Blocks
I/Os
Name
Inputs:
Output:
Data Type
Explanation
Default
IN1
F_BOOL
Input 1
IN2
F_BOOL
Input 2
IN3
F_BOOL
Input 3
OUT
F_BOOL
Output
OUTN
F_BOOL
Negating output
Error Handling
None
8-90
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
8.7.6
F_XOUTY
Function
The block monitors up to 16 binary inputs for signal state 1. The input signals are
monitored starting with the input IN1 up to and including the input INY for signal
state 1. The number of binary inputs to be monitored can be set with the Y
parameter. The output OUT is 1 if at least X inputs are 1. Otherwise, the output is
0. The output OUTN corresponds to the negating output OUT.
The binary inputs must be occupied continuously starting with IN1. When X>Y,
X<=0, X>16, Y<=0, the output OUT is 0. When Y>16, the output OUT behaves in
the same way as when Y=16.
I/Os
Inputs:
Name
Data Type
Explanation
Default
IN1
F_BOOL
Input 1
IN2
F_BOOL
Input 2
IN3
F_BOOL
Input 3
...
Output:
...
IN16
F_BOOL
Input 16
F_INT
F_INT
Number of inputs to be
monitored: 0 < Y <= 16
OUT
F_BOOL
Output
OUTN
F_BOOL
Negating output
Error Handling
In the event of an error that is critical to safety, the system function SFC F_CTRL
is called. This records the event in the Diagnostic Buffer and requests a switch to
the reserve CPU if the error occurred only on the master CPU. For non-redundant
systems or a common-cause error occurring in both CPUs, the shutdown logic can
be configured to either disable the erred F-run-time group or the entire Safety
Program.
Description
75DAH
Fail-Safe Systems
A5E00085588-03
8-91
Fail-Safe Blocks
8.8
8.8.1
Block
Description
F_LIM_HL
F_LIM_LL
F_2oo3_R
F_1oo2_R
F_LIM_HL
Function
This block monitors the input variable U for limit violation (U_HL). A hysteresis can
also be specified to avoid fluttering of the output QH in the event of fluctuations of
the input value.
U < (U_HL HYS): In the event of violation of the lower limit (hysteresis), the
output QH = 0.
The limit and hysteresis are also available as non-fail-safe data at the outputs
U_HL_O and HYS_O for further processing in the standard program. The
hysteresis can be used to avoid fluttering of QH if the input value U fluctuates by
the limit value U_HL.
If either input variable U, U-HL or HYS contains an invalid REAL number, the
Substitute Input (SUBS_IN) will be passed directly to the output (QH).
If an invalid REAL number is generated during the calculations involving U, U-HL
and HYS, the output QH=1.
The output QHN corresponds to the negating output QH.
Note
The non-fail-safe outputs can be made available to the standard program without a
conversion block.
8-92
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
I/Os
Inputs:
Outputs:
Name
Data Type
Explanation
Default
F_REAL
Input variable
0.0
U_HL
F_REAL
Upper limit
100.0
HYS
F_REAL
Hysteresis
0.0
SUBS_IN
F_BOOL
Substitute Input
QH
F_BOOL
QHN
F_BOOL
Negating output QH
U_HL_O
REAL
Upper limit
100.0
HYS_O
REAL
Hysteresis
Note
If, when you create the program, you preset the QH output in CFC the initial value
1, it will remain set after startup (cold restart or warm restart) if (U_HL - HYS) <= U
< U_HL.
It is only reset if U < (U_HL - HYS).
Note that the initial values of the output parameters do not appear in the printout of
the CFC chart. They must be checked in the printout of the safety program.
Error Handling
In the event of an error that is critical to safety, the system function SFC F_CTRL
is called. This records the event in the Diagnostic Buffer and requests a switch to
the reserve CPU if the error occurred only on the master CPU. For non-redundant
systems or a common-cause error occurring in both CPUs, the shutdown logic can
be configured to either disable the erred F-run-time group or the entire Safety
Program.
Description
75D9H
75DAH
Fail-Safe Systems
A5E00085588-03
8-93
Fail-Safe Blocks
8.8.2
F_LIM_LL
Function
This block monitors the input variable U for violation of the lower limit (U_LL). A
hysteresis can also be specified to avoid fluttering of the output QL in the event of
fluctuations in the input value.
U > (U_LL + HYS): In the event of upper limit violation + hysteresis, the output
QL = 0.
The limit and hysteresis are also available as non-fail-safe data at the outputs
U_LL_O and HYS_O for further processing in the standard program. The
hysteresis can be used to avoid fluttering of QL if the input value U fluctuates by
the limit value U_LL.
If either input variable U, U_LL or HYS contains an invalid REAL number, the
Substitute Input (SUBS_IN) will be passed directly to the output (QL).
If an invalid REAL number is generated during the calculations involving U, U-LL
and HYS, the output QL=1.
The output QLN corresponds to the negating output QL.
Note
The non-fail-safe outputs can be made available to the standard program without a
conversion block.
I/Os
Name
Inputs:
Outputs:
8-94
Data Type
Explanation
Default
F_REAL
Input variable
0.0
U_LL
F_REAL
Lower limit
100.0
HYS
F_REAL
Hysteresis
0.0
SUBS_IN
F_BOOL
Substitute Input
QL
F_BOOL
QLN
F_BOOL
Negating output QL
U_LL_O
REAL
Upper limit
100.0
HYS_O
REAL
Hysteresis
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
Note
If, when you create the program, you preset the QL output in CFC with the initial
value 1, it will remain set after startup (cold restart or warm restart) if U_LL < U
<= (U_LL + HYS).
It is only reset if U > (U_LL + HYS).
Note that the initial values of output parameters do not appear in the printout of the
CFC chart. They must be checked in the printout of the safety program.
Error Handling
In the event of an error that is critical to safety, the system function SFC F_CTRL
is called. This records the event in the Diagnostic Buffer and requests a switch to
the reserve CPU if the error occurred only on the master CPU. For non-redundant
systems or a common-cause error occurring in both CPUs, the shutdown logic can
be configured to either disable the erred F-run-time group or the entire Safety
Program.
Description
75D9H
Invalid REAL number at the inputs U, U_LL, HYS (DATA component) or,
generated during the calculations involving U, U_LL, HYS and SUBS_IN
75DAH
Fail-Safe Systems
A5E00085588-03
8-95
Fail-Safe Blocks
8.8.3
F_2oo3_R
Function
This block selects the median value from three inputs and places the result at the
output. The QBAD output will be set if two or more of the three inputs present a
QBAD input.
Note
This function block is supplied as a block type. This adds one restriction to the
usage of this block: It may not be placed within another block type.
Note
The OUT output is always the median value of the inputs. Inputs with bad quality
(QBADx=TRUE) are not masked from the selection calculation. The OUT
calculation is NOT directly affected by QBAD.
I/Os
Name
Inputs:
Outputs:
Data Type
Explanation
Default
IN1
F_REAL
Input variable 1
0.0
IN2
F_REAL
Input variable 2
0.0
IN3
F_REAL
Input variable 3
0.0
QBAD1
F_BOOL
IN1 invalid
QBAD2
F_BOOL
IN2 invalid
QBAD3
F_BOOL
IN3 invalid
DELTA
REAL
Allowable difference
0.0
OUT
F_REAL
Median value
0.0
QBAD
BOOL
DIS1
BOOL
DIS2
BOOL
DIS3
BOOL
The block employs a two-out-of-three selection scheme and is often used to detect
the failure of sensors and input processing subsystems. Typical use of this block
would have the V and QBAD outputs of three F_CH_AI blocks connected to the
F_2oo3_Rs respective IN and QBAD inputs.
At least two of the three inputs must have their QBAD input clear for QBAD output
to be clear.
The DIS outputs indicate a discrepancy between the respective input, the DELTA
input and the selected median (the difference between IN and OUT is greater than
DELTA).
8-96
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
The V outputs of the three F_CH_AI connected to the three IN inputs of the
F_2oo3_R
The QBAD outputs of the three F_CH_AI connected to the three QBAD inputs
of the F_2oo3_R
The F_2oo3_R blocks DELTA input set to the largest acceptable difference
from the expected value
The SUBS_V inputs of the three F_CH_AI blocks set larger than the F_2oo3_R
blocks DELTA input
Error Handling
In the event of an error that is critical to safety, the system function SFC F_CTRL
is called. This records the event in the Diagnostic Buffer and requests a switch to
the reserve CPU if the error occurred only on the master CPU. For non-redundant
systems or a common-cause error occurring in both CPUs, the shutdown logic can
be configured to either disable the erred F-run-time group or the entire Safety
Program.
Fail-Safe Systems
A5E00085588-03
8-97
Fail-Safe Blocks
Description
0x75D9
0x75DA
Error in the safety data format (error due to online modification of the
Safety Program or internal CPU fault)
8.8.4
F_1oo2_R
Function
This block selects its output from one of two inputs based on the QBAD inputs.
IN1 will be output unless QBAD1 is set, which selects IN2 as the output. The
QBAD output will be set if both QBAD inputs are set.
Note
This function block is supplied as a block type. This adds one restriction to the
usage of this block: It may not be placed within another block type.
I/Os
Name
Inputs:
Outputs:
Data Type
Explanation
Default
IN1
F_REAL
Input variable 1
0.0
IN2
F_REAL
Input variable 2
0.0
QBAD1
F_BOOL
IN1 invalid
QBAD2
F_BOOL
IN2 invalid
DELTA
REAL
Allowable difference
0.0
OUT
F_REAL
Selected value
0.0
QBAD
BOOL
DIS1
BOOL
DIS2
BOOL
The block employs a one-out-of-two selection scheme and is often used to detect
the failure of sensors and input processing subsystems. Typical use of this block
would have the V and QBAD outputs of two F_CH_AI blocks connected to the
F_1oo2_Rs respective IN and QBAD inputs.
At least one of the two inputs must have their QBAD input clear for QBAD output to
be clear.
The DIS outputs indicate a discrepancy between the respective input, the DELTA
input and the selected output (the difference between IN and OUT is greater than
DELTA).
8-98
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
The V outputs of the two F_CH_AI connected to the two IN inputs of the
F_1oo2_R
The QBAD outputs of the two F_CH_AI connected to the two QBAD inputs of
the F_1oo2_R
The F_1oo2_R blocks DELTA input set to the largest acceptable difference
from the expected value
The SUBS_V inputs of the two F_CH_AI blocks set larger than the F_1oo2_R
blocks DELTA input
Error Handling
In the event of an error that is critical to safety, the system function SFC F_CTRL
is called. This records the event in the Diagnostic Buffer and requests a switch to
the reserve CPU if the error occurred only on the master CPU. For non-redundant
systems or a common-cause error occurring in both CPUs, the shutdown logic can
be configured to either disable the erred F-run-time group or the entire Safety
Program.
Fail-Safe Systems
A5E00085588-03
8-99
Fail-Safe Blocks
Description
0x75D9
0x75DA
Error in the safety data format (error due to online modification of the
Safety Program or internal CPU fault)
8.9
Flip-Flop Blocks
8.9.1
Block
Description
F_RS_FF
F_SR_FF
F_RS_FF
Function
The block executes the function of an RS flipflop (resetting dominant).
The RS flipflop is reset if the signal state at the input R = 1 and at the input S =
0. The flipflop is set if the input R = 0 and the input S = 1. If the result of the logic
operation is 1 at both inputs, the flipflop is reset.
Truth Table
R
QN
QNn
Qn-1
QNn-1
I/Os
Inputs:
Outputs:
8-100
Name
Data Type
Explanation
Default
F_BOOL
Reset
F_BOOL
Set
F_BOOL
Output
QN
F_BOOL
Negating output
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
Note
If, when you create the program, you preset the Q output in CFC with the initial
value 1, it will remain set after startup (cold restart or warm restart) until the signal
state at the R input changes to 1.
Note that the initial values of output parameters do not appear in the printout of the
CFC chart. They must be checked in the printout of the safety program.
Error Handling
In the event of an error that is critical to safety, the system function SFC F_CTRL
is called. This records the event in the Diagnostic Buffer and requests a switch to
the reserve CPU if the error occurred only on the master CPU. For non-redundant
systems or a common-cause error occurring in both CPUs, the shutdown logic can
be configured to either disable the erred F-run-time group or the entire Safety
Program.
Description
75DAH
Fail-Safe Systems
A5E00085588-03
8-101
Fail-Safe Blocks
8.9.2
F_SR_FF
Function
The block executes the function of an SR flipflop (setting dominant).
The SR flipflop is set if the signal state at the input R = 0 and at the input S = 1.
The flipflop is reset if the input R = 1 and the input S = 0. If the result of the logic
operation is 1 at both inputs, the flipflop is set.
Truth Table
R
QN
QNn
Qn-1
QNn-1
I/Os
Inputs:
Outputs:
Name
Data Type
Explanation
Default
F_BOOL
Reset
F_BOOL
Set
F_BOOL
Output
QN
F_BOOL
Negating output
Note
If, when you create the program, you preset the Q output in CFC with the initial
value 1, it will remain set after startup (cold restart or warm restart) until the signal
state at the R input changes to 1 (at input S = 0).
Note that the initial values of output parameters do not appear in the printout of the
CFC chart. They must be checked in the printout of the safety program.
Error Handling
In the event of an error that is critical to safety, the system function SFC F_CTRL
is called. This records the event in the Diagnostic Buffer and requests a switch to
the reserve CPU if the error occurred only on the master CPU. For non-redundant
systems or a common-cause error occurring in both CPUs, the shutdown logic can
be configured to either disable the erred F-run-time group or the entire Safety
Program .
8-102
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
8.10
Description
75DAH
8.10.1
Block
Description
F_CTUD
F_TP
Timer pulse
F_TON
Timer on-delay
F_TOF
Timer off-delay
F_CTUD
Function
This block is an edge-controlled up/down counter.
The CV count value responds to rising edges of the inputs CU and CD as well as
to the level of the inputs LOAD and R:
CU: CV is increased by 1.
If the count value reaches the upper limit (32,767), it is not increased any
further.
CD: CV is decreased by 1.
If the count value reaches the lower limit (32,768), it is not decreased any
further.
R = 1: CV is reset to 0.
The values at the inputs CU, CD and LOAD are ignored.
If in a cycle there is a rising edge at the input CU and the input CD, the counter
keeps its current value.
The QU output is set if the count value is greater than or equal to the preset value
PV. The output QD is set if the count value is less than or equal to zero.
Startup Characteristics
In the first cycle after a cold or warm restart or in the case of a first call, the counter
is reset.
Fail-Safe Systems
A5E00085588-03
8-103
Fail-Safe Blocks
I/Os
Inputs:
Outputs:
Name
Data Type
Explanation
Default
CU
F_BOOL
Up-counting input
CD
F_BOOL
Down-counting input
F_BOOL
LOAD
F_BOOL
PV
F_INT
Preset value
Name
Data Type
Explanation
Default
QU
F_BOOL
F_BOOL
F_INT
Note
If, when you create the program, you preset the CV output in CFC with an initial
value of < 0 or > 0, the counter is incremented or decremented as of this value.
Note that the initial values of output parameters do not appear in the printout of the
CFC chart. They must be checked in the printout of the safety program.
Error Handling
In the event of an error that is critical to safety, the system function SFC F_CTRL
is called. This records the event in the Diagnostic Buffer and requests a switch to
the reserve CPU if the error occurred only on the master CPU. For non-redundant
systems or a common-cause error occurring in both CPUs, the shutdown logic can
be configured to either disable the erred F-run-time group or the entire Safety
Program.
8-104
Description
75DAH
Error in the safety data format of the input CU, CD, R, LOAD
or PV (error due to online modification of the Safety Program
or internal CPU fault)
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
8.10.2
F_TP
Function
The block generates a pulse with the duration PT at the output Q.
The pulse is started by a rising edge at the input IN. The output Q remains set for
the duration PT, irrespective of the subsequent pattern of the input signal.
The output ET indicates how long the output Q has already been set. The
maximum value it can adopt is that of the input PT. It is reset if the input IN
changes to 0, but not before the time PT has elapsed.
If PT < 0, the outputs Q and ET are reset.
Timing Diagram
scasc
IN
Q
PT
PT
PT
ET
PT
Startup Characteristics
In the first cycle after a cold or warm restart or in the case of a first call, the timer is
reset.
I/Os
Inputs:
Outputs:
Fail-Safe Systems
A5E00085588-03
Name
Data Type
Explanation
Default
IN
F_BOOL
Start input
PT
F_TIME
T#0 ms
F_BOOL
Pulse output
ET
F_TIME
Elapsed time
T#0 ms
8-105
Fail-Safe Blocks
Error Handling
In the event of an error that is critical to safety, the system function SFC F_CTRL
is called. This records the event in the Diagnostic Buffer and requests a switch to
the reserve CPU if the error occurred only on the master CPU. For non-redundant
systems or a common-cause error occurring in both CPUs, the shutdown logic can
be configured to either disable the erred F-run-time group or the entire Safety
Program.
Error in the safety data format of the inputs PT and IN and the
output ET (error due to online modification of the Safety Program
or internal CPU fault)
See Also
Fail-Safe User Times
8-106
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
8.10.3
F_TON
Function
The block delays a rising edge by the time PT.
A rising edge at the input IN results in a rising edge at the output Q after the time
PT has elapsed. Q remains set until the input IN changes to 0.
If the input IN changes to 0 before PT has elapsed, Q remains at 0.
The output ET indicates the time that has elapsed since the last rising edge at the
input IN, but only up to the value of the input PT. ET is reset if the input IN changes
to 0.
If PT < 0, the outputs Q and ET are reset.
Timing Diagram
scasc
IN
Q
PT
PT
ET
PT
Startup Characteristics
In the first cycle after a cold or warm restart or in the case of a first call, the timer is
reset.
I/Os
Inputs:
Outputs:
Fail-Safe Systems
A5E00085588-03
Name
Data Type
Explanation
Default
IN
F_BOOL
Start input
PT
F_TIME
T#0 ms
F_BOOL
Pulse output
ET
F_TIME
Elapsed time
T#0 ms
8-107
Fail-Safe Blocks
Error Handling
In the event of an error that is critical to safety, the system function SFC F_CTRL
is called. This records the event in the Diagnostic Buffer and requests a switch to
the reserve CPU if the error occurred only on the master CPU. For non-redundant
systems or a common-cause error occurring in both CPUs, the shutdown logic can
be configured to either disable the erred F-run-time group or the entire Safety
Program.
Description
75DAH
Error in the safety data format of the inputs PT and IN and the
output ET (error due to online modification of the Safety
Program or internal CPU fault)
See Also
Fail-Safe User Times
8-108
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
8.10.4
F_TOF
Function
The block delays a falling edge by the time PT.
A rising edge at the input IN results in a rising edge at the output Q. A falling edge
at IN results in a falling edge at Q after PT has elapsed.
If the input IN changes to 1 before PT has elapsed, Q remains on 1.
The output ET indicates the time that has elapsed since the last falling edge at the
input IN, but only up to the value at the input PT. ET is reset if the input IN changes
to 1.
If PT < 0, the outputs Q and ET are reset.
Timing Diagram
IN
Q
PT
PT
ET
PT
Startup Characteristics
In the first cycle after a cold or warm restart or in the case of a first call, the timer is
reset.
I/Os
Inputs:
Outputs:
Fail-Safe Systems
A5E00085588-03
Name
Data Type
Explanation
Default
IN
F_BOOL
Start input
PT
F_TIME
T#0 ms
F_BOOL
Pulse output
ET
F_TIME
Elapsed time
T#0 ms
8-109
Fail-Safe Blocks
Error Handling
In the event of an error that is critical to safety, the system function SFC F_CTRL
is called. This records the event in the Diagnostic Buffer and requests a switch to
the reserve CPU if the error occurred only on the master CPU. For non-redundant
systems or a common-cause error occurring in both CPUs, the shutdown logic can
be configured to either disable the erred F-run-time group or the entire Safety
Program.
Error in the safety data format of the inputs PT and IN and the
output ET (error due to online modification of the Safety Program
or internal CPU fault)
See Also
Fail-Safe User Times
8-110
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
8.11
Pulse Blocks
8.11.1
Block
Description
F_F_TRIG
F_R_TRIG
F_LIM_TI
F_F_TRIG
Function
The block checks the input variable for the occurrence of a falling edge and indicates at
the output whether an edge has been detected. At a falling edge of the input pulse CLK,
the output Q is set to 1 until the next call of the block.
Timing Diagram
CLK
Startup Characteristics
In the first cycle after a cold or warm restart or in the case of a first call, no edge is
detected.
I/Os
Name
Data Type
Explanation
Default
Input:
CLK
F_BOOL
Input pulse
Output:
F_BOOL
Output pulse
Fail-Safe Systems
A5E00085588-03
8-111
Fail-Safe Blocks
Error Handling
None
8.11.2
F_R_TRIG
Function
The block checks the input variable for the occurrence of a rising edge and
indicates at the output whether an edge has been detected. At a rising edge of the
input pulse CLK, the output Q is set to 1 until the next call of the block.
Timing Diagram
CLK
Startup Characteristics
If the input CLK has a value of 1 in the first cycle after a cold or warm restart, a
rising edge is detected and the output Q is set to 1 until the next call of the block.
I/Os
Name
Data Type
Explanation
Default
Input:
CLK
F_BOOL
Input pulse
Output:
F_BOOL
Output pulse
Error Handling
None
8-112
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
8.11.3
F_LIM_TI
Function
This block compares the input variables IN, MAX and MIN. It checks whether IN is
within or outside the interval between MIN and MAX. If the lower limit (MIN) of the
interval is greater than or equal to the upper limit (MAX), the output OUT = MAX
and the outputs OUTU and OUTL are set to 1. If IN is > MAX, the upper limit has
been violated, OUT = MAX, OUTU = 1 and OUTL = 0. If IN is < MIN, the lower limit
has been violated, OUT = MIN, OUTU = 0 and OUTL = 1. If IN is between MIN and
MAX, OUT = IN, OUTU = 0 and OUTL = 0 are set.
I/Os
Name
Inputs:
Outputs:
Data Type
Explanation
Default
IN
F_TIME
Input variable
T#0 ms
MIN
F_TIME
Lower limit
T#0 ms
MAX
F_TIME
Upper limit
OUT
F_TIME
Output variable
T#0 ms
OUTU
F_BOOL
OUTL
F_BOOL
Error Handling
None
Fail-Safe Systems
A5E00085588-03
8-113
Fail-Safe Blocks
8.12
8.12.1
Description
F_LIM_I
F_LIM_I
Function
This block compares the input variables IN, MAX and MIN. It checks whether IN is
within or outside the interval between MIN and MAX. If the lower limit (MIN) of the
interval is greater than or equal to the upper limit (MAX), the output OUT = MAX
and the outputs OUTU and OUTL are set to 1. If IN is > MAX, the upper limit has
been violated, OUT = MAX, OUTU = 1 and OUTL = 0. If IN is < MIN, the lower limit
has been violated, OUT = MIN, OUTU = 0 and OUTL = 1. If IN is between MIN and
MAX, OUT = IN, OUTU = 0 and OUTL = 0 are set.
I/Os
Name
Inputs:
Outputs:
Data Type
Explanation
Default
IN
F_INT
Input variable
MIN
F_INT
Lower limit
-32768
MAX
F_INT
Upper limit
32767
OUT
F_INT
Output variable
OUTU
F_BOOL
OUTL
F_BOOL
Error Handling
None
8-114
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
8.13
8.13.1
Description
F_ADD_R
F_SUB_R
F_MUL_R
F_DIV_R
F_ABS_R
F_MAX3_R
F_MID3_R
F_MIN3_R
F_LIM_R
F_SQRT
F_AVEX_R
F_SMP_AV
F_ADD_R
Function
This block adds the inputs and outputs the sum at the output.
OUT = IN1 + IN2
I/Os
Inputs:
Output:
Name
Data Type
Explanation
Default
IN1
F_REAL
Addend 1
0.0
IN2
F_REAL
Addend 2
0.0
OUT
F_REAL
Sum
0.0
Error Handling
If the operation generates an invalid REAL number the event will be recorded in
the Diagnostic Buffer.
Fail-Safe Systems
A5E00085588-03
8-115
Fail-Safe Blocks
8.13.2
Description
75D9H
F_SUB_R
Function
This block subtracts the input IN2 from the input IN1 and outputs the difference at
the output.
OUT = IN1 IN2
I/Os
Name
Inputs:
Output:
Data Type
Explanation
Default
IN1
F_REAL
Minuend
0.0
IN2
F_REAL
Subtrahend
0.0
OUT
F_REAL
Difference
0.0
Error Handling
If the operation generates an invalid REAL number the event will be recorded in
the Diagnostic Buffer.
8-116
Description
75D9H
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
8.13.3
F_MUL_R
Function
This block multiplies the inputs and outputs the product at the output.
OUT = IN1 * IN2
I/Os
Inputs:
Output:
Name
Data Type
Explanation
Default
IN1
F_REAL
Multiplicand
0.0
IN2
F_REAL
Multiplier
0.0
OUT
F_REAL
Product
0.0
Error Handling
If the operation generates an invalid REAL number the event will be recorded in
the Diagnostic Buffer.
Description
75D9H
Fail-Safe Systems
A5E00085588-03
8-117
Fail-Safe Blocks
8.13.4
F_DIV_R
Function
This block divides the input IN1 by the input IN2 and outputs the quotient at the
output.
OUT = IN1 / IN2
I/Os
Inputs:
Output:
Name
Data Type
Explanation
Default
IN1
F_REAL
Dividend
0.0
IN2
F_REAL
Divisor
1.0
OUT
F_REAL
Quotient
0.0
Error Handling
If the operation generates an invalid REAL number the event will be recorded in
the Diagnostic Buffer.
Description
75D9H
Note
Use the F block F_LIM_R to prevent errors as a result of division by 0.
8-118
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
8.13.5
F_ABS_R
Function
This block outputs the absolute value (amount) of the input at the output.
OUT = | IN |
I/Os
Name
Data Type
Explanation
Default
Input:
IN
F_REAL
Input value
0.0
Output:
OUT
F_REAL
Absolute value
0.0
Error Handling
None
Fail-Safe Systems
A5E00085588-03
8-119
Fail-Safe Blocks
8.13.6
F_MAX3_R
Function
This block compares three inputs and then outputs the maximum value at the
output. All the inputs are preset with a value of -3,402823e+38 (largest negative
REAL number), so that even a maximum value can be formed from only two
inputs.
OUT = MAX {IN1, IN2 , IN3}
I/Os
Inputs:
Output:
Name
Data Type
Explanation
Default
IN1
F_REAL
Input variable 1
-3.402823e+38
IN2
F_REAL
Input variable 2
-3.402823e+38
IN3
F_REAL
Input variable 3
-3.402823e+38
OUT
F_REAL
Maximum value
-3.402823e+38
Error Handling
If the operation generates an invalid REAL number the event will be recorded in
the Diagnostic Buffer.
8-120
Description
75D9H
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
8.13.7
F_MID3_R
Function
This block compares three inputs and then outputs the median value at the output.
OUT = mean value {IN1, IN2, IN3}
I/Os
Inputs:
Output:
Name
Data Type
Explanation
Default
IN1
F_REAL
Input variable 1
0.0
IN2
F_REAL
Input variable 2
0.0
IN3
F_REAL
Input variable 3
0.0
OUT
F_REAL
Mean value
0.0
Error Handling
If the operation generates an invalid REAL number the event will be recorded in
the Diagnostic Buffer.
Description
75D9H
Fail-Safe Systems
A5E00085588-03
8-121
Fail-Safe Blocks
8.13.8
F_MIN3_R
Function
This block compares three inputs and then outputs the minimum value at the
output. All the inputs are preset with a value of 3,402823e+38 (largest positive
REAL number), so that even a minimum value can be formed from only two inputs.
OUT = MIN {IN1, IN2, IN3}
I/Os
Inputs:
Output:
Name
Data Type
Explanation
Default
IN1
F_REAL
Input variable 1
3.402823e+38
IN2
F_REAL
Input variable 2
3.402823e+38
IN3
F_REAL
Input variable 3
3.402823e+38
OUT
F_REAL
Minimum value
3.402823e+38
Error Handling
If the operation generates an invalid REAL number the event will be recorded in
the Diagnostic Buffer.
8-122
Description
75D9H
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
8.13.9
F_LIM_R
Function
This block compares the input variables IN, MAX and MIN. It checks whether IN is
within or outside the interval between MIN and MAX. If the lower limit (MIN) of the
interval is greater than or equal to the upper limit (MAX), the output OUT = MAX
and the outputs OUTU and OUTL are set to 1. If IN is > MAX or IN represents a
positive overflow, the upper limit has been violated, OUT = MAX, OUTU = 1 and
OUTL = 0. If IN is < MIN or IN represents a negative overflow, the lower limit has
been violated, OUT = MIN, OUTU = 0 and OUTL = 1. If IN is between MIN and
MAX, OUT = IN, OUTU = 0 and OUTL = 0 are set.
If the input variable (IN) contains an invalid REAL number, the Substitute Input
(SUBS_IN) will be passed directly to the output (OUT) and both OUTH=1 and
OUTL=1.
I/Os
Inputs:
Outputs:
Name
Data Type
Explanation
Default
IN
F_REAL
Input variable
0.0
MIN
F_REAL
Lower limit
-100.0
MAX
F_REAL
Upper limit
100.0
SUBS_IN
F_REAL
Substitute Input
0.0
OUT
F_REAL
Output variable
0.0
OUTU
F_BOOL
OUTL
F_BOOL
Error Handling
In the event of an error that is critical to safety, the system function SFC F_CTRL is
called. This records the event in the Diagnostic Buffer and requests a switch to the
reserve CPU if the error occurred only on the master CPU. For non-redundant
systems or a common-cause error occurring in both CPUs, the shutdown logic can
be configured to either disable the erred F-run-time group or the entire Safety
Program.
Description
75D9H
75DAH
Error in the safety data format of the inputs IN, MIN, MAX,
SUBS_IN.
Fail-Safe Systems
A5E00085588-03
8-123
Fail-Safe Blocks
8.13.10 F_SQRT
Function
This block calculates the square root of the input and then outputs it at the output.
OUT =
IN
I/Os
Name
Data Type
Explanation
Default
Input:
IN
F_REAL
Radicand
0.0
Output:
OUT
F_REAL
Root
0.0
Error Handling
If the operation generates an invalid REAL number the event will be recorded in
the Diagnostic Buffer.
8-124
Description
75D9H
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
8.13.11 F_AVEX_R
Function
This block calculates the mean value from a maximum of nine inputs and then
outputs the result at the output. Inputs without a set validity bit are not included in
the mean value calculation. At least MIN inputs must be valid, otherwise the output
VALIDOUT will be reset.
I/Os
Name
Inputs:
Outputs:
Fail-Safe Systems
A5E00085588-03
Data Type
Explanation
Default
IN1
F_REAL
Input variable 1
0.0
IN2
F_REAL
Input variable 2
0.0
IN3
F_REAL
Input variable 3
0.0
IN4
F_REAL
Input variable 4
0.0
IN5
F_REAL
Input variable 5
0.0
IN6
F_REAL
Input variable 6
0.0
IN7
F_REAL
Input variable 7
0.0
IN8
F_REAL
Input variable 8
0.0
IN9
F_REAL
Input variable 9
0.0
VALIDIN1
F_BOOL
IN1 valid
VALIDIN2
F_BOOL
IN2 valid
VALIDIN3
F_BOOL
IN3 valid
VALIDIN4
F_BOOL
IN4 valid
VALIDIN5
F_BOOL
IN5 valid
VALIDIN6
F_BOOL
IN6 valid
VALIDIN7
F_BOOL
IN7 valid
VALIDIN8
F_BOOL
IN8 valid
VALIDIN9
F_BOOL
IN9 valid
MIN
F_INT
OUT
F_REAL
Mean value
0.0
VALIDOUT
F_BOOL
8-125
Fail-Safe Blocks
Error Handling
If the operation generates an invalid REAL number the event will be recorded in
the Diagnostic Buffer.
In the event of an error that is critical to safety, the system function SFC F_CTRL
is called. This records the event in the Diagnostic Buffer and requests a switch to
the reserve CPU if the error occurred only on the master CPU. For non-redundant
systems or a common-cause error occurring in both CPUs, the shutdown logic can
be configured to either disable the erred F-run-time group or the entire Safety
Program.
8-126
Description
75D9H
75DAH
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
8.13.12 F_SMP_AV
Function
This block outputs the mean value of the last N input values at the output.
OUT = (INk+INk-1+ ... +INk-N+1) / N
INk is the current input value.
The number N of input values must fulfill the condition 0 < N < 33.
I/Os
Inputs:
Outputs:
Name
Data Type
Explanation
Default
IN
F_REAL
Input variable
0.0
F_INT
OUT
F_REAL
Mean value
0.0
Startup Characteristics
As long as N input values have not been read in after a cold or warm restart or in
the case of a first call, only the available input values (< N) are taken into account
for mean value formation. Input values saved before the startup are not taken into
account.
Error Handling
If the condition 0 < N < 33 is not fulfilled, OUT = INk is set.
If the operation generates an invalid REAL number the event will be recorded in
the Diagnostic Buffer.
In the event of an error that is critical to safety, the system function SFC F_CTRL
is called. This records the event in the Diagnostic Buffer and requests a switch to
the reserve CPU if the error occurred only on the master CPU. For non-redundant
systems or a common-cause error occurring in both CPUs, the shutdown logic can
be configured to either disable the erred F-run-time group or the entire Safety
Program.
Description
75DAH
75D9H
Fail-Safe Systems
A5E00085588-03
8-127
Fail-Safe Blocks
8.14
Multiplex Blocks
8.14.1
Block
Description
F_MUX2_R
F_MUX2_R
Function
This block outputs one of the inputs IN0 or IN1, depending on the selection input K,
at the output OUT:
K = 0: OUT = IN0
K = 1: OUT = IN1
I/Os
Inputs:
Output:
Name
Data Type
Explanation
Default
F_BOOL
Selection input
IN0
F_REAL
Value 1
0.0
IN1
F_REAL
Value 2
0.0
OUT
F_REAL
Output
0.0
Error Handling
In the event of an error that is critical to safety, the system function SFC F_CTRL
is called. This records the event in the Diagnostic Buffer and requests a switch to
the reserve CPU if the error occurred only on the master CPU. For non-redundant
systems or a common-cause error occurring in both CPUs, the shutdown logic can
be configured to either disable the erred F-run-time group or the entire Safety
Program.
8-128
Description
75DAH
Error in the safety data format of the input K (error due to online
modification of the Safety Program or internal CPU fault)
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
8.15
Error Handling
Safety-Relevant Errors
If safety-relevant errors are detected in fail-safe blocks, the system function SFC
F_CTRL is called. SFC F_CTRL records the event in the Diagnostic Buffer and
requests a switch to the reserve CPU if the error only occurred on the master CPU.
The shutdown logic should be configuration for partial or full shutdown to handle
features in non-redundant systems or common cause faults on redundant systems
(both CPUs encounter a fault at the same time).
The data block number of the fail-safe block that triggered the error.
The error codes and their causes are described for each of the fail-safe blocks.
See Also
Error Information at the Outputs of the Driver Blocks
Error Information at the Output RETVAL
Fail-Safe Systems
A5E00085588-03
8-129
Fail-Safe Blocks
8.15.1
TIMEOUT errors
The module has not received a new frame from the CPU or has not
responded to it within the configured monitoring time (TIMEOUT).
Channel faults reported by the F-I/Os (ET 200M: only if the "Group Diagnosis"
parameter is set).
Error Reaction
F channel drivers for digital input modules output the substitute value 0 at the
outputs.
F channel drivers for analog input modules output at the outputs the substitute
value or the last valid value, depending on the parameterization.
F channel drivers for digital output modules output the substitute value 0 to the
module instead of the process values.
Note
The output of simulation values has priority over the output of substitute values in
the case of input modules.
8-130
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
Error Signaling
The following block outputs are activated:
QUALITY at the F_CH_xx F channel drivers: quality code of the process value
per channel
QBAD at the F_CH_xx F channel drivers: The output is set if substitute values
are output.
You can find an overview of diagnostic messages and possible remedies in the
section entitled "Error Information at the Outputs of the Driver Blocks".
The error codes and their causes are described for each of the fail-safe blocks.
See Also
Error Information at the Outputs of the Driver Blocks
Fail-Safe Systems
A5E00085588-03
8-131
Fail-Safe Blocks
8.15.2
Output
Cause
DIAG_n
Remedies
Byte 0
Bit 2: CRC value/watchdog error on SMn Compare the CRC_IMPx parameter with
the corresponding CRC check sum
parameters from HWCONFIG
Download the configuration from
HWCONFIG, compile the changes to the
Safety Program , download them again,
and carry out a cold restart.
Switch the voltage off and on at the F-I/O
Check the PROFIBUS connection between
the CPU and F-I/O
Read out the module diagnosis
Bit 3: Reserved
8-132
Bit 7: Reserved
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
Output
Cause
Remedies
Output
Cause
Remedies
...
Check sensor
...
...
Note
In byte 0 of DIAG_1/2, the most recent error information remains stored until a new
error occurs, even if the error has already gone.
Fail-Safe Systems
A5E00085588-03
8-133
Fail-Safe Blocks
8.15.3
Remedies
This event contains the Instance DB
number of the function block that
encountered this invalid calculation. Use
the DB number to identify the function
block within the project that has this
failure.
1.
2.
Remedies
8-134
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
72DBH
Remedies
Shutdown of Failsafe Runtime Group Activated Reported from Shutdown Logic F_SHUTDN
Error Code (W#16#...) Cause
75DDH
Remedies
-and-or
Fail-Safe Systems
A5E00085588-03
8-135
Fail-Safe Blocks
Remedies
@F_ShutDn.
-and-
Full Shutdown of Entire Safety Program Deactivated Reported from Shutdown Logic F_SHUTDN
Error Code (W#16#...) Cause
74DEH
Remedies
The FB F_SHUTDN has completed a reinitialization of the whole Safety Program, all Frun-time groups are enabled.
This would happen after the User causes a 0 ->
1 transition on the RESTART input of the FB
F_SHUTDN located in the CFC chart
@F_ShutDn.
Remedies
74DFH
The FB F_SHUTDN has completed a reinitialization of the Safety Program, all F-runtime groups are enabled.
You may have to Reintegrate your I/O through
the F_QUITES function block this is only
necessary if the F-run-time Group that was
shutdown contains F Module Driver blocks...
8-136
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
Remedies
Error Detected in F_PLK Program/Data Flow Control Error Before Output Blocks
Error Code (W#16#...) Cause
75E1H
Remedies
-or-
-orError Detected in F_PLK_O Program/Data Flow Control Error After Output Blocks
Error Code (W#16#...) Cause
75E1 H
Remedies
Power failure,
Remedies
-or-
-or-
Fail-Safe Systems
A5E00085588-03
8-137
Fail-Safe Blocks
Remedies
Remedies
-or-
8-138
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
Remedies
Remedies
Check
whether tests of the FError during self-test of the CPU, or Error due to
CPU
have
been switched off
online modification of the Safety Program, or
by SFC90 H_CTRL. The tests
internal CPU fault
must not be switched off.
Insure that the F-CPUs Test
Cycle Time has been set <
12h in CPUs H Parameters
properties.
-or
-or-
Fail-Safe Systems
A5E00085588-03
8-139
Fail-Safe Blocks
8.15.4
Bit
Cause
Reserved
Remedies
Read out the cause in RETVAL on the receiving side
Communication problems: see high byte
Check the connection configuration, and download it
again
Check the connecting cable
Check value error (CRC) or internal error in Check whether CRC_IMP is identical on the send and
the sender or recipient CPU or in the CP
receive sides; if not, recompile the Safety Program ,
download it to the CPU, and execute a cold restart, or
Check the connection configuration, and download it
again
Check the connecting cable
or replace the CPU or CP
Watchdog error or
internal error in the sender or recipient
CPU or in the CP
TIMEOUT error or
8-140
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
8.16
Run Times
8.16.1
5XQ7LPHVRIWKH)DLO6DIH%ORFNVLQ V
Block
Name
Block
Number
Function
Maximum Run
Time with
Dynamically
Connected Inputs
in V
Driver Blocks
F_M_AI6
F_M_DI8
F_M_DI24
F_M_DO8
F_M_DO10
F_CH_DI
FB 383
FB 384
FB 385
FB 388
FB 386
FB 377
Fail-Safe Systems
A5E00085588-03
465
520
740
814
518
570
1046
1155
847
1727
1830
789
488
542
570
1210
1598
519
51
8-141
Fail-Safe Blocks
Block
Name
Block
Number
Function
Maximum Run
Time with
Dynamically
Connected Inputs
in V
F_CH_DO
FB 378
44
F_CH_AI
FB 379
130
FB 457
5900
F_2OUT3
FB 305
F_2oo3_R
FB 456
F_ABS_R
FB 325
12
F_ADD_R
FB 321
16
F_AND4
FB 301
13
F_AVEX_R
FB 331
98
F_BO_FBO
FC 303
10
F_CTUD
FB 341
28
F_CYC_CO FB 395
280
F_DIV_R
FB 324
18
F_F_TRIG
FB 347
13
16
7650
F_FBO_BO
FC 363
F_FI_I
FC 305
F_FR_FI
FB 461
13
F_FR_R
FC 304
10
F_FTI_TI
FC 306
10
F_I_FI
FB 369
11
F_LIM_HL
FB 314
24
F_LIM_I
FB 350
21
F_LIM_LL
FB 315
24
F_LIM_R
FB 329
40
F_LIM_TI
FB 345
26
F_MAX3_R
FB 326
18
F_MID3_R
FB 327
21
F_MIN3_R
FB 328
18
F_MUL_R
FB 323
18
F_MUX2_R
FB 332
17
F_NOT
FB 304
11
F_OR4
FB 302
F_PLK
FB 396
To be supplied
F_PLK_O
FB 397
To be supplied
F_QUITES
FB 367
24
F_R_BO
FB 391
44
F_R_FR
FB 362
11
8-142
15
Fail-Safe Systems
A5E00085588-03
Fail-Safe Blocks
Block
Name
Block
Number
Function
F_R_R
FB 393
F_R_TRIG
FB 346
F_RCVBO
FB 371
1250
F_RCVR
FB 373
770
F_RS_FF
FB 307
16
F_S_BO
FB 390
12
F_S_R
FB 392
12
F_SENDBO FB 370
F_SENDR
FB 372
Maximum Run
Time with
Dynamically
Connected Inputs
in V
40
13
1320
1420
F_SHUTDN FB 458
21
F_SMP_AV
391
FB 333
F_SQRT
FB 330
58
F_SR_FF
FB 308
16
F_START
FB 394
11
F_SUB_R
FB 322
16
F_TEST
FB 398
362
F_TESTC
FB 399
445
F_TESTM
FB 400
178
F_TI_FTI
FB 368
12
F_TOF
FB 344
Timer off-delay
24
F_TON
FB 343
Timer on-delay
24
F_TP
FB 342
Timer pulse
24
F_XOR2
FB 303
13
F_XOUTY
FB 306
74
DB_INIT
FC 180
DB_RES
FC 301
FAIL_MSG
FC 181
Included in
RTG_LOGIC
RTG_LOGIC FB 459
12
11
To be supplied
Fail-Safe Systems
A5E00085588-03
8-143
Fail-Safe Blocks
8-144
Fail-Safe Systems
A5E00085588-03
Check Lists
A.1
Check List
Phase
Note
Refer to
Prerequisite: A "Safety
requirements specification"
must be available for the
planned application
Depends on the
process
Depends on the
process
Depends on the
process
Requirements placed
on the actuators
Check
Planning
DIN V 19 250
IEC 61508
Configuration
Installation of the add-on
package
Prerequisites for
installation
Selection of S7 components
Fail-Safe Systems
A5E00085588-03
A-1
Check Lists
Phase
Note
Refer to
Check
Verification of the
hardware components F-SYS: App. A.2
used on the basis of the
check list of the certified
modules
Parameter assignment of the
CPU
Password
Settings for safety
mode
Programming
Program design
Verification of the
F-SYS: App. A.3
hardware components
used on the basis of the
check list of the certified
F function blocks
Creation of the CFC charts.
Placement and
interconnection of the F
function blocks
A-2
Fail-Safe Systems
A5E00085588-03
Check Lists
Phase
Note
Refer to
F SM: Chap. 4
Check
Installation
Hardware setup
F SM: Chap. 4
F ET 200S Chap. 5 and
6
Downloading of the fail-safe
program
Fail-Safe Systems
A5E00085588-03
A-3
Check Lists
Commissioning
Switching on
Acceptance
Operation, maintenance
Operation, general
Access protection
Diagnostics
Responses to faults/errors
and events
Replacement of hardware
components
Modifications of software
components
Deinstallation, disassembly
A-4
Fail-Safe Systems
A5E00085588-03
Check Lists
A.2
Description
Order Number
SM 326; DI 8xNAMUR
6ES7 326-1RF00-0AB0
6ES7 326-1BK00-0AB0
6ES7 326-2BF00-0AB0
SM 336; AI 6x13Bit
6ES7 336-1HE00-0AB0
PM-E F 24 VDC
PROFIsafe Digital
Electronic Module
6ES7 138-4FA00-0AB0
4 F-DO 24 VDC/2 A
PROFIsafe Digital
Electronic Module
6ES7 1384FB00-0AB0
PM-D F 24 VDC
Check
F-Copy License
Downloading F blocks to an F or FH destination system is only permitted if you
have an official F-Copy License (order number: 6ES7 833 1CC00 6YX0) for this F
or FH destination system.
The F-Copy License consists of:
Two stickers to identify the CPU (or CPUs in the case of S7 FH systems) for
which the F copy license has been obtained.
S7-400F
A-5
Check Lists
Check
Are your sensors and actuators of adequate quality and suitable for
environments with polluted air and corrosive fumes?
Do you make use of the possibilities of double redundancy for sensors,
where appropriate?
Do you make use, where appropriate, of the possibilities for actuators of
reading back auxiliary contacts or process-linked sensors?
Have you set sufficiently short proof test intervals, if necessary
individually?
A-6
Fail-Safe Systems
A5E00085588-03
Check Lists
A.3
Block
Name
Number
Function
Check
Driver Blocks
F_M_AI6
FB 383
F_M_DI8
FB 384
F_M_DI24
FB 385
F_M_DO8
FB 388
F_M_DO10
FB 386
F_CH_DI
FB 377
F_CH_DO
FB 378
F_CH_AI
FB 379
FB 457
F_2OUT3
FB 305
F_2oo3_R
FB 456
F_ABS_R
FB 325
F_ADD_R
FB 321
F_AND4
FB 301
F_AVEX_R
FB 331
F_BO_FBO
FC 303
F_CTUD
FB 341
F_CYC_CO
FB 395
F_DIV_R
FB 324
F_F_TRIG
FB 347
F_FBO_BO
FC 363
F_FI_I
FC 305
F_FR_FI
FB 461
F_FR_R
FC 304
F_FTI_TI
FC 306
F_I_FI
FB 369
F_LIM_HL
FB 314
Fail-Safe Systems
A5E00085588-03
A-7
Check Lists
A-8
Block
Block
Name
Number
Function
F_LIM_I
FB 350
F_LIM_LL
FB 315
F_LIM_R
FB 329
F_LIM_TI
FB 345
F_MAX3_R
FB 326
F_MID3_R
FB 327
F_MIN3_R
FB 328
F_MUL_R
FB 323
Check
F_MUX2_R
FB 332
F_NOT
FB 304
F_OR4
FB 302
F_PLK
FB 396
F_PLK_O
FB 397
F_QUITES
FB 367
F_R_BO
FB 391
F_R_FR
FB 362
F_R_R
FB 393
F_R_TRIG
FB 346
F_RCVBO
FB 371
F_RCVR
FB 373
F_RS_FF
FB 307
F_S_BO
FB 390
F_S_R
FB 392
F_SENDBO
FB 370
F_SENDR
FB 372
F_SHUTDN*
FB 458
F_SMP_AV
FB 333
F_SQRT
FB 330
F_SR_FF
FB 308
F_START
FB 394
F_SUB_R
FB 322
F_TEST
FB 398
F_TESTC
FB 399
Check Lists
Block
Block
Name
Number
F_TESTM
FB 400
Function
Check
F_TI_FTI
FB 368
F_TOF
FB 344
Timer off-delay
F_TON
FB 343
Timer on-delay
F_TP
FB 342
Timer pulse
F_XOR2
FB 303
F_XOUTY
FB 306
DB_INIT*
FC 180
DB_RES*
FC 301
FAIL_MSG*
FC 181
RTG_LOGIC*
FB 459
* Even though these blocks arent yellow, they are safety critical and are placed
automatically by the CFC editor. The user may not place or remove these blocks.
Changes are not permitted except for connections to the F_SHUTDN block (see
the F_SHUTDN block description in the Fail-Safe Block section for further
description).
Newly created accepted F block types can be added to the list of certified F-Blocks.
Fail-Safe Systems
A5E00085588-03
A-9
Check Lists
A.4
Type
Safety Parameter
Value
<Call of the F
driver block>
F_M_DI8,
LADDR
F_M_DI24,
F_M_AI6,
LADDR_R
TIMEOUT, etc.
F_M_DO10, or
Check
F_M_D08
Example
F Driver
Type
Safety Parameter
Value
Check
F/1
F_M_DI8
TIMEOUT
1000
LADDR
24
LADDR_R
TIMEOUT
2000
LADDR
16
LADDR_R
F/4
A-10
F_M_DI24
Fail-Safe Systems
A5E00085588-03
References
1. S7-300 Programmable Controller, Fail-Safe Signal Modules
2. S7-400, M7-400 Programmable Controllers, Installation Manual
3. S7-400, M7-400 Programmable Controllers, Reference Manual
4. S7-400H Programmable Controller, Fault-Tolerant Systems
5. S7-300 Programmable Controllers, Hardware and Installation
6. S7-300 Programmable Controllers, Reference Manual
7. ET 200M Distributed I/O Device
8. ET 200S Distributed I/O System Fail-Safe Modules
9. STEP 7 manuals
10. PCS 7 manuals
11. CFC manuals
12. Testing S7 Programs with S7-PLCSIM
You can find manuals 2 to 8 in the "SIMATIC Electronic Manuals" collection on CD
ROM. Manuals 9 to 12 are included with the products in electronic form. Some of
them can be obtained by choosing the Start > Simatic > Documentation >
English menu command.
You can download all the manuals from the Internet at:
http://www.ad.siemens.de/simatic-cs
Fail-Safe Systems
A5E00085558-03
B-1
References
B-2
Fail-Safe Systems
A5E00085558-03
Glossary
1oo1 evaluation
1oo2 evaluation
A
Acceptable risk
AK requirement classes
C
Channel fault
D
Dark period
Dark periods occur during switch-off tests and complete bit pattern tests.
This involves test-related 0 signals being switched to the output by the
fail-safe output module while the output is active. The output is then
switched off briefly (dark period). A sufficiently slow actuator does not
respond to this and remains switched on.
Interval between online tests that detect faults in a fail-safe system with a
specific diagnostic coverage level.
Fail-Safe Systems
A5E00085588-03
Glossary-1
Glossary
1oo1 evaluation
Discrepancy analysis
Discrepancy Time
E
ES
Engineering system
F
F
F-Copy License
F CPU
F cycle time
F-Data Types
F-FBs
F-I/Os
F program
F-run-time groups
F-SMs
F-Systems
Fail-safe systems
Fail-safe
Fail-safe systems
Glossary-2
Fail-Safe Systems
A5E00085588-03
Glossary
1oo1 evaluation
F-capable CPU
I
I&C
Internal fault
L
Light period
Light periods occur during complete bit pattern tests. This involves testrelated 1 signals being switched to the output by the fail-safe output
module while the output is inactive (output signal "0"). The output is then
switched on briefly (light period). A sufficiently slow actuator will not
respond to this and remains switched off.
M
Module fault
Module redundancy
O
OS
Operator station
P
Passivation
PROFIsafe
The period of time after which a component must be put into an error-free
state (i.e. replaced by an unused component or demonstrated to be
completely error-free).
Fail-Safe Systems
A5E00085588-03
Glossary-3
Glossary
1oo1 evaluation
R
Redundancy, AvailabilityEnhancing
Redundancy, SafetyEnhancing
S
Safety Program
Safe state
Safety
Safety is a state in which the risk is not higher than the acceptable risk.
Safety frame
Safety function
Safety level between 4 and 1 in accordance with IEC 61508 and prEN
50129. The higher the safety integrity level, the more comprehensive are
the measures to avoid systematic errors and control systematic errors
and hardware failures.
Safety mode
Safety note
Glossary-4
Fail-Safe Systems
A5E00085588-03
Glossary
1oo1 evaluation
Safety system
A system (including all devices, units and safety circuits) that protects
people and the system. This particularly includes systems for flame
control, the interruption of fuel infeed and the ventilation of combustion
chambers.
If this is achieved with multi-channel systems, the safety system consists
of all the channels and monitoring equipment that contribute to safety.
Safety-related
-> Fail-safe
Sensor Evaluation
SIL
Standard mode
Fail-Safe Systems
A5E00085588-03
Glossary-5
Glossary
Glossary-6
Fail-Safe Systems
A5E00085588-03
Index
A
Acceptance of an F system ..........................7-14
Acceptance of Changes to the
Safety Program ........................................7-20
Acceptance of F block types ........................7-22
Access protection ...........................................3-8
Access rights
setting up....................................................4-7
Access rights for the CPU ..............................4-7
ACK_NEC ...........................................5-25, 5-26
Address area..................................................4-1
Allocating addresses ....................................5-16
Arithmetic Blocks with the INT Data Type ..8-114
Arithmetic Blocks with the REAL Data
Type .......................................................8-115
Assigning parameters to F blocks ................5-12
Assigning parameters to the CPU ..................4-3
Authorization ................................................1-12
Automatically Inserted F Blocks ...................5-11
B
Binary selection ...................................8-89, 8-91
Block I/Os................................................8-4, 8-5
Block Numbers ...............................................8-6
Blocks for converting data between
the standard and safety sections..............8-35
Blocks for F Communication Between
CPUs ........................................................8-25
Blocks of the Safety Program .........................5-2
C
Certification ....................................................7-2
CFC charts
inserting......................................................5-8
Changing a Safety Program .........................5-39
Changing fail-safe constants in CFC test mode562
Changing the Safety Program ........................6-3
Changing the Safety Program in
RUN Mode................................................5-49
Check list of F blocks .................................... A-7
Check list of the hardware components ........ A-5
Check List of the Safety Parameters
of the F Drivers........................................ A-10
Cold restart............................................3-4, 5-28
Command tests ..............................................3-5
Common features of the driver blocks..........8-22
Fail-Safe Systems
A5E00085588-03
D
DATA component .......................................... 8-2
Data exchange between the Safety
Program and the standard user program . 3-10
DB_INIT ....................................................... 8-81
DB_RES ...................................................... 8-80
Defining the program structure ...................... 5-7
Disassembly .................................................. 6-5
Discrepancy analysis in the case
of module redundancy ............................. 8-22
Displaying Information ................................. 5-65
Disposal......................................................... 6-5
Downloading an Safety Program ................. 5-47
Downloading changes ................................. 5-47
Downloading Changes................................. 5-54
Downloading in RUN mode ......................... 5-47
Downloading the Entire Safety Program ...... 5-48
Downloading the Safety Program after
simulation................................................. 5-57
Downloading the user program.................... 5-47
Index-1
Index
E
Error Handling............................................ 8-129
Error Handling of Driver Blocks.................. 8-130
Error information at the output RETVAL .... 8-140
Error information in ACCU 1 after
CPU STOP............................................. 8-134
Error messages and remedies................... 8-132
Example of reintegration after startup
of the Safety Program .............................. 5-29
Exclusive OR logic operation ....................... 8-88
F
F block names ............................................. 5-10
F block types
acceptance .............................................. 7-22
F control blocks.............................................. 5-2
F Control Blocks........................................... 8-55
F conversion blocks ..................................... 5-36
F cycle time........................................... 3-6, 5-30
F cycle time monitoring .................................. 5-9
F data types .......................................... 5-12, 8-2
F run-time groups........................................... 5-9
F run-time license ..........................................A-5
F simulation blocks ............................... 5-2, 5-57
F System
monitoring errors...................................... 2-12
F System Blocks .......................................... 8-47
F user blocks ................................................. 5-2
F_1oo2_R .................................................... 8-99
F_2oo3_R .................................................... 8-97
F_2OUT3 ..................................................... 8-89
F_ABS_R................................................... 8-119
F_ADD_R .................................................. 8-115
F_AND4AND logic operation ....................... 8-85
F_AVEX_R................................................. 8-125
F_BO_FBO ................................5-36, 5-37, 8-36
F_CH_AI ..................5-18, 5-21, 8-18, 8-19, 8-21
F_CH_DI....................................5-18, 5-21, 8-10
F_CH_DO .........................5-16, 5-18, 5-21, 8-13
F_CTUD..................................................... 8-103
F_CYC_CO......................................... 5-30, 8-56
F_DIV_R .................................................... 8-118
F_F_TRIG .................................................. 8-111
F_FBO_BO ................................5-36, 5-37, 8-40
F_FI_I ........................................5-36, 5-37, 8-41
F_FR_FI....................................................... 8-43
F_FR_R .....................................5-36, 5-37, 8-42
F_FTI_TI ....................................5-36, 5-37, 8-44
F_I_FI .......................................................... 8-37
F_LIM_HL .................................................... 8-92
F_LIM_I...................................................... 8-114
F_LIM_LL..................................................... 8-94
F_LIM_R .................................................... 8-123
F_LIM_TI.................................................... 8-113
F_M_AI6 ...................................................... 8-68
Index-2
F_M_DI24.....................................................8-61
F_M_DI8.......................................................8-58
F_M_DO10...................................................8-66
F_M_DO8.....................................................8-64
F_MAX3_R.................................................8-120
F_MID3_R ..................................................8-121
F_MIN3_R ..................................................8-122
F_MUL_R ...................................................8-117
F_MUX2_R.................................................8-128
F_NOT..........................................................8-89
F_OR4..........................................................8-87
F_PLK ..........................................................8-70
F_PLK_O......................................................8-71
F_QUITES....................................................8-45
F_R_BO ............................................. 5-34, 8-49
F_R_FR..................................... 5-36, 5-37, 8-38
F_R_R ................................................ 5-34, 8-52
F_R_TRIG ..................................................8-112
F_RCVBO .......................................... 5-32, 8-29
F_RCVR ............................................. 5-32, 8-33
F_RS_FF....................................................8-100
F_S_BO.............................................. 5-34, 8-48
F_S_R ................................................ 5-34, 8-51
F_SENDBO ........................................ 5-32, 8-27
F_SENDR........................................... 5-32, 8-31
F_SHUTDN ...................... 8-72, 8-74, 8-75, 8-76
F_SMP_AV.................................................8-127
F_SQRT .....................................................8-124
F_SR_FF....................................................8-102
F_START ........................................... 5-28, 8-54
F_SUB_R ...................................................8-116
F_TEST ........................................................8-77
F_TESTC .....................................................8-78
F_TESTM .....................................................8-79
F_TI_FTI.......................................................8-39
F_TOF ........................................................8-109
F_TON........................................................8-107
F_TP...........................................................8-105
F_XOR2 .......................................................8-88
F_XOUTY.....................................................8-91
FAIL_MSG....................................................8-82
Fail-Safe Blocks .............................................8-1
Fail-safe systems ................................... 1-2, 3-8
access protection .......................................3-8
Fail-safe user program .................................1-10
Fail-safe user times ........................................3-7
Fault-tolerant F system
creating a fail-safe user program ..............2-16
monitoring errors ......................................2-17
setting up the hardware ............................2-13
Fault-tolerant systems ....................................5-7
F-capable CPU...............................................1-8
F-I/Os ..................................................... 1-8, 1-9
Flipflop Blocks ............................................8-100
Functioning of the fail-safe systems ...............3-1
G
Getting Started ...............................................2-1
Group diagnosis .............................................4-5
Fail-Safe Systems
A5E00085588-03
Index
H
Hardware components ............................1-8, 1-9
Hierarchical charts..........................................5-8
HOLD
operating mode ..........................................3-4
How to work with the Safety Program ............6-2
I
IEC pulse and counter blocks.....................8-103
Inclusion in cyclic interrupt OB .....................8-22
Initial acceptance of a Safety Program.........7-15
Inserting F blocks .........................................5-10
Inserting run-time groups ...............................5-9
Installing the optional package .....................1-11
Interconnecting F blocks ..............................5-12
Interconnecting F cycle time monitoring .......5-30
Interconnecting F driver blocks ....................5-16
L
Life Cycle of the Fail-Safe Programmable
Controllers ................................................. A-1
Limit violation ......................................8-92, 8-93
Live monitoring...............................................3-6
Logging the Safety Program.........................5-76
Logic Blocks with the BOOL Data Type .......8-85
Logical program execution and data flow
monitoring ..................................................3-5
Lower limit violation ......................................8-94
M
Maintenance of the F systems .......................6-1
Memory card ................................................5-47
Messages
configuring................................................5-23
Module redundancy......................................8-22
Monitoring of safety-related communication
between CPUs .........................................7-12
Monitoring of Safety-Related Communication
Between F Run-Time Groups...................7-13
Monitoring Safety-Related Communication
Between F CPU and F-I/Os via
PROFIsafe ...............................................7-11
Monitoring the F Cycle Time ........................7-10
Monitoring times ......................................7-8, 7-9
Multiplex Blocks .........................................8-128
O
Operating modes............................................3-4
Operation in frequent requirement or
continuous mode ........................................7-4
Operation in low requirement mode ...............7-4
Optional package
installing ..........................................1-11, 1-13
OR logic operation........................................8-87
Fail-Safe Systems
A5E00085588-03
Overview........................................................ 4-1
Overview of fault control measures................ 3-3
P
Parameter assignment of F-I/Os.................... 4-4
Passivating fail-safe output modules ............. 6-5
Passivation ................................ 5-24, 5-25, 5-26
Password ....................................... 3-8, 4-3, 5-47
Performance enhancement ........................... 5-7
Placing and interconnecting F blocks ..... 5-4, 5-5
Plausibility check .................................. 6-3, 8-35
Plausibility checking..................................... 5-36
PLCSim ...................5-57, 5-58, 5-59, 5-60, 5-61
Preventative maintenance (proof test) ........... 6-4
Printing the Safety Program......................... 5-77
Product overview ........................................... 1-4
PROFIsafe nodes .......................................... 6-1
Programming communication between
F and standard user programs................. 5-36
Programming communication between
F run-time groups .................................... 5-34
Programming communication between
Safety Program s on different CPUs........ 5-31
Programming device functions in STEP 7 ..... 4-7
Proof test ....................................................... 6-5
Pulse Blocks .............................................. 8-111
Q
Qualifications ............................................... 7-22
R
Receiving
F_BOOL data........................................... 8-29
F_REAL data ........................................... 8-33
Redundant F signal modules
configuring ................................................. 4-6
References .................................................... B-1
Reintegration ............................. 5-25, 5-26, 5-27
Repair ............................................................ 6-4
Replacing hardware components .................. 6-4
Replacing software components.................... 6-4
Requirements
installation................................................ 1-11
Response time............................................... 7-8
Response to cold restart.............................. 5-28
Responsibilities............................................ 7-22
Responsibilities and qualifications ............... 7-22
Restart protection ................................. 3-4, 5-28
Risk chart....................................................... 7-4
Risk parameters...................................... 7-4, 7-5
RTG_LOGIC ................................................ 8-83
Rules for CFC charts ..................................... 5-8
Rules for changing the Safety Program ......... 6-3
Rules for communication between
F run-time groups .................................... 5-34
Rules for compilation ................................... 5-43
Rules for downloading ................................. 5-47
Index-3
Index
S
S7 F Systems optional package .................. 1-10
S7-400FH
both CPUs master at the same time .......... 6-1
fiber-optic cables between
synchronization modules ....................... 6-1
Safe state....................................................... 3-3
Safety certification.......................................... 7-1
Safety data format.......................................... 8-2
Safety function ............................................... 1-1
Safety Integrity Level .............................. 1-1, 7-5
Safety level ............................................. 1-1, 7-4
Safety mechanisms........................................ 3-1
Safety mode................................................... 3-2
Safety mode of the F-I/Os.............................. 3-2
Safety mode of the Safety Program ............... 3-2
Safety program ............................................ 1-10
Safety Program ............................................ 1-10
testing ...................................................... 5-56
Safety Program
compiling.................................................. 5-43
Safety Program on the memory card ........... 5-47
Safety Program s
managing ................................................. 5-39
Safety requirements....................................... 7-4
Safety-Related Communication ..................... 3-9
Safety-related communication between
CPUs ....................................................... 3-12
Safety-related parameters ........................... 7-17
Save reference data..................................... 5-66
Self-tests........................................................ 3-5
Sending
F_BOOL data........................................... 8-27
F_REAL data ........................................... 8-31
Setting up Access Rights for the CPU ........... 4-8
Setting up the hardware................................. 2-4
SFC F_CTRL ............................................... 8-84
Index-4
T
Testing offline ...............................................5-57
Testing the Safety Program..........................5-56
Time-based program execution monitoring ....3-6
U
Uninstallation of the S7-400F/FH ...................6-5
User acknowledgment ............... 5-25, 5-26, 5-27
User times
inaccuracy ..................................................3-7
V
Version management system .......................7-14
W
Warm restart...................................................3-4
Working with F-Systems...............................1-19
Fail-Safe Systems
A5E00085588-03