Control right switching method, device, system, equipment and storage medium

Through the control rights switching method between the physical teaching device and the PC teaching device, the problem of low security in the robot's control rights switching process is solved, and data synchronization and security improvement is achieved.

CN115729143BActive Publication Date: 2025-09-02GREE ELECTRIC APPLIANCE INC OF ZHUHAI
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211441344.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-17
Publication Date
2025-09-02
Estimated Expiration
2042-11-17

AI Technical Summary

Technical Problem

In the prior art, there is a problem of low security in the process of switching control rights of robots, especially when switching permissions of physical teaching devices and PC teaching devices, it is easy to cause safety hazards.

Method used

Through the control rights switching method between the physical teaching device and the PC teaching device, the physical teaching device enters the automatic mode and releases the control rights, the robot controller updates the control rights status, the PC teaching device establishes a connection with the robot controller and obtains the robot running status data and files, so as to achieve safe switching of control rights.

Benefits of technology

Ensure the synchronous update of robot-related data, and improve the security of robot operation and prevent the occurrence of safety hazards.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115729143B_ABST
    Figure CN115729143B_ABST
Patent Text Reader

Abstract

The present invention discloses a control right switching method, device, system, equipment, and storage medium, which relate to the field of robotics. The method comprises: a physical teaching pendant enters automatic mode and releases control rights in response to an automatic switching instruction and a control right release instruction; a robot controller receives the control right release instruction sent by the physical teaching pendant and updates the control right status according to the control right release instruction; a PC-side teaching pendant establishes a connection with the robot controller according to the updated control right status, obtains robot operation status data and robot operation files from the robot controller, and controls the robot based on the robot operation status data and the robot operation files. The solution of the present invention not only ensures the synchronous update of robot-related data, but also improves the safety of the robot during operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of robotics technology, and in particular to a control right switching method, device, system, equipment and storage medium. Background Art

[0002] With the development of industrial robot technology, the popularity of robots in factories is increasing. In actual applications, users can control robots by issuing instructions to the physical teach pendant and / or PC teach pendant. The physical teach pendant has a key switch. Through the key switch, the user can know the current mode of the robot and then determine whether it is possible to approach the robot. For example, in manual mode, the robot will only move if the user operates the physical teach pendant; in automatic mode, the robot performs the corresponding actions according to the programmed program. In the existing technology, the process of switching permissions between the physical teach pendant and the PC teach pendant is prone to security risks and its security is relatively low. Summary of the Invention

[0003] Embodiments of the present invention provide a control right switching method, apparatus, system, device and storage medium, aiming to solve the problem of low robot operation safety during the existing control right switching process.

[0004] In a first aspect, an embodiment of the present invention provides a control right switching method, which is applied to a physical teaching pendant and includes:

[0005] In response to an automatic switching instruction, controlling the physical teaching pendant to enter an automatic mode;

[0006] In response to the control right release instruction, a control right switching command is sent to the robot controller, so that the robot controller switches the control right of the robot to the PC-side teaching pendant.

[0007] In a second aspect, an embodiment of the present invention provides a control right switching method, which is applied to a PC-side teaching pendant and includes:

[0008] If it is detected that no connection is established with the robot controller, the PC-side teaching pendant is controlled to enter offline mode;

[0009] If it is detected that a connection has been established with the robot controller, a control right acquisition instruction is sent to the robot controller;

[0010] If a control right confirmation instruction returned by the robot controller is received, the robot operation status data and the robot operation file are obtained from the robot controller, and the robot is controlled based on the robot operation status data and the robot operation file.

[0011] In a third aspect, an embodiment of the present invention provides a control right switching method, which is applied to a robot controller and includes:

[0012] Start the monitoring thread to monitor whether there is a teaching pendant requesting access;

[0013] If it is monitored that there is a teaching pendant requesting access, a communication connection is established with the teaching pendant requesting access;

[0014] Start the data reading and writing thread to obtain the IP address of the teaching pendant and process the sending and receiving operations of the teaching pendant;

[0015] Start the UDP data thread and the FTP data thread, and send the robot operation status data and the robot operation file to the teaching pendant according to the IP address, so that the teaching pendant obtains control.

[0016] In a fourth aspect, an embodiment of the present invention further provides a control right switching device, which is applied to a physical teaching pendant and includes:

[0017] A first control unit is configured to control the physical teaching pendant to enter an automatic mode in response to an automatic switching instruction;

[0018] The switching unit is used to send a control right switching command to the robot controller in response to the control right release instruction, so that the robot controller switches the control right of the robot to the PC-side teaching pendant.

[0019] In a fifth aspect, an embodiment of the present invention further provides a control right switching device, which is applied to a PC-side teaching pendant and includes:

[0020] A second control unit is configured to control the PC-side teaching pendant to enter an offline mode if it is detected that no connection is established with the robot controller;

[0021] a first sending unit, configured to send a control right acquisition instruction to the robot controller if it is detected that a connection has been established with the robot controller;

[0022] The third control unit is used to obtain the robot operation status data and the robot operation file from the robot controller if it receives the control right confirmation instruction returned by the robot controller, and control the robot based on the robot operation status data and the robot operation file.

[0023] In a sixth aspect, an embodiment of the present invention further provides a control right switching device, applied to a robot controller, comprising:

[0024] The monitoring unit is used to start a monitoring thread to monitor whether there is a teaching pendant requesting access;

[0025] an establishing unit, configured to establish a communication connection with the teaching pendant requesting access if a teaching pendant requesting access is detected;

[0026] A processing unit, configured to start a data reading and writing thread to obtain the IP address of the teaching pendant and process the sending and receiving operations of the teaching pendant;

[0027] The second sending unit is used to start the UDP data thread and the FTP data thread, and send the robot operation status data and the robot operation file to the teaching pendant according to the IP address, so that the teaching pendant obtains control.

[0028] In the seventh aspect, an embodiment of the present invention also provides a control right switching system, including a physical teaching pendant, a PC teaching pendant and a robot controller, wherein the physical teaching pendant and the PC teaching pendant are both connected to the robot controller; the physical teaching pendant includes the control right switching device of the fourth aspect mentioned above, and the PC teaching pendant includes the control right switching device of the fifth aspect mentioned above; the robot controller includes the control right switching device of the sixth aspect mentioned above.

[0029] In an eighth aspect, an embodiment of the present invention further provides a control right switching method, comprising:

[0030] The physical teaching pendant responds to the automatic switching instruction and the control right release instruction, enters the automatic mode and releases the control right;

[0031] The robot controller receives the control right release instruction sent by the physical teaching pendant, and updates the control right state according to the control right release instruction;

[0032] The PC-side teaching pendant establishes a connection with the robot control according to the updated control right status, obtains the robot operation status data and the robot operation file from the robot controller, and controls the robot based on the robot operation status data and the robot operation file.

[0033] In a ninth aspect, an embodiment of the present invention further provides a computer device comprising a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the method of the first aspect, the second aspect, or the third aspect is implemented.

[0034] In the tenth aspect, an embodiment of the present invention further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it can implement the method of the first aspect, the second aspect, or the third aspect mentioned above.

[0035] The embodiment of the present invention provides a control right switching method, device, system, equipment and storage medium. The method includes: the physical teaching pendant enters automatic mode and releases control rights in response to an automatic switching instruction and a control right release instruction; the robot controller receives the control right release instruction sent by the physical teaching pendant and updates the control right status according to the control right release instruction; the PC-side teaching pendant establishes a connection with the robot controller according to the updated control right status, obtains robot operation status data and robot operation files from the robot controller, and controls the robot based on the robot operation status data and the robot operation files. The technical solution of the embodiment of the present invention is that when the physical teaching pendant enters automatic mode and releases control rights, the robot controller updates the control right status. Based on the updated control right status, the PC-side teaching pendant establishes a connection with the robot controller and obtains the robot operation status data and robot operation files to achieve control right switching. During the entire authority switching process, not only can the synchronous update of robot-related data be ensured, but also the safety of the robot during operation is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0037] Figure 1 A schematic diagram of a scenario of a control right switching method provided by an embodiment of the present invention;

[0038] Figure 2 A schematic flow chart of a control right switching method applied to a physical teaching pendant provided in one embodiment of the present invention;

[0039] Figure 3 A schematic diagram of a message format for a control right switching method applied to a PC-side teaching pendant provided in one embodiment of the present invention;

[0040] Figure 4 A schematic flow chart of a control right switching method applied to a robot controller provided by one embodiment of the present invention;

[0041] Figure 5 A schematic diagram of a sub-flow diagram of a control right switching method applied to a robot controller provided by one embodiment of the present invention;

[0042] Figure 6 A flow chart of a control right switching method applied to a control right switching system provided by one embodiment of the present invention;

[0043] Figure 7 A schematic block diagram of a control right switching device applied to a physical teaching pendant provided by one embodiment of the present invention

[0044] Figure 8 A schematic block diagram of a control right switching device applied to a PC-side teaching pendant provided by one embodiment of the present invention;

[0045] Figure 9 A schematic block diagram of a control right switching device applied to a robot controller provided in yet another embodiment of the present invention; and

[0046] Figure 10 A schematic block diagram of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0047] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0048] It will be understood that when used in this specification and the appended claims, the terms “comprises” and “comprising” indicate the presence of described features, integers, steps, operations, elements and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.

[0049] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the present invention. As used in the specification and appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms unless the context clearly indicates otherwise.

[0050] It should be further understood that the term "and / or" used in the present description and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

[0051] As used in this specification and the appended claims, the term "if" can be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.

[0052] Figure 1 : is a scenario diagram of the control right switching system provided by an embodiment of the present invention. The control right switching system includes a physical teach pendant, a PC-side teach pendant, a robot controller and a robot, wherein the physical teach pendant and the PC-side teach pendant are both communicatively connected to the robot controller. In actual applications, based on the robot controller, the user can control the robot by operating the physical teach pendant and the PC-side teach pendant. It should be noted that in this embodiment, after the physical teach pendant enters automatic mode and releases the control right, the robot controller updates the control right status. Based on the updated control right status, the PC-side teach pendant establishes a connection with the robot controller and obtains the robot operation status data and the robot operation file to realize the switching of control rights. During the entire authority switching process, not only can the synchronous update of the robot-related data be ensured, but also the safety of the robot during operation is improved.

[0053] It should also be noted that in this embodiment, the switching of control rights is necessary because the robot can only have one control terminal at a time—that is, only one of the physical teach pendant or the PC-based teach pendant—to control the robot. Understandably, switching control rights involves not only switching the control entity but also synchronizing the robot's operating status data and operating files, including robot configuration parameter files and robot program files.

[0054] The following describes in detail the steps of the control authority switching method from the perspectives of a physical teach pendant, a PC teach pendant, a robot controller, and a control authority switching system.

[0055] Figure 2 1 is a flow chart of a control right switching method provided by an embodiment of the present invention. The method is applied to a physical teaching pendant. The method includes the following steps S110-S120.

[0056] S110 , in response to an automatic switching instruction, controlling the physical teaching pendant to enter an automatic mode.

[0057] S120. In response to the control right release instruction, a control right switching command is sent to the robot controller, so that the robot controller switches the control right of the robot to the PC-side teaching pendant.

[0058] In this embodiment, the user controls the robot through the physical teach pendant, such as sending commands and writing programs. When the user wants to use the PC teach pendant to control the robot, he first needs to turn the key switch of the physical teach pendant to the automatic position. At this time, the sending of the automatic switching instruction will be triggered. The physical teach pendant receives the automatic switching instruction and enters the automatic mode; then the user clicks the control right switching button on the physical teach pendant to trigger the sending of the release control right instruction. The physical teach pendant sends a control right switching command to the robot controller according to the release control right instruction, so that the robot controller switches the control of the robot to the PC teach pendant.

[0059] Figure 3 1 is a flow chart of a control right switching method provided by an embodiment of the present invention. The method is applied to a PC-side teaching pendant. The method includes the following steps S210-S230.

[0060] S210: If it is detected that no connection is established with the robot controller, control the PC-side teaching pendant to enter offline mode;

[0061] S220: If it is detected that a connection has been established with the robot controller, a control right acquisition instruction is sent to the robot controller;

[0062] S230: If a control right confirmation instruction returned by the robot controller is received, obtain the robot operation status data and the robot operation file from the robot controller, and control the robot based on the robot operation status data and the robot operation file.

[0063] In this embodiment, the startup of the PC-side teach pendant is divided into two situations. The first situation is that the physical teach pendant has given up control and the PC-side teach pendant has not yet been started. In this case, the PC-side teach pendant should be turned on first because the physical teach pendant has given up control. During the startup of the PC-side teach pendant, the PC-side teach pendant can establish a connection with the robot controller. After the connection is established, the PC-side teach pendant will send a control acquisition instruction to the robot controller. The robot controller receives the control acquisition instruction and switches the control authority. Then, it will return a control confirmation instruction to the PC-side teach pendant. The PC-side teach pendant receives the control confirmation instruction, obtains the robot operation status data from the robot controller through the UDP communication protocol, and displays it on the PC-side teach pendant. At the same time, it also obtains the robot operation file from the robot controller through the FTP protocol to ensure that the robot program written on the physical teach pendant is synchronized to the PC-side teach pendant. After the PC-side teach pendant is started, the user can control the robot through the PC-side teach pendant. The second situation is that the physical teach pendant has not yet given up control rights, and the PC-side teach pendant has been started. In this case, when the physical teach pendant has not given up control rights, the PC-side teach pendant will detect that it cannot connect to the robot controller, and the PC-side teach pendant will enter offline mode. After entering offline mode, the user can only write programs on the PC-side teach pendant; when the physical teach pendant gives up control rights and the PC-side teach pendant wants to obtain control rights, the user can click the control right acquisition button on the PC-side teach pendant to trigger the PC-side teach pendant to send a control right acquisition instruction to the robot controller. After the robot controller receives the control right acquisition instruction and switches the control authority, it will return a control right confirmation instruction to the PC-side teach pendant. The PC-side teach pendant receives the control right confirmation instruction and obtains the robot operation status data and the robot operation file from the robot controller through the UDP communication protocol and the FTP communication protocol, and based on the robot operation status data and the robot operation file, the PC-side teach pendant can control the robot.

[0064] It should be noted that, in this embodiment, programs written in offline mode on the PC-side teach pendant can be synchronized to the robot controller via FTP communication. It should also be noted that, in this embodiment, when the PC-side teach pendant obtains control of the robot, the physical teach pendant can still control the robot via the key switch.

[0065] Figure 41 is a flow chart of a control right switching method provided by an embodiment of the present invention. The method is applied to a robot controller. The method includes the following steps S310-S340.

[0066] S310, start a monitoring thread to monitor whether there is a teaching pendant requesting access;

[0067] S320: if it is detected that the teaching pendant has requested access, establishing a communication connection with the teaching pendant requesting access;

[0068] S330, start the data reading and writing thread to obtain the IP address of the teaching pendant, and process the sending and receiving operations of the teaching pendant;

[0069] S340, start the UDP data thread and the FTP data thread, and send the robot operation status data and the robot operation file to the teaching pendant according to the IP address, so that the teaching pendant obtains control.

[0070] In this embodiment, from the TCP communication level, the teach pendant is the client and the robot controller is the server. When switching control rights, two clients (physical teach pendant and PC teach pendant) are connected to the robot controller, and the robot controller adopts a multi-threaded method to complete communication with the two clients. Among them, one sub-thread is a listening thread, which is used to monitor whether there is a new client access, that is, to monitor whether there is a teach pendant requesting access, and when the teach pendant requests access, establish a communication connection with the teach pendant requesting access. In the specific code implementation process, the connected client, that is, the teach pendant, is placed in the Socket array for listening; the other sub-threads are data reading and writing threads, UDP data threads and FTP data threads, among which, by starting the data reading and writing threads, the IP address of the teach pendant can be obtained, and the sending and receiving operations of the teach pendant can be processed; by starting the UDP data thread and the FTP data thread, and sending the robot operation status data and the robot operation file to the teach pendant according to the IP address, the teach pendant can obtain control rights.

[0071] It should be noted that in this embodiment, if a request for access from the teach pendant is detected, the step of establishing a communication connection with the teach pendant requesting access specifically includes: if a request for access from the teach pendant is detected, detecting whether the teach pendant meets the conditions for obtaining control rights; if the teach pendant meets the conditions for obtaining control rights, establishing a communication connection with the teach pendant requesting access. In actual applications, the control rights conditions are determined by determining the control rights status. Specifically, when the physical teach pendant releases control rights, the control rights status is 0, and the teach pendant is determined to meet the conditions for obtaining control rights. Conversely, if the control rights status is 1, the teach pendant is determined to not meet the conditions for obtaining control rights.

[0072] In some embodiments, such as the present embodiment, Figure 5 As shown, the step S330 may include steps S331-S337.

[0073] S331, start the data reading and writing thread, and use the Select model to monitor the sending and receiving operations of the teaching pendant;

[0074] S332, obtaining the IP address of the teaching pendant through the socket established on the teaching pendant end;

[0075] S333, judging whether the teaching pendant is a physical teaching pendant according to the IP address, if the teaching pendant is the physical teaching pendant, executing step S334, otherwise executing step S336;

[0076] S334, determining whether the sending and receiving operation is a manual switching instruction, if so, executing step S335, otherwise executing step S337;

[0077] S335, controlling the robot to stop running;

[0078] S336: Calling a function corresponding to the sending and receiving operation to perform the sending and receiving operation;

[0079] S337: discard the data corresponding to the sending and receiving operation.

[0080] In this embodiment, the robot controller starts a data reading and writing thread, and uses the Select model in Linux to monitor the sending and receiving operations of the teach pendant, specifically, monitors whether the teach pendant Socket socket has data receiving or sending operations, and can also obtain the IP address of the teach pendant through the Socket socket; determines whether the teach pendant is a physical teach pendant based on the IP address; if the teach pendant is not the physical teach pendant, indicating that the teach pendant is the PC-side teach pendant, then calls the function corresponding to the sending and receiving operation to perform the sending and receiving operation; if the teach pendant is the physical teach pendant, then determines whether the sending and receiving operation is a manual switching instruction, wherein the manual switching instruction is an instruction triggered when the user turns the key switch on the physical teach pendant from automatic gear to manual gear; if the sending and receiving operation is a manual switching instruction, indicating that the user has switched the physical teach pendant from automatic gear to manual gear, then controls the robot to stop running.

[0081] It should be noted that, in this embodiment, when the PC-side teach pendant has control authority, all commands sent by the physical teach pendant except the key switch will be ignored, and other control commands will be based on the PC-side teach pendant. It can be understood that at this time, the UDP communication will synchronously change the sending object to the PC-side teach pendant to ensure that the PC-side teach pendant can obtain the robot operation status data; the file transmission between the teach pendant and the robot controller adopts FTP, the teach pendant as the client, and the robot controller as the server. In the robot controller, the FTP server adopts a multi-process method, that is, each time a client is connected, a child process will be created for it separately. Due to the particularity of FTP, the multi-process solution can ensure that when a problem occurs in one of the processes, it will not cause abnormalities in other processes, which will be manifested as abnormal communication of one of the clients, and the other client can be used normally. In this way, file transfer between the physical teach pendant and the PC-side teach pendant can be realized. It should also be noted that, in this embodiment, the above method can effectively and safely realize the switching of the controller from the physical teach pendant to the PC teach pendant. Similarly, the switching from the PC teach pendant to the physical teach pendant is similar to the above process. For the sake of simplicity, it will not be repeated here.

[0082] Figure 6 FIG4 is a flow chart of a control right switching method provided by an embodiment of the present invention. The method is applied to a control right switching system. The method includes the following steps S410-S430.

[0083] S410, the physical teaching pendant responds to the automatic switching instruction and the control right release instruction, enters the automatic mode and releases the control right;

[0084] S420: The robot controller receives the control right release instruction sent by the physical teaching pendant, and updates the control right state according to the control right release instruction;

[0085] S430. The PC-side teaching pendant establishes a connection with the robot controller according to the updated control status, obtains the robot operation status data and the robot operation file from the robot controller, and controls the robot based on the robot operation status data and the robot operation file.

[0086] In this embodiment, the user operates the physical teach pendant, pulls the key switch from the automatic gear to the manual gear, and clicks the control right switch button on the interface, which triggers the sending of the automatic switch instruction and the release control right instruction. The physical teach pendant receives the automatic switch instruction and the release control right instruction, enters the automatic mode and releases the control right, and sends the release control right instruction to the robot controller; the robot controller receives the release control right instruction sent by the physical teach pendant and updates the control right state according to the release control right instruction; the PC-side teach pendant establishes a connection with the robot controller based on the updated control right state. After the connection is established, the robot operating status data and robot operating files are obtained from the robot controller via the UDP communication protocol and the FTP communication protocol, and the robot is controlled based on the robot operating status data and the robot operating files. It should be noted that in this embodiment, the user can switch the control authority of the PC-side teach pendant and the physical teach pendant, which not only ensures the synchronization of robot-related data but also ensures user safety.

[0087] Figure 7 FIG is a schematic block diagram of a control right switching device 100 provided by an embodiment of the present invention. Figure 7 As shown, corresponding to the above control right switching method, the present invention also provides a control right switching device 100. The control right switching device 100 includes a unit for executing the above control right switching method, and the device can be configured on a physical teaching device. Specifically, please refer to Figure 7 The control right switching device 100 includes a first control unit 101 and a switching unit 102 .

[0088] Among them, the first control unit 101 is used to control the physical teach pendant to enter automatic mode in response to the automatic switching instruction; the switching unit 102 is used to respond to the release control right instruction and send a control right switching command to the robot controller so that the robot controller switches the control right of the robot to the PC teach pendant.

[0089] Figure 8FIG is a schematic block diagram of a control right switching device 200 provided by an embodiment of the present invention. Figure 8 As shown, corresponding to the above control right switching method, the present invention also provides a control right switching device 200. The control right switching device 200 includes a unit for executing the above control right switching method, and the device can be configured on a PC teaching device. Specifically, please refer to Figure 8 The control right switching device 200 includes a second control unit 201 , a first sending unit 202 and a third control unit 203 .

[0090] Among them, the second control unit 201 is used to control the PC-side teaching pendant to enter offline mode if it detects that no connection is established with the robot controller; the first sending unit 202 is used to send a control acquisition instruction to the robot controller if it detects that a connection has been established with the robot controller; the third control unit 203 is used to obtain robot operation status data and robot operation files from the robot controller if it receives a control confirmation instruction returned by the robot controller, and control the robot based on the robot operation status data and the robot operation files.

[0091] Figure 9 FIG is a schematic block diagram of a control right switching device 300 provided in an embodiment of the present invention. Figure 9 As shown, corresponding to the above control right switching method, the present invention also provides a control right switching device 300. The control right switching device 200 includes a unit for executing the above control right switching method, and the device can be configured in a robot controller. Specifically, please refer to Figure 9 The control right switching device 300 includes a monitoring unit 301 , an establishing unit 302 , a processing unit 303 and a second sending unit 304 .

[0092] Among them, the monitoring unit 301 is used to start a monitoring thread to monitor whether there is a teaching pendant requesting access; the establishment unit 302 is used to establish a communication connection with the teaching pendant requesting access if it monitors that there is a teaching pendant requesting access; the processing unit 303 is used to start a data reading and writing thread to obtain the IP address of the teaching pendant, and process the sending and receiving operations of the teaching pendant; the second sending unit 304 is used to start a UDP data thread and an FTP data thread, and send the robot operation status data and robot operation file to the teaching pendant according to the IP address, so that the teaching pendant obtains control.

[0093] In some embodiments, such as this embodiment, the establishing unit 302 includes a detection unit and an establishing sub-unit.

[0094] Among them, the detection unit is used to detect whether the teach pendant meets the conditions for obtaining control rights if it monitors that the teach pendant requests access; the establishment subunit is used to establish a communication connection with the teach pendant requesting access if the teach pendant meets the conditions for obtaining control rights.

[0095] In some embodiments, such as this embodiment, the processing unit 303 includes a starting unit, an acquiring unit, a first judging unit, a second judging unit, a control subunit, an executing unit, and a discarding unit.

[0096] Among them, the starting unit is used to start the data reading and writing thread, and uses the Select model to monitor the sending and receiving operations of the teach pendant; the acquisition unit is used to obtain the IP address of the teach pendant through the Socket established on the teach pendant end; the first judgment unit is used to judge whether the teach pendant is a physical teach pendant based on the IP address; the second judgment unit is used to judge whether the sending and receiving operation is a manual switching instruction if the teach pendant is the physical teach pendant; the control subunit is used to control the robot to stop running if the sending and receiving operation is a manual switching instruction; the execution unit is used to call the function corresponding to the sending and receiving operation to execute the sending and receiving operation if the teach pendant is not the physical teach pendant; the discarding unit is used to discard the data corresponding to the sending and receiving operation if the sending and receiving operation is not a manual switching instruction.

[0097] The above-mentioned control right switching and control right switching device can be implemented in the form of a computer program. The computer program can be used in Figure 10 Runs on the computer equipment shown.

[0098] See also Figure 10 , Figure 10 1 is a schematic block diagram of a computer device provided by an embodiment of the present invention. The computer device 900 comprises a physical teaching pendant, a PC teaching pendant, and a robot controller.

[0099] See Figure 10 The computer device 900 includes a processor 902 , a memory, and a network interface 905 connected via a system bus 901 , wherein the memory may include a storage medium 903 and an internal memory 904 .

[0100] The storage medium 903 may store an operating system 9031 and a computer program 9032. When the computer program 9032 is executed, the processor 902 may execute a control right switching method.

[0101] The processor 902 is used to provide computing and control capabilities to support the operation of the entire computer device 900.

[0102] The internal memory 904 provides an environment for the operation of the computer program 9032 in the storage medium 903. When the computer program 9032 is executed by the processor 902, the processor 902 can execute a control right switching method.

[0103] The network interface 905 is used to communicate with other devices over the network. Figure 10 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present invention and does not constitute a limitation on the computer device 900 to which the solution of the present invention is applied. The specific computer device 900 may include more or fewer components than those shown in the figure, or combine certain components, or have a different component arrangement.

[0104] The processor 902 is configured to run a computer program 9032 stored in the memory. When the computer program 9032 is executed, the processor 902 may execute any embodiment of the control right switching method described above.

[0105] It should be understood that in the embodiment of the present invention, the processor 902 may be a central processing unit (CPU), or may be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.

[0106] Those skilled in the art will appreciate that all or part of the process steps in the method for implementing the above-described embodiments can be accomplished by instructing the relevant hardware through a computer program. The computer program can be stored in a storage medium that is a computer-readable storage medium. The computer program is executed by at least one processor in the computer system to implement the process steps of the above-described method embodiment. Therefore, the present invention also provides a storage medium. The storage medium can be a computer-readable storage medium. The storage medium stores a computer program. When executed by a processor, the computer program causes the processor to execute any embodiment of the control right switching method described above.

[0107] The storage medium may be any computer-readable storage medium that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk.

[0108] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the composition and steps of each example according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0109] In the several embodiments provided herein, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the various units is merely a logical functional division, and actual implementation may employ other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be omitted or not implemented.

[0110] The steps in the methods of the embodiments of the present invention may be adjusted in order, combined, or deleted as needed. The units in the devices of the embodiments of the present invention may be combined, divided, or deleted as needed. Furthermore, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit.

[0111] If this integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the existing technology, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, terminal, or network device, etc.) to execute all or part of the steps of the method described in various embodiments of the present invention.

[0112] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0113] Obviously, those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, to the extent such changes and modifications fall within the scope of the claims and their equivalents, the present invention is intended to encompass such changes and modifications.

[0114] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and such modifications or substitutions are intended to be within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope of protection of the claims.

Claims

1. A control right switching method, characterized in that: include: The physical teaching pendant responds to the automatic switching instruction and enters the automatic mode; The physical teach pendant sends a control right switching command to the robot controller in response to the release control right instruction to release the control right, wherein the automatic switching instruction and the release control right instruction are triggered by a control right switching button of the physical teach pendant; The robot controller receives the control right release instruction sent by the physical teaching pendant, and updates the control right state according to the control right release instruction; The PC-side teaching pendant establishes a connection with the robot controller according to the updated control status, obtains robot operation status data and robot operation files from the robot controller, and controls the robot based on the robot operation status data and the robot operation files, wherein the robot operation files include robot configuration parameter files and robot program files.

2. A control right switching method, applied to a PC teaching pendant, characterized in that: include: If it is detected that no connection is established with the robot controller, the PC-side teaching pendant is controlled to enter an offline mode, wherein the PC-side teaching pendant can only perform program writing in the offline mode; If it is detected that a connection has been established with the robot controller, a control right acquisition instruction is sent to the robot controller; If a control confirmation instruction is received from the robot controller, the robot operation status data is obtained from the robot controller through the UDP communication protocol, and the robot operation file is obtained from the robot controller through the FTP communication protocol, and the robot is controlled based on the robot operation status data and the robot operation file.

3. A control right switching method, applied to a robot controller, characterized in that: include: Start the monitoring thread to monitor whether there is a teaching pendant requesting access; If it is monitored that there is a teaching pendant requesting access, a communication connection is established with the teaching pendant requesting access; Start the data reading and writing thread to obtain the IP address of the teaching pendant and process the sending and receiving operations of the teaching pendant; Starting a UDP data thread and an FTP data thread, and sending the robot operation status data and the robot operation file to the teaching pendant according to the IP address, so that the teaching pendant obtains control; Wherein, if it is monitored that the teaching pendant requests access, the step of establishing a communication connection with the teaching pendant requesting access includes: If it is detected that the teaching pendant requests access, then the teaching pendant is detected to see whether it meets the conditions for obtaining control rights; If the teach pendant meets the conditions for obtaining control rights, a communication connection is established with the teach pendant requesting access; The step of starting a data reading and writing thread to obtain the IP address of the teaching pendant and processing the sending and receiving operations of the teaching pendant includes: Start the data reading and writing thread, and use the Select model to monitor the sending and receiving operations of the teaching pendant; Obtain the IP address of the teaching pendant through the Socket established on the teaching pendant end; Determining whether the teaching pendant is a physical teaching pendant according to the IP address; If the teaching pendant is the physical teaching pendant, determining whether the sending and receiving operation is a manual switching instruction; If the sending and receiving operation is a manual switching instruction, the robot is controlled to stop running.

4. The method according to claim 3, characterized in that After the step of determining whether the teaching pendant is a physical teaching pendant according to the IP address, the method further includes: If the teaching pendant is not the physical teaching pendant, a function corresponding to the sending and receiving operation is called to perform the sending and receiving operation.

5. The method according to claim 3, characterized in that After the step of determining whether the sending and receiving operation is a manual switching instruction, the method further includes: If the sending and receiving operation is not a manual switching instruction, the data corresponding to the sending and receiving operation is discarded.

6. A control right switching device, applied to a PC teaching pendant, characterized in that: include: A second control unit is configured to control the PC-side teaching pendant to enter an offline mode if it is detected that no connection is established with the robot controller, wherein the PC-side teaching pendant can only perform programming in the offline mode; a first sending unit, configured to send a control right acquisition instruction to the robot controller if it is detected that a connection has been established with the robot controller; The third control unit is used to obtain the robot operation status data from the robot controller through the UDP communication protocol and the robot operation file from the robot controller through the FTP communication protocol if it receives the control confirmation instruction returned by the robot controller, and control the robot based on the robot operation status data and the robot operation file.

7. A control right switching device, applied to a robot controller, characterized in that: include: The monitoring unit is used to start a monitoring thread to monitor whether there is a teaching pendant requesting access; an establishing unit, configured to establish a communication connection with the teaching pendant requesting access if a teaching pendant requesting access is detected; A processing unit, configured to start a data reading and writing thread to obtain the IP address of the teaching pendant and process the sending and receiving operations of the teaching pendant; A second sending unit is used to start a UDP data thread and an FTP data thread, and send the robot operation status data and the robot operation file to the teaching pendant according to the IP address, so that the teaching pendant obtains control rights; Wherein, the establishing unit includes: a detection unit, configured to detect whether the teach pendant satisfies a condition for obtaining control rights if a request for access from the teach pendant is detected; an establishing subunit, configured to establish a communication connection with the teaching pendant requesting access if the teaching pendant satisfies a condition for obtaining control right; The processing unit includes: A startup unit, used to start a data reading and writing thread, and use a Select model to monitor the sending and receiving operations of the teaching pendant; An acquiring unit, configured to acquire the IP address of the teaching pendant through the socket established by the teaching pendant end; A first judging unit, configured to judge whether the teaching pendant is a physical teaching pendant according to the IP address; a second determining unit, configured to determine whether the sending and receiving operation is a manual switching instruction if the teaching pendant is the physical teaching pendant; The control subunit is used to control the robot to stop running if the sending and receiving operation is a manual switching instruction.

8. A control right switching system, characterized in that: It includes a physical teaching pendant, a PC teaching pendant and a robot controller, wherein the physical teaching pendant and the PC teaching pendant are both connected to the robot controller; The PC teaching pendant includes the control right switching device as described in claim 6; the robot controller includes the control right switching device as described in claim 7.

9. A computer device, characterized in that: The computer device includes a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the method according to claim 2 or the method according to any one of claims 3 to 5 is implemented.

10. A computer-readable storage medium, characterized in that The storage medium stores a computer program, and when the computer program is executed by a processor, the computer program implements the method according to claim 2 or performs the method according to any one of claims 3 to 5.

Citation Information

Patent Citations

  • Robot system for operating robot from plurality of teaching devices

    CN106476014A