The marriage of CODESYS and ROS 2 isn't just a trend—it’s the future of Software-Defined Automation
We will create a Function Block to handle the MQTT connection.
CODESYS data types are mapped to ROS2 messages as follows:
Linux-based ROS 2 nodes (unless running on specialized Real-Time Linux patches like RT-PREEMPT) operate on a best-effort basis. Never allow a ROS 2 node to directly control a critical safety loop. Always design the CODESYS layer to automatically fault, stop safely, or enter a holding pattern if the ROS 2 heartbeat signal is lost.
CODESYS (Controller Development System) is the global standard tool for programming controller applications according to the international industrial standard IEC 61131-3. It turns standard embedded or industrial PCs (IPCs) into powerful PLCs. CODESYS manages deterministic real-time tasks, handles industrial fieldbuses (like EtherCAT, PROFINET, and EtherNet/IP), and guarantees predictable execution times down to the microsecond level. What is ROS2?
The official CODESYS ROS 2 library is not the only path. Consider these alternatives for specific use cases:
I can provide complete C++ alternatives for the ROS2 bridge node if your application demands than Python can provide.