End of 2019 we 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.
Starting with OOP, several choices need to be made right from the beginning: are all function blocks in one Class? Think about the PLCopen Motion Control function blocks as an example, do we need then the AxisRef as the reference to the axis or even the MC_ as part of the FB name? How do they contain the methods? And will we use only methods, or also direct access to variables? Is the state machine for the axis controlled by the methods? Are all axes’ objects with methods, and we access them only via these methods? How about interfaces? And do we prefer composition above inheritance?
All these choices give a different look & feel to the users across the different systems, different training guidelines and differences in maintenance. And this is where PLCopen wants to help and give guidance to create a more homogeneous programming methodology.
Overall, there is little information on how to use OOP for industrial control or the operation technology (OT). The goal of this group is to help here with the following recommendations:
- Guidance to using OOP in addition to the “classical” way.
- Provide the same look & feel in using OOP across the different platforms and implementations.
- Create generic design patterns for industrial control programming.
- The classical programming way should be possible to be used in addition to the OOP way (e.g. this can mean that we have to extend the classical FBs with interfaces, methods, properties, and maybe input and outputs).
As an example, a boiler demo was used to represent the different forms of programming.
We have now published the first document “PLCopen Guidelines for usage of Object-Oriented Programming”, version 0.99 as Release for Comments. We look forward to receive your feedback and comments on this document by August 14, 2021 latest. Comments can be made directly in the pdf file and sent back.
The document can be downloaded from the PLCopen website.