Skip to main content
DIN RAIL · CONTROL ARCHITECTURE

DIN Rail PC vs PLC: When to Use Each

Use a PLC for deterministic machine control, safety interlocks and simple I/O that must run unchanged for years. Use a DIN rail PC when the same cabinet also needs HMI screens, databases, vision or AI. Many projects use both, and a DIN rail PC running a soft PLC can take over the control job when timing and safety allow.

01

The question behind PLC vs PC

Asking “PLC or PC?” used to mean choosing between a dedicated controller and an office-style computer on a shelf. Today both can clip onto the same DIN rail, take the same 24 V DC supply and run IEC 61131-3 control code, so the real question is which device should own which job.

A PLC runs one control program in a fixed scan cycle and does very little else. DIN rail PCs run Windows or Linux, so they can host an HMI, a historian, vision software and, with the right runtime, the control program as well. This page looks at that last option, the soft PLC, and at how to split work between the two.

02

What a soft PLC is

A soft PLC is control software that turns a PC into a programmable controller. It provides the same scan cycle, task scheduling and IEC 61131-3 languages as a hardware PLC, but runs on an x86 or Arm processor under a general-purpose operating system.

Examples include CODESYS Control, which has been ported to many x86 and Arm platforms, open-source projects such as OpenPLC, and runtimes that PLC makers license for their own industrial PCs. Most are programmed from the same engineering tool as the vendor’s hardware controllers, so the logic, function blocks and diagnostics look familiar to automation engineers.

The runtime talks to field devices over the PC’s Ethernet ports. EtherCAT masters, for example, run on a standard network controller with no special card, and PROFINET, EtherNet/IP and Modbus TCP stacks are available for most runtimes. Local inputs and outputs come from the PC’s own isolated I/O, I/O modules or remote I/O near the machine.

03

How a PC keeps real-time timing

A normal operating system can pause a program at any moment to deal with updates, drivers or other tasks. A soft PLC needs its cycle to start on time, every time, so PC-based control uses one or more of these methods:

  • //
    A real-time Linux kernel. The PREEMPT_RT patches, merged into the mainline Linux kernel in version 6.12, make most of the kernel pre-emptible, so a high-priority control task is not held up by lower-priority work.
  • //
    Dedicated processor cores. The control task is pinned to one or more isolated cores, while Windows or Linux applications use the rest.
  • //
    A real-time hypervisor. A hypervisor runs a real-time operating system and a general-purpose one side by side, each on its own cores, memory and devices.
  • //
    Platform timing features. Intel Time Coordinated Computing tunes the processor and memory for predictable latency, and Time-Sensitive Networking extends that predictability onto the Ethernet link.
04

When a PLC is the better choice

A hardware PLC remains the safer default when any of these apply. Safety functions such as emergency stops, guard interlocks and light curtains belong on a safety PLC or safety relay certified to IEC 61508 or IEC 62061; some soft PLC runtimes offer certified safety options, but most projects keep safety on dedicated hardware. A PLC also suits machines that must run unchanged for ten years or more with no operating system patches, sites where maintenance staff are trained on one PLC family, and applications with simple logic and few signals, where a compact PLC is the smallest and simplest answer.

05

When a DIN rail PC is the better choice

A DIN rail PC earns its place when control is only part of the job. Typical cases are a machine that needs an operator screen, recipe storage and production records beside its logic; vision inspection or AI models that run on the same camera feeds the control decision depends on; data collection from several PLCs, meters and drives for OPC UA, MQTT or a database; and multi-axis motion over EtherCAT, where a fast processor helps with complex kinematics.

Consolidation is the other driver. One DIN rail PC running a soft PLC, the HMI and the data software replaces a PLC, a panel computer and a gateway, which saves rail space, wiring and spare parts.

FAQ · 01
What is a DIN rail controller?
Any programmable control device that clips onto the cabinet rail, from compact PLCs and edge controllers to DIN rail PCs running soft PLC software.
Read the full FAQ —
06

When to use both

Most cabinets end up with both, split by job rather than by preference. Three patterns cover most projects:

Pattern What the PLC does What the DIN rail PC does Suits
PLC controls, PC supervises All machine logic and interlocks HMI, logging, analytics and data forwarding Existing machines and retrofits
Soft PLC with a safety PLC Safety functions only Standard control, motion, HMI and data New machines with motion or vision
PLC plus edge AI Control and reject outputs Vision or AI models that tell the PLC what to do Inspection, sorting and quality checks

In every pattern the two talk over the plant network, using Modbus TCP, PROFINET, EtherNet/IP or OPC UA. Our guide to how an HMI works with a PLC covers the tag exchange that sits underneath.

07

Moving IEC 61131-3 code between them

IEC 61131-3 defines the languages, Ladder Diagram, Function Block Diagram, Structured Text and Sequential Function Chart, with Instruction List deprecated in the 2013 edition. It does not make programs fully portable: each vendor adds its own libraries, I/O mapping and system functions. PLCopen XML can carry much of a project between tools, but plan to rework hardware-specific parts.

For systems spread across several controllers and PCs, IEC 61499 adds an event-driven function block model designed for distributed control, and is supported by open-source and commercial runtimes.

08

Quick answers on PLC vs PC

PLC vs PC: common questions

Is an IPC the same as a PC-based PLC?

Not quite. An IPC is the hardware. It only becomes a PC-based PLC when a soft PLC runtime is installed and runs the control program.

Can a soft PLC be as fast as a hardware PLC?

Often faster. PC processors run complex logic and motion maths quickly, but cycle timing depends on the real-time setup, so check the runtime’s jitter figures.

Does Windows updating stop a soft PLC?

It should not. Real-time runtimes isolate the control task, but schedule updates and restarts for planned downtime all the same.

What happens if a DIN rail PC loses power?

It needs a clean shutdown. A DC UPS or supercapacitor module gives the PC time to save data and stop safely, which a PLC rarely needs.

We supply our DIN rail PCs with the operating system, storage and wireless modules fitted and configured as standard, ready to install beside the PLC.