Glossary · Automation software engineering and architecture
Object-oriented programming
Also known as: OOP
German: Objektorientierte Programmierung
In software engineering, object-oriented programming is a paradigm that structures programs as objects combining data and the operations on it, using classes, encapsulation, inheritance and polymorphism; IEC 61131-3 (edition 3) added object-oriented extensions to function blocks.
- Software engineering
In one sentence
Object-oriented programming structures software as objects combining data and methods, using encapsulation, inheritance and polymorphism.
Example
A machine builder defines a base function block for all conveyors with methods Start, Stop and Reset and derives belt and roller conveyors from it.
How it applies
- Engineering: In PLC programming, function blocks with methods, properties and interfaces allow reusable machine modules. Deep inheritance hierarchies, however, make code harder for maintenance staff to follow.
- Maintenance: Service technicians often read PLC code online. Very abstract object-oriented code can slow down troubleshooting, so many companies set coding guidelines on how far to use these features.
- Documentation: Class or function block libraries need reference documentation per method and property, plus a conceptual overview of the hierarchy. Generated API documentation is a good starting point but rarely explains intended use.
Object-oriented vs. modular programming
Modular programming divides a program into units with interfaces. Object-oriented programming adds Inheritance and Polymorphism, so modules can share and specialize behavior.