Industrial robot control method and device, electronic equipment and storage medium
By obtaining and using the trajectory data of the first program for industrial robots, control the robot to return the reference location safely with the opposite trajectory, solve the problem of hidden safety hazards when industrial robots returned after the non -normal shutdown, and improved safety.
Patent Information
- Application Number
- CN202310916170.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-24
- Publication Date
- 2025-01-24
AI Technical Summary
When an industrial robot returns to the reference position after an abnormal shutdown, there are safety hazards, which may lead to interference, collisions and other accidents.
By acquiring the point data in the first trajectory generated by executing the first program, the industrial robot is controlled to move to the preset reference position in the opposite trajectory without passing through the preset processing point, thereby returning safely.
Effectively avoid the risk of interference and crash when industrial robots returning to the reference position, and improving the safety of the robot.
Smart Images

Figure CN119347744A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to the field of industrial robots, and more specifically, to a control method, device, electronic device, and storage medium for an industrial robot. Background Art
[0002] With the improvement, update and popularization of factory automation equipment, industrial robots are increasingly used in daily production and manufacturing in the industrial field. The resulting safety issues of industrial robots in daily production and manufacturing are increasingly valued by engineers and factory managers. How to solve the problem of how to safely return to the original point of the industrial robot and restart it after the industrial robot stops due to alarms, collisions or human intervention is particularly prominent. At present, industrial robots must return to a pre-set reference position after an abnormal shutdown before they can be restarted.
[0003] In the prior art, when an industrial robot returns to a reference position after an abnormal stop, it needs to continue to move to the next point and then return to the reference point. However, if the next point interferes with the industrial robot and stops the industrial robot, if it returns to the reference position in this way, the industrial robot will continue to move to the next point, resulting in interference and collision safety issues. Summary of the invention
[0004] The disclosed embodiments provide a control method, device, electronic device and storage medium for an industrial robot, which can eliminate the potential safety hazard when the industrial robot returns to a reference point after stopping.
[0005] In a first aspect, the present embodiment provides a control method for an industrial robot, comprising: when the industrial robot stops while executing a first program, obtaining point data of points in a first trajectory generated by executing the first program, the first trajectory being a trajectory of the industrial robot moving from a preset reference position corresponding to the first program to a stop position; when the first trajectory does not pass through a preset processing point corresponding to the first program, controlling the industrial robot to move to the preset reference position along a second trajectory according to the point data, wherein the second trajectory is in an opposite direction to the first trajectory.
[0006] Optionally, the method also includes, when the first trajectory passes through a preset processing point corresponding to the first program, creating a second program and adding a first program segment to the second program, wherein the first program segment is a program segment that has not been executed in the first program; and executing the second program to return the industrial robot to a preset reference position.
[0007] Optionally, the first program includes at least one level of sub-programs; before creating the second program and adding the first program segment to the second program, the method also includes: obtaining the pointer positions of all levels from the first level to the Nth level, wherein the first level is the highest level in the first program, the Nth level is the level of the running program, and the pointer position is used to indicate the number of lines that the program has run; determining the first program segment based on the pointer positions of all levels from the first level to the Nth level.
[0008] Optionally, determining the first program segment according to the pointer positions of all levels from the first level to the Nth level includes: determining the unexecuted program segments of the program at each level according to the pointer positions of all levels from the first level to the Nth level; and splicing the unexecuted program segments in sequence from the Nth level to the first level to obtain the first program segment.
[0009] Optionally, before obtaining the point data of the point in the first trajectory generated by executing the first program, the method also includes: when the industrial robot reaches the first point, recording the point data of the first point, the point data including: the point number, joint coordinates and movement mode of the industrial robot at the current point, the first point being any one of the preset reference position, the processing point and the point between the preset reference position and the processing point.
[0010] Optionally, controlling the industrial robot to move to the preset reference position along a second trajectory based on the point data includes: determining a point sequence in which the industrial robot moves to the preset reference position based on the point numbers; and controlling the industrial robot to move to the preset reference position in the point sequence based on the joint coordinates and the motion mode.
[0011] Optionally, the method further includes, when the industrial robot starts to execute the first program, using the current position of the industrial robot as a preset reference position of the first program.
[0012] In a second aspect, an embodiment of the present application provides a control device for an industrial robot, characterized in that it includes: an acquisition module for acquiring point data of points in a first trajectory generated by executing a first program when the industrial robot stops while executing the first program, the first trajectory being a trajectory of the industrial robot moving from a preset reference position corresponding to the first program to a stop position; and a control module for controlling the industrial robot to move to the preset reference position along a second trajectory according to the point data when the first trajectory does not pass through the preset processing point corresponding to the first program, wherein the second trajectory is in an opposite direction to the first trajectory.
[0013] According to a third aspect of the present disclosure, an electronic device is provided, comprising a processor and a memory, wherein the memory stores computer instructions, and when the computer instructions are executed by the processor, the steps of any one of the methods described in the first aspect of the present disclosure are implemented.
[0014] According to a fourth aspect of the present disclosure, a storage medium is provided, on which computer instructions are stored. When the computer instructions are executed by a processor, the steps of any one of the methods described in the first aspect of the present disclosure are implemented.
[0015] The embodiment of the present disclosure provides a control method for an industrial robot. When the industrial robot stops while executing a first program, the point data of each point of the first trajectory when executing the first program is obtained, and when the industrial robot does not pass through a preset processing point, the point data of each point is used to control the industrial robot to return to a reference position along a trajectory opposite to the first trajectory. In this way, when the industrial robot does not pass through a processing point and stops abnormally, it can return to the reference position along the original path to avoid the risk of interference and collision. The safety of the industrial robot is improved.
[0016] Other features and advantages of the embodiments of the present disclosure will become apparent from the following detailed description of exemplary embodiments of the present disclosure with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the present disclosure and, together with the description, serve to explain the principles of the embodiments of the present disclosure.
[0018] Figure 1 A flow chart of a method for controlling an industrial robot according to an embodiment of the present disclosure is shown.
[0019] Figure 2 A schematic diagram showing an example of a method for controlling an industrial robot according to an embodiment of the present disclosure.
[0020] Figure 3 A flowchart showing an example of a method for controlling an industrial robot according to an embodiment of the present disclosure is shown.
[0021] Figure 4 A flowchart showing an example of a method for controlling an industrial robot according to an embodiment of the present disclosure is shown.
[0022] Figure 5 A block diagram of a control device for an industrial robot according to an embodiment of the present disclosure is shown.
[0023] Figure 6 A block diagram of an electronic device according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0024] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that the relative arrangement of components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention unless otherwise specifically stated.
[0025] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.
[0026] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered as part of the specification.
[0027] In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not limiting. Therefore, other examples of the exemplary embodiments may have different values.
[0028] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0029] The present application discloses a control method for an industrial robot. Figure 1 As shown, it includes step S11 and step S12.
[0030] For industrial robots, there is generally a main program as a framework for controlling the industrial robot. For each function of the industrial robot, such as the pickup function, delivery function or other processing functions, a corresponding program is set.
[0031] S11, when the industrial robot stops while executing the first program, obtaining point data of points in a first trajectory generated by executing the first program, the first trajectory being a trajectory of the industrial robot moving from a preset reference position corresponding to the first program to a stop position
[0032] In this example, the first program may be a program corresponding to when the industrial robot performs a specific function. Moreover, for any first program, a reference position is set. The process of the industrial robot running the program is to move to the processing point through the reference position, and then return to the reference position. In one example, one or more points may be set between the reference position and the processing point to limit the running trajectory of the industrial robot to a certain range.
[0033] In this embodiment, when the industrial robot stops executing the first program, such as when an abnormal situation such as interference risk occurs, the point data of the points in the first trajectory of the industrial robot when executing the first program can be obtained. Figure 2 As shown in the figure, point P1 is the reference point of the industrial robot, and point P6 is the processing point of the industrial robot. When the industrial robot executes the first program and moves from P1 to P6, an abnormality occurs and the robot stops at Figure 2 At the stop position in, at this time, the first trajectory is the trajectory of the industrial robot moving from P1 to the stop point, and the point of the first trajectory is the point actually reached by the industrial robot.
[0034] In an example of the present embodiment, before obtaining the point data of the point in the first trajectory generated by executing the first program, the method also includes: when the industrial robot reaches the first point, recording the point data of the first point, the point data includes: the point number, joint coordinates and movement mode of the industrial robot at the current point, the first point is any one of a preset reference position, a processing point and a point between the preset reference position and the processing point.
[0035] In one example, when the industrial robot is operating normally, for example, when the industrial robot reaches a reference position, a processing point, or any point in between, point data such as the point number, joint coordinates, and motion mode of the current point can be pre-recorded.
[0036] In one example, the first point may be a point actually reached by the industrial robot when executing the first program.
[0037] In one example, the motion mode of the industrial robot includes at least one of joint motion, linear motion and circular motion. When the industrial robot performs circular motion, one or more auxiliary points may be included in the middle. The points in the first trajectory in the embodiment of the present application, as well as the points between the preset reference position and the processing point, may include auxiliary points of circular motion. Figure 2 As shown, the industrial robot goes to the processing points in the order of P1 to P7, wherein the industrial robot performs circular motion from P2 to P3. At this time, the running program can add an auxiliary point P2a to enable the industrial robot to perform circular motion more accurately.
[0038] In one example, if Figure 2As shown, the industrial robot starts to execute the first program from the reference point P1. At this time, the industrial robot is at the point P1, and records the point data of the current point, including the point number, joint coordinates and movement mode. Among them, the point number can be a number temporarily recorded when the industrial robot reaches the point. The joint coordinates of the industrial robot include the joint coordinates of each joint of the industrial robot. In an example, when the first program involves multiple coordinate systems, the joint coordinates in the point data can also include the data of the coordinate system corresponding to the coordinates. The movement mode is the movement mode of the industrial robot from this point to the next point. In this example, the industrial robot moves from point P1 to point P2. The movement mode can be read from the first program or set by the user from the teach pendant. In an example, the movement mode, in addition to the aforementioned linear motion, joint motion and circular motion, can also include the movement speed of the industrial robot and the arrival parameters. The arrival parameters are used to characterize whether the industrial robot arrives at the next point accurately or approximately. As Figure 2 As shown, the method adopted by the industrial robot when moving from P3 to P4 is approximate arrival, that is, the industrial robot does not need to accurately reach the point P4, but only needs to reach a position close to P4, such as P4'.
[0039] When the industrial robot continues to execute the first program and reaches subsequent points such as P2, P2a, P3, and P4', the point data of these points will also be recorded.
[0040] In this example, when the industrial robot executes the first program and reaches each point, the point data such as the number, joint coordinates and movement mode of these points can be recorded in advance, so that if an abnormality occurs later and causes the industrial robot to stop, the industrial robot can return to the reference position along the opposite trajectory to avoid interference and other safety issues. In addition, the industrial robot can automatically number each point it reaches, and record the coordinates and movement mode, so that the newly added points and the points that are approaching the industrial robot during the movement process can also be recorded, ensuring that the trajectory of the industrial robot when returning is consistent with the running trajectory.
[0041] In one example, after acquiring the point data of the points in the first trajectory, it can be determined based on the point data whether the industrial robot has passed the preset processing point.
[0042] Step S12, when the first trajectory does not pass through the preset processing point corresponding to the first program, control the industrial robot to move to the preset reference position along the second trajectory according to the point data, wherein the second trajectory is opposite to the first trajectory.
[0043] In one example, when the industrial robot stops abnormally and does not pass through a preset processing point, the position where the industrial robot stops can be used as a starting point to control the industrial robot to return to a reference position along a reverse trajectory.
[0044] In an example of this embodiment, based on the point data, the industrial robot is controlled to move to a preset reference position along a second trajectory, including: determining the point sequence of the industrial robot moving to the preset reference position based on the point number; and controlling the industrial robot to move to the preset reference position according to the joint coordinates and the movement mode.
[0045] In this embodiment, since the industrial robot records the point data of each intermediate point in the process of moving from the preset reference position to the stop point while executing the first program, the order of the points passed by the industrial robot when moving to the stop position can be determined based on the point numbers of these recorded points. The opposite order is the order in which the industrial robot returns from the stop point to the preset reference position.
[0046] After determining the point sequence of the industrial robot moving to the preset reference position, the industrial robot can be controlled to move back to the reference position according to the joint coordinates and motion mode in the point data. Figure 2 As shown in the figure, when the industrial robot starts to return to the reference position from the stop position, it can obtain the joint coordinates and motion mode of the previous point P5, and use the same method to return the industrial robot to the previous point P4 in the opposite direction. After that, the joint coordinates and motion mode of the previous point are obtained according to the point number, and after passing through these points in sequence, it returns to the reference position.
[0047] In one example, after the industrial robot returns to the reference position, the first program may continue to be executed.
[0048] In this example, a control method for an industrial robot is provided. When the industrial robot stops while executing the first program, the point data of each point of the first trajectory when executing the first program is obtained, and when the industrial robot does not pass the preset processing point, the point data of each point is used to control the industrial robot to return to the reference position along the opposite trajectory of the first trajectory. In this way, when the industrial robot does not pass the processing point and stops abnormally, it can return to the reference position along the original route to avoid the risk of interference and collision. The safety of the industrial robot is improved.
[0049] In an example of this embodiment, when the first trajectory passes through the preset processing point corresponding to the first program, a second program is created and the first program segment is added to the second program, wherein the first program segment is a program segment that has not been executed in the first program; the second program is executed to make the industrial robot return to the preset reference position.
[0050] In one example, each program of the industrial robot includes multiple lines of program code, and each line of program code represents a complete logical judgment or an independent action group. Therefore, the unexecuted program segments in the first program can be added to the newly created program and executed to return the industrial robot to the preset reference position. Specifically, when the industrial robot stops executing the first program, the pointer position of the first program can be recorded, and the pointer position is used to indicate the number of lines that the first program has run. Further, the unexecuted program segments in the first program can be determined. In one example, the unexecuted program segments can include the line where the pointer is located and all programs after the line.
[0051] In an example of this embodiment, the first program includes at least one level of subprograms; before creating the second program and adding the first program segment to the second program, the method also includes: obtaining the pointer positions of all levels from the first level to the Nth level, wherein the first level is the highest level in the first program, the Nth level is the level of the running program, and the pointer position is used to indicate the number of lines that the program has run; determining the first program segment based on the pointer positions of all levels from the first level to the Nth level.
[0052] In one example, multiple levels of subroutines may be nested in the first program. For example, a line of program code in the first program may be a program code that calls a subroutine A, and a line of code in the program code of subroutine A may be a program code that calls subroutine B. In this case, the first program includes three levels of programs, where the level of the first program is the first level, which is also the highest level, the level where subroutine A is located is the second level, and the level where subroutine B is located is the third level.
[0053] In an example of this embodiment, during the normal execution of the first program by the industrial robot, before the industrial robot calls the subroutine of the next level, the current pointer position can be pre-recorded as the pointer position of the level. For example, before calling the subroutine A of the second level, the pointer position of the first level of the first program, that is, the line number of the program code of the calling subroutine A, can be pre-recorded to prevent the situation in which the pointer position cannot be obtained due to the loss of the pointer when entering the program of the next level.
[0054] When the industrial robot stops executing the first program and the first trajectory passes through the preset processing point, if the first program is running, the pointer position of each level from the first level in the first program to the level of the running program can be obtained, wherein the pointer position can be only the number of lines that the program has currently run or the number of lines that are being run.
[0055] In an example of the present embodiment, the first program segment is determined according to the pointer positions of all levels from the first level to the Nth level, including: determining the unexecuted program segments of the program at each level according to the pointer positions of all levels from the first level to the Nth level; splicing the unexecuted program segments in sequence from the Nth level to the first level to obtain the first program segment.
[0056] After the pointer positions of all levels from the first level to the Nth level are acquired, the unexecuted program segments in each level from the first level to the Nth level may be determined according to the pointer position of each level.
[0057] For example, the first program includes a subroutine A of the second level, and the subroutine A of the second level includes a subroutine B of the third level. When the industrial robot stops abnormally, the 91st line of the subroutine B of the third level is running. Therefore, the program segment consisting of the 91st line and all subsequent program codes can be used as an unexecuted program segment of the third level. At the same time, the unexecuted program segment in the corresponding level can also be determined based on the pointer positions of the second level and the first level. For example, the 15th line of the subroutine A of the second level is the pointer position of the second level, that is, the program code of the 15th line is the program code for calling subroutine B. At this time, the subroutine segment from the 16th line to the last line of the subroutine A of the second level can be used as an unexecuted program segment of the second level, and the same applies to the first level.
[0058] After determining the unexecuted program segments of each level from the first level to the Nth level, the unexecuted program segments of the N levels can be spliced in sequence from the Nth level to the first level and added to the second program, so that the industrial robot returns to the preset reference position when executing the second program.
[0059] In an example of this embodiment, the running program level may be the first level.
[0060] In this example, when the industrial robot stops executing the first program and the first trajectory passes through the processing point, the unexecuted program segments in the first program can be determined by the pointer positions of each level in the first program, and these program segments can be added to the newly created program. To continue execution, the industrial robot returns to the reference position. When the industrial robot stops abnormally, if the user wants to check through the teach pendant to find out the program running situation, the pointer position of the program will change accordingly, resulting in the situation where the program running position cannot be determined. The above method can effectively solve the problem that the user cannot check through the teach pendant. In addition, by creating a new program, it can also solve the problem that when the industrial robot stops abnormally during program execution, the original program may crash or the industrial robot cannot continue to execute the original program.
[0061] In one example of this embodiment, before the industrial robot executes the first program, it can be pre-determined whether the industrial robot is at the reference position, such as Figure 3 As shown, when the industrial robot is at the reference position, the first program is executed. When the industrial robot is not at the reference position, it is determined whether the industrial robot has been manually intervened. If the industrial robot has not been manually intervened, the industrial robot is controlled to automatically return to the reference position. If the industrial robot has been manually intervened, an alarm is issued to prompt the user to control the industrial robot to return to the reference position through manual intervention.
[0062] In an example of this embodiment, when the industrial robot starts to execute the first program, the current position of the industrial robot is used as a preset reference position of the first program.
[0063] In one example, the position of the industrial robot when it starts executing the first program can be used as the reference position of the program, and the program can be executed from this position. This allows the robot to reach the last point of the previous program by approximation instead of precise arrival when the previous program returns to the reference position after execution. At the same time, there is no need to control the industrial robot to return to the reference position of the first program, which solves the problem of the industrial robot being stuck when switching between the two programs, and makes the running trajectories of the two programs more coherent and smooth, thereby improving the rhythm of the industrial robot and enhancing efficiency.
[0064] In one example, refer to Figure 4 The process of an example of the control method of the industrial robot of the present application is described. When the industrial robot stops executing the first program, it is determined whether the industrial robot is at the reference position. When the industrial robot is at the reference position, all signals can be initialized and the first program can be re-executed. When the industrial robot is not at the reference position, it is determined whether the first trajectory passes through the preset processing point. When the first trajectory does not pass through the preset processing point, the point data of the points in the first trajectory, such as the point number, joint coordinates and movement mode, are obtained. According to the point number, the point order of the industrial robot moving to the preset reference position is determined. According to the joint coordinates and the movement mode, according to the point order, the industrial robot is controlled to return to the preset reference position.
[0065] When the first trajectory passes through the preset processing point, the pointer position of each level from the highest level in the first program to the level of the running program is obtained, and the unexecuted program segments of each level are determined according to the pointer position of each level. The unexecuted program segments are spliced in order from the Nth level to the first level to obtain the first program segment, and then the first program segment is added to the second program, and the second program is executed, so that the industrial robot returns to the preset reference position.
[0066] The present application embodiment provides a control device 100 for an industrial robot, such as Figure 5 As shown, it includes: an acquisition module 101, which is used to acquire point data of points in a first trajectory generated by executing the first program when the industrial robot stops while executing the first program, and the first trajectory is a trajectory of the industrial robot moving from a preset reference position corresponding to the first program to a stop position; a control module 102, which is used to control the industrial robot to move to a preset reference position with a second trajectory according to the point data when the first trajectory does not pass through the preset processing point corresponding to the first program, wherein the second trajectory is opposite to the direction of the first trajectory.
[0067] Optionally, the device further includes: a creation module, which is used to create a second program and add the first program segment to the second program when the first trajectory passes through a preset processing point corresponding to the first program, wherein the first program segment is a program segment that is not executed in the first program. An execution module is used to execute the second program so that the industrial robot returns to the preset reference position.
[0068] Optionally, the first program includes at least one level of sub-programs; the acquisition module 101 is also used to obtain the pointer positions of all levels from the first level to the Nth level, wherein the first level is the highest level in the first program, the Nth level is the level of the running program, and the pointer position is used to indicate the number of lines that the program has run; the device also includes a determination module, which is used to determine the first program segment based on the pointer positions of all levels from the first level to the Nth level.
[0069] Optionally, the determination module is specifically used to determine the unexecuted program segments of the program at each level according to the pointer positions of all levels from the first level to the Nth level; the unexecuted program segments are spliced in sequence in the order from the Nth level to the first level to obtain the first program segment.
[0070] Optionally, the device also includes: a recording module, used to record the point data of the first point when the industrial robot reaches the first point, the point data including: the point number, joint coordinates and movement mode of the industrial robot at the current point, the first point being any one of a preset reference position, a processing point and a point between the preset reference position and the processing point.
[0071] Optionally, the control module 102 is specifically used to: determine the point sequence of the industrial robot moving to the preset reference position according to the point number; and control the industrial robot to move to the preset reference position according to the point sequence according to the joint coordinates and the movement mode.
[0072] Optionally, the device further comprises a reference position module, which is used to use the current position of the industrial robot as a preset reference position of the first program when the industrial robot starts to execute the first program.
[0073] The present application embodiment also provides an electronic device 200, such as Figure 6 As shown, the electronic device has a processor 201 and a memory 202, and the memory 202 stores computer instructions. When the computer instructions are executed by the processor 201, any one of the industrial robot control methods in the industrial robot control method embodiments is implemented, and the same technical effect can be achieved. To avoid repetition, they are not repeated here.
[0074] An embodiment of the present application also provides a storage medium on which computer instructions are stored. When the computer instructions are executed by a processor, any one of the industrial robot control methods in the above-mentioned industrial robot control method embodiments is implemented, and the same technical effect can be achieved. To avoid repetition, they are not repeated here.
[0075] Each embodiment in the present disclosure is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and equipment embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0076] The above describes specific embodiments of the present disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0077] The embodiments of the present disclosure may be systems, methods and / or computer program products. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the embodiments of the present disclosure.
[0078] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.
[0079] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0080] The computer program instructions for performing the operation of the embodiments of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be personalized by utilizing the state information of a computer-readable program instruction, and the electronic circuit may execute a computer-readable program instruction, thereby realizing various aspects of the embodiments of the present disclosure.
[0081] Various aspects of the embodiments of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.
[0082] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0083] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0084] The flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of an instruction, and a part of a module, a program segment or an instruction contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or the flowchart, and the combination of the boxes in the block diagram and / or the flowchart can be implemented by a dedicated hardware-based system that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions. It is well known to those skilled in the art that it is equivalent to implement it by hardware, implement it by software, and implement it by combining software and hardware.
[0085] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. A control method for an industrial robot, characterized in that: include: When the industrial robot stops while executing a first program, acquiring point data of points in a first trajectory generated by executing the first program, the first trajectory being a trajectory of the industrial robot moving from a preset reference position corresponding to the first program to a stop position; When the first trajectory does not pass through the preset processing point corresponding to the first program, the industrial robot is controlled to move to the preset reference position along a second trajectory according to the point data, wherein the second trajectory is in the opposite direction to the first trajectory.
2. The method according to claim 1, characterized in that The method further comprises: When the first trajectory passes through a preset processing point corresponding to the first program, a second program is created, and a first program segment is added to the second program, wherein the first program segment is a program segment that has not been executed in the first program; The second program is executed to make the industrial robot return to a preset reference position.
3. The method according to claim 2, characterized in that The first program includes at least one level of sub-programs; Before creating the second program and adding the first program segment to the second program, the method further includes: Obtaining pointer positions of all levels from the first level to the Nth level, wherein the first level is the highest level in the first program, the Nth level is the level of the program being run, and the pointer position is used to indicate the number of lines that the program has run; A first program segment is determined according to the pointer positions of all levels from the first level to the Nth level.
4. The method according to claim 3, characterized in that The step of determining the first program segment according to the pointer positions of all levels from the first level to the Nth level includes: Determine the unexecuted program segments of the program at each level according to the pointer positions of all levels from the first level to the Nth level; The unexecuted program segments are sequentially spliced in the order from the Nth level to the first level to obtain a first program segment.
5. The method according to claim 1, characterized in that Before acquiring the point data of the points in the first trajectory generated by executing the first program, the method further includes: When the industrial robot reaches a first point, the point data of the first point is recorded, and the point data includes: the point number, joint coordinates and movement mode of the industrial robot at the current point, and the first point is any one of the preset reference position, the processing point and the point between the preset reference position and the processing point.
6. The method according to claim 5, characterized in that According to the point data, controlling the industrial robot to move to the preset reference position along a second trajectory comprises: Determining the point sequence of the industrial robot moving to the preset reference position according to the point number; According to the joint coordinates and the motion mode, the industrial robot is controlled to move to the preset reference position in the order of the points.
7. The method according to claim 1, characterized in that The method further includes, when the industrial robot starts to execute the first program, using the current position of the industrial robot as a preset reference position of the first program.
8. A control device for an industrial robot, characterized in that: include: an acquisition module, configured to acquire, when the industrial robot stops while executing a first program, point data of points in a first trajectory generated by executing the first program, wherein the first trajectory is a trajectory of the industrial robot moving from a preset reference position corresponding to the first program to a stop position; A control module is used to control the industrial robot to move to the preset reference position along a second trajectory according to the point data when the first trajectory does not pass through the preset processing point corresponding to the first program, wherein the second trajectory is in the opposite direction to the first trajectory.
9. An electronic device, characterized in that: A processor and a memory are provided, wherein the memory stores computer instructions, and when the computer instructions are executed by the processor, the steps of the method described in any one of claims 1 to 7 are implemented.
10. A storage medium, characterized in that: Computer instructions are stored thereon, and when the computer instructions are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.