
Networkapp is the mobile event app that ensures your attendees get the most out of your event and their network before, during and after the event. This creates even better connections and makes the best use of the available network during physical meetings.
Try it for freeBuild your event app demo in 15 minutes!
Converting PLC data types (like REAL or INT ) into ROS2 messages ( sensor_msgs/LaserScan , etc.) requires careful serialization.
Create a Global Variable List (GVL) that will act as the data interface (e.g., RobotJoints , TargetPose ).
For applications where communication latency above 10–20 milliseconds is acceptable, internet-standard protocols are highly efficient. codesys ros2
This example shows the core action of populating a message object and publishing it, regardless of the underlying communication method.
Today, bridging these two worlds is no longer a luxury—it is a necessity. The most powerful manifestation of this integration is connecting , the leading IEC 61131-3 development environment for PLCs, with the Robot Operating System 2 (ROS2) , the gold standard for advanced robotics software. Why Connect CODESYS and ROS2? Converting PLC data types (like REAL or INT
import rclpy from rclpy.node import Node from std_msgs.msg import Float64 from asyncua import Client class CodesysBridge(Node): def __init__(self): super().__init__('codesys_bridge') self.publisher_ = self.create_publisher(Float64, 'plc_position', 10) self.timer = self.create_timer(0.05, self.timer_callback) # 20Hz loop self.client = Client("opc.tcp:// :4840") async def init_client(self): await self.client.connect() self.var = await self.client.get_node("ns=4;s=|var|CODESYS_Control.PLC_PRG.lrTargetPosition") async def timer_callback(self): val = await self.var.get_value() msg = Float64() msg.data = float(val) self.publisher_.publish(msg) def main(args=None): rclpy.init(args=args) node = CodesysBridge() # Handle async loop execution... rclpy.spin(node) rclpy.shutdown() Use code with caution. Real-World Use Cases
At the heart of CODESYS's motion capabilities is , a software library that extends the standard CODESYS runtime with powerful motion control functionality. It provides function blocks for managing single axes and coordinated multi-axis movements, electronic cams and gears, and CNC path interpolation. When integrated with ROS 2, a typical pattern is for an ROS 2 node to send high-level motion commands, such as a target pose for a pick-and-place operation. A CODESYS program then uses SoftMotion's multi-axis interpolation function blocks to compute the necessary joint trajectories and execute the motion with precise timing. This allows ROS 2 to focus on perception and planning while CODESYS handles real-time motion execution. This example shows the core action of populating
Use the DDS (Data Distribution Service) backbone of ROS2 to create a unified communication layer across a factory floor.
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.
CODESYS publishes data to an MQTT broker; a simple ROS2 Python node subscribes to that broker and republishes the data as a ROS2 Topic.
Menno de Vries
Partner Network & Administration Manager, Aflatoun
Networkapp’s event app allows you as an organizer to truly listen to your attendees and provide them with the right tools to find the information they need. In addition to offering your event program and the ability to put together a personalized program, our event app literally gives attendees a network in their hands.
Want to learn in half an hour how this can work for your event? Then schedule a no-obligation demo and we’ll explain everything to you!
Schedule a demoRegister
Build
Try