Codesys Ros2 Link Jun 2026

: Non-deterministic; higher latency; not suitable for tight closed-loop control. 3. The OPC UA Bridge (Industrial Standard)

All of this is configured via CODESYS’s IEC 61131‑3 graphical tools and ROS 2’s standard tooling ( rqt , rviz2 ).

Some advanced industrial controllers running CODESYS on Linux (like Raspberry Pi with CODESYS Control or industrial edge PCs) allow for custom C++ libraries or specific DDS implementations. This allows the PLC to publish ROS2 topics directly (e.g., /joint_states or /cmd_vel ) without a translation layer. codesys ros2

: High-speed communication is often achieved via shared memory. A ROS 2 node reads and writes data to a specific memory location that the CODESYS runtime can also access, enabling extremely low-latency data exchange. ROBIN Project

We will implement a model using MQTT.

ROS2 MoveIt provides path planning, and the command is sent over the bridge to CODESYS for real-time EtherCAT execution. 5. Summary and Future Outlook

Connecting these two systems typically involves a gateway that allows them to "speak" to one another: : Non-deterministic; higher latency; not suitable for tight

Using a C-Extension in CODESYS to write to a shared memory segment that a ROS2 node reads.

The shared memory approach used by ROBIN is the most real‑time‑friendly. Because both processes are on the same machine and the data exchange does not involve the kernel’s network stack, latencies can be kept under 100 µs. In contrast, WebSocket or OPC UA over TCP/IP may add unpredictable delays due to network scheduling and protocol overhead. A ROS 2 node reads and writes data

PROGRAM Publish_Twist VAR pub : REFERENCE TO Publisher; twist : REFERENCE TO Twist; END_VAR pub := ROS.NewPublisher('cmd_vel', 'geometry_msgs/Twist'); twist := ROS.NewObject('geometry_msgs/Twist'); twist.linear_x := 0.1; twist.angular_z := 0.2; pub.Publish(twist);

Build the project and download it to your PLC runtime (e.g., CODESYS Control for Raspberry Pi or an industrial IPC).