Ecosystem Architecture

How the undoRT components fit together, and where the project stands today.

The Integration Pipeline

The full undoRT pipeline moves from Structured Text source to deterministic hardware execution in four stages. The first three — the undoStudio IDE the source is written in, the st2cpp compiler and the undoCore foundation library — are now released. The remaining components are in active development.

ST Source
IEC 61131-3
→
undoStudio
Released v0.1
→
st2cpp
Released v0.5
→
C++17 Binary
Output
→
undoCore
Released v0.2.4
→
undoPLC
Released v0.2.3
→
undoBUS
Planned
+
undoOS
Planned
Available now In development

st2cpp — Semantic Analysis & a JSON Data Layer

Before generating any code st2cpp runs a two-pass semantic analyzer — symbol table, IEC case-insensitive resolution, type checking, interface and inheritance verification, circular-dependency detection — in Strict (fail-fast) or Permissive (incremental adoption) modes, so errors are caught at build time rather than on the target.

Around the compiler sits a bidirectional JSON data layer: libraries and project data are declared in versioned JSON schemas (Library Descriptor v1.0, Project Configuration v1.0), imported through --ext-libs, resolved by the semantic analyzer, and bound by the code generator. The same pipeline runs in reverse: analyzed ST is exported back to a JSON library descriptor (semantic-only, round-trippable) — from the CLI via --export-descriptor or programmatically via LibraryDescriptorBuilder.

A third JSON document completes the picture. Task Configuration v1.0 (tasks.json, --tasks) declares the cyclic tasks of a PLC: which programs each one runs, at which cycle, priority and CPU core. The compiler turns it into a Runtime.cpp with one undoPLC Master per PLC instance and one Worker per task, so the transpiled code is a runnable PLC rather than a set of translation units. Each PROGRAM is instantiated once per calling task, as in TwinCAT.

Shared Core: undoCore

undoCore is the header-only foundation library that provides common contracts and data structures across all undoRT projects. It defines:

Integrated with undoPLC v0.2.3

undoPLC carries undoCore as a submodule, using ProcessImage for I/O management and IoBus as the contract for fieldbus communication, so undoPLC and undoBUS share one set of contracts.

The Deterministic Execution Loop

Traditional SoftPLCs introduce overhead through intermediate virtual machines or interpretation layers. undoPLC bypasses this by executing native C++ binaries compiled directly from Structured Text by st2cpp — no VM, no interpreter.

When paired with undoOS (a Linux Preempt-RT kernel configuration), real-time tasks are pinned to isolated CPU cores using FIFO scheduling priorities. Fieldbus communication via undoBUS (IgH EtherCAT Master) runs deterministically in user-space alongside the PLC runtime, using the IoBus interface defined in undoCore.

The generated C++ compiles and runs standalone on any C++17-capable platform, so the compiler is useful without a real-time target. Passing --tasks goes further and emits the runtime as well, producing a PLC that expects isolated CPU cores and SCHED_FIFO scheduling to meet its cycle.

undoStudio — Where the ST Source Comes From

undoStudio is the IDE the pipeline starts in: the editor for IEC 61131-3 Structured Text, the project layout the compiler is pointed at, and the diagnostics the compiler produces read back against the source that caused them.

Legacy Migration via undoImport

undoImport will ingest existing commercial IDE configurations — TwinCAT (.tmc/.tpy) and CODESYS projects — extracting POU logic and variable declarations, then routing them directly into the st2cpp pipeline.

This makes undoRT immediately useful for teams with existing automation code, without requiring a full manual rewrite.