Industrial robot distributed modular control system and communication method

By introducing a distributed modular control method into the industrial robot control system and establishing a real-time data link between the virtual machine and the EtherCAT master module, the response delay problem in the existing technology is solved, real-time adaptive control of the robot in complex scenarios is achieved, and operational adaptability and safety are improved.

CN120697021APending Publication Date: 2025-09-26DONGGUAN UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510961213.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-13
Publication Date
2025-09-26

AI Technical Summary

Technical Problem

Existing industrial robot control systems struggle to respond to dynamic changes in the external environment in real time when faced with the demands of flexible and intelligent production. This leads to problems such as excessive contact stress and assembly failure in complex scenarios. Existing improvement solutions suffer from communication delays and untimely responses.

Method used

A distributed modular control system for industrial robots is adopted. By integrating a bytecode interpreter module and an EtherCAT master module in the lower computer, a direct data link is established between the virtual machine and the EtherCAT master module to achieve real-time feedback closed-loop control. The virtual machine dynamically adjusts the program execution process based on real-time data, introduces "perception-decision-making" instructions, and simplifies the programming logic.

Benefits of technology

It achieves ultra-low latency response to external events, improves the robot's intelligence and autonomous operation capabilities, simplifies programming in complex scenarios, ensures the determinism of the adaptive control process and system stability, avoids mechanical shock, and improves the robot's adaptability and safety in complex scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120697021A_ABST
    Figure CN120697021A_ABST
Patent Text Reader

Abstract

The invention discloses an industrial robot distributed modular control system and a communication method, and aims to solve the problem that a traditional robot control system rigidly executes a predetermined track and cannot adapt to the uncertainty of a working environment in real time. The system comprises an upper computer and a lower computer running a real-time operating system, and a byte code interpreter module, a motion control module and an EtherCAT master station module are deployed on the lower computer. According to the method, a robot program script instruction set is expanded, and an instruction containing perception-decision logic is introduced. When the byte code interpreter of the lower computer executes the instruction, the memory area is shared by directly accessing a process data image (PDI) maintained by the EtherCAT master station module in real time. According to the method, decision logic is sunk to a hard real-time environment, and a tight closed loop between program logic and physical feedback is established, so that the robot has the capability of quickly responding to external events and autonomously adjusting the external events, and the intelligent level of the robot in complex scenes such as flexible assembly and the like is remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of industrial robot control, and in particular to a distributed modular control system and a communication method for an industrial robot. Background Art

[0002] As core automation equipment in modern manufacturing, industrial robots have been widely used in structured work environments such as welding, handling, and spray painting. Their core advantage lies in their ability to accurately, quickly, and continuously execute pre-programmed programs, significantly improving production efficiency and product quality. Traditional industrial robot control systems typically employ a "teach-and-play" operating model, where the operator pre-plans one or more fixed motion trajectories using a teach pendant or offline programming software and stores them as a robot program. During production, the robot controller strictly follows the recorded instruction sequence, sequentially interpreting and driving each joint to the specified position.

[0003] However, this control paradigm, which assumes a completely deterministic working environment, has inherent limitations when faced with the growing demand for flexible and intelligent production. In complex scenarios such as precision assembly, flexible grinding, and the grasping of special-shaped parts, where robots need to interact with the external environment, there are often small and unpredictable deviations in the incoming position, dimensional tolerance, or assembly relationship of the workpiece. When the robot still attempts to strictly execute its preset rigid trajectory, this deviation will cause excessive contact stress between the robot end and the workpiece, which can lead to assembly failure and scratches on the workpiece surface at the very least. In severe cases, it may damage the workpiece, the robot end effector, or even trigger a protective emergency stop for the entire system, thereby interrupting the production process.

[0004] In order to overcome this defect, some improvement schemes have been proposed in the existing technology, but these schemes still have shortcomings. A common attempt is to introduce an external sensing system, such as installing a visual system in the robot work unit. Through the "hand-eye coordination" method, the target is first photographed and positioned before the robot performs the action, and then the upper computer analyzes the image, calculates the deviation and corrects the target position of the robot. Although this method has improved the adaptability to a certain extent, it is essentially still an open-loop or large-loop feedback mode of "perception first, planning later, and execution again". The entire information processing link is long and the response delay is large. It cannot cope with dynamic and unexpected contact events that occur during movement.

[0005] Another attempt is to integrate force sensors at the end or joint of the robot and upload the force feedback signal to the controller. After receiving the force feedback data, the upper-level application in the controller uses logical judgment to decide the next action, such as stopping the current movement or switching to another preset correction program. The problem with this solution is that the perception of force feedback signals and the execution of decision logic are usually distributed at different levels of the control system. The force signal is transmitted from the sensor through the bus, and after reaching the controller, it needs to pass through the operating system and finally be delivered to the non-real-time user application for processing. The communication and scheduling delays introduced by this process are not suitable for applications that require microseconds or milliseconds.

[0006] For real-time collision or contact events that require a response time of seconds, this is often unacceptable, resulting in the robot being unable to make truly instantaneous reflexive actions.

[0007] Therefore, existing technologies generally lack a control mechanism that can directly and tightly couple the real-time feedback from the underlying physical world with the robot's high-level program logic. This makes it difficult to give robots the ability to quickly and autonomously respond to dynamic changes in the external environment while ensuring the determinism of hard real-time motion control. Summary of the Invention

[0008] In response to the shortcomings of the existing technology, the present invention provides a distributed modular control system and communication method for industrial robots. Existing industrial robot control systems usually perform tasks according to preset fixed programs. The program logic is disconnected from the real-time feedback from the physical world, making it difficult to perform real-time and intelligent self-adjustment according to dynamic changes in the external environment during execution, thereby limiting their adaptability and process implementation capabilities in complex and unstructured operating scenarios.

[0009] In order to solve the above technical problems, the present invention provides a distributed modular control system and a communication method for an industrial robot.

[0010] A first aspect of the present invention provides a distributed modular control system for an industrial robot.

[0011] The system includes a host computer and a slave computer. The host computer is configured to provide a program script. The slave computer is configured to communicate with the host computer via a protocol such as Modbus TCP to receive the program script.

[0012] The slave computer integrates a bytecode interpreter module and an EtherCAT master module. The core of the bytecode interpreter module is a virtual machine, responsible for compiling program scripts sent by the host computer into bytecode executable by the virtual machine. The EtherCAT master module is responsible for high-speed, periodic data exchange with at least one of the robot's drive slaves, thereby obtaining real-time data reflecting the physical status of the drive slave, such as the actual axis position, speed, torque, or current.

[0013] The core innovation of this invention lies in the fact that the virtual machine is no longer a standalone execution engine solely responsible for translating instructions. It is specifically configured to establish a direct data link with the EtherCAT master module. Through this data link, while executing bytecode instruction sequences, the virtual machine can proactively query the real-time data collected by the EtherCAT master module based on the needs of the current instructions. Furthermore, the virtual machine uses this real-time data as a basis for decision-making to control its own program execution flow, for example, deciding whether to execute sequentially, jump to another part of the program, or pause and wait.

[0014] Through this structure, the system establishes an unprecedented real-time feedback loop between the program logic layer and the physical execution layer. Robotic program execution is no longer blind; instead, it possesses the ability to perceive the external environment, enabling it to dynamically adjust its operating behavior based on real-world physical feedback such as force and displacement, thereby achieving a higher level of adaptive and intelligent control.

[0015] In a preferred technical solution, in order to facilitate user programming to implement adaptive logic, the program script may include a preset "perception-

[0016] The bytecode interpreter module is correspondingly configured to compile such instructions into special bytecodes that can be recognized by the virtual machine. When the virtual machine executes such "perception-

[0017] When receiving a "decision-making" instruction, it will execute a complete "perception-judgment-

[0018] Action sequence: First, query the real-time data, then compare the data with the preset thresholds in the instruction, and finally perform actions such as program jump or pause execution based on the comparison results, thereby achieving precise control over the program execution process.

[0019] In one specific implementation, to ensure real-time data exchange, the data link between the virtual machine and the EtherCAT master module is achieved by having the virtual machine directly access the process data image (PDI) maintained by the EtherCAT master module. This direct memory access mechanism avoids the latency and system overhead associated with traditional communication methods, ensuring that the data underlying virtual machine decisions is up-to-date and synchronized with the physical world.

[0020] To achieve complete robot control, the lower computer may also include a motion control module. This module receives motion commands from the virtual machine and is responsible for trajectory planning to generate smooth drive instructions. To ensure smooth robot operation and avoid shock during startup and shutdown, the motion control module may use a quintic polynomial for trajectory planning. The joint positions.

[0021] The planning model of q(t) is:

[0022] q(t)=c0+c1t+c2t 2 +c3t 3 +c4t 4 +c5t 5 ;

[0023] Where t is time and c0 to c5 are polynomial coefficients. These coefficients are uniquely determined by the boundary conditions of the path. For example, at a given starting position q s , end position q f and the total running time T d , and set the typical conditions that the velocity and acceleration of the starting and ending points are zero, some key coefficients can be

[0024] Calculated using the following formula:

[0025]

[0026] The lower computer can be based on a high-performance embedded PC board and implemented by running the VxWorks real-time operating system to ensure the determinism and high reliability of the task scheduling of the entire control system.

[0027] A second aspect of the present invention provides a communication method for a distributed modular control system of an industrial robot.

[0028] The method includes the following steps: First, a slave computer receives a program script sent by a master computer and compiles the script into bytecode using its internal bytecode interpreter module. Simultaneously, an EtherCAT master module within the slave computer continuously and periodically exchanges data with at least one slave drive, thereby continuously acquiring real-time data reflecting the physical status of the slave drive.

[0029] The core step of this method is that the virtual machine in the bytecode interpreter module, while executing the bytecode, does not execute instructions in isolation. Instead, it actively queries real-time data obtained by the EtherCAT master module through a pre-established data link based on the content of the current bytecode instruction. The virtual machine then uses this real-time data as a basis for dynamic control of its program execution flow, such as determining the address of the next instruction to be executed.

[0030] This method breaks the rigidity of program flow in traditional robot control methods by establishing the dependence and response of program logic on physical real-time data at the virtual machine execution level, enabling the robot's actions to adapt to changes in the external environment in real time, thus making it possible to realize complex robot operations that require environmental perception.

[0031] The present invention provides a distributed modular control system and communication method for industrial robots. It has the following beneficial effects:

[0032] 1. This invention achieves ultra-low latency response to external events. By placing the decision-making logic core (bytecode interpreter) and the real-time feedback data source (EtherCAT process data image) in the same shared memory area of ​​the hard real-time operating system, the virtual machine can obtain sensor data through zero-copy direct memory access. This design eliminates the latency caused by data traversing multiple software layers and communication buses in traditional control architectures, enabling the robot to respond to physical events such as contact and collision with microsecond-to-millisecond reflex actions, far exceeding existing technologies.

[0033] 2. This invention significantly improves the intelligence and autonomous operation capability of robots.

[0034] The extended bytecode instructions for "decision-making" logic make robot programs no longer fixed trajectory sequences. The virtual machine can autonomously make logical judgments within the program and implement real-time jumps in the execution flow based on real-time physical interaction information (such as torque). This allows it to perform complex tasks such as "force-controlled search" and "flexible insertion" that require autonomous adjustment of strategies based on environmental conditions, transforming the robot from a passive "executor" to an active "decision-maker."

[0035] 3. This invention simplifies the programming of complex and flexible application scenarios. Developers no longer need to write complex multi-threaded programs on the host computer to synchronously process motion control and sensor data. They only need to use high-level instructions such as BranchOnForce in the robot script to intuitively describe a complete "perception-

[0036] The lower computer system of the present invention automatically completes the underlying complex mechanisms such as real-time data synchronization, conditional judgment, and program flow switching, which greatly reduces the development threshold and improves programming efficiency.

[0037] 4. The present invention ensures the high certainty and system stability of the entire adaptive control process.

[0038] The closed-loop process of "control execution" runs entirely within a hard real-time operating system such as VxWorks and relies on the distributed clock technology of the EtherCAT bus to ensure strict and deterministic timing for data sampling and the issuance of control instructions. This ensures that the robot's adaptive response behavior does not interfere with the stability of the underlying motion control. While giving the robot flexibility, it also maintains the high reliability and safety required for industrial applications.

[0039] 5. This invention effectively improves the smoothness of robot motion and protects equipment safety. The motion control module uses a quintic polynomial for trajectory planning, ensuring zero velocity and acceleration during the start and stop phases of all robot movements. This creates a smooth S-shaped acceleration and deceleration curve, minimizing mechanical shock. Furthermore, the extremely fast force response capability enables the robot to immediately stop or change motion with minimal overshoot in the event of accidental contact, effectively preventing damage to the robot or workpiece due to overload. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 This is a block diagram of the distributed modular control system structure of an industrial robot according to an embodiment of the present invention;

[0041] Figure 2 This is a schematic diagram of an application scenario of flexible pin insertion according to an embodiment of the present invention. DETAILED DESCRIPTION

[0042] refer to Figures 1 to 2 In order to make the purpose, technical solutions and advantages of the present invention more clear, the specific embodiments of the present invention are described in detail with reference to the accompanying drawings. It should be noted that these embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0043] The present invention provides a distributed modular control system for industrial robots. The system adopts a physically and logically separated architecture of upper and lower computers. Through functional decoupling, non-real-time task management and hard real-time motion control are clearly separated, thereby ensuring the stability and high responsiveness of core control tasks.

[0044] The system may specifically include a host computer, a slave computer, at least one driver slave station communicatively connected to the slave computer, and a motor mechanically connected to the driver slave station.

[0045] The host computer can be a standard industrial personal computer (IPC) running graphical robot control interface software. This software provides an integrated development environment for writing, editing, and managing scripts that control the robot's operating behavior. It also displays the robot's current status and alarm information in real time and receives user commands. The host computer establishes a communication connection with the slave computer via its integrated standard Ethernet interface.

[0046] The slave computer is the core physical unit that performs real-time motion control for the robot. In this embodiment, the slave computer's hardware foundation is an industrial-grade embedded PC card, which serves as the core processor and is installed in a PCI (or PCI Express) bus slot on a host computer. Using its dedicated onboard EtherCAT interface, the slave computer forms a high-speed, deterministic, real-time industrial fieldbus network with all slave drive units in a daisy-chain or star topology.

[0047] To ensure strict timing determinism and microsecond-level responsiveness for motion control instructions, the embedded PC board deploys and runs the VxWorks real-time operating system. Within this operating system, the system's core functions are encapsulated as multiple independent real-time tasks with varying scheduling priorities for concurrent management. This architecture effectively isolates interference between tasks, ensuring that high-priority motion control loops are not blocked by lower-priority communication or logging tasks.

[0048] Specifically, multiple software modules are deployed within the VxWorks operating system. These modules run as independent tasks and collaborate efficiently through zero-copy inter-task communication mechanisms (such as shared memory) provided by the operating system. These modules primarily include a bytecode interpreter module, a motion control module, and an EtherCAT master module.

[0049] Communication between the host and slave computers follows the ModbusTCP protocol. The host computer encapsulates the entire program script file, single-step debugging instructions, system configuration parameters, and other data written in the control interface using the ModbusTCP protocol and sends it to the slave computer via a standard Ethernet link. A background service task on the slave computer receives these data packets and passes them to the bytecode interpreter module. This communication link is characterized by stability and reliability, primarily used for non-periodic, large-scale block transmission of information.

[0050] The communication between the lower computer and all the drive slave stations fully adopts the EtherCAT protocol to meet the stringent real-time requirements of multi-axis synchronous control. The EtherCAT master station module is responsible for the management and periodic communication of the entire bus network. It runs at a fixed, millisecond time period (for example, 1ms). At the beginning of each cycle, it uses the distributed clock mechanism of EtherCAT to broadcast synchronization signals to all drive slave stations and issue their respective target position, speed or torque instructions. Then, within the same communication cycle, the response messages uploaded by all drive slave stations are collected, and the real-time data containing their physical status are parsed out, and these data are refreshed to a memory area called a process data image (ProcessDataImage). The real-time data may specifically include the actual position, actual speed, feedback torque or drive current of each motor shaft, providing direct, undelayed decision input for subsequent adaptive control links.

[0051] In one embodiment of the present invention, the key to achieving adaptive control lies in establishing a deep, real-time information coupling mechanism between the virtual machine in the bytecode interpreter module and the EtherCAT master module. This mechanism enables the robot's upper-level program logic to directly and instantly respond to underlying data changes generated by interactions with the physical world, thus breaking away from the rigidity of traditional pre-programmed models.

[0052] In order to achieve this coupling, the robot's high-level program scripting language was specially expanded to introduce a class of "perception-

[0053] Decision-making instructions. Taking a typical force control scenario as an example, the user can write a command like BranchOnForce(axis_id,F_thr,label) in the program script. The semantics of this command are: monitor the specified robot axis axis_id. Once the external force feedback value exceeds the preset torque threshold F_thr, the program execution flow should immediately and unconditionally jump to the location marked by label in the code.

[0054] When a program script containing such instructions is sent to the lower computer, the compiler in the bytecode interpreter module first parses it. After the compiler recognizes the high-level instruction "BranchOnForce", it translates it into a predefined extended bytecode format that can be directly executed by the virtual machine. For example, the extended bytecode may consist of an 8-bit opcode (Opcode) and subsequent operands (Operands). Its layout in memory may be: [Opcode:

[0055] OP_BRANCH_ON_FORCE, operand 1: axis_id, operand 2: binary representation of F_thr, operand 3: absolute bytecode address corresponding to label].

[0056] The premise for achieving adaptive decision-making is that the virtual machine can obtain real-time data with zero delay. In this embodiment, this premise is guaranteed by establishing a direct memory connection between the virtual machine task and the EtherCAT master task. Specifically, after the EtherCAT master module initializes and successfully establishes communication with all drive slaves, it will apply for and maintain a continuous memory area in the memory space of the VxWorks operating system, namely the process data image (PDI). During the system startup phase, the EtherCAT master module will register the starting physical address and size of the PDI in a global table of the system. Subsequently, when the virtual machine task in the bytecode interpreter module is started, it will query this global table to obtain a direct pointer to the PDI memory area. Through this pointer, the virtual machine can bypass all time-consuming operating system calls or message queues and directly access the latest data uploaded by any drive slave at the speed of reading and writing memory.

[0057] When the virtual machine encounters the aforementioned OP_BRANCH_ON_FORCE extension bytecode in its instruction execution loop, it performs a specific internal processing flow:

[0058] First, the virtual machine decodes the operands from the bytecode stream, that is, obtains the axis ID axis_id to be monitored, the torque threshold F_thr, and the jump target address label.

[0059] Next, the virtual machine uses the acquired PDI memory pointer to calculate the precise offset of the real-time torque value of the target axis axis_id in the memory area according to the preset PDI data structure, and directly reads the current torque feedback value F from the memory address. cur .

[0060] Then, the virtual machine performs a comparison operation in its arithmetic logic unit to determine the condition |F cur |≥F thr Is it true?

[0061] Finally, the virtual machine controls its own program execution flow based on the comparison result. If the condition is met, the virtual machine will forcibly modify the value of its internal program counter (ProgramCounter) to the jump target label stored in the operand. This way, during the next instruction fetch cycle, the virtual machine will begin execution from the new program location, thus achieving dynamic jumps in program logic. If the condition is not met, the program counter increments normally, and the virtual machine continues to execute the next bytecode instruction sequentially. Through this series of closely linked internal operations, the robot is able to make real-time decisions and adjust its behavior based on force feedback.

[0062] In one specific embodiment of the present invention, the motion control module integrated into the lower computer plays a crucial role in translating the logical motion commands parsed by the virtual machine into smooth and precise physical motions for the robot. After receiving the target position from the virtual machine, this module performs low-level trajectory planning, generating a series of high-density, time-sequential intermediate position commands for each robot joint.

[0063] To ensure that each robot joint has good dynamic characteristics at the start and end of movement to avoid mechanical shock and vibration, the motion control module in this embodiment uses a quintic polynomial interpolation algorithm to generate the joint space motion trajectory. A significant advantage of the quintic polynomial is that it can simultaneously meet the position, velocity, and acceleration at the start and end points.

[0064] Six boundary conditions constrain the natural formation of a smooth 5-shaped acceleration and deceleration curve.

[0065] Path. For any joint of the robot, its angular position q(t) changes with time t as a function of

[0066] The number can be described by the following general quintic polynomial:

[0067] q(t)=c0+c1t+c2t 2 +c3t 3 +c4t 4 +c5t 5 ;

[0068] Among them, c0, c1, c2, c3, c4, and c5 are the coefficients of the polynomial to be solved.

[0069] Correspondingly, the angular velocity v(t) and angular acceleration a(t) of the joint are the position function over time.

[0070] The first and second derivatives of :

[0071]

[0072] In planning a section from the starting position q s To the end position q f , the total running time is T d When the trajectory is obtained, the motion control module sets the following six boundary conditions: the position of the starting point (t = 0) is q s , the velocity and acceleration are both zero; the end point (t=T d ) is located at q f , the velocity and acceleration are also zero. By solving the linear equations formed by these six conditions, the values ​​of all six polynomial coefficients can be uniquely determined:

[0073] c0=q s ;

[0074] c1=0;

[0075] c2=0;

[0076]

[0077] After all coefficients are obtained, the motion control module can substitute the current time t in each servo control cycle to calculate the precise planned position q(t)

[0078] and sends it as the target instruction to the EtherCAT master module.

[0079] The EtherCAT master module in the slave computer is responsible for accurately and synchronously transmitting planned motion commands to all slave drives. This module runs as a high-priority real-time task. Its core function is to utilize the Distributed Clocks (DC) mechanism built into the EtherCAT bus protocol. This mechanism precisely measures and compensates for network delays, synchronizing the internal clocks of all nodes on the bus (including the master and all slaves) to the nanosecond level.

[0080] Based on this high-precision synchronization, the EtherCAT master module executes in a strictly fixed cycle (for example, 1 millisecond). At the beginning of each cycle, it obtains the target position of all joints at the current moment from the motion control module and packages these instructions into an EtherCAT data frame. The data frame is then sent to the bus and "flies" through all drive slaves in a very short time. During this process, each slave extracts its own instructions from the data frame in real time, and at the same time inserts its own feedback data (such as actual position, feedback torque, etc.) into the corresponding fields of the data frame. When the data frame returns to the master, the master module immediately parses out all the feedback data contained therein and uses it to update the process data image (PDI) mentioned above. This complete "instruction issuance-

[0081] The "state feedback" process is completed within one communication cycle, ensuring that the data used by the virtual machine when making decisions in the next cycle is up-to-date and deterministic.

[0082] To further illustrate the practical benefits of the technical solution described in this invention, a typical industrial robot "flexible pin insertion" task is described in detail below. In this scenario, the robot needs to precisely insert a pin into a workpiece hole, but the hole's position can vary slightly and unpredictably.

[0083] In this embodiment, the operator first writes a program script for performing this task in the control interface of the host computer. The core logic of the script is: the robot first moves to a safe approach point directly above the nominal position of the hole, and then performs an insertion action vertically downward. The key point is that while performing the downward insertion action, the program will enable an adaptive adjustment logic based on force feedback. An example of a simplified pseudocode script is as follows: MoveL P_approach / / Move to the approach point BranchOnForce(Axis_Z,10.0,label_correction) / / Set Z-axis force monitoring, jump if the torque exceeds 10.0N·m MoveL P_insert / / Execute the downward insertion action GoTo label_success / / Insertion successful, jump to the end

[0084] label_correction: / / Correction subroutine label MoveRel(0,0,5) / / Move back 5mm SearchSpiral() / / Execute a spiral search subroutine GoToP_approach / / Return to the approach point and prepare to try again

[0085] label_success: / / Task success label EndProgram / / End program

[0086] The program script is then sent from the host computer to the slave computer via the Modbus TCP protocol. The bytecode interpreter module in the slave computer receives and compiles it into an internal execution format containing extended bytecode.

[0087] The complete task execution process is as follows: When the virtual machine begins executing bytecode, it first issues instructions to the motion control module to drive the robot to move smoothly to the approach point P_approach. When the downward insertion instruction MoveLP_insert is executed, the virtual machine enters a special execution state because the force monitoring instruction BranchOnForce has been activated before this action.

[0088] During the robot's downward motion, due to actual deviation in the hole position, the pin's tip missed the hole opening and instead struck the workpiece surface at the edge of the hole. This contact momentarily generated a significant impact force on the robot's Z-axis (vertical axis), causing the output torque of the servo drive slave on that axis to increase dramatically. During the next EtherCAT communication cycle, this increased torque feedback value, FcurFcur, was collected and reported by the drive slave, and instantly updated by the EtherCAT master module to the corresponding memory location in the Process Data Image (PDI).

[0089] Almost immediately, the VM, in its execution loop, reads the updated Z-axis real-time torque value FcurFcur from the PDI through direct memory access, following the logic of the BranchOnForce instruction. The VM detects that the value of |Fcur||Fcur| exceeds the script's preset threshold of 10.0 N·m. Consequently, the VM immediately interrupts the current linear program flow and forces its internal program counter to jump to the bytecode address pointed to by label_correction.

[0090] Program execution then shifts to the correction subroutine. The virtual machine begins executing the instructions in this code block, first controlling the robot to retract a short distance upward along the Z axis to relieve contact stress. It then executes a pre-defined, narrow-range, planar spiral search subroutine, SearchSpiral(), to locate the correct entry point near the orifice. After completing this search, the program logic guides the robot back to the approach point, preparing for the next insertion attempt.

[0091] This "try-perception-

[0092] The "correction" loop continues. When, after a spiral search, the pin's position is aligned with the actual position of the hole, the robot executes the downward insertion action MoveLP_insert again. At this time, because the pin can slide smoothly into the hole, the Z-axis drive does not generate abnormal torque feedback. Therefore, the jump condition of the BranchOnForce instruction is never met, and the program is executed sequentially. After the pin is successfully inserted to the specified depth, the program finally jumps to label_success, successfully completing the entire task.

[0093] This example demonstrates that the system and method provided by the present invention, by establishing an efficient, direct closed-loop pathway between virtual machine program logic and real-time feedback from the underlying physical world, enables the robot to transcend being merely a tool that passively executes a predetermined trajectory. It can perceive its interactions with the environment in real time during execution and autonomously adjust and correct itself based on the logic defined in the high-level program script. This enables the robot to successfully complete uncertain precision assembly tasks that are beyond the capabilities of traditional rigid control systems, significantly enhancing its intelligence and operational adaptability.

[0094] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.

Claims

1. A distributed modular control system for industrial robots, characterized in that: include: The host computer is configured to provide program scripts; The lower computer is configured to communicate with the upper computer and receive program scripts. The lower computer includes: a bytecode interpreter module configured to compile a program script into bytecode, the bytecode interpreter module including a virtual machine for executing the bytecode; an EtherCAT master module configured to perform periodic data exchange with at least one drive slave to obtain real-time data reflecting a physical state of the drive slave; Among them, the virtual machine is configured to establish a data link with the EtherCAT master station module so that during the execution of bytecode, it can query real-time data according to the instructions of the bytecode and control the program execution process of the virtual machine itself based on the queried real-time data.

2. The system according to claim 1, wherein: The bytecode interpreter module is also configured to compile the preset instructions contained in the program script into "perception-decision" type instructions; the virtual machine is correspondingly configured to control the program execution process by executing the "perception-decision" type instructions.

3. The system according to claim 1, wherein: The manner in which the virtual machine establishes a data link with the EtherCAT master module is that the virtual machine is configured to directly access a process data image (PDI) maintained by the EtherCAT master module.

4. The system according to claim 2, wherein: When executing the "perception-decision" type instructions, the virtual machine is configured to compare the queried real-time data with the preset threshold contained in the instructions, and execute the program jump or pause execution action based on the comparison result to control the program execution process.

5. The system according to claim 1, wherein: The communication between the host computer and the slave computer is carried out through the ModbusTCP protocol.

6. The system according to claim 1, wherein: The lower computer is implemented based on an industrial-grade embedded PC board, and runs a VxWorks real-time operating system on the embedded PC board.

7. The system according to claim 1, wherein: The lower computer further includes a motion control module, which is configured to receive motion commands from the virtual machine and use a fifth-order polynomial for trajectory planning to generate drive instructions. The mathematical model of the fifth-order polynomial is: q(t)=c0+c1t+c2t 2 +c3t 3 +c4t 4 +c5t 5 ; Where q(t) is the planned joint position, t is time, and c0 to c5 are polynomial coefficients.

8. The system according to claim 7, characterized in that When the motion control module performs trajectory planning, it sets the starting position q s , end position q f And the total running time T d , and constrain the boundary conditions of the velocity and acceleration of the starting and ending points to zero, determine the polynomial coefficients, where the calculation formula of some coefficients is:

9. The system according to claim 1, wherein: The real-time data includes at least one selected from the following: actual position, speed, torque or current of the shaft.

10. A communication method for a distributed modular control system of an industrial robot, characterized in that: The steps include: The lower computer receives the program script sent by the upper computer; The bytecode interpreter module in the lower computer compiles the program script into bytecode; The EtherCAT master station module in the lower computer performs periodic data exchange with at least one drive slave station to obtain real-time data reflecting the physical status of the drive slave station; The virtual machine in the bytecode interpreter module executes the bytecode and, during the execution process, queries the real-time data through a data link established with the EtherCAT master module, and controls the program execution flow of the virtual machine itself based on the queried real-time data and the instructions of the bytecode.