0 Introduction
In recent years, with the development of smart manufacturing technology, the automation and intelligence level of production sites has continuously improved. However, current information systems such as MES and SCADA mostly utilize field data at the digitalization or visualization level, creating a disconnect between manufacturing floors and management layers. To address the interaction and integration between the physical world and information world required by smart manufacturing, the digital twin solution has been proposed.
This research uses the AUBO-i5 industrial robot as the subject and industrial robot simulation software as a tool to establish a single robot's digital twin. The twin generates control programs through offline simulation functionality. A PC application communicates with the controller via Socket, controlling the robot and acquiring real-time data written to Buffer files. The twin model reads Buffer files through LUA scripts to obtain real-time joint values and drive model motion, achieving real-time monitoring. This implements a closed-loop system for a single robot digital twin.
1 System Architecture
1.1 Hardware Configuration
The entire system includes an AUBO i5 industrial robot, robot controller, PC, and network cables. The robot controller controls robot actions and provides Ethernet interfaces for PC communication.
1.2 Software Configuration
The PC is installed with Trustrobot's production system simulation software HedraSMF for establishing digital twin models and performing offline programming for the robot. Additionally, a console application for communication between the simulation software and robot controller was developed on the Windows platform.
1.3 Overall System Structure
The overall system structure consists of three layers: the robot and controller at the bottom layer, the communication application at the middle layer, and the industrial robot simulation software at the upper layer. The communication program and simulation software are installed on the PC, with the controller connected to the PC via network cable using Socket communication. The offline programming module generates robot control programs along selected trajectories in XML document format stored on the PC hard drive.
2 Digital Twin Construction
The digital twin model is built using simulation software, which provides modeling, offline programming, and rich LUA language simulation interfaces for establishing robot digital models and implementing required functions through secondary development.
2.1 Twin Model Construction
The robot's actual 3D model is imported into the simulation software for disassembly and modeling. Based on D-H link coordinate system principles, kinematic mechanisms are constructed for its six joints, ensuring the model's joint zero positions correspond to the actual robot.
2.2 Offline Programming Output
The offline programming module incorporates the robot's inverse kinematics algorithm — solving for optimal six-joint values from target point end-effector poses. Software developers also developed post-processor output functionality based on the AUBO robot control program format, outputting robot control programs according to target trajectory lines.
2.3 Real-time Monitoring Implementation
LUA thread scripts are added to the model, reading local Buffer files through LUA I/O operations to obtain robot six-joint angle values and manipulator event codes. The simRMLMoveToJointPositions() interface function and model six-joint handles are used to control motion. In a sub-thread executing every 30 milliseconds, real-time mapping of the model to the physical entity is achieved.
3 Communication Application Implementation
The application handles data processing and transmission, implemented as a simple console application with only start and stop functions. The implementation is based on Socket communication and controller interfaces provided by the robot manufacturer.
The program establishes communication through the robot controller's Socket server address and port. After initializing the manipulator control platform, three sub-threads implement functionality. First, a callback function for obtaining real-time robot joint values is registered, continuously acquiring six joint angles. A callback for robot event information is also registered, returning manipulator event codes when events occur. Two callbacks run in separate sub-threads to obtain real-time data, writing joint values and event codes to Buffer files every 30 milliseconds.
The robot offline programming output is in fixed XML document format. A corresponding parser reads all waypoints from the robot trajectory route, and a thread function sending motion commands to the controller controls the robot to begin operation. After all waypoints complete, Socket disconnects and the program ends.