Method and system for automatic return to home position after an abnormal stop of an industrial robot

By decomposing the working path of an industrial robot into sub-task programs and forming custom motion instructions, calculating the deviation value of the interruption point and the state of the end effector, the efficiency and safety issues of returning the robot to its original position after abnormal shutdown are solved, and efficient and safe automatic return is achieved.

CN117301057BActive Publication Date: 2026-07-14东风设备制造有限公司

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
东风设备制造有限公司
Filing Date
2023-09-28
Publication Date
2026-07-14

Smart Images

  • Figure CN117301057B_ABST
    Figure CN117301057B_ABST
Patent Text Reader

Abstract

The application discloses a method and system for returning to the original position after abnormal stop of an industrial robot, comprising the following steps: storing each work path of the robot as a plurality of sub-task programs, numbering the plurality of sub-task programs and points in each sub-task program, adding a movement type, a program number and a point number to a basic movement instruction to form a self-defined movement instruction, and calculating a deviation value of an interruption point relative to a work path according to first position coordinate data of the interruption point and the self-defined movement instruction when the robot abnormally stops and receives a return-to-original-position instruction, and planning a path for the robot to return to the original position according to the deviation value and a state of an end effector of the robot. The application can update and modify the sub-task programs according to actual work requirements, has high adaptability, and can avoid collision accidents caused by manual adjustment of a sub-task program track and change of a state of an end effector of the robot.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of industrial robot technology, and in particular to a method and system for automatically returning an industrial robot to its original position after an abnormal shutdown. Background Technology

[0002] With the gradual advancement of Industry 4.0, industrial robots are increasingly being used in production and manufacturing across various industrial sectors. In practical applications, issues such as unstable power supply or network in the workshop, and operator errors can all lead to abnormal robot shutdowns. The various problems encountered by industrial robots in daily production are receiving increasing attention from engineers and factory managers. Because operating industrial robots requires a certain level of expertise and complexity, and because safety control regulations in most factories in China require robots to return to a pre-set safe position (referred to as the "home position") after an abnormal shutdown before they can be restarted.

[0003] Currently, there are generally two methods to return industrial robots to their original positions after shutdowns caused by alarms, collisions, or human intervention. One method involves the operator manually teaching the robot to return to its original position. This method has relatively low requirements for robot programming, but its programming efficiency is relatively low due to environmental and equipment factors. Furthermore, since the location of abnormal shutdowns is unpredictable and not fixed, manual teaching to return to the original position is required after each abnormal shutdown, resulting in poor repeatability. The other method involves secondary development of the robot's work path. When an abnormal shutdown occurs, the robot is controlled to continue moving along the current work path to reach the final workstation, thus achieving automatic return to its original position. However, during the execution of the work path, the state of its end effector changes. For example, after the handling robot moves to the gripper position, the gripper will tighten its grip on the workpiece. This method does not consider the changes in the robot's end effector's reciprocating state, and during the automatic return process, collisions may occur due to changes in the state of the robot's end effector. Summary of the Invention

[0004] In view of the above-mentioned defects or improvement needs of the existing technology, the purpose of this invention is to provide a method and system for an industrial robot to return to its original position after abnormal shutdown. When the robot stops abnormally, the method plans the path for the robot to return to its original position based on the deviation of the interruption point from the working path and the state of the robot's end effector, so as to avoid collision accidents caused by manual adjustment of the sub-task program trajectory and changes in the state of the robot's end effector.

[0005] To achieve this objective, the present invention adopts the following technical solution:

[0006] This invention provides a method for an industrial robot to automatically return to its original position after an abnormal shutdown, comprising:

[0007] S100. Store each working path of the robot as multiple sub-task programs, number the multiple sub-task programs and the points in each sub-task program, and add motion type, program number and point number to the basic motion instructions to form custom motion instructions.

[0008] S200. After receiving the return-to-original-position command, take the robot's current position as the interruption point and obtain the first position coordinate data of the interruption point.

[0009] S300. Based on the most recently executed custom motion command and the first position coordinate data, calculate and determine the deviation value between the interruption point and the current working path;

[0010] S400. If the deviation value is within the allowable deviation range, the robot is controlled to return to its original position according to the state of the robot end effector.

[0011] Furthermore, for any point in each subtask program, the corresponding custom motion instruction includes a program number, a point number, a target point, and a motion type, wherein:

[0012] The array of positional variables is used to store the position coordinate data of all points in each subtask program; the array of character variables is used to store the motion type; and the array of numerical variables is used to store the reference tool coordinate system number and workpiece coordinate system number of all points in each subtask program.

[0013] Further, step S300 includes:

[0014] S301. Determine the starting point and target point based on the most recently executed custom motion command;

[0015] S302. Based on the relative positional relationship between the starting point, the target location, and the interruption point, determine the deviation value between the interruption point and the current working path.

[0016] Further, step S302 includes:

[0017] Read the second position coordinate data of the starting point and the third position coordinate data of the target location;

[0018] Based on the first position coordinate data, the second position coordinate data, and the third position coordinate data, calculate the first distance between the interruption point and the starting point, the second distance between the interruption point and the target point, and the third distance between the starting point and the target point;

[0019] If both the first distance and the second distance are less than the third distance, then the interruption point is determined to be on the trajectory between the starting point and the target point.

[0020] Furthermore, step S302 also includes:

[0021] Based on the first position coordinate data, the second position coordinate data, and the third position coordinate data, calculate the fourth distance from the interruption point to the straight line formed by the starting point and the target point, and use the fourth distance as the deviation value.

[0022] Further, step S400 includes:

[0023] Based on the most recently executed custom motion command, read the motion type between the starting point and the target point;

[0024] When the robot is in joint motion, if the deviation value is less than the allowable deviation value for joint motion, the robot is controlled to return to its original position according to the state of the robot's end effector.

[0025] When the robot is moving in a straight line, if the deviation value is less than the allowable deviation value for straight line movement, the robot is controlled to return to its original position based on the state of the robot's end effector.

[0026] Furthermore, the custom motion command also includes recording the robot end effector state through a Boolean variable, wherein the robot end effector state includes actions not performed by the robot end effector and actions performed by the robot end effector.

[0027] Furthermore, controlling the robot to return to its original position based on the state of the robot's end effector includes:

[0028] If the robot's end effector does not perform an action, the robot is controlled to move backward from the interruption point back to its original position based on the current working path;

[0029] If the robot's end effector performs an action, the robot is controlled to move forward from the interruption point back to its original position based on the current working path.

[0030] Furthermore, the method also includes setting an in-situ safety zone, and before step S300, it further includes:

[0031] If the interruption point is determined to fall within the original safe zone based on the first position coordinate data, then the robot is controlled to move from the interruption point back to its original position.

[0032] This invention also provides a system for an industrial robot to automatically return to its original position after an abnormal shutdown, comprising:

[0033] The custom motion instruction generation module is used to store each working path of the robot as multiple sub-task programs, number the multiple sub-task programs and the points in each sub-task program, and add motion type, program number and point number to the basic motion instruction to form a custom motion instruction.

[0034] The interruption point deviation calculation module is used to obtain the first position coordinate data of the interruption point after receiving the return-to-original-position instruction, and calculate and determine the deviation value between the interruption point and the current working path based on the most recently executed custom motion instruction and the first position coordinate data.

[0035] The robot control module is used to control the path for the robot to return to its original position based on the deviation value and the state of the robot's end effector.

[0036] The beneficial effects of this invention are:

[0037] This invention provides a method and system for automatically returning an industrial robot to its original position after an abnormal shutdown. The method involves storing the robot's working paths as multiple sub-task programs, numbering each sub-task program and its corresponding points, and adding motion type, program number, and point number to basic motion instructions to form custom motion instructions. Upon receiving a return-to-original-position instruction, the robot's current position is used as the interruption point, and the first position coordinate data of the interruption point is obtained. Based on the most recently executed custom motion instruction and the first position coordinate data, the deviation value between the interruption point and the current working path is calculated. If the deviation value meets the allowable deviation range, the robot is controlled to return to its original position according to the state of the robot's end effector.

[0038] 1. In this invention, each working path of the robot is stored as a multiple sub-task program, which can be updated and modified according to actual work needs, thereby improving the adaptability of this invention; the basic motion instructions are further developed to form custom motion instructions, and then arrays are used to store and retrieve the required data, thereby improving the working efficiency of this invention.

[0039] 2. This invention verifies the deviation between the robot's interruption point and the current working path. After an abnormal shutdown, when the robot's position deviates from the current working path due to manual adjustment of the sub-task program trajectory, it effectively avoids collision accidents caused by automatically returning to the original position.

[0040] 3. This invention controls the robot's forward or reverse movement back to its original position based on the state of the robot's end effector, thus avoiding collision accidents caused by changes in the state of the robot's end effector.

[0041] Additional aspects and advantages of this application will be set forth in part in the description which follows, and will become apparent from the description or may be learned by practice of this application. Attached Figure Description

[0042] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:

[0043] Figure 1 This is a flowchart of a method for automatically returning an industrial robot to its original position after an abnormal shutdown, as described in an embodiment of the present invention.

[0044] Figure 2 This is a schematic diagram of the working path stored in the subtask program of an embodiment of the present invention;

[0045] Figure 3 This is a schematic diagram of a custom motion command in an embodiment of the present invention;

[0046] Figure 4 This is a schematic diagram of an abnormal robot shutdown in an embodiment of the present invention;

[0047] Figure 5 This is a flowchart of the return-to-home-position interrupt procedure in an embodiment of the present invention;

[0048] Figure 6 This is a schematic diagram illustrating the degree of deviation between the interruption point and the working path in an embodiment of the present invention;

[0049] Figure 7 This is a schematic diagram of a system in which an industrial robot automatically returns to its original position after an abnormal shutdown, according to an embodiment of the present invention. Detailed Implementation

[0050] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present invention, and not all of the structures.

[0051] In the description of this invention, unless otherwise explicitly specified and limited, the terms "connected," "linked," and "fixed" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0052] Those skilled in the art will understand that, unless otherwise stated, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the word “comprising” as used in the specification of this application means the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or combinations thereof.

[0053] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the same meaning as in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined as in the embodiments of this application.

[0054] This application provides a method and system for automatically returning an industrial robot to its original position after an abnormal shutdown. When an industrial robot stops abnormally, the system plans the robot's path back to its original position based on the deviation of the interruption point from the working path and the state of the robot's end effector, effectively avoiding collision accidents caused by manual adjustment of the sub-task program trajectory and changes in the state of the robot's end effector.

[0055] This application provides a method for an industrial robot to automatically return to its original position after an abnormal shutdown. The flowchart of this method is as follows: Figure 1 As shown, the method for automatically returning the industrial robot to its original position after an abnormal shutdown in this embodiment includes steps S100-S400.

[0056] S100. Store each working path of the robot as multiple sub-task programs, number each of the multiple sub-task programs and the points in each sub-task program, and add motion type, program number and point number to the basic motion instructions to form custom motion instructions.

[0057] A schematic diagram of the working path stored in the subtask program in this embodiment is shown below. Figure 2 As shown, a work path is defined as the round-trip path of the robot from its home position to a working device, and each work path includes multiple points. A home safety zone is defined near the home position, within which the robot can move freely without interfering with surrounding equipment; this home safety zone is typically rectangular or cylindrical.

[0058] Furthermore, design sub-task programs for the normal operation of the robot according to the above work path. It should be noted that the work path recorded by the sub-task program usually includes: starting from the original position, moving to the outside of the equipment, entering the gripper, the end effector performing the action, exiting the gripper, moving to the outside of the equipment, and returning to the original position. However, based on the actual application scenarios of various industrial robots, the starting point and ending point of the sub-task program may not be the original position, but it must be within the safe zone of the original position.

[0059] See also Figure 2 First, the multiple sub-task programs are numbered. For example, the sub-task program corresponding to the robot's working path from the origin to device 1 is designated as program 1, the sub-task program corresponding to the robot's working path from the origin to device 2 is designated as program 2, and so on. Then, the points in each sub-task are numbered. The point at the origin is fixed at number 1. Generally, the beginning and end of each sub-task program are both the point at the origin number 1. The remaining points in the working path are numbered sequentially according to the order in which the robot completes one working path.

[0060] In this embodiment, after fixing each working path by subtask program number and point number, multiple motion instruction function sets—custom motion instructions—are developed based on basic motion instructions.

[0061] Taking ABB robots as an example, the basic motion commands for ABB robots include joint motion MoveJ, linear motion MoveL, circular motion MoveC, and absolute position motion MoveAbsJ. Taking joint motion MoveJ as an example, if the robot's motion path between two points is planned using joint motion commands, the corresponding robot programming statement would be: "MoveJp..." M1Load ,v1000,z50,Tool1\WObj:=w Wobj1 ", where P M1Load This represents the target point, a coordinate-type position data. v100 represents the robot's running speed, z50 represents the robot's turning radius, Tool1 represents the robot's tool center point, and WObj := w Wobj1 This indicates that the reference user coordinate system for this location data is w. Wobj1 .

[0062] As can be seen, the robot programming statements corresponding to the basic motion instructions define the process of the robot moving from the starting point to the target point. This includes the motion type, target point, speed, robot tool center point, and reference user coordinate system. Based on this, custom motion instructions add program numbers and point numbers, and all these variables are parameterized, forming a set of instruction functions with formal parameters. Taking the ABB robot as an example, the custom motion instructions formed after secondary development of the basic motion instructions can be found in [link to example]. Figure 3 Specifically, in the custom motion section, the three basic motion commands—MoveJ (joint motion), MoveL (linear motion), and MoveC (circular motion)—are merged into a single custom command with parameters: MOVE\L\C\J. The absolute position motion command MoveAbsJ is changed to MoveAbs\J. Furthermore, the parameters in the custom motion command include motion type, program number, point number, target point (and position variable), motion speed, turning radius, and the reference tool coordinate system and workpiece coordinate system for the target point. It can be understood that the point number recorded in the custom motion command is the same as the starting point number.

[0063] Furthermore, in this embodiment, arrays are used to store the relevant data of the custom motion instructions: multiple arrays of different types are defined to store the formal parameters in the custom motion instructions. Among them, the position variable array is used to store the position coordinate data of all points in each subtask program, the character variable array is used to store the motion type, and the numeric variable array is used to store the reference tool coordinate system number and workpiece coordinate system number of all points in each subtask program.

[0064] Specifically, all sub-motion programs are written according to the custom motion instructions. If there are N1 sub-task programs in total, and each sub-task program has at most N2 points, i.e., the maximum point number is N2, then the formal parameters in the custom motion instructions are stored in an array, including:

[0065] (1) Define a two-dimensional position array PG, which is used to store the position coordinate data of each point in each subtask program. The capacity of the two-dimensional position array is PG{N1,N2}. In this embodiment, N1 one-dimensional arrays containing N2 position coordinate data can also be created to store the position coordinate data of each point in each subtask program.

[0066] (2) Define a two-dimensional string array SG. This two-dimensional string array SG is used to store the motion type of each point in each subtask program. The capacity of the two-dimensional string array SG is SG{N1,N2}. In this embodiment, N1 one-dimensional arrays containing N2 character data can also be created to store the motion type of each point in each subtask program.

[0067] (3) Define a two-dimensional numerical array NG1. This two-dimensional numerical array NG1 is used to store the reference tool coordinate system of each point in each subtask program. The capacity of the two-dimensional numerical array NG1 is NG1{N1, N2}. In this embodiment, N1 one-dimensional arrays containing N2 values ​​can also be created to store the reference tool coordinate system of each point in each subtask program.

[0068] (4) Define a two-dimensional numerical array NG2, which is used to store the workpiece coordinate system of each point in each subtask program. The capacity of the two-dimensional numerical array NG2 is NG2{N1, N2}. In this embodiment, N1 one-dimensional arrays containing N2 values ​​can also be created to store the workpiece coordinate system of each point in each subtask program.

[0069] In this embodiment, the data input for the custom motion commands includes: when the robot executes a sub-task program, the robot system automatically records the current program number and point number according to the custom motion commands, finds the array variable corresponding to the program number, records the position coordinate data of each point in the corresponding position-type variable array according to the point number, records the motion type of each point in the corresponding string-type variable array, and records the reference tool coordinate system and workpiece coordinate system of each point in the corresponding numeric variable array. Furthermore, Boolean variables are used to record whether the robot's end effector performs an action. For example, if the end effector of a handling robot is a gripper, Boolean variables are used to record whether the gripper grasps the workpiece (or whether the gripper places the workpiece). After all sub-task tasks are executed once, the robot system can store the formal parameters corresponding to all points in each sub-task program in the form of an array, completing the data initialization of the custom motion commands. It should be noted that in this embodiment, using arrays for storage facilitates data storage and retrieval, and also greatly simplifies the number of lines of program motion commands.

[0070] While executing sub-task programs, the robot system records and updates the robot's current program number, target point number, and end effector status in real time. In this embodiment, the current program number is denoted as NowProNum, the current target point number as NowPointNum, and the current end effector status as BoolGripACT. Furthermore, by matching the robot's current program number and target point number with custom language commands, relevant parameters of the robot's current motion path can be obtained. See also... Figure 4When the robot stops abnormally, based on the robot system records and the robot program's pre-read function, it can be determined that the robot is executing the subroutine task with program number NowProNum and is on the trajectory between the starting point PX1 (NowPointNum-1) and the target point PX2 (NowProNum).

[0071] S200: After receiving the return-to-home command, take the robot's current position as the interruption point and obtain the first position coordinate data of the interruption point.

[0072] In this embodiment, when the operator triggers the robot's stop alarm and presses the return-to-origin button, the robot system receives a return-to-origin command and triggers the return-to-origin interrupt procedure. It is understood that when the robot experiences an abnormal stop, manual adjustment of the sub-task program trajectory or collisions may cause the robot's current position to deviate from the working path. Therefore, in this embodiment, the return-to-origin interrupt procedure is used to verify whether the robot has the conditions for automatic return to its origin and to plan the robot's automatic return-to-origin path based on the robot's end effector status. The flowchart of this return-to-origin interrupt procedure is shown below. Figure 5 .

[0073] See Figure 5 After triggering the return-to-home-position interrupt procedure, the robot's current position is set as the interrupt point PX, and the robot system obtains the first position coordinate data of the interrupt point. If, based on the first position coordinate data, the interrupt point falls within the home-position safety zone, the robot is controlled to move from the interrupt point back to its home position. It should be noted that in this embodiment, the home-position safety zone is equipped with an area monitoring function. When the robot's tool center point enters the home-position safety zone, DO... HomeArea The signal automatically outputs a high level, i.e., DO. HomeArea =1. Therefore, after triggering the home-site interrupt routine, if DO is detected... HomeArea The signal automatically outputs a high level, i.e., DO. HomeArea =1 indicates that the current center point of the robot tool is located in the home safety zone. At this time, the robot is controlled to return directly from the interrupt point to the home position, and the home position interrupt program ends.

[0074] Furthermore, if the robot's interruption point is outside the original safe zone, it is necessary to determine whether the interruption point deviates from the working path. It is understood that the working path referred to here is the working path corresponding to the current subtask program. If the interruption point does not deviate from the working path or the deviation is minor, the robot is controlled to move forward or backward along the current working path back to the origin; otherwise, the operator decides whether to manually return to the original position.

[0075] S300: Based on the most recently executed custom motion command and the first position coordinate data, calculate and determine the deviation between the interruption point and the current working path.

[0076] S301. Determine the starting point and target point based on the most recently executed custom motion command;

[0077] S302. Based on the relative positions of the starting point, target location, and interruption point, determine the deviation value between the interruption point and the current working path.

[0078] Specifically, the second position coordinate data of the starting point and the third position coordinate data of the target location are read. Based on the first, second, and third position coordinate data, the first distance between the interruption point and the starting point, the second distance between the interruption point and the target point, and the third distance between the starting point and the target point are calculated. A schematic diagram illustrating the deviation between the interruption point and the working path in this embodiment is shown below. Figure 6 As shown, based on the characteristics of robot motion, if the robot's interruption point lies on the trajectory between the starting point and the target point, the following relationship holds:

[0079]

[0080] Where ΔX1 is the first distance between the interruption point and the starting point, ΔX2 is the second distance between the interruption point and the target point, and ΔX 12 This is the third distance between the starting point and the target point.

[0081] In other words, if both the first and second distances are less than the third distance, then the interruption point is determined to be on the trajectory between the starting point and the target point. However, simply determining that the interruption point at the current position is on the trajectory between the starting point and the target point is not enough. At this point, it is still not possible to determine whether the robot's current position PX has been moved manually and deviated from the trajectory between PX1 and PX2 automatically planned by the robot system. Therefore, an allowable deviation distance D is introduced. This value is manually set and reflects the allowable deviation range. In this embodiment, the allowable deviation distance can be adjusted according to the accuracy requirements of the robot's current position.

[0082] Furthermore, the calculation of the deviation between the interruption point and the current working path in this embodiment includes: calculating a fourth distance from the interruption point to the straight line formed by the starting point and the target point, based on the first position coordinate data, the second position coordinate data, and the third position coordinate data, wherein, see... Figure 6 The fourth distance is D. x , the fourth distance D x This serves as the deviation value between the interruption point and the current working path. In this embodiment, after calculating the deviation value between the interruption point and the current working path, the robot is controlled to return to its original position based on this deviation value and the state of the robot's end effector.

[0083] S400. If the deviation value is within the allowable deviation range, the robot will be controlled to return to its original position based on the status of the robot's end effector.

[0084] Specifically, in this embodiment, the allowable deviation value is the product of the allowable deviation coefficient and the third distance. The allowable deviation coefficient is determined according to the robot's motion type. For example, if the trajectory between PX1 and PX2 is a joint motion, it means that the space between PX1 and PX2 is large, and the allowable deviation coefficient is 0.6. If the trajectory between PX1 and PX2 is a linear motion, it means that the space between PX1 and PX2 is small, and the allowable deviation coefficient is 0.1.

[0085] Furthermore, based on the most recently executed custom motion command, the motion type between the starting point and the target point is read. When the robot is in joint motion, if the deviation value is less than the allowable deviation value for joint motion, the robot is controlled to return to its original position according to the state of the robot's end effector. When the robot is in linear motion, if the deviation value is less than the allowable deviation value for linear motion, the robot is controlled to return to its original position according to the state of the robot's end effector. It can be understood that if the deviation value does not meet the allowable deviation range, it means that the robot's current position deviates significantly from the current working path, possibly due to manual movement of the robot. If automatic return to the original position is insisted upon, a collision may occur. In this case, the user is allowed to decide whether to still use automatic return to the original position. If the user confirms, the return trajectory is executed from the current position. If the user refuses to execute the return trajectory from the current position, the program terminates, and the user needs to manually return to the original position.

[0086] As mentioned earlier, custom motion commands also include recording the robot's end effector state using Boolean variables. The end effector state includes both periods when the robot is not performing an action and periods when it is performing an action. It's important to note that determining the robot's return path based on the end effector state is crucial because the robot's end effector state changes significantly during action execution. Therefore, the return path must be considered on a case-by-case basis to avoid collisions.

[0087] In this embodiment, if the robot's end effector does not perform an action, the robot is controlled to reverse its movement from the interruption point back to its original position based on the current work path. Specifically, when a Boolean variable is called to determine that the robot's end effector has not performed an action, the stored data related to the program number NowProNum is retrieved from the data storage area. The program is then executed in reverse from PX to PX1, until the point numbered 1 is reached. That is, the trajectory points are PX, PG{NowProNum,NowPointNum-1}, PG{NowProNum,NowPointNum-2}…PG{NowProNum,1}, P…PG{NowProNum,1}…PG ...P…P…P…P…P…P…P…P…P…P…P…P…P…P…P…P…P…P…P…P…P…P…P…P…P…P…P…P… HOMEThe motion types of these points are SG{NowProNum, NowPointNum}, SG{NowProNum, NowPointNum-1}, ..., SG{NowProNum, 1}, MoveAbsJ; the reference tool coordinates are NG1{NowProNum, NowPointNum-1}, NG1{NowProNum, NowPointNum-2}...NG1{NowProNum, 1}, {0, 0}; the reference workpiece coordinate system is NG2{NowProNum, NowPointNum-1}, NG2{NowProNum, NowPointNum-2}...NG2{NowProNum, 1}, {0, 0};

[0088] Furthermore, if the robot's end effector performs an action, the robot is controlled to move forward from the interruption point back to its original position based on the current work path. Specifically, when the Boolean variable is called to determine the robot's end effector's action, the relevant data about the program number NowProNum is retrieved from the data storage area. The program is executed forward from PX in the direction of PX2, until the point with position number N2 is reached (note: it is assumed here that the maximum position number in the current subtask program is N2). That is, the trajectory points are PX, PG{NowProNum,NowPointNum}, PG{NowProNum,NowPointNum+1}, ..., PG{NowProNum,N2}, P HOME The motion types of these points are SG{NowProNum, NowPointNum}, SG{NowProNum, NowPointNum+1}, ..., SG{NowProNum, N2}, MoveAbsJ; the reference tool coordinates are NG1{NowProNum, NowPointNum-1}, NG1{NowProNum, NowPointNum-2}...NG1{NowProNum,1}, {0,0}; the reference workpiece coordinate system is NG2{NowProNum, NowPointNum-1}, NG2{NowProNum, Now-PointNum-2}...NG2{NowProNum,1}, {0,0};

[0089] The return to the original position is now complete. The original position is checked and found to be OK. The return to the original position interrupt procedure ends.

[0090] In summary, this application stores the robot's various working paths as multiple sub-task programs, which can be updated and modified according to actual work needs, improving the adaptability of the invention. Basic motion instructions are further developed into custom motion instructions, and arrays are used to store and retrieve the required data, improving the work efficiency of the invention. Simultaneously, this application verifies the deviation between the robot's interruption point and the current working path. After an abnormal shutdown, when manual adjustment of the sub-task program trajectory causes the robot's position to deviate from the current working path, it effectively avoids collisions caused by automatically returning to the original position. Furthermore, based on the state of the robot's end effector, the robot is controlled to move forward or backward to return to its original position, preventing collisions caused by changes in the robot's end effector state.

[0091] This application also provides a system for an industrial robot to automatically return to its original position after an abnormal shutdown. A schematic diagram of this system is shown below. Figure 7 As shown, the system for automatically returning to its original position after an abnormal shutdown of the industrial robot in this embodiment includes a custom motion command generation module, an interruption point deviation value calculation module, and a robot control module.

[0092] The custom motion instruction generation module is used to store the robot's working paths as multiple sub-task programs, number the multiple sub-task programs and the points in each sub-task program, and add motion type, program number and point number to the basic motion instructions to form custom motion instructions.

[0093] The interruption point deviation calculation module is used to obtain the first position coordinate data of the interruption point after receiving the return-to-origin command, and calculate and determine the deviation value between the interruption point and the current working path based on the most recently executed custom motion command and the first position coordinate data.

[0094] The robot control module is used to control the path for the robot to return to its original position based on the deviation value and the state of the robot's end effector.

[0095] It should be understood that although the steps in the flowcharts of the accompanying figures are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the accompanying figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.

[0096] The above description is only a partial embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A method for automatically returning an industrial robot to its original position after an abnormal shutdown, characterized in that, include: S100. Store each working path of the robot as a multiple sub-task program, number the multiple sub-task programs and the points in the sub-task programs respectively, and add motion type, program number and point number to the basic motion instructions to form custom motion instructions. S200. After receiving the return-to-original-position command, take the robot's current position as the interruption point and obtain the first position coordinate data of the interruption point. S300. Based on the most recently executed custom motion command and the first position coordinate data, calculate and determine the deviation value between the interruption point and the current working path; S400. If the deviation value is within the allowable deviation range, the robot is controlled to return to its original position according to the state of the robot end effector. The custom motion command also includes recording the robot end effector state through Boolean variables, wherein the robot end effector state includes actions not performed by the robot end effector and actions performed by the robot end effector; The step of controlling the robot to return to its original position based on the state of the robot's end effector includes: if the robot's end effector does not perform an action, then controlling the robot to move backward from the interruption point to return to its original position based on the current working path; if the robot's end effector performs an action, then controlling the robot to move forward from the interruption point to return to its original position based on the current working path.

2. The method for automatically returning an industrial robot to its original position after an abnormal shutdown, as described in claim 1, is characterized in that... For any point in the subtask program, the corresponding custom motion instruction includes a program number, point number, target point, and motion type, wherein: An array of positional variables is used to store the position coordinate data of all points in the subtask program; an array of character variables is used to store the motion type; and an array of numeric variables is used to store the reference tool coordinate system number and workpiece coordinate system number of all points in the subtask program.

3. The method for automatically returning an industrial robot to its original position after an abnormal shutdown, as described in claim 2, is characterized in that... Step S300 includes: S301. Determine the starting point and target point based on the most recently executed custom motion command; S302. Based on the relative positional relationship between the starting point, the target point, and the interruption point, determine the deviation value between the interruption point and the current working path.

4. The method for automatically returning an industrial robot to its original position after an abnormal shutdown, as described in claim 3, is characterized in that... Step S302 includes: Read the second position coordinate data of the starting point and the third position coordinate data of the target point; Based on the first position coordinate data, the second position coordinate data, and the third position coordinate data, calculate the first distance between the interruption point and the starting point, the second distance between the interruption point and the target point, and the third distance between the starting point and the target point; If both the first distance and the second distance are less than the third distance, then the interruption point is determined to be on the trajectory between the starting point and the target point.

5. The method for automatically returning an industrial robot to its original position after an abnormal shutdown, as described in claim 4, is characterized in that... Step S302 also includes: Based on the first position coordinate data, the second position coordinate data, and the third position coordinate data, calculate the fourth distance from the interruption point to the straight line formed by the starting point and the target point, and use the fourth distance as the deviation value.

6. The method for automatically returning an industrial robot to its original position after an abnormal shutdown, as described in claim 3, is characterized in that... Step S400 includes: Based on the most recently executed custom motion command, read the motion type between the starting point and the target point; When the robot is in joint motion, if the deviation value is less than the allowable deviation value of joint motion, the robot is controlled to return to its original position according to the state of the robot's end effector. When the robot is moving in a straight line, if the deviation value is less than the allowable deviation value for straight line movement, the robot is controlled to return to its original position based on the state of the robot's end effector.

7. The method for automatically returning an industrial robot to its original position after an abnormal shutdown according to any one of claims 1-6, characterized in that, The method further includes setting an in-situ safety zone, and prior to step S300, it also includes: If the interruption point is determined to fall within the original safe zone based on the first position coordinate data, then the robot is controlled to move from the interruption point back to its original position.

8. A system for automatically returning an industrial robot to its original position after an abnormal shutdown, characterized in that, include: A custom motion instruction generation module is used to store each working path of the robot as multiple sub-task programs, number the multiple sub-task programs and the points in the sub-task programs respectively, and add motion type, program number and point number to the basic motion instruction to form a custom motion instruction. The interruption point deviation calculation module is used to obtain the first position coordinate data of the interruption point after receiving the return-to-original-position instruction, and calculate and determine the deviation value between the interruption point and the current working path based on the most recently executed custom motion instruction and the first position coordinate data. The robot control module is used to control the path of the robot to return to its original position based on the deviation value and the state of the robot end effector; The custom motion command also includes recording the robot end effector state through Boolean variables, wherein the robot end effector state includes actions not performed by the robot end effector and actions performed by the robot end effector; The step of controlling the robot to return to its original position based on the state of the robot's end effector includes: if the robot's end effector does not perform an action, then controlling the robot to move backward from the interruption point to return to its original position based on the current working path; if the robot's end effector performs an action, then controlling the robot to move forward from the interruption point to return to its original position based on the current working path.