Codesys Ros2 2021 -
Integrating (an industrial PLC programming environment) with
EtherCAT fieldbus runs directly on the same device
With CODESYS ROS 2, the as your ROS 2 nodes. The PLC cycle (down to 250µs) drives the motors while the ROS 2 nodes run simultaneously on the multicore processor. The result? Better trajectory tracking and immediate emergency stops. codesys ros2
- Autonomous Mobile Robot (AMR): ROS 2 runs navigation stack (cartographer, nav2). CODESYS runs motor controllers, safety bumper logic, and battery management.
- Industrial Robotic Arm: ROS 2 runs MoveIt for inverse kinematics and collision avoidance. CODESYS runs the low-level joint interpolation, torque limits, and emergency stop chain.
- Smart Conveyor System: CODESYS controls the conveyor belt speed and diverters. ROS 2 runs object detection to decide which product goes to which chute.
Abstract
The convergence of classical Programmable Logic Controller (PLC) ecosystems and modern robotic software frameworks is a critical challenge in Industry 4.0. CODESYS, a dominant IEC 61131-3 development environment, excels at hard real-time control and fieldbus management (EtherCAT, CANopen). The Robot Operating System 2 (ROS2), built on Data Distribution Service (DDS), provides a flexible, distributed middleware for perception, planning, and collaboration. This paper proposes a formal architecture for integrating CODESYS runtime with ROS2. We analyze communication patterns, data representation mapping, real-time constraints, and security implications. A reference implementation using ROS2-native client libraries for CODESYS is presented, alongside performance benchmarks comparing native DDS versus OPC UA gateway approaches. Autonomous Mobile Robot (AMR): ROS 2 runs navigation
The integration of CoDeSys and ROS 2 offers a powerful combination of industrial automation expertise and robotics flexibility. By leveraging the strengths of both technologies, developers can create sophisticated automation applications that benefit from high-performance control, scalability, and flexibility. As the industrial automation and robotics industries continue to evolve, the integration of CoDeSys and ROS 2 is poised to play a key role in shaping the future of automation and robotics development. a dominant IEC 61131-3 development environment
Integrating CODESYS with ROS 2 allows you to use high-level robotics algorithms (Navigation, SLAM, Computer Vision) running in ROS 2 nodes while maintaining hard real-time control of motors and sensors using IEC 61131-3 logic in CODESYS.
The Cultural Clash: IEC 61131-3 vs. DDS
Step 3: Create a ROS 2 Package
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