: PLCs excel at real-time, deterministic control. They manage microsecond-level I/O loops, execute safety functions, and communicate via robust industrial protocols like EtherCAT, PROFINET, and EtherNet/IP. However, they lack the computational flexibility needed for complex tasks like autonomous navigation, dynamic path planning, or machine learning.

For applications where communication latency above 10–20 milliseconds is acceptable, internet-standard protocols are highly efficient.

manages high-level logic, SLAM, and visualization through its distributed node system. Popular Integration Methods

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).

: CODESYS utilizes its built-in MQTT client or HTTP library to publish data to a broker. On the PC side, a ROS2 bridge node subscribes to these MQTT topics and translates the payloads into standard ROS2 messages.

If CODESYS and ROS 2 are running on the exact same hardware—such as an Industrial PC (IPC) utilizing a real-time Linux kernel (PREEMPT_RT)—they can communicate via Shared Memory or Inter-Process Communication (IPC). A dedicated ROS 2 node writes velocity commands to shared memory, which the CODESYS runtime reads deterministically to drive the motors. Step-by-Step Implementation Guide

If you want to dive deeper into the technical setup, let me know: