gitmyhub

robocpp

Rust ★ 31 updated 18d ago

RoBoC++ is an Open-source IEC 61131-3 PLC compiler

An open-source compiler and runtime for IEC 61131-3 industrial control programs that lets engineers validate, simulate, and convert PLC code written in all five standard language formats into portable C for real hardware targets.

RustCsetup: moderatecomplexity 4/5

RoboC++ is an open-source compiler and runtime toolkit for a programming standard called IEC 61131-3, which is the international standard for how industrial controllers (PLCs) are programmed. PLCs are the computers that run factory machines, assembly lines, and robotic systems. The standard defines several programming languages for writing that control logic, and RoboC++ can read and compile programs written in all of them.

The tool is aimed at engineers, robotics teams, and companies who want to build or validate control system software without being tied to a specific vendor's development environment. You give it a source file written in one of the supported formats, and it can check the code for errors, run a simulation to trace what the program would do, or convert it into portable C code that can be embedded into real hardware systems. It also supports an XML exchange format called PLCopen that graphical PLC tools use, so you can import and export projects from other environments.

The supported input formats cover all five IEC 61131-3 language families: Structured Text, Instruction List, Sequential Function Charts, Ladder Diagram, and Function Block Diagram. Each has its own file extension and the compiler handles them through a shared frontend. There is also a command that checks how well the implementation covers the standard's requirements, and the README states that the current profile reports zero remaining compliance gaps.

When the compiler generates C code, it produces a scan function and a matching state structure. Robot or PLC targets can hook into this generated code to connect the control logic to real hardware, whether that is Modbus, EtherCAT industrial networking, ROS 2 (a robotics middleware framework), or GPIO pins. Safety features like watchdogs and emergency-stop gates are included in the target adapter layer.

The project is written in Rust and is intentionally kept dependency-light so it is easy to audit, modify, and embed. It is dual-licensed under MIT and Apache 2.0.

Where it fits