The ABSTRACT keyword

It was already available in CODESYS, but with the release of TwinCAT 4024 it’s now available in TwinCAT as well: the ABSTRACT keyword. Abstraction and the use of the abstract keyword is common practice in OOP and many higher level languages as C# support this.  It’s often considered as the fourth pillar of OOP. In this post i’ll explain how to use the ABSTRACT keyword in TwinCAT with some practical examples.

Read More

The three pillars of OOP – Inheritance

Pillars

With the object orientated options we’ve got available with IEC 61131-3 last years the time has come to talk about design patterns and best practices in the world of PLC programming. In this series of three posts ‘The three pillars of OOP’ I will explain the concepts of: Encapsulation, Inheritance  and Polymorphism with some examples in TwinCAT. This post is about the second pillar ‘Inheritance’.

Read More

The three pillars of OOP – Encapsulation

Pillars

With the object orientated options we’ve got available with IEC 61131-3 last years the time has come to talk about design patterns and best practices in the world of PLC programming. In this series of three posts ‘The three pillars of OOP’ I will explain the concepts of: Encapsulation, Inheritance  and Polymorphism with some examples in TwinCAT. This post is about the first pillar ‘Encapsulation’.

Read More