This paper presented a practical, real-time capable bridge between CODESYS PLCs and ROS2. By embedding a ROS2 client library into the CODESYS runtime and using a lock-free FIFO between the real-time task and a lower-priority spin thread, we achieve mean latencies of 220μs—suitable for high-speed robotic control. The architecture preserves the determinism of IEC 61131-3 code while leveraging the full ROS2 ecosystem. Source code for the CODESYS ROS2 client library is available under Apache 2.0 license (anonymized for review).
Developers interested in integrating CoDeSys and ROS 2 can follow these steps:
Use the RobinNode function block in your PLC program to map your GVL variables to shared memory. Phase 2: ROS 2 Configuration codesys ros2
Rather than writing custom ROS 2 drivers for every fieldbus protocol—CANopen, EtherCAT, Modbus, Ethernet/IP, and others—developers can let CODESYS handle the hardware layer and expose a clean, high‑level interface to ROS 2. This separation of concerns reduces complexity, speeds up development, and improves reliability. In a typical scenario, CODESYS manages all low‑level I/O and fieldbus communication, while ROS 2 focuses on higher‑level motion planning, perception, and overall system coordination.
Here’s a feature concept for bridging (a leading IEC 61131-3 development environment for industrial controllers) with ROS 2 (Robot Operating System), aimed at simplifying hybrid robotics/automation projects. This paper presented a practical, real-time capable bridge
Structured Text code inside a 1ms CODESYS task:
Bridging the Industrial-Robotic Divide: CODESYS and ROS2 Integration Source code for the CODESYS ROS2 client library
The integration of (a widely-used IEC 61131-3 soft PLC platform) and ROS2 (Robot Operating System 2) represents a powerful shift in industrial automation, bridging the gap between traditional deterministic PLC control and modern, intelligent robotics .