Codesys Ros2 - |link|
CODESYS
Integrating with ROS 2 (Robot Operating System 2) creates a powerful bridge between traditional industrial automation and modern robotic intelligence . This combination allows engineers to leverage the determinism and safety of a PLC (Programmable Logic Controller) alongside the advanced perception, mapping, and navigation capabilities of ROS 2. 1. The Core Synergy
Keywords:
CODESYS, ROS2, Industrial Robotics, Real-Time Systems, DDS, EtherCAT, IEC 61131-3. codesys ros2
CoDeSys is a software tool developed by 3S - Smart Software Solutions GmbH, a leading provider of automation software. It allows users to design, test, and deploy control applications for various industrial automation controllers, including programmable logic controllers (PLCs), industrial PCs, and other embedded systems. CoDeSys supports multiple programming languages, including IEC 61131-3 languages (e.g., Ladder Logic, Function Block Diagram, and Structured Text). CODESYS Integrating with ROS 2 (Robot Operating System
Safety and Determinism:
Use CODESYS for safety-critical logic and motor torque loops while ROS2 handles high-level mission planning. Use CODESYS on an industrial PC to control
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).
- Use CODESYS on an industrial PC to control conveyor and gripper.
- Run ROS 2 on the same PC or an adjacent edge device to perform object detection and pick planning.
- ROS 2 publishes pick_pose topic; a small bridge converts it to PLC setpoints. PLC executes motion while monitoring safety inputs and a ROS heartbeat. If heartbeat stops, PLC aborts motion and goes to safe state.
Unlocking the Power of Industrial Automation with CoDeSys and ROS 2
Data Mapping:
Converting PLC data types (like REAL or INT ) into ROS2 messages ( sensor_msgs/LaserScan , etc.) requires careful serialization.

