Abstract
| In agreement with the IEC 61511 functional safety standard, fail-safe application programs should be written using a Limited Variability Language (LVL), that has a limited number of operations and data types, such as LD (Ladder Diagrams) or FBD (Function Block Diagrams) for safety PLC (Programmable Logic Controller) languages. The specification of safety instrumented systems, as part of the Safety Requirements Specification document, shall unambiguously define the logic of the program, creating a one-to-one relationship between code and specification. Hence, coding becomes a translation from a specification language to PLC code. This process is repetitive and error-prone when performed by a human. In this paper we describe the process of fully generating Siemens TIA portal LD programs for safety applications from a formal specification. The process starts by generating an intermediate model that represents a generic LD program based on a predefined meta-model. This intermediate model is then automatically translated into code. The idea can be expanded to other equivalent LVL languages from other PLC manufacturers. In addition, the intermediate model can be generated from different specification formalisms having the same level of expressiveness as the one presented in this paper: a Cause-Effect Matrix. Our medium-term vision is to automatically generate fail-safe programs from diverse formal specification methods and using different LVLs. |