Programming safety functions
Standard-compliant with support from 'Softema'
The DIN EN ISO 13849-1 and DIN EN 62061 standards define requirements for the software development of safety functions, among other things. However, many people are unclear about how to implement these new requirements in detail. The upcoming 'Softema' tool is intended to provide support here.
Safety development in accordance with the standards DIN EN ISO 13849-1 and DIN EN 62061 should help to avoid dangerous systematic errors in the application software for a machine. The problem with this is that the presentation of requirements in a standard is naturally very general. To make matters worse, there have hardly been any published examples of implementation to date. In response to this situation, the German Social Accident Insurance (DGUV) - on the initiative of the Institute for Occupational Safety and Health (IFA) and the employers' liability insurance associations - has funded various projects.
One of these is the FP0319 project "Standard-compliant development and documentation of safety-related user software in mechanical engineering". As part of this project, Prof. Norbert Becker and his colleagues at Bonn-Rhein-Sieg University of Applied Sciences developed several specific procedures for implementing the requirements contained in the new standards for the software development of safety functions for machines and evaluated and documented them using industrial examples.
Specifically, a matrix-based form of specification and documentation of safety software was developed in the course of the project - the so-called IFA matrix method. This met with much greater acceptance in industry than the alternative methods of 'description of the application software as a state machine' or 'specification via checklists'. One reason for this may be that many companies already document and specify their security software in the form of tables.

Stronger cooperation between China and Germany
At a meeting of the Sino-German Commission on Standardization (DCKN) in Xiamen, China, representatives of VDE|DKE and China agreed to cooperate more closely - especially in the field of digitalization. A consortium is to pave the way for companies to become digital factories.
The IFA matrix method
The main characteristics of the matrix method are
- Permissible simplification and decomposition of the V-model of DIN EN ISO 13849-1 into two small V-models: one V-model is used for the software development of safety functions, the other for the development of project-specific function blocks (modules).
- Definition of documents for processing the V-models.
- Structuring the software into a pre-processing level, a control logic to be specified and a post-processing level.
- This allows the control logic to be specified using a C&E table (Cause & Effect).
- The test coverage can be completed with additional test lines in the C&E table.
- Integration of test fields in the documents.
- The specification-compliant quality of the software is monitored by the verification, code review and software validation test steps.
From the start of the project, the intention was to prepare and publish the results of the research project later in an IFA report (IFA Report 2/2016; www.dguv.de/webcode/d1023063) on this topic. In addition to the presentation of the actual development method, the target group will receive further necessary information and interpretations of normative requirements for application software. The changes to the DIN EN ISO 13849 series of standards, Part 1 and Part 2, in relation to application software are also considered - for example, the topics 'Validation of software' and 'Use of standard components'. IFA Report 2/2016 thus supplements the well-known IFA Report 2/2017 (Functional safety of machine control systems; previously BGIA Report 2/2008), which focuses more on the reliability of control hardware and the calculation of its failure probabilities.
The IFA tool Softema
To ensure efficient and quality-assured implementation of the IFA matrix method, the IFA developed a software tool called Softema. This tool manages the tables required for the IFA matrix method as well as the information required for project management, such as project description, user administration, change logs and document management. Softema can also be used to view the examples of the IFA matrix method available for download. Last but not least, the software can be used to create and edit your own projects.
Softema can open and edit one project file at a time for the specification and documentation of an application program. However, the software can be run multiple times in order to edit different projects and application programs in parallel. The corresponding project files use the file type 'Microsoft Excel workbook' (*.xlsx) and can therefore be edited either with Softema or with Microsoft Excel directly. In the latter case, all tables are freely editable; in Softema, the contents are protected by the user administration.
The following functions are initially supported by Softema:
- Tables, columns and rows can be added and customized in the project file according to the user.
- Automatic updating of tables when input data is modified.
- Formal verification of tables for missing, contradictory or duplicate entries.
- Management of employees in the project.
- Role-based user authorizations.
- Support for verification, validation and checking.
- Support for modifications.
- Specific editors for the various cell contents.
- Management of documents and changes.
- Undo/redo functions, search/replace functions.
- Specific print functions and reports.
The project planning process
The typical project planning process with Softema is as follows: For a new project, open an empty but already pre-formatted project template. After filling in the project description (table 'Project'), enter the safety functions with their properties such as PLr, operating mode, priority etc. in table 'A1 Safety functions' (see Fig. 2). The input and output signals are entered or imported in table 'A2.4 IO list', in each case with variable names and hardware/network addresses. External content can also be copied and pasted into all tables via the clipboard.
The catalog of error-preventing measures and the programming rules can be selected and adapted in table 'A3 Measures'. The list of required function blocks for the pre-processing and post-processing level is based on the safety functions, the peripheral hardware and the I/O list. These can be managed in table 'B3 Modular architecture'. With these preparations, table 'B4 Matrix C+E' can finally be filled in (see Fig. 3). This is done using the buttons for automatic updating for I/O signals and safety functions.
The actual software specification is also carried out in the 'B4 Matrix C+E' table by entering the logical linking of the signals for the switching operations to the output signals (right-hand area in Fig. 3). The latter is necessary for coding the control logic. A specialized editor helps with this linking. At this point at the latest, all available functions for formal verification of the tables mentioned should have been used in order to detect and correct omissions, duplicates and contradictions.
Once all input documents and the specification described above have been verified, the program can be coded. The code is also verified. This process is documented in detail in various tables and summarized in table 'C1 Codereview'. The program is then validated, which is also documented individually in various tables and summarized in table 'D1 Validation' (see Figure 4). Persons who subsequently check the project can also document and comment on their activities.
If the safety functions or I/O signals are modified, the changes from these tables are automatically updated in the specification table and revised by the user.
In summary, it can be said that The Softema tool described can be used to support the specification, validation and documentation of application software for safety functions in accordance with standards. The procedure is manufacturer-independent and also independent of the programming language and performance level. If the procedure shown as an example is followed, it can be assumed that the requirements of DIN EN ISO 13849-1 relevant to the development process with regard to safety-related application software are fulfilled. In addition to this procedure, there are certainly other methods with which the requirements can also be fulfilled in an equivalent manner.
Softema has recently become available as a beta version on request from the IFA([email protected]). The first release version of the freeware tool is planned for mid-2019.
Author:
Dr. Michael Huelke is head of the "New Technologies, People and Technology" department at the IFA.














