Robot control method and system

By calibrating the coordinate systems of the industrial robot tool and workpiece and assigning them independent numbers, and combining encoder feedback and coordinate transformation algorithms, real-time control of the tool center point was achieved. This solved the problems of long debugging cycles and insufficient support for dynamic motion scenarios in traditional programming, and improved production efficiency and programming flexibility.

CN122500732APending Publication Date: 2026-08-04ZHONGKE TIMES (SHENZHEN) COMPUTER SYST CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHONGKE TIMES (SHENZHEN) COMPUTER SYST CO LTD
Filing Date
2026-07-03
Publication Date
2026-08-04

AI Technical Summary

Technical Problem

Existing industrial robot programming methods require re-teaching of points when tools are changed or workpiece positions change, resulting in long debugging cycles, low production efficiency, and insufficient support for dynamic motion scenarios, making it difficult to achieve high-precision, high-real-time synchronous tracking.

Method used

The coordinate system is calibrated and assigned a number to different tools and workpieces. The coordinate system number is independently bound through the teaching entries. Different motion command templates are selected. The dynamic position is calculated using real-time encoder feedback and coordinate transformation algorithm to achieve real-time control of the tool center point.

Benefits of technology

It significantly shortens the production debugging cycle, improves program reusability and flexibility, adapts to tool changes and workpiece movement, solves the problems of high development difficulty and poor real-time performance in traditional programming scenarios in circular motion scenarios, and reduces the programming threshold and debugging cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122500732A_ABST
    Figure CN122500732A_ABST
Patent Text Reader

Abstract

This disclosure relates to the field of industrial robot control technology, specifically to a robot control method and system. The method includes: assigning different tool coordinate system numbers to multiple different tools, and assigning different workpiece coordinate system numbers to multiple different workpieces or workpiece carrying devices; displaying a teaching point editing interface containing multiple teaching entries, each teaching entry defining a target point of the tool's center point; for each teaching entry, generating a configured teaching entry based on the target point's position coordinates input by the user and the bound coordinate system number; sequentially generating robot control program code for each configured teaching entry based on the user's input for the teaching entry and the configured motion instruction template selected by the user for the teaching entry; and executing the robot control program code to control the robot's movement. This disclosure improves program flexibility, adapts to multi-tool and multi-workpiece scenarios, and shortens the debugging cycle by decoupling and automatically switching coordinate systems and points.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of industrial robot control technology, specifically to a robot control method and system. Background Technology

[0002] In the field of industrial automation, industrial robots are widely used in complex operations such as welding, handling, gluing, and assembly. Robot programming is a key step in ensuring their accurate and efficient task execution. Traditional industrial robot programming mainly relies on online teach pendant programming, where the operator manually moves the robot's end effector tool centerpoint (TCP) to various target positions using a teach pendant, records these positions, inserts corresponding input / output logic, and finally generates a complete execution program.

[0003] However, existing teach-and-write programming methods have significant technical shortcomings in practical applications, exhibiting poor reusability and adaptability of point data. In traditional programming models, when a robot needs to change its end effector, such as switching from a welding torch to a gripper, or when the workpiece position shifts, the tool and workpiece coordinate systems bound to the taught points are fixed. Operators often need to re-teach all or most of the points, leading to long debugging cycles and low production efficiency. Simultaneously, the insufficient support of existing programming platforms for dynamic motion scenarios is also a major problem. For example, when performing operations on a workpiece on a rotating table, the workpiece is in continuous motion, making it difficult to achieve high-precision, high-real-time synchronous tracking between the robot's TCP and the dynamic target. Existing technologies lack a highly integrated, easily configurable, and robust programming method, resulting in high development difficulty, complex program debugging, and tracking accuracy susceptible to fluctuations in the table's speed in such applications. Summary of the Invention

[0004] To address the problems in the related technologies, this disclosure provides a robot control method and system.

[0005] In a first aspect, embodiments of this disclosure provide a robot control method, the method comprising:

[0006] Assign corresponding tool coordinate system numbers to multiple tool coordinate systems calibrated by multiple different tools; Assign corresponding workpiece coordinate system numbers to multiple workpiece coordinate systems calibrated for multiple different workpieces or workpiece bearing devices; The teaching point editing interface is shown. The teaching point editing interface includes multiple teaching entries, each of which is used to define a target point of the tool's center point. For each teaching entry, the teaching entry is configured based on the coordinates of the target point in the workpiece coordinate system to which the teaching entry is bound, the tool coordinate system number of the tool coordinate system to which the teaching entry is bound, and the workpiece coordinate system number of the workpiece coordinate system to which the teaching entry is bound, thus generating a configured teaching entry. For each configured teaching item, robot control program code is generated based on the user's input for the teaching item and the configured motion instruction template selected by the user for the teaching item. The robot control program code is executed to control the robot's movement. When the robot control program code is executed, it determines whether to switch the currently effective tool coordinate system and workpiece coordinate system based on whether the tool coordinate system number and workpiece coordinate system number bound to two consecutive teaching entries are consistent. When the user selects the configured disk tracking instruction template, the real-time position of the workpiece carried on the rotating disk in space is calculated in real time through a coordinate transformation algorithm based on the rotation angle of the rotating disk fed back by the encoder in real time, and the movement of the tool center point is controlled according to the real-time position.

[0007] According to embodiments of this disclosure, it further includes: The tool displays a command template library, which includes multiple motion command templates, with different motion command templates corresponding to different motion paths of the tool's center point. In response to the user's operation of selecting a motion instruction template from the instruction template library, a parameter configuration interface corresponding to the motion instruction template is displayed. The parameter configuration interface is used to receive template parameters input by the user that correspond to the motion instruction template. Generates a pre-configured motion instruction template based on the template parameters input by the user.

[0008] According to embodiments of this disclosure, the motion instruction template further includes a conveyor belt tracking instruction template; both the conveyor belt tracking instruction template and the disc tracking instruction template are invoked through a unified interface; The motion control process corresponding to the conveyor belt tracking instruction template includes: determining the initial position of the workpiece in the conveyor belt coordinate system according to the conveyor belt coordinate system configuration parameters and the workpiece initial position configuration parameters in the template parameters; calculating the real-time position of the workpiece carried on the conveyor belt in space in real time through a coordinate transformation algorithm based on the real-time feedback of the conveyor belt displacement data from the encoder; and controlling the movement of the tool center point of the tool according to the real-time position.

[0009] According to embodiments of this disclosure, the plurality of motion instruction templates further includes a pallet instruction template, and the template parameters corresponding to the pallet instruction template include the number of rows, columns, layers, and layer height of the pallet, and the row spacing and column spacing of the workpiece array carried by the pallet; The motion control process corresponding to the pallet instruction template includes: The matrix size of the pallet is determined by the number of rows, columns, and layers of the pallet, and the spacing between adjacent workpieces on the pallet is determined by the row spacing, column spacing, and layer height. Based on the workpiece coordinate system, number of rows, number of columns, number of layers, row spacing, column spacing, and layer height of the tray, calculate the position coordinates of all workpieces on the tray, and control the movement of the tool center point of the tool according to the position coordinates of all workpieces.

[0010] According to embodiments of this disclosure, the plurality of motion command templates further includes a gantry-type motion command template, and the motion control flow corresponding to the gantry-type motion command template includes: Based on the safe height value, lifting method, and lowering method in the template parameters, the tool center point of the control tool is raised from its current position to a safe height, moved horizontally from the safe height to a safe height above the target point, and lowered from the safe height to the target point; the lifting method and the lowering method are joint movement methods or linear movement methods.

[0011] According to embodiments of this disclosure, the transition modes in the template parameters include: TMCornerDistance mode; When the transition mode is TMCornerDistance mode, the template parameters also include linear axis transition distance value and rotary axis transition angle value. The linear axis transition distance value and the rotary axis transition angle value are used to define the transition range of the linear axis and the rotary axis when they are connected in continuous motion.

[0012] According to embodiments of this disclosure, controlling the robot's movement includes controlling the movement of the robot's axis group, the axis group including multiple joint axes of the robot, and controlling the movement of the robot's axis group includes: Obtain axis group task configuration data, which includes: task cycle value, CPU core allocation information, and priority setting information; wherein, the task cycle value is the cyclic execution interval shared by the bus communication task and the axis group trajectory planning task, the task cycle value is greater than or equal to 5 milliseconds, the CPU core allocation information is used to specify the CPU core that executes the specified axis group task, and the priority setting information sets the execution priority of the axis group task; According to the CPU core allocation information, the bus communication task and the axis group trajectory planning task are assigned to the CPU cores in the integrated drive and control hardware device that correspond to the CPU core allocation information for execution; wherein, the bus communication task is used to send motion commands to the servo drivers of the joint axes and obtain the actual state data of the joint axes from the encoder, and the axis group trajectory planning task is used to generate motion commands for each joint axis of the robot according to the user's input for the teaching item and the configured motion command template selected by the user for the teaching item.

[0013] Secondly, embodiments of this disclosure provide a robot control system applied to an industrial automation platform, the system comprising: The tool calibration module is configured to assign corresponding tool coordinate system numbers to multiple tool coordinate systems calibrated by multiple different tools; The workpiece calibration module is configured to assign corresponding workpiece coordinate system numbers to multiple workpiece coordinate systems calibrated for multiple different workpieces or workpiece bearing devices. The teaching point editing module is configured to display a teaching point editing interface, which includes multiple teaching entries, each of which is used to define a target point of the tool's center point. For each teaching entry, the teaching entry is configured based on the coordinates of the target point in the workpiece coordinate system to which the teaching entry is bound, the tool coordinate system number of the tool coordinate system to which the teaching entry is bound, and the workpiece coordinate system number of the workpiece coordinate system to which the teaching entry is bound, thus generating a configured teaching entry. The code generation module is configured to generate robot control program code sequentially for each configured teaching item, based on the user's input for the teaching item and the configured motion instruction template selected by the user for the teaching item. The execution module is configured to execute the robot control program code to control the robot's movement. When the robot control program code is executed, it determines whether to switch the currently effective tool coordinate system and workpiece coordinate system based on whether the tool coordinate system number and workpiece coordinate system number bound to two consecutive teaching entries are consistent. When the user selects the configured disk tracking instruction template, the real-time position of the workpiece carried on the rotating disk in space is calculated in real time through a coordinate transformation algorithm based on the rotation angle of the rotating disk fed back by the encoder in real time, and the tool center point of the tool is controlled to move according to the real-time position.

[0014] According to embodiments of this disclosure, it further includes: The instruction template library display module is configured to display an instruction template library, which includes multiple motion instruction templates, and different motion instruction templates correspond to different motion paths of the tool's center point; The parameter configuration module is configured to display a parameter configuration interface corresponding to the motion instruction template in response to a user's operation of selecting a motion instruction template from the instruction template library. The parameter configuration interface is used to receive template parameters input by the user that correspond to the motion instruction template. The template generation module is configured to generate pre-configured motion instruction templates based on template parameters input by the user.

[0015] According to embodiments of this disclosure, the motion instruction template further includes a conveyor belt tracking instruction template; both the conveyor belt tracking instruction template and the disc tracking instruction template are invoked through a unified interface; The motion control process corresponding to the conveyor belt tracking instruction template includes: determining the initial position of the workpiece in the conveyor belt coordinate system according to the conveyor belt coordinate system configuration parameters and the workpiece initial position configuration parameters in the template parameters; calculating the real-time position of the workpiece carried on the conveyor belt in space in real time through a coordinate transformation algorithm based on the real-time feedback of the conveyor belt displacement data from the encoder; and controlling the movement of the tool center point of the tool according to the real-time position.

[0016] According to the technical solution provided in this disclosure, corresponding tool coordinate system numbers are assigned to multiple tool coordinate systems calibrated for multiple different tools; corresponding workpiece coordinate system numbers are assigned to multiple workpiece coordinate systems calibrated for multiple different workpieces or workpiece bearing devices; a teaching point editing interface is displayed, the teaching point editing interface including multiple teaching entries, each teaching entry being used to define a target point of the tool center point; for each teaching entry, the teaching entry is configured according to the coordinates of the target point in the workpiece coordinate system bound to the teaching entry, the tool coordinate system number of the tool coordinate system bound to the teaching entry, and the workpiece coordinate system number of the workpiece coordinate system bound to the teaching entry, generating a configured teaching entry; and each configured teaching entry is then processed sequentially. The robot control program code is generated based on the user's input for the teaching item and the configured motion instruction template selected by the user for the teaching item. The robot control program code is executed to control the robot's movement. When the robot control program code is executed, it determines whether to switch the currently effective tool coordinate system and workpiece coordinate system based on whether the tool coordinate system number and workpiece coordinate system number bound to two consecutive teaching items are consistent. When the user selects the configured disk tracking instruction template, the real-time position of the workpiece carried on the rotating disk in space is calculated in real time through a coordinate transformation algorithm based on the rotation angle of the rotating disk fed back by the encoder in real time, and the tool center point of the tool is controlled to move according to the real-time position.

[0017] This disclosure achieves decoupling between coordinate systems and point data by separately calibrating and numbering coordinate systems for different tools and workpieces, and by independently binding coordinate system numbers to teaching entries. It allows different teaching entries to be bound to different coordinate system numbers, and different motion instruction templates to be selected during the program generation phase, making it possible for welding points and gripping points to call different motion templates. The consistency of the bound coordinate system numbers automatically determines whether to switch coordinate systems between consecutive teaching entries, without requiring manual user intervention. When changing tools or causing workpiece position shifts, only the corresponding coordinate system needs to be recalibrated; no points need to be re-taught, significantly shortening the production debugging cycle and improving program reusability and flexibility. This disclosure integrates various dedicated instruction templates such as disc tracking, conveyor belt tracking, pallet stacking, and gantry motion, configuring different motion types for different teaching entries through a unified interface. When selecting the disk tracking template, the system calculates the dynamic position in real time based on encoder real-time feedback and coordinate transformation algorithm and controls the tool center point tracking, which solves the problems of high development difficulty and poor real-time performance of traditional programming in circular motion scenarios; when selecting the pallet template, the system automatically calculates and traverses the matrix points, which significantly improves the programming efficiency of regular operations such as palletizing.

[0018] This disclosure significantly enhances the robot's adaptability to complex working conditions such as tool changes, workpiece movement, and multi-process mixing by using a dual decoupling mechanism that independently binds coordinate system numbers to teaching entries and independently selects motion instruction templates. Ordinary process engineers can complete the robot program writing for multiple mixed processes, reducing the programming threshold and debugging costs.

[0019] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0020] Other features, objects, and advantages of this disclosure will become more apparent from the following detailed description of non-limiting embodiments, taken in conjunction with the accompanying drawings. In the drawings: Figure 1 A flowchart illustrating a robot control method according to an embodiment of the present disclosure is shown; Figure 2 A schematic diagram showing a teaching point editing interface according to an embodiment of the present disclosure; Figure 3 A schematic diagram of a user input sub-interface of a teaching point editing interface according to an embodiment of the present disclosure is shown. Figure 4 A schematic diagram of a manual operation panel according to an embodiment of the present disclosure is shown.

[0021] Figure 5 A block diagram of a robot control system according to an embodiment of the present disclosure is shown. Detailed Implementation

[0022] In the following, exemplary embodiments of the present disclosure will be described in detail with reference to the accompanying drawings to enable those skilled in the art to readily implement them. Furthermore, for clarity, portions unrelated to the description of exemplary embodiments have been omitted from the drawings.

[0023] In this disclosure, it should be understood that terms such as “comprising” or “having” are intended to indicate the presence of features, figures, steps, behaviors, components, parts or combinations thereof disclosed in this specification, and are not intended to exclude the possibility of the presence or addition of one or more other features, figures, steps, behaviors, components, parts or combinations thereof.

[0024] It should also be noted that, unless otherwise specified, the embodiments and features described in this disclosure can be combined with each other. This disclosure will now be described in detail with reference to the accompanying drawings and embodiments.

[0025] For ease of understanding, the technical solutions of this disclosure are described below through specific embodiments.

[0026] Figure 1 A flowchart illustrating a robot control method according to an embodiment of the present disclosure is shown, such as... Figure 1 As shown, the robot control method includes steps S101 to S105.

[0027] In step S101, corresponding tool coordinate system numbers are assigned to multiple tool coordinate systems calibrated for multiple different tools.

[0028] According to embodiments of this disclosure, users calibrate various tools mounted on the robot's end effector via a tool calibration interface. Exemplarily, users can calibrate the tool coordinate system using a four-point or six-point method to obtain the positional offset and orientation of each tool's center point relative to the robot's end effector. Each calibrated tool coordinate system is assigned a unique tool coordinate system number; for example, number "1" corresponds to a gripper tool, number "2" to a suction cup tool, and number "3" to a welding torch tool. Users can view, modify, or delete calibrated tool coordinate systems in the tool calibration interface. All calibrated tool coordinate systems and their numbers are stored in the system for subsequent teaching entries.

[0029] In step S102, a corresponding workpiece coordinate system number is assigned to multiple workpiece coordinate systems calibrated for multiple different workpieces or workpiece bearing devices.

[0030] According to embodiments of this disclosure, users can calibrate different workpieces or workpiece support devices (e.g., incoming material pallets, finished product pallets, conveyor belts, rotary discs, and inspection tables) through a workpiece calibration interface. Exemplarily, users can calibrate the workpiece coordinate system using a three-point method: moving the tool center point to the origin position on the workpiece, the actual point position in the positive X-axis direction, and the actual point position in the positive Y-axis direction. The system automatically calculates and establishes the workpiece coordinate system based on these three points. Each calibrated workpiece coordinate system is assigned a unique workpiece coordinate system number; for example, number "1" corresponds to the incoming material pallet, number "2" corresponds to the finished product pallet, and number "3" corresponds to the inspection table. Users can view, modify, or delete calibrated workpiece coordinate systems in the workpiece calibration interface. All calibrated workpiece coordinate systems and their numbers are stored in the system for subsequent teaching entries.

[0031] In step S103, a teaching point editing interface is displayed. The teaching point editing interface includes multiple teaching entries, each of which is used to define a target point of the tool center point. For each teaching entry, the teaching entry is configured according to the coordinates of the target point in the workpiece coordinate system bound to the teaching entry, the tool coordinate system number of the tool coordinate system bound to the teaching entry, and the workpiece coordinate system number of the workpiece coordinate system bound to the teaching entry, thereby generating a configured teaching entry.

[0032] According to embodiments of this disclosure, the system displays a teaching point editing interface. For example... Figure 2 As shown, the interface includes a point data table area. The table header columns are, in order, "Number," "Name," "X," "Y," "Z," "R," "Hand System Used," "Workpiece Coordinate System Number," and "Tool Coordinate System Number." The table contains multiple teach entries, with each row corresponding to a target point. Each teach entry independently stores the complete configuration information of a target point, including the point name, coordinate values, hand system, workpiece coordinate system number, and tool coordinate system number. Users can select the corresponding teach entry by clicking on any row in the table, indicating that the target point is currently being edited. Through this tabular display, users can intuitively view and manage all created target points and quickly locate the teach entry that needs editing.

[0033] In response to a user's click on any teach item, the system displays the editing interface for that teach item on the left side of the screen. For example... Figure 3As shown, the editing interface includes: a name input box, a coordinate input area (including four input boxes: X, Y, Z, and R), a workpiece coordinate system number input box, a tool coordinate system number input box, a manual selection area, and a button bar, including a "Teach" button, a "Clear" button, a "Save" button, and a "Point Movement" button. Users can use the "Teach" button to read the robot's current real-time position coordinates and fill them into the coordinate input area, or directly input known coordinate values ​​in the input boxes. The workpiece coordinate system number input box receives the workpiece coordinate system number input by the user. This number specifies the workpiece coordinate system that will be effective when executing the teaching entry from among multiple calibrated workpiece coordinate systems. The tool coordinate system number input box receives the tool coordinate system number input by the user. This number specifies the tool coordinate system that will be effective when executing the teaching entry from among multiple calibrated tool coordinate systems.

[0034] After the user completes the input and clicks the "Save" button, the system associates and stores the coordinates of the target point of the current teaching entry in the workpiece coordinate system bound to the teaching entry, the tool coordinate system number bound to the teaching entry, and the workpiece coordinate system number bound to the teaching entry, generating a configured teaching entry. The user repeats the above operation to configure all teaching entries in sequence. Through the above editing interface, the user independently specifies the position coordinates, the workpiece coordinate system to which it belongs, and the tool coordinate system used for each target point, realizing the decoupling of point data and coordinate system.

[0035] In step S104, robot control program code is generated sequentially for each configured teaching item, based on the user's input for the teaching item and the configured motion instruction template selected by the user for the teaching item.

[0036] According to an embodiment of this disclosure, an instruction template library is shown, which includes multiple motion instruction templates, and different motion instruction templates correspond to different motion paths of the tool's center point; In response to the user's operation of selecting a motion instruction template from the instruction template library, a parameter configuration interface corresponding to the motion instruction template is displayed. The parameter configuration interface is used to receive template parameters input by the user that correspond to the motion instruction template.

[0037] This disclosure generates a configured motion instruction template based on template parameters input by the user. The user selects a motion instruction template from the instruction template library. In response to this selection, the system displays a parameter configuration interface corresponding to the selected motion instruction template. This interface receives template parameters input by the user corresponding to the motion instruction template. The system generates the configured motion instruction template based on these parameters. Exemplarily, the user can select motion instruction templates such as joint motion, linear motion, circular motion, gantry motion, conveyor belt tracking, disc tracking, or tray commands, and input the corresponding template parameters for each template in the parameter configuration interface, such as speed percentage, safety height value, and transition mode.

[0038] According to embodiments of this disclosure, when a user selects a pre-configured disk tracking instruction template, the robot control program code, when executed, calculates the real-time position of the workpiece carried on the rotating disk in space using a coordinate transformation algorithm based on the rotation angle of the rotating disk fed back in real time by the encoder equipped on the robot, and controls the movement of the tool's center point according to the real-time position. Specifically, the system acquires the raw pulse data fed back in real time by the encoder, converts the data into the real-time cumulative angular offset of the rotating disk according to the encoder's resolution parameters, constructs a rotation coordinate system based on the disk rotation center coordinate system configuration parameters determined by the user in advance using the three-point method, and reads the initial installation position of the workpiece on the disk. During the disk rotation process, the system uses a coordinate transformation algorithm to calculate the real-time position of the workpiece in the robot's world coordinate system, controls the tool's center point to move to the calculated position, and completes dynamic grasping or processing.

[0039] According to embodiments of this disclosure, the motion instruction template further includes a conveyor belt tracking instruction template; both the conveyor belt tracking instruction template and the disc tracking instruction template are invoked through a unified interface; The motion control process corresponding to the conveyor belt tracking instruction template includes: determining the initial position of the workpiece in the conveyor belt coordinate system according to the conveyor belt coordinate system configuration parameters and the workpiece initial position configuration parameters in the template parameters; calculating the real-time position of the workpiece carried on the conveyor belt in space in real time through a coordinate transformation algorithm based on the real-time feedback of the conveyor belt displacement data from the encoder; and controlling the movement of the tool center point of the tool according to the real-time position.

[0040] As an example, the conveyor belt tracking instruction template and the disk tracking instruction template share the same interface design. A unified interface distinguishes between enabling linear conveyor belt tracking and disk tracking, and a unified instruction trigger address and status feedback address complete the tracking task. When the conveyor belt tracking instruction template is invoked, the system constructs a conveyor belt coordinate system based on the user-inputted conveyor belt coordinate system transformation parameters. Based on the user-inputted initial workpiece position, the system determines the initial pose of the workpiece on the conveyor belt. During the conveyor belt's movement, the incremental encoder provides real-time feedback on the conveyor belt's displacement. The system uses a coordinate transformation algorithm to calculate the workpiece's current position in the robot's world coordinate system in real time and controls the tool's center point to move to that real-time position.

[0041] According to embodiments of this disclosure, the plurality of motion command templates further includes a pallet command template. The template parameters corresponding to the pallet command template include the number of rows, columns, layers, and layer height of the pallet, and the row spacing and column spacing of the workpiece array carried by the pallet. The motion control flow corresponding to the pallet command template includes: determining the matrix size of the pallet based on the number of rows, columns, and layers; determining the spacing between adjacent workpieces on the pallet based on the row spacing, column spacing, and layer height; calculating the position coordinates of all workpieces on the pallet based on the workpiece coordinate system, number of rows, columns, layers, row spacing, column spacing, and layer height; and controlling the movement of the tool center point of the tool sequentially based on the position coordinates of all workpieces.

[0042] Specifically, the user pre-defines three key points of the pallet through a teaching method: the origin P0 (a corner point of the pallet), the X-axis point P1 (another point along the length of the pallet), and the Y-axis point P2 (another point along the width of the pallet). The system automatically constructs a two-dimensional pallet coordinate system based on these three points. The user also needs to input the matrix size of the pallet in the pallet parameter configuration data: the number of rows, columns, and layers, as well as the row spacing, column spacing, and layer height. When executing pallet commands, the system automatically calculates the precise coordinates of each row, column, and layer position in the robot world coordinate system based on the pallet coordinate system and the spacing parameters. According to an embodiment of this disclosure, the calculation formula is as follows: P(i,j,k) = P0 + (i-1)·d_row·u_row+(j-1)·d_col·u_col + (k-1)·d_layer·u_layer.

[0043] Where P(i,j,k) represents the position vector of the target point in the i-th row, j-th column, and k-th layer in the robot world coordinate system; P0 is the origin point of the pallet coordinate system (i.e., the first point taught by the user, corresponding to the workpiece position in the first row, first column, and first layer); i, j, and k are the row number, column number, and layer number, respectively, i=1,2,…,R, j=1,2,…,C, k=1,2,…,L, and R, C, and L are the row number, column number, and layer number input by the user, respectively; d_row is the row spacing (the straight-line distance between the centers of two adjacent rows), and d_col is the column spacing (the straight-line distance between the centers of two adjacent rows). The system defines the vertical distance between the center of each column, d_layer as the layer height (vertical distance between adjacent layers); u_row as the unit vector in the row direction, normalized from the difference vector between the X-axis point (P1) and the origin P0 in the pallet coordinate system definition; u_col as the unit vector in the column direction, normalized from the difference vector between the Y-axis point (P2) and the origin P0, and orthogonal to u_row; u_layer as the unit vector in the vertical direction, usually taken as the positive Z-axis direction (0,0,1) of the robot world coordinate system, used to represent the lifting direction between layers during palletizing. When the row number, column number, or layer number starts from 0, (i-1), (j-1), and (k-1) in the formula are replaced with i, j, and k respectively. The system automatically traverses all combinations according to the above formula, generates a complete pallet position sequence, and controls the robot to move to each position sequentially according to the user-specified motion type.

[0044] Understandably, if the workpiece position shifts but the relative arrangement of the workpieces on the pallet remains unchanged, for example, if the entire pallet moves from position A to position B, the user does not need to modify any teaching entries. The user only needs to recalibrate the workpiece coordinate system corresponding to the pallet according to step S102, that is, re-teach the origin P0, the X-axis point P1, and the Y-axis point P2. The system will automatically convert all position coordinates to the new position coordinates according to the updated workpiece coordinate system parameters, and the robot can then operate normally in the new position. All teaching entries do not need to be re-edited.

[0045] If a different pallet size is used, for example, replacing the original 3×3 array pallet with a 100mm row spacing with a new 4×4 array pallet with a 120mm row spacing, the user still does not need to re-teach the position of each workpiece. In this scenario, the user only needs to change the number of rows from 3 to 4, the number of columns from 3 to 4, and the row spacing from 100mm to 120mm in the pallet instruction template parameter configuration interface. The system will automatically recalculate the position coordinates of all workpieces in space based on the updated template parameters and control the robot's movement according to the new position coordinates. Even if the number of layers or the layer height of the new pallet changes, the user only needs to modify the corresponding layer number and layer height values ​​in the template parameters. In this way, whether the entire pallet is moved or a different pallet size is replaced, it is not necessary to re-teach any individual point.

[0046] According to an embodiment of this disclosure, the plurality of motion command templates further includes a gantry-type motion command template. The motion control process corresponding to the gantry-type motion command template includes: according to the safety height value, lifting method, and lowering method in the template parameters, controlling the tool center point to be raised from the current position to a safety height, to be translated from the safety height to a safety height above the target point, and to be lowered from the safety height to the target point; the lifting method and the lowering method are joint motion methods or linear motion methods.

[0047] Specifically, the gantry motion instruction template is used to avoid collisions with workpieces or fixtures when gripping or placing workpieces. Users need to specify the safety height value, as well as the lifting and lowering methods in the template parameters. When executing gantry motion, the system first controls the tool center point to rise vertically from its current position to the safety height using the specified lifting method. Then, it controls the tool center point to move horizontally to the safety height position directly above the target point. Finally, it controls the tool center point to descend vertically from the safety height to the actual coordinates of the target point using the specified lowering method. The entire process forms a "gantry" shaped trajectory.

[0048] According to embodiments of this disclosure, the transition mode in the template parameters includes: TMCornerDistance mode; when the transition mode is TMCornerDistance mode, the template parameters further include linear axis transition distance value and rotation axis transition angle value, the linear axis transition distance value and the rotation axis transition angle value are respectively used to define the transition range of the linear axis and the rotation axis when continuous motion is connected.

[0049] As an example, the user selects the transition mode as "TMCornerDistance" through the parameter configuration interface of the motion command template. The system displays two input boxes: "Linear Transition Distance" and "Rotational Transition Angle." These values ​​are encapsulated in a parameter array, where the first element stores the linear axis transition distance value and the second element stores the rotational axis transition angle value. When the robot performs continuous motion, the system generates a smooth transition curve between adjacent motion trajectories based on these transition parameters. This distance-based hybrid mode allows the robot to smoothly transition from one motion to the next without decelerating to zero.

[0050] In step S105, the robot control program code is executed to control the robot's movement. When the robot control program code is executed, it determines whether to switch the currently effective tool coordinate system and workpiece coordinate system based on whether the tool coordinate system number and workpiece coordinate system number bound to two consecutive teaching entries are consistent. When the user selects the configured disk tracking instruction template, the real-time position of the workpiece carried on the rotating disk in space is calculated in real time through a coordinate transformation algorithm based on the rotation angle of the rotating disk fed back by the encoder in real time, and the tool center point of the tool is controlled to move according to the real-time position.

[0051] This embodiment of the disclosure sequentially generates robot control program code for each configured teaching item, based on the position coordinates of the configured teaching item, the bound tool coordinate system number and workpiece coordinate system number, and the configured motion instruction template and its parameters selected by the user for the configured teaching item. When the generated program code is executed, it determines whether to switch the currently effective tool coordinate system and workpiece coordinate system based on whether the bound tool coordinate system numbers and workpiece coordinate system numbers of two consecutive configured teaching items are consistent. If the tool coordinate system numbers are inconsistent, the currently effective tool coordinate system is automatically switched to the tool coordinate system corresponding to the bound tool coordinate system number of the next configured teaching item after the control tool center point reaches the target point defined by the previous configured teaching item; if the workpiece coordinate system numbers are inconsistent, the currently effective workpiece coordinate system is automatically switched to the workpiece coordinate system corresponding to the bound workpiece coordinate system number of the next configured teaching item after the control tool center point reaches the target point defined by the previous configured teaching item. The entire coordinate system switching process is completely transparent to the user, and the user does not need to manually insert any coordinate system switching instructions in the program.

[0052] In this embodiment, the generation and subsequent execution of the aforementioned program code are both completed by the motion control kernel within the same integrated drive and control hardware device. After generating the code, this kernel directly loads it into the real-time runtime environment without requiring external devices or a host computer. In step S105, the same integrated drive and control hardware device, which executed the program generated in step S104, executes the robot control program code to control the robot's movement. That is, this hardware device undertakes both the task of compiling and generating the program code and the scheduling and execution tasks of real-time bus communication and axis group trajectory planning.

[0053] According to embodiments of this disclosure, controlling the robot's movement includes controlling the movement of the robot's axis group, the axis group including multiple joint axes of the robot, and controlling the movement of the robot's axis group includes: Obtain axis group task configuration data, which includes: task cycle value, CPU core allocation information, and priority setting information; wherein, the task cycle value is the cyclic execution interval shared by the bus communication task and the axis group trajectory planning task, the task cycle value is greater than or equal to 5 milliseconds, the CPU core allocation information is used to specify the CPU core that executes the specified axis group task, and the priority setting information sets the execution priority of the axis group task; According to the CPU core allocation information, the bus communication task and the axis group trajectory planning task are assigned to the CPU cores in the integrated drive and control hardware device that correspond to the CPU core allocation information for execution; wherein, the bus communication task is used to send motion commands to the servo drivers of the joint axes and obtain the actual state data of the joint axes from the encoder, and the axis group trajectory planning task is used to generate motion commands for each joint axis of the robot according to the user's input for the teaching item and the configured motion command template selected by the user for the teaching item.

[0054] In an exemplary embodiment of this disclosure, the system executes the robot control program code generated in step S104. The user creates a bus communication task named "EtherCAT_Task" through the system, responsible for sending motion commands to the servo driver via the EtherCAT bus and obtaining the actual position, velocity, and status data of each joint axis from the encoder. The user can set the cycle time of this task in the task configuration interface, for example, setting the cycle time to 5 milliseconds, 6 milliseconds, or more. Since the standard module processing time is around 5 milliseconds, setting the task cycle value to no less than 5 milliseconds can avoid axis group call errors due to an excessively short task cycle. The user can also adjust the task cycle value according to the actual operating conditions by monitoring the maximum cycle time of the task.

[0055] Users specify CPU core allocation information in the configuration interface, such as assigning bus communication tasks and axis group trajectory planning tasks to the same CPU core. This allocation method ensures data synchronization between bus communication and axis group trajectory planning tasks, avoiding latency and uncertainty issues caused by cross-core communication. Users can also set task priority information, such as setting bus communication tasks to the highest priority. The system executes either the bus communication task or the axis group trajectory planning task in each cycle. Since the priority of the bus communication task is higher than that of the axis group trajectory planning task, the bus communication task is executed first if there is an unexecuted bus communication task; otherwise, the axis group trajectory planning task is executed. After obtaining the above configuration data, the system binds the bus communication task and the axis group trajectory planning task to the specified CPU core for execution according to the CPU core allocation information during runtime. The bus communication task is executed periodically according to the set task cycle, responsible for sending the joint position, velocity, acceleration, and other motion commands generated by the axis group trajectory planning task to each servo driver via the bus, while simultaneously reading the actual joint state data fed back by the encoder. The axis group trajectory planning task calculates the target position, velocity, and acceleration of each joint axis in each control cycle based on the template parameters input by the user and the position coordinates of each configured teaching item, generating a smooth motion trajectory.

[0056] Furthermore, Figure 4A schematic diagram of a manual operation panel according to an embodiment of the present disclosure is shown. According to the embodiment of the present disclosure, during the execution of the robot control program code, the method further includes: determining the currently active coordinate system and displaying the coordinate system icon corresponding to the currently active coordinate system in the status bar in real time; if the current operation mode is manual operation mode, upon receiving a directional jog trigger operation input by the user through the robot controller, controlling the tool center point of the specified tool to move along the currently active coordinate system in the direction triggered by the jog operation. Exemplarily, the system monitors and displays the currently active coordinate system type in real time during runtime, and the user can manually switch the currently active coordinate system through the coordinate system icon in the status bar or a drop-down menu. When the user sets the operation mode switch to manual speed limit mode, the system enters manual operation mode. The user inputs a jog operation via the directional jog buttons. Based on the currently active coordinate system and the direction triggered by the user, the system controls the tool's center point to move along the corresponding axis of that coordinate system, acquiring the user's operation command on the manual operation panel. The manual operation panel includes: an enable button control, a reset button control, a coordinate system switching drop-down menu, a speed percentage slider control, and multiple directional jog button controls. In response to the operation command, the system controls the specified tool to jog along the corresponding direction of the currently active coordinate system via the corresponding interface address. For example, the coordinate system switching operation corresponds to a coordinate system switching address; X-direction forward rotation corresponds to the X-direction forward rotation interface address; X-direction reverse rotation corresponds to the X-direction reverse rotation interface address; and so on for Y, Z, A, etc. The user selects a coordinate system via the drop-down menu on the manual operation panel, sets the speed in the speed percentage slider, and then clicks the directional button. The system then controls the tool's center point to move along the corresponding direction of the currently active coordinate system at the set speed via the corresponding interface address.

[0057] Secondly, this disclosure provides a robot control system 200, characterized in that it is applied to an industrial automation platform, the system comprising: The tool calibration module 201 is configured to assign corresponding tool coordinate system numbers to multiple tool coordinate systems calibrated by multiple different tools; The workpiece calibration module 202 is configured to assign corresponding workpiece coordinate system numbers to multiple workpiece coordinate systems calibrated for multiple different workpieces or workpiece bearing devices. The teaching point editing module 203 is configured to display a teaching point editing interface, which includes multiple teaching entries, each teaching entry being used to define a target point of the tool's center point; For each teaching entry, the teaching entry is configured based on the coordinates of the target point in the workpiece coordinate system to which the teaching entry is bound, the tool coordinate system number of the tool coordinate system to which the teaching entry is bound, and the workpiece coordinate system number of the workpiece coordinate system to which the teaching entry is bound, thus generating a configured teaching entry. The code generation module 204 is configured to generate robot control program code sequentially for each configured teaching item, based on the user's input for the teaching item and the configured motion instruction template selected by the user for the teaching item. The execution module 205 is configured to execute the robot control program code to control the robot's movement. When the robot control program code is executed, it determines whether to switch the currently effective tool coordinate system and workpiece coordinate system based on whether the tool coordinate system number and workpiece coordinate system number bound to two consecutive teaching entries are consistent. When the user selects the configured disk tracking instruction template, based on the rotation angle of the rotating disk fed back by the encoder in real time, the real-time position of the workpiece carried on the rotating disk in space is calculated in real time through a coordinate transformation algorithm, and the tool center point of the tool is controlled to move according to the real-time position.

[0058] According to embodiments of this disclosure, it further includes: The instruction template library display module 206 is configured to display an instruction template library, which includes multiple motion instruction templates, and different motion instruction templates correspond to different motion paths of the tool's center point; The parameter configuration module 207 is configured to display a parameter configuration interface corresponding to the motion instruction template in response to a user's operation of selecting a motion instruction template from the instruction template library. The parameter configuration interface is used to receive template parameters input by the user that correspond to the motion instruction template. The template generation module 208 is configured to generate a pre-configured motion instruction template based on the template parameters input by the user.

[0059] According to embodiments of this disclosure, the motion instruction template further includes a conveyor belt tracking instruction template; both the conveyor belt tracking instruction template and the disc tracking instruction template are invoked through a unified interface; The motion control process corresponding to the conveyor belt tracking instruction template includes: determining the initial position of the workpiece in the conveyor belt coordinate system according to the conveyor belt coordinate system configuration parameters and the workpiece initial position configuration parameters in the template parameters; calculating the real-time position of the workpiece carried on the conveyor belt in space in real time through a coordinate transformation algorithm based on the real-time feedback of the conveyor belt displacement data from the encoder; and controlling the movement of the tool center point of the tool according to the real-time position.

[0060] In particular, according to embodiments of this disclosure, the methods described above can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program containing program code for performing the methods described above. In such embodiments, the computer program can be downloaded and installed from a network via a communication component, and / or installed from a removable medium.

[0061] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0062] The units or modules described in the embodiments of this disclosure can be implemented in software or programmable hardware. The described units or modules can also be located in a processor, and the names of these units or modules do not necessarily constitute a limitation on the unit or module itself.

[0063] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the inventive concept. For example, technical solutions formed by substituting the above-described features with (but not limited to) technical features disclosed in this disclosure that have similar functions.

Claims

1. A robot control method, characterized in that, The method includes: Assign corresponding tool coordinate system numbers to multiple tool coordinate systems calibrated by multiple different tools; Assign corresponding workpiece coordinate system numbers to multiple workpiece coordinate systems calibrated for multiple different workpieces or workpiece bearing devices; The teaching point editing interface is shown. The teaching point editing interface includes multiple teaching entries, each of which is used to define a target point of the tool's center point. For each teaching entry, the teaching entry is configured based on the coordinates of the target point in the workpiece coordinate system to which the teaching entry is bound, the tool coordinate system number of the tool coordinate system to which the teaching entry is bound, and the workpiece coordinate system number of the workpiece coordinate system to which the teaching entry is bound, thus generating a configured teaching entry. For each configured teaching item, robot control program code is generated based on the user's input for the teaching item and the configured motion instruction template selected by the user for the teaching item. The robot control program code is executed to control the robot's movement. When the robot control program code is executed, it determines whether to switch the currently effective tool coordinate system and workpiece coordinate system based on whether the tool coordinate system number and workpiece coordinate system number bound to two consecutive teaching entries are consistent. When the user selects the configured disk tracking instruction template, the workpiece carried on the rotating disk is calculated in real time in space based on the rotation angle of the rotating disk fed back by the encoder in real time through a coordinate transformation algorithm, and the tool center point of the tool is controlled to move according to the real-time position.

2. The method according to claim 1, characterized in that, Also includes: The tool displays a command template library, which includes multiple motion command templates, with different motion command templates corresponding to different motion paths of the tool's center point. In response to the user's operation of selecting a motion instruction template from the instruction template library, a parameter configuration interface corresponding to the motion instruction template is displayed. The parameter configuration interface is used to receive template parameters input by the user that correspond to the motion instruction template. Generates a pre-configured motion instruction template based on the template parameters input by the user.

3. The method according to claim 2, characterized in that, The motion instruction template also includes a conveyor belt tracking instruction template; both the conveyor belt tracking instruction template and the disc tracking instruction template are invoked through a unified interface; The motion control process corresponding to the conveyor belt tracking instruction template includes: determining the initial position of the workpiece in the conveyor belt coordinate system according to the conveyor belt coordinate system configuration parameters and the workpiece initial position configuration parameters in the template parameters; calculating the real-time position of the workpiece carried on the conveyor belt in space in real time through a coordinate transformation algorithm based on the real-time feedback of the conveyor belt displacement data from the encoder; and controlling the movement of the tool center point of the tool according to the real-time position.

4. The method according to claim 2, characterized in that, The plurality of motion instruction templates also include a pallet instruction template. The template parameters corresponding to the pallet instruction template include the number of rows, columns, layers, and layer height of the pallet, as well as the row spacing and column spacing of the workpiece array carried by the pallet. The motion control process corresponding to the pallet instruction template includes: The matrix size of the pallet is determined by the number of rows, columns, and layers of the pallet, and the spacing between adjacent workpieces on the pallet is determined by the row spacing, column spacing, and layer height. Based on the workpiece coordinate system, number of rows, number of columns, number of layers, row spacing, column spacing, and layer height of the tray, calculate the position coordinates of all workpieces on the tray, and control the movement of the tool center point of the tool according to the position coordinates of all workpieces.

5. The method according to claim 2, characterized in that, The plurality of motion command templates also includes a gantry-type motion command template, and the motion control flow corresponding to the gantry-type motion command template includes: Based on the safe height value, lifting method, and lowering method in the template parameters, the tool center point of the control tool is raised from its current position to a safe height, moved horizontally from the safe height to a safe height above the target point, and lowered from the safe height to the target point; the lifting method and the lowering method are joint movement methods or linear movement methods.

6. The method according to claim 2, characterized in that, The transition modes in the template parameters include: TMCornerDistance mode; When the transition mode is TMCornerDistance mode, the template parameters also include linear axis transition distance value and rotary axis transition angle value. The linear axis transition distance value and the rotary axis transition angle value are used to define the transition range of the linear axis and the rotary axis when they are connected in continuous motion.

7. The method according to claim 1, characterized in that, The control of robot movement includes controlling the movement of the robot's axis group, the axis group including multiple joint axes of the robot, and the control of the robot's axis group movement includes: Obtain axis group task configuration data, which includes: task cycle value, CPU core allocation information, and priority setting information; wherein, the task cycle value is the cyclic execution interval shared by the bus communication task and the axis group trajectory planning task, the task cycle value is greater than or equal to 5 milliseconds, the CPU core allocation information is used to specify the CPU core that executes the specified axis group task, and the priority setting information sets the execution priority of the axis group task; According to the CPU core allocation information, the bus communication task and the axis group trajectory planning task are assigned to the CPU cores in the integrated drive and control hardware device that correspond to the CPU core allocation information for execution; wherein, the bus communication task is used to send motion commands to the servo drivers of the joint axes and obtain the actual state data of the joint axes from the encoder, and the axis group trajectory planning task is used to generate motion commands for each joint axis of the robot according to the user's input for the teaching item and the configured motion command template selected by the user for the teaching item.

8. A robot control system, characterized in that, The system, applied to an industrial automation platform, includes: The tool calibration module is configured to assign corresponding tool coordinate system numbers to multiple tool coordinate systems calibrated by multiple different tools; The workpiece calibration module is configured to assign corresponding workpiece coordinate system numbers to multiple workpiece coordinate systems calibrated for multiple different workpieces or workpiece bearing devices. The teaching point editing module is configured to display a teaching point editing interface, which includes multiple teaching entries, each of which is used to define a target point of the tool's center point. For each teaching entry, the teaching entry is configured based on the coordinates of the target point in the workpiece coordinate system to which the teaching entry is bound, the tool coordinate system number of the tool coordinate system to which the teaching entry is bound, and the workpiece coordinate system number of the workpiece coordinate system to which the teaching entry is bound, thus generating a configured teaching entry. The code generation module is configured to generate robot control program code sequentially for each configured teaching item, based on the user's input for the teaching item and the configured motion instruction template selected by the user for the teaching item. The execution module is configured to execute the robot control program code to control the robot's movement. When the robot control program code is executed, it determines whether to switch the currently effective tool coordinate system and workpiece coordinate system based on whether the tool coordinate system number and workpiece coordinate system number bound to two consecutive teaching entries are consistent. When the user selects the configured disk tracking instruction template, the real-time position of the workpiece carried on the rotating disk in space is calculated in real time through a coordinate transformation algorithm based on the rotation angle of the rotating disk fed back by the encoder in real time, and the tool center point of the tool is controlled to move according to the real-time position.

9. The system according to claim 8, characterized in that, Also includes: The instruction template library display module is configured to display an instruction template library, which includes multiple motion instruction templates, and different motion instruction templates correspond to different motion paths of the tool's center point; The parameter configuration module is configured to display a parameter configuration interface corresponding to the motion instruction template in response to a user's operation of selecting a motion instruction template from the instruction template library. The parameter configuration interface is used to receive template parameters input by the user that correspond to the motion instruction template. The template generation module is configured to generate pre-configured motion instruction templates based on template parameters input by the user.

10. The system according to claim 9, characterized in that, The motion instruction template also includes a conveyor belt tracking instruction template; both the conveyor belt tracking instruction template and the disc tracking instruction template are invoked through a unified interface; The motion control process corresponding to the conveyor belt tracking instruction template includes: determining the initial position of the workpiece in the conveyor belt coordinate system according to the conveyor belt coordinate system configuration parameters and the workpiece initial position configuration parameters in the template parameters; calculating the real-time position of the workpiece carried on the conveyor belt in space in real time through a coordinate transformation algorithm based on the real-time feedback of the conveyor belt displacement data from the encoder; and controlling the movement of the tool center point of the tool according to the real-time position.