While declaring arrays, one had always to define a constant value up to now. Since the 3rd edition of the IEC 61131-3, arrays can be declared with a variable length. Thus, you can create functions much more generically than previously.
Continue reading “IEC 61131-3: Arrays with variable length”IEC 61131-3: Das Command Pattern
Durch den Aufruf einer Methode kann an einem Funktionsblock ein Befehl ausgeführt werden. Funktionsblock A ruft eine Methode von Funktionsblock B auf. So weit so gut. Doch wie lässt sich der Austausch solcher Befehle zwischen mehreren Funktionsblöcken flexibel gestalten? Das Command Pattern liefert hier einen interessanten Ansatz.
Continue reading “IEC 61131-3: Das Command Pattern”IEC 61131-3: Arrays mit variabler Länge
Bei der Deklaration von Arrays musste bisher immer eine konstante Größe angegeben werden. Ab der 3rd Edition der IEC 61131-3 können Arrays mit einer variablen Länge deklariert werden. Funktionen lassen sich dadurch deutlich generischer anlegen als bisher.
Continue reading “IEC 61131-3: Arrays mit variabler Länge”IEC 61131-3: Coding Guidelines
The wish to raise the quality of a software is hardly much older than the software development itself. At the beginning, a set of rules should be determined which define software development guidelines, especially in major projects with multiple developers. Fortunately, PLCopen published recently a draft specifically for IEC 61131-3.
Continue reading “IEC 61131-3: Coding Guidelines”IEC 61131-3: Coding Guidelines
Der Wunsch, die Qualität von Software zu erhöhen, ist sehr wahrscheinlich nur unwesentlich jünger als die Softwareentwicklung an sich. Gerade bei großen Projekten mit mehreren Entwicklern, sollte zu Beginn ein Regelwerk festgelegt werden, welches die Richtlinien für die Softwareentwicklung definiert. Erfreulicherweise hat die PLCopen vor einiger Zeit einen Entwurf speziell für die IEC 61131-3 veröffentlicht.
Continue reading “IEC 61131-3: Coding Guidelines”MEF Part 1 – Fundamentals, Imports and Exports
It has become a necessary standard procedure to distribute applications among several components. Every developer who has designed such an infrastructure for dynamic extension knows that the implementation can be very sophisticated. Managed Extensibility Framework (MEF) promises relief. A short introduction should illustrate it.
Continue reading “MEF Part 1 – Fundamentals, Imports and Exports”
IEC 61131-3: The Abstract Factory Pattern
If instances of a function block have to be created, the exact type of the function block should be known before compiling. Properties of an application can hardly be expanded by this fixed assignment. For example, this will be the case when the function block is located in a library and the access to the source code is thus not possible. The instance variable is constrained by a specific type. A class factory can help to break these stiff structures.
Continue reading “IEC 61131-3: The Abstract Factory Pattern”IEC 61131-3: Das Abstract Factory Pattern
Sollen Instanzen eines Funktionsblocks anlegt werden, so muss vor dem Compilieren der genaue Typ des Funktionsblocks bekannt sein. Durch diese feste Zuordnung kann das Verhalten einer Anwendung nur schwer erweitert werden. Dieses ist z.B. der Fall, wenn sich der Funktionsblock in einer Bibliothek befindet und somit der Zugriff auf den Quellcode nicht möglich ist. Die Instanz-Variable ist fest an einen bestimmten Typ gebunden. Eine Klassenfabrik kann helfen diese starren Strukturen aufzubrechen.
Continue reading “IEC 61131-3: Das Abstract Factory Pattern”IEC 61131-3: Object composition with the help of interfaces
While the notion of inheritance is used readily and frequently, interfaces are rather rarely applied. However, interfaces provide a number of benefits, which increase flexibility of the PLC programs and improve maintenance. The following post will introduce the possibilities of interfaces relating to the IEC 61131-3 standard.
Continue reading “IEC 61131-3: Object composition with the help of interfaces”IEC 61131-3: Objektkomposition mit Hilfe von Interfaces
Während der Begriff der Vererbung gerne und häufig verwendet wird, so wird der Einsatz von Interfaces eher selten behandelt. Dabei bieten Interfaces etliche Vorteile, die die Flexibilität eines SPS-Programms erhöhen und auch die Wartbarkeit verbessern. Der folgende Post soll die Möglichkeiten von Interfaces in Zusammenhang mit der IEC 61131-3 vorstellen.
Continue reading “IEC 61131-3: Objektkomposition mit Hilfe von Interfaces”