Get Adobe Flash player

Programing in industrial automation

2012 – 05-20

In the previous articles we overviewed the story of PLCopen and the conforming programming systems, have explained some implementations – that are already applied in industrial practice –, were discussing further possibilities of these application development systems, as well as possible applications of some newly issued PLCopen specifications, released in the meantime.
In the current article we’ll follow on with analyzing the programmi systems used in the fields of industrial automation, will inspect the history of their evolution as well as the pros and cons of these programming procedures then propose a foreseeing solution about a progressive, universal application.

 

In industrial automation, state of the art motion/automation controllers must ensure a fast and predictable response to the physical process they are controlling.

Therefore most PLCs (Programmable Logic Controller) execute a cyclic scan continuously.

In each scan cycle the PLC reads multiple inputs, performs calculations (e.g. logic, PID loop etc.) and produces multiple outputs.

A Function Block (FB) as described in the PLC language standard IEC61131-3 can be used as the software component that forms the basic building block of an automation application. The developer can reduce system complexity by working with FBs without really understanding how the FBs work internally, much like ICs in the field of electronics. The use of FBs is nearer to the mind-set of the industrial system designer who is familiar with connecting physical devices together in different ways to provide a particular system solution. “A picture is worth a thousand words”.

The standard PLCopen (www.plcopen.org) – platform independent – Function Blocks library for Motion Control is based on the IEC 61131-3 FB software model.

Unlike IT (Information Technology) component models (e.g. COM, CORBA etc.) the FB Diagram language –made possible by the scanned nature of IEC61131 -has an easily understood visual model for representing the interconnections of data among components.

Modern automation solutions blend the advantages of PLC-style deterministic industrial control with the flexible configuration and enterprise integration strengths of PC-based systems.

Today’s wide spread PLC-programming systems

Today’s wide spread PLC-programming systems supports the IEC 61131-3 standard.

The standard IEC61131-3 programing languages (LD, IL, SFC, ST and FBD) are a result of a compromise between major automation suppliers all wishing to standardize their own established languages.

Sophisticated applications however are increasingly hard to program in these traditional languages. For example, to efficiently program a PackML (www.omac.org) state machine in LD (Ladder Diagram) or IL (Instruction List) is simply hopeless.

SFC (Sequential Flow Chart) is workable but it quickly turns into a “rat’s nest” for a complex state machine.

ST (Structured Text) is flexible but if text-based, then why not use instead the world’s most widespread and powerful general purpose programing language, C++.

FBD (Function Block Diagram) -employed with traditional specialized FBD editors- is limited in complexity. This limitation however can be overcome by using an FBD editor with FBD nesting capabilities and schematic editor type features such as, buses to bundle wires, named labels, convenient zooming and scrolling etc. Linking FB instances to XML property files can also provide added flexibility.

Unnecessary complexity is also introduced by having to combine multiple IEC programing languages for today’s sophisticated application. The ‘main’ POU (Program Organization Unit) is typically edited in Structured Text. The call of added POUs must be done by the user. The variables – used for storing user data- have to be declared at the beginning of each POU, i.e. their assignment to a specific data type (such as BYTE or REAL) is made known.

Managing all the variables and entering programming code requires advanced computer programing skills.

The need to use five industry specific programing languages raises the question; why not eliminate the unnecessary variety of languages.

Why not just do it all with one visual programing language instead?

If additional text-based programing is required, why not use the world’s most widespread standard programing language, C++.

The Click & Move automation solution

There is a new innovative solution available called Click & Move (C&M). By employing state of the art technology, open architecture and adherence to international industry standards for communications and motion control, C&M merges the best of both the IT and industrial automation worlds. C&M is based on C++ and uses a set of nested FBDs.

FBDs can manage practically unlimited complexity in a transparent manner when combined with powerful editing, nesting, debugging features and linked to XML property files.

In C&M programing is reduced to drawing functional block diagrams using www.PLCopen.org  motion, IEC61131, and user created library Function Blocks.

No need to declare variables or write a single line of code. The system designer’s main focus is to take standard proven encapsulated functionality and wire it together in the quickest and most intuitive way possible.

C++ programing is only needed for user’s function blocks that can’t be created by combining standard library function blocks.

Run-time executable code is generated by a click of button, for the selected hardware platform.
–    FBDs are edited with a flexible schematic editor (named bus wires, labels etc.) as opposed to proprietary editors with limited flexibility.
–    a new FB can be created at the push of a button from a whole FBD allowing the nesting of FBDs
–    a new FB can also be easily created with an encapsulated user C++ program, utilizing all data types
–    FB instances can be linked to XML property files
–    an application can be organized around a state machine type central logic
–    all aspects of an application (including communications) are managed by FBs

The Development system runs on Windows. The run-time system currently runs on Windows, real-time Linux or in user programmable drives.

 

These platforms provide quick access to evolving high performance technologies while protecting software investment.

C&M applications can also be fragmented and distributed over various devices, via Ethernet and CAN links.

With C&M there is no need to learn proprietary programming languages and/or the standard IEC61131-3 programming languages used in the PLC world.

FBD is self-documenting and easily understood. C++ is already widely used.

All in all C&M is a good, practical compromise between simplicity and flexibility.
The capabilities of C&M can quickly be assessed by simply reading through the tooltips of the menu items.