Basics of PLC 61131 programming with Wago CoDeSys software

Wago-I/O-Pro CAA is the Wago version of CoDeSys (Controlled Development System) by 3S Co. Here are some basics about how it works.

By Mark T. Hoske August 21, 2009

Brent Kucharski, a Wago product training manager, told Control Engineering that the diversity of students ensures that training for I/O-based industrial controllers is interesting. A recent class included adult students from Nestle Purina, Swiki Anderson and Assoc., ENSCO, Lubrication Systems Co., and Evrisko Systems.

Germantown, WI – Wago-I/O-Pro CAA is the Wago version of CoDeSys (Controlled Development System) by 3S Co. (Smart Software Solutions GmbH), says Brent Kucharski, Wago product training manager. Hundreds of manufacturers use this IEC 61131 programming tool for multiple hardware and software platforms. In a recent training class, Kucharski said each manufacturer provides a Target Support Package (TSP), which defines device drivers. IEC 61131 Part 1 is general information; Part 2 is operational funds and requirements; Part 3 is programming languages; Part 4 is the manual; and Part 5 is PLC communications, he said.

Languages are instruction list (IL), ladder diagram (LD), function block diagram (FBD), sequential function chart (SFC), structured text (ST), and continuous function chart (CFC), Kucharski explained; Nine Wago products are programmed with the software. A site license is less than $900.

In the software, on the left is a program organization unit (POU), a box with vertical folders, like a Microsoft Windows tree, he said. On the upper right, the variable declaration editor is used for local programs. The middle a box shows the text or graphical editor. On the bottom is the message window, where compiling messages or warnings show.

POU types are:
– Functions. Local variables are initialized each call. Variables do not retain their value from the previous call. Function name also is name of the output variable. Requires one or more input variables.
-Function blocks. FBs retain the value from the previous call. I/O variables are optional; not every one has to be used. Counters, timers, triggers, and robotics are among uses.
-Programs. Programs retain their values, but only have one global instance.

More about languages:
– SFC is a language but cannot work or stand alone. It’s basically containers used to house other code in flowchart-type way. Batching and packing machines often use this (rather than LD, which could run a packaging application in 6,000 rungs, very hard to troubleshoot.) SFC helps structure software, consists of steps and transitions, and backs up steps with real actions.
– CFCs can loop back on themselves, are like FBDs and allow free placement of blocks and connections.
– IL is a low level language, causing little work for the CPU. It can be hard to understand. It is a textual language, like assembler code.
– ST, a textual language, operates high level like PASCAL. It’s best for conditional execution and loops.
– FBD is graphical, network-oriented, and easy to understand.
– LD with origins in automotive, is supported by all PLCs support. It is network oriented and is good for Boolean expressions.

Also read from Control Engineerin g:
– Wago industrial control seminar: Implementation tips for I/O-based controllers (more photos) ;

and

– Speaking in Tongues: Understanding the IEC 61131-3 Programming Languages .

– Mark T. Hoske, editor in chief, Control Engineering www.controleng.com


Author Bio: Mark Hoske has been Control Engineering editor/content manager since 1994 and in a leadership role since 1999, covering all major areas: control systems, networking and information systems, control equipment and energy, and system integration, everything that comprises or facilitates the control loop. He has been writing about technology since 1987, writing professionally since 1982, and has a Bachelor of Science in Journalism degree from UW-Madison.