Archive

Posts Tagged ‘Inheritance’

IEC 61131-3: Additional language extensions

June 17, 2017 3 comments

The focus of my post has been the object-oriented extensions so far. But there are several general, usually not so far-reaching innovations within TwinCAT 3. Below, they are briefly described.

Read more…

IEC 61131-3: Methods, Properties and Inheritance

April 23, 2017 3 comments

Object-oriented programming (OOP) is a proven way of keeping the complexity of software systems in check. Until recently the preserve of languages such as C++, Java and C#, IEC 61131-3 introduces the concept to PLC programming.

Read more…

IEC 61131-3: The ‘Command’ Pattern

December 7, 2016 2 comments

A command can be run on a function block by calling a method. Function block A calls a method of function block B. So far, so good, but how can such “commands” be exchanged flexibly between several function blocks. The command pattern provides an interesting approach.

Read more…

IEC 61131-3: Namespaces

November 22, 2016 Leave a comment

The third edition of IEC 61131-3 introduces the concept of namespaces. Namespaces group elements such as variables, function blocks, data types and libraries into coherent units. This means that elements are no longer identified solely using their names, but additionally using the associated namespace.

Read more…

IEC 61131-3: Arrays with variable length

September 27, 2016 Leave a comment

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.

Read more…

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.

Read more…

IEC 61131-3: The ‘Abstract Factory’ Pattern

November 16, 2014 Leave a comment

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.

Read more…