PLCopen Guidelines on Object Orientation

The 3rd edition of the IEC 61131-3 standard enables the usage of Object Oriented Programming, OOP. With Object Orientation one can make many additional choices in the way the program is structured and decomposed, providing a different look & feel to the users especially across the different systems and platforms, creating different training guidelines and differences in maintenance.

To support the right choices and to add to the training programs, PLCopen started an OOP Guidelines initiative, in order to create a more homogeneous method. This activity helps to understand to make the right choice upfront, and to create consistent programs with long-term support.

PLCopen was already involved in OOP with the definition of PLCopen compliant function block libraries, which included both object orientation and classical programming (procedural). With the specification on communication via OPC UA, other OOP aspects come in. And with the security aspects within a system more OOP technology will arrive at the controller level.

This does not mean that the classical programming will be replaced: due to the upwards compatibility both programming styles can cooperate in parallel and be used in those areas that they serve best.

When one starts using OOP, several choices need to be made. For instance: 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 its costs. 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, moving from a classical approach, via a harmonized look & feel towards OOP.

We now published the first document “PLCopen Guidelines for usage of Object-Oriented Programming”, as version 1.0.

This is an additional document within the framework of the PLCopen Software Construction Guidelines. The documents from this activity can be found at our website www.PLCopen.org :

• Coding Guidelines

• Creating PLCopen Compliant Libraries

• Structuring with SFC – do’s & don’ts

• Guidelines for Object Oriented Programming

News release from PLCopen, 23/11/2021


Feel free to share

Calendar

15/04 - 19/04: Wire/Tube, Düsseldorf (D)

22/04 - 26/04: Hannover Messe, Hannover (D)

14/05 - 16/05: Advanced Manufacturing, Antwerp Expo (B)

15/05 - 16/05: Advanced Engineering, Antwerp Expo (B)

15/05 - 16/05: Food Tech Event, Brabanthallen, 's-Hertogenbosch (Nl)

28/05: Industrie & Maintenance, Namur Expo (B)

05/06 - 06/06: Vision, Robotics & Motion, Brabanthallen, 's-Hertogenbosch

10/06 - 14/06: ACHEMA, Frankfurt am Main (D)

18/09 - 19/09: Kunststoffen, Brabanthallen 's-Hertogenbosch (Nl)

08/10 - 11/10: Motek, Stuttgart (D)

15/09/25 - 19/09/25: Schweissen & Schneiden, Messe Essen (D)

08/10/25 - 15/10/25: K, Düsseldorf (D)