Although there are guidelines for many programming languages, these are nearly non-existent for the important area of industrial control, e.g. IEC 61131-3 and its PLCopen extensions. Nevertheless, the software in the industrial environment is becoming more and more important, the software projects are larger, and the costs of errors increase.
Software nowadays absorbs half of the initial project costs and between 40 and 80% deals with maintenance over the life cycle costs of the software. In order to deal with the complexity of larger programs one needs modern software development processes supporting a structured approach and creating re-usable code. Also, we need to increase the efficiency in coding via re-use of pre-defined functionalities and to help to better understand the program over the life cycle.
PLCopen supports this goal via their initiative Software Construction Guidelines. The key topic is the definition of Rules, Coding Patterns and Guidance, and how to use them in Industrial Automation. Within this activity several sub-groups are identified, and the first results have been published and very well accepted in the market. The results of the working group are based on the IEC 61131-3 1st and 2nd edition but should be easily extensible to the 3rd edition of the standard that was released in 2013.
PLCopen also started a new initiative on PLCopen Guidelines for Object Oriented Programming. The 3rd edition of the IEC 61131-3 standard enables the usage of Object Oriented Programming. Parallel to this, PLCopen has defined the concept of function block libraries including object orientation, as well as sets of function blocks for motion control, safety and communication.
Overview of the Results
So far six documents have been published:
- PLCopen Coding Guidelines version 1.0, the first result of this working group, the document was released in April 2016. You can download the Coding Guidelines document as .pdf. We would appreciate your comments and ideas on it, especially on the usability for you.
- Creating PLCopen Compliant Libraries version 1.0, the second document, was released in May 2017.
- PLCopen Structuring with SFC do’s and don’ts version 1.0 is available since July 2018.
- PLCopen Guidelines for Object Oriented Programming version 1.0 released November 2021
- PLCopen Application Examples for Motion Control - Porting "Function blocks for motion control" into OOP, version 1.0
- PLCopen Guideline on Software Quality Metrics, version 1.0 released November 2023
Additional working groups active under the Software Construction Guidelines will focus on the following topics:
- Guidance for documentation in software programs
- Software quality issues and software consistency
- Software development process
The results of the different subgroups will be made available on the PLCopen website on an on-going basis.