OOP – Object-Oriented Programming

Description

To gain efficiency and meet machine manufacturers' needs for modular and highly flexible solutions, software development processes must be optimized.

Object-oriented programming (OOP) is the key to that: it enables the machine manufacturer to standardize and reuse software modules more efficiently and drastically reduce programming and testing work.


Technology overview

As of software V4.5, object-oriented programming (OOP) is fully implemented in SIMOTION in compliance with IEC 61131-3 ED3.

Object-oriented programming enables you to break complex applications down into a manageable object structure. The software with OOP then precisely replicates the structure of a modular machine.

Modular design of a machine.

The formation of classes, principles of inheritance, and interfaces for interaction between objects is fully available in V4.5.

Machine modules in libraries

Objects

Each object is a unit of software with its properties (data) and methods (functions). Each unit can be simply tested and integrated into a larger unit.

Classes

Object-oriented programming is based on classes (object types). A class defines the structure and behavior of an object type. This blueprint for object types is the basis for creating real objects.

Tested object types are easy to integrate into more extensive object types (aggregation). The increased reusability of software substantially reduces programming costs.

Inheritance and override mechanisms

Adaptation to new situations or further development are achieved by deriving a new class from an existing class. The new class automatically inherits all properties and methods of the base class.

Thanks to this principle of inheritance, object types that have already been tested do not need to be tested again after expansions. In the derived class, properties or methods can be added and inherited methods can also be overridden.

Interfaces

In OOP, information is exchanged between different object types via so-called interfaces: this enables specific data exchange between objects.

Objects can also be further developed as required without adversely affecting existing communication mechanisms. Interfaces also permit more efficient collaboration between different development departments and therefore independent software development.

Advantages

  • Modularization
    With the object-oriented approach, even large software projects remain manageable. Overall, OOP hugely increases the level of modularization.

  • Standardization / reusability
    In conjunction with libraries, OOP substantially increases standardization and reusability.

  • Reduced programming and testing work
    Object types that have been tested once do not need to be tested again.

  • Security
    Encapsulation protects the object data from impermissible program accesses and increases the security of the software.

  • Optimized data exchange
    The interfaces permit targeted, generically implementable communication between the objects.

The SIMOTION SCOUT engineering software conveniently supports the programmer with using the object-oriented programming. Existing procedural programs can still be used and gradually expanded with object-oriented programs without any problem.