CODESYS ยท IEC 61131-3 ยท runtime and hardware

Write once, run anywhere

The other academies teach a single vendor's tool. CODESYS is a programming system embedded inside 1000+ devices from 400+ manufacturers. Your program targets the CODESYS runtime, not the silicon, so the exact same code runs on a WAGO, a Festo, or a Raspberry Pi. CODESYS compiles that one source into native code for each target's CPU and downloads it to all three.

๐Ÿ“ฆ one appโš™๏ธ one runtime๐Ÿญ many vendors
01 ยท One program, three machines

How the runtime runs your program

This blinker-and-counter POU runs on three controllers from different vendors. Each runs the CODESYS runtime on top of its own hardware. Press โš™๏ธ Compile & download to all and CODESYS builds the same application for each target and downloads it. All three run the same logic on the same runtime, so they behave the same. The sim drives them from one clock; three real controllers each keep their own time and do not run in lockstep.

// PROGRAM PLC_PRG  โ€” your application (one source)
blink_t(IN := NOT blink_t.Q, PT := T#500ms);   // 1 Hz blinker
xLamp := blink_t.Q;
IF blink_t.Q AND NOT qPrev THEN nCount := nCount + 1; END_IF
qPrev := blink_t.Q;

All three lamps blink together and the counters match because the sim shares one clock between them. The controllers use the same logic and runtime on three different vendors' hardware. The only part that differs per target is the I/O mapping (which physical pin xLamp drives). Change targets and your logic never changes; only the mapping does.

Source : codesys.com

02 ยท Moving between controllers

Use your code and skills across vendors

๐Ÿ” Skills transfer. Learn CODESYS and you can program WAGO, Festo, Eaton, ABB, Beckhoff (TwinCAT is CODESYS-derived) and many OEM controllers with the same skills.

๐Ÿšช No lock-in. When you outgrow a controller, re-target the project to a bigger CODESYS device, remap the I/O, then download. Your existing application comes with you.

๐Ÿงช Cheap to learn. The CODESYS runtime runs on a Raspberry Pi, giving you a low-cost IEC 61131-3 PLC to learn on. Prototype on the Pi, then deploy on the industrial target.

๐Ÿงฉ IEC standards. CODESYS implements IEC 61131-3 and helped bring OOP into the standard. The concepts you learn here are defined by that standard and transfer to other systems.

03 ยท Check yourself

What changes when you move a project?

You finish a project on a WAGO controller, then must redeploy it to an Eaton controller. What has to change?