PILLAR GUIDE9 min readUpdated Jun 2026

Programming a Raspberry Pi like a PLC: OpenPLC, CODESYS & Node-RED

You don't write industrial control in raw Python. Soft-PLC runtimes bring IEC 61131-3 languages to Linux — here's how they compare and where each fits.

SHORT ANSWER

Soft-PLC runtimes bring IEC 61131-3 languages — ladder, structured text, function blocks — to a Linux Pi. OpenPLC is the open-source standard, CODESYS is the industrial-grade commercial runtime, and Node-RED offers flow-based logic for integration and dashboards. For sub-millisecond determinism you pair any of them with a microcontroller co-processor that owns the hard real-time loop.

IEC 61131-3
the standard PLC programming languages
IEC
3
mature soft-PLC paths on a Pi
this guide
$0
license for OpenPLC + mainline Linux
OpenPLC

01Soft PLC vs scripts

You can write control in Python, but you give up the determinism, the standard languages and the operator-familiar tooling that make PLC code maintainable. A soft-PLC runtime gives you IEC 61131-3 on Linux — the same ladder and structured text your controls team already knows.

02The main runtimes

OpenPLC is free, open and great for learning and non-critical control. CODESYS is the commercial, industrial-grade runtime with a polished IDE and broad fieldbus support. Node-RED isn't a PLC but excels at flow-based integration, protocol bridging and dashboards. Many real systems combine a runtime for logic with Node-RED for connectivity.

03Handling real-time

Stock Linux isn't deterministic. A PREEMPT_RT kernel tightens it, and for genuinely hard loops we hand the time-critical part to an onboard microcontroller while the Pi runs supervision, AI and connectivity. Most monitoring and supervisory control is fine on soft real-time alone.

Common questions

The ones we're asked on every first call.

Yes. OpenPLC and CODESYS both run IEC 61131-3 ladder diagrams on a Pi, so an existing controls engineer can program it with familiar tools rather than learning Python.

For monitoring, data acquisition and non-safety control, yes. Safety-instrumented functions belong on IEC 61508-certified hardware — keep those on certified gear and run the soft PLC alongside.

Want this run on your numbers?

Send us your current stack and what it needs to do. A controls engineer replies with a candid one-page teardown — no deck, no sales call.

Request a teardown