WO2019084881A1 - Robot system, driver, memory device, and control mode switching method - Google Patents

Robot system, driver, memory device, and control mode switching method Download PDF

Info

Publication number
WO2019084881A1
WO2019084881A1 PCT/CN2017/109157 CN2017109157W WO2019084881A1 WO 2019084881 A1 WO2019084881 A1 WO 2019084881A1 CN 2017109157 W CN2017109157 W CN 2017109157W WO 2019084881 A1 WO2019084881 A1 WO 2019084881A1
Authority
WO
WIPO (PCT)
Prior art keywords
control module
virtual
loop
speed
control
Prior art date
Application number
PCT/CN2017/109157
Other languages
French (fr)
Chinese (zh)
Inventor
李宇翔
Original Assignee
深圳配天智能技术研究院有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳配天智能技术研究院有限公司 filed Critical 深圳配天智能技术研究院有限公司
Priority to CN201780034125.8A priority Critical patent/CN109313420B/en
Priority to PCT/CN2017/109157 priority patent/WO2019084881A1/en
Publication of WO2019084881A1 publication Critical patent/WO2019084881A1/en

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02PCONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
    • H02P29/00Arrangements for regulating or controlling electric motors, appropriate for both AC and DC motors

Definitions

  • the invention relates to a motor drive technology, in particular to a robot system, a drive, a storage device and a switching method of a control mode.
  • Servo drives typically use three feedback control modules to control the servo motor, which are position loop, speed loop, and torque loop.
  • the position loop is used for precise control of the motor position
  • the speed loop is used for precise control of the motor speed
  • the torque loop is used for precise control of the motor output.
  • the switching of the dynamic mode of the servo driver requires the user to first configure the two rings to be switched. Therefore, in actual use, only the two rings can be dynamically switched. In the process of switching, the servo driver needs to be disabled, and any ring dynamic mode switching cannot be realized, and the switching takes a long time.
  • the invention provides a robot system, a driver, a storage device and a control mode switching method, which can realize fast switching of dynamic modes between different control modules.
  • a technical solution adopted by the present invention is to provide a method for switching a dynamic mode of a driver, the method comprising: running a virtual first control module when a control mode of the second control module is required to be switched to a control mode of the first control module
  • the first control module is an upper control module of the second control module;
  • the virtual first control module generates, according to the received instruction of the second control module, corresponding to the first control module a virtual instruction;
  • the virtual first control module sends a virtual instruction corresponding to the first control module to the first control module, and is switched by a control mode of the second control module to a control mode of the first control module.
  • a driver includes: a first interface, a second interface, and a third interface; a processor, and the first interface, the second The interface is connected to the third interface, the first interface is configured to be connected to the upper computer for receiving an instruction from the upper computer, and the second interface is configured to connect the motor to output the instruction of the processor to The motor, the third interface is configured to receive feedback information from the motor or a load; wherein, when a control mode of the second control module is required to be switched to a control mode of the first control module, the virtual first control is executed a module, wherein the first control module is a higher-level control module of the second control module; the virtual first control module generates a virtual instruction corresponding to the first control module according to the received instruction of the second control module; The virtual first control module sends a virtual instruction corresponding to the first control module to the first control module, and is controlled by a second control module A first control mode is switched to the control module.
  • a robot system including a driver and an electrode, the driver including: a first interface, a second interface, and a third interface; a processor, a coupling a first interface, a second interface, and a third interface, the first interface is configured to be connected to the upper computer for receiving an instruction from the upper computer, and the second interface is configured to connect the motor to output An instruction of the processor to the motor, the third interface is configured to receive feedback information from the motor or a load; wherein, when a control mode of the second control module is required to be switched to a control mode of the first control module a virtual first control module, wherein the first control module is a higher control module of the second control module; the virtual first control module generates a corresponding one according to the received instruction of the second control module a virtual instruction of the control module; the virtual first control module sends a virtual instruction corresponding to the first control module to the first control module, and The second control mode is switched to the control module of
  • the invention has the beneficial effects of providing a robot system, a driver and a control mode switching method.
  • the control module parameters are not pre-configured by the host computer, the virtual control module of the control module is operated to obtain an instruction corresponding to the control module.
  • the problem that the corresponding control module cannot obtain the corresponding instruction in time due to the failure of the control module can be solved, and the dynamic mode of the different control modules can be quickly switched.
  • FIG. 1 is a schematic flow chart of a first embodiment of a control mode switching method according to the present invention
  • FIG. 2 is a schematic structural view of an embodiment of switching a speed loop of the present invention to a position loop;
  • FIG. 3 is a schematic structural view of an embodiment of the present invention in which a torque ring is switched to a speed loop;
  • FIG. 4 is a schematic flow chart of a second embodiment of a control mode switching method according to the present invention.
  • FIG. 5 is a schematic structural view of an embodiment of a position loop switching to a speed loop according to the present invention.
  • FIG. 6 is a schematic structural view of an embodiment of the speed loop switching to a torque ring of the present invention.
  • Figure 7 is a schematic structural view of an embodiment of a driver of the present invention.
  • FIG. 8 is a schematic structural view of an embodiment of a robot system of the present invention.
  • Figure 9 is a block diagram showing an embodiment of a memory device of the present invention.
  • first the terms “first,” “second,” and “third” are used for descriptive purposes only, and are not to be construed as indicating or implying relative importance or implicitly indicating the indicated technology.
  • features defining “first”, “second”, and “third” may include at least one of the features, either explicitly or implicitly.
  • FIG. 1 is a schematic flowchart diagram of an embodiment of a control mode switching method according to the present invention.
  • the driver in the present invention may be, but not limited to, a servo driver.
  • the servo driver realizes precise operation of the motor through a position command of a position loop, a speed command of a speed loop, and a torque command of a torque ring. In some cases, it is necessary to switch the command from one control module to another in real time while the motor is working.
  • the present invention provides a method for switching a control mode. As shown, the method includes the following steps:
  • the switching method of the control mode of the present invention is applicable to any multi-mode switching control system, and is applicable to both a closed-loop control system and an open-loop control system.
  • the first control module is an upper control module of the second control module, that is, the instruction of the second control module is generated by the first control module, that is, when in the control mode of the first control module, in the instruction transmission direction
  • a control module parses the instruction of the corresponding first control module into an instruction of the second control module, and then passes the instruction of the second control module to the second control module for processing.
  • the second control module referred to in the present invention may be a speed loop of a servo drive or a torque loop of a servo drive
  • the first control module may correspond to a position loop of a servo drive or a speed loop of a servo drive.
  • switching to the first control module during the actual switching process may be represented as switching from the speed loop as the second control module to the position loop as the first control module, or may be represented as the second control by the torque loop.
  • the module switches to be switched by the speed loop as the first control module and by the torque loop as the second control module to the position loop as the first control module.
  • the switching method of the control mode may include the following situations:
  • the speed loop is switched as a second control module to the position loop as the first control module, and the virtual position loop is operated at the time of switching.
  • the virtual position loop can generate a virtual command by the speed command and the position feedback information generated by the motor, and the virtual position loop is not used for loop control, and is only used for dynamic mode switching from the speed loop to the position loop. .
  • the speed command is directly sent by the upper computer to the speed loop instead of the position loop, and then transmitted to the virtual position loop.
  • the position feedback information may include, but is not limited to, current position information and load information of the driven object obtained by the motor.
  • the torque loop is switched as a second control module to the speed loop as the first control module, and the virtual speed loop is operated during the switching.
  • the virtual speed loop can generate virtual commands from the torque command and the speed feedback information generated by the motor, and the virtual speed loop is not used for loop control, only for dynamic mode switching from the torque loop to the speed loop.
  • the torque command is directly sent by the upper computer instead of the torque ring to the speed loop, and then transmitted to the virtual ring of the speed loop.
  • the speed feedback information may include, but is not limited to, a current position of the driven object and load information obtained by the motor.
  • the torque ring is switched as a second control module to the position loop as the first control module.
  • the first control module and the second control module include a third control module, that is, the third control module is a speed loop, and before running the virtual position ring, the virtual speed loop is operated. That is, during this switching process, since the torque ring cannot directly switch across the speed loop to the position loop, the torque loop needs to be switched to the speed loop, and then the speed loop is switched to the position loop, and the dynamic mode switching has been completed. Therefore, the situation is the same as the process of switching the torque ring to the speed loop in this embodiment, and details are not described herein again.
  • the virtual first control module generates a virtual instruction corresponding to the first control module according to the received instruction of the second control module.
  • step S2 corresponds to the three cases described in the above step S1, and may also include the following cases:
  • the first control module is the position loop of the servo driver
  • the second control module is the speed loop of the servo driver
  • the speed loop is switched as the second control module to the position loop as the first control module.
  • FIG. 3 is The schematic diagram of the embodiment in which the speed loop of the present invention is switched to the position loop.
  • the virtual position loop receives the position feedback information of the position loop and the speed command from the speed loop, and uses the position feedback information and the speed command to calculate and generate a virtual command corresponding to the position loop.
  • the position feedback information may be position information of the motor itself, and may also be current position information of the motor load.
  • the virtual command may include configuration information, such as location information at a previous moment, in order to make the location loop work properly.
  • the speed command of the speed loop is directly sent to the speed loop by the upper computer instead of the position loop, and the speed command sent by the upper computer is the same as the speed command sent by the original position loop.
  • the position loop receives the virtual command and other related information from the virtual position loop, and then normally issues a speed command to the speed loop, so that the subsequent link works normally, thereby completing the speed loop.
  • the control mode is switched to the control mode of the position loop.
  • FIG. 4 is a schematic structural diagram of an embodiment of the torque ring switching to the speed loop of the present invention.
  • the virtual speed loop receives speed feedback information from the speed loop and commands from the torque loop, and uses the speed feedback information and the torque command to calculate a virtual command corresponding to the speed loop.
  • the speed feedback information may be current speed information of the motor load, and the second feedback information may also be speed information of the motor itself.
  • the virtual command may include configuration information, such as torque information from a previous moment, in order to make the speed loop work properly.
  • the torque command of the torque ring is directly sent to the torque ring by the upper computer instead of the speed ring, and the torque command sent by the upper computer is the same as the torque command sent by the original speed ring.
  • the speed loop receives relevant information such as virtual commands from the virtual speed loop, and then normally issues a torque command to the torque loop to make the subsequent links work normally, thereby completing the torque loop.
  • the control mode switches to the control mode of the speed loop.
  • the torque ring is switched as the second control module to the position loop as the first control module. Since the torque ring cannot directly cross the speed loop and directly switches to the position loop, the torque ring is first switched to the speed loop control, and then switched by the speed loop.
  • the location loop is the same as the corresponding handover method, and is not described here.
  • the virtual first control module sends the virtual instruction corresponding to the first control module to the first control module, and is switched by the control mode of the second control module to the control mode of the first control module.
  • step S3 after the virtual second control module calculates its virtual instruction, the virtual instruction needs to be sent to the first control module to implement dynamic mode switching from the first control module to the second control module.
  • the speed loop is switched as the first control module to the position loop as the second control module.
  • the position loop during the process of switching from the speed loop to the position loop, the position loop does not run at this time, and the position loop does not save the last position information and other parameters, so the virtual ring in the position loop
  • the configuration information (command and position feedback information) of the corresponding position loop is sent to the position loop
  • the position loop can be operated according to the configuration information to realize the dynamic mode switching of the speed loop to the position loop.
  • the configuration information of the position loop does not need to be preset by the upper computer, but is calculated by the virtual position loop according to the speed command of the speed loop and the position feedback information. Thereby a fast switching from the speed loop to the position loop can be achieved.
  • the torque ring is switched as the first control module to the speed loop as the second control module.
  • the position loop and the speed loop are not operated at this time, and the speed loop does not save the parameters of the previous speed information, etc., so the speed is
  • the speed loop can be started and run according to its configuration information to realize the dynamic mode switching of the torque loop to the speed loop.
  • the configuration information of the speed loop does not need to be preset by the upper computer, but is calculated by the virtual speed loop according to the torque command of the torque ring and the speed feedback information. This enables a fast switching from the torque ring to the speed loop.
  • the third control module is included between the first control module and the second control module, that is, the torque ring and the position ring are further included as the speed loop.
  • Three control modules Running a virtual speed loop before running the virtual position loop, the virtual speed loop generates a virtual command corresponding to the speed loop through the received second feedback information and the command of the torque loop, that is, the torque loop is switched to When positioning the ring, you need to switch the torque ring to the speed loop first.
  • the instruction of the corresponding control module is obtained by running the virtual control module, which can solve the problem that the corresponding control module cannot obtain the corresponding instruction in time because it is not enabled. Realize fast switching between dynamic modes between different control modules.
  • FIG. 4 is a schematic flowchart diagram of a third embodiment of a control mode switching method according to the present invention. As shown in the figure, the method includes the following steps:
  • the upper control unit replaces the first control module to send an instruction to the second control module.
  • FIG. 5 is a schematic structural diagram of an embodiment of the position loop switching to the speed loop according to the present invention.
  • the speed command is directly sent to the speed loop by the upper machine instead of the position loop, the new speed.
  • the instruction replaces the command generated by the original position loop, so mode switching does not require special handling.
  • the speed command directly from the host computer to the speed loop should be the same as the command from the home position loop to the speed loop.
  • FIG. 6 is a schematic structural diagram of an embodiment of the speed loop switching to the torque loop of the present invention.
  • the upper limiter directly substitutes the speed loop to give the torque command to the torque ring, and the new torque
  • the instruction replaces the command generated by the original speed loop, so mode switching does not require special pre-configuration.
  • the torque command directly from the host computer to the torque ring should be the same as the command from the original speed ring to the torque ring.
  • the second control module receives the instruction and processes.
  • Step S21 Object The above steps also include the following cases:
  • the speed loop receives and processes the speed command sent by the host computer to complete the dynamic mode switching from the position loop to the speed loop.
  • the torque loop receives and processes the torque command sent by the host computer to complete the dynamic mode switching from the speed loop to the torque loop.
  • the position loop needs to be switched to the speed loop first, and then the speed loop is switched to the torque loop.
  • the instruction between the dynamic modes of the control modules can be realized by directly transmitting instructions to the control module by the host computer without special pre-configuration.
  • FIG. 7 is a schematic structural diagram of an embodiment of a driver of the present invention. As shown, the drive 10 includes a first interface 11, a second interface 12, and a third interface 13.
  • the processor 14 is connected to the first interface 11, the second interface 12, and the third interface 13.
  • the first interface 11 is configured to be connected to the host computer 20 for receiving commands from the host computer 20, and the second interface 12 is used.
  • the motor 30 is connected to output an instruction of the processor 14 to the motor 30, and the third interface 13 is configured to receive feedback information from the motor 30, and may be omitted, and the second interface 12 is used to receive feedback from the motor 30 or the motor load. information.
  • peripheral circuits can also be included to achieve more functions.
  • the processor 14 is configured to run a virtual first control module when the control mode of the second control module is required to be switched to the control mode of the first control module, where the first control module is a higher-level control module of the second control module,
  • the virtual first control module generates a virtual instruction corresponding to the first control module according to the received instruction of the second control module, and the processor 14 passes the virtual first control module according to the received first control module.
  • the first feedback information and the instruction of the second control module generate a virtual instruction corresponding to the first module; the virtual instruction corresponding to the first control module is sent to the first control module by the virtual first control module, and is used by the second control module
  • the control mode is switched to the control mode of the first control module.
  • the processor 14 performs the following steps:
  • the processor 14 receives the position feedback information of the position loop and the speed command of the speed loop through the virtual position loop; calculates the virtual position command of the position loop by using the position feedback information and the speed command; and virtualizes the position loop through the virtual position loop
  • the position command is sent to the position loop and switched from the control mode of the speed loop to the control mode of the position loop.
  • the processor 14 performs the following steps:
  • the speed feedback information of the speed loop and the torque command of the torque loop are received through the virtual speed loop; the speed feedback information and the torque command are used to calculate the virtual speed command of the speed loop; and the virtual speed command of the speed loop is sent through the virtual speed loop. Go to the speed loop and switch from the control mode of the torque loop to the control mode of the speed loop.
  • the processor 14 runs the virtual third control module before the virtual second control module is executed, and the virtual third control module receives the third control module.
  • the instruction of the second control module to generate a virtual instruction corresponding to the third control module.
  • the virtual third control module virtual instruction is sent to the third control module to implement mode switching of the second control module to the third control module.
  • the processor 14 continues to execute the virtual first control module and its subsequent steps.
  • the processor 14 performs the following steps.
  • the virtual position loop Before running the virtual position loop, it includes: running a virtual speed loop; receiving speed feedback information of the speed loop and torque command of the torque loop through the virtual speed loop; calculating by using the speed feedback information and the torque command to obtain the virtual position of the speed loop
  • the virtual speed command is sent to the speed loop through the virtual speed loop, and is switched from the control mode of the torque loop to the control mode of the speed loop; wherein, after the control mode of the torque loop is switched to the control mode of the speed loop, the processor 14 Continue to run the virtual location loop and its subsequent steps.
  • driver can perform the steps performed by the driver in the above method.
  • steps performed by the driver in the above method For details, refer to the detailed description in the above method, and details are not described herein.
  • FIG. 8 is a schematic structural diagram of an embodiment of a robot system according to the present invention.
  • the robot system 40 includes a driver 10 and a motor 30.
  • the driver 10 includes a first interface 11, a second interface 12, and a third interface 13, and the specific structure of the driver can be referred to the description in FIG.
  • the processor 14 is coupled to the first interface 11, the second interface 12, and the third interface 13.
  • the first interface 11 is configured to be connected to the host computer 20 for receiving commands from the upper computer 20, and the second interface is for connecting the motor. 30, for outputting instructions of the processor 14 to the motor, and the third interface 13 for receiving feedback information from the motor 30 or the load.
  • the processor 14 runs a virtual first control module when the control mode of the second control module needs to be switched to the control mode of the first control module, where the first control module is a virtual control module of the second control module.
  • a control module generates a virtual instruction corresponding to the first control module according to the received instruction of the second control module; and sends a virtual instruction corresponding to the first control module to the first control module by using the virtual first control module, and The control mode of the two control modules is switched to the control mode of the first control module.
  • driver can perform the steps performed by the driver in the above method.
  • steps performed by the driver in the above method For details, refer to the detailed description in the above method, and details are not described herein.
  • FIG. 9 is a schematic structural diagram of an embodiment of a storage device according to the present invention.
  • the storage device of the present invention stores a program file 31 capable of implementing all of the above methods, wherein the program file 21 may be stored in the storage device in the form of a software product, including a plurality of instructions for causing a computer device (which may be an individual) A computer, server, or network device, or the like, or a processor, performs all or part of the steps of the methods of the various embodiments of the present invention.
  • the foregoing storage device includes: a U disk, a mobile hard disk, a read only memory (ROM, Read-Only) Memory), random access memory (RAM, Random Access Memory, memory, or optical disk, etc., which can store program code, or terminal devices such as computers, servers, mobile phones, and tablets.
  • ROM read only memory
  • RAM Random Access Memory
  • memory or optical disk, etc., which can store program code, or terminal devices such as computers, servers, mobile phones, and tablets.
  • the disclosed system, apparatus, and method may be implemented in other manners.
  • the device implementations described above are merely illustrative.
  • the division of the modules or units is only a logical function division.
  • there may be another division manner for example, multiple units or components may be used. Combinations can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • the technical solution of the present invention which is essential or contributes to the prior art, or all or part of the technical solution, may be embodied in the form of a software product stored in a storage medium.
  • a number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) or a processor to perform all or part of the steps of the methods of the various embodiments of the present invention.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read only memory (ROM, Read-Only) Memory, random access memory (RAM), disk or optical disk, and other media that can store program code.
  • the present invention provides a method for switching a robot system, a driver, a storage device, and a control mode, by running a virtual control module without pre-configuring control module parameters by the host computer.
  • the instruction of the corresponding control module is obtained, which can solve the problem that the corresponding control module cannot obtain the corresponding instruction in time because it is not enabled, and thus can realize the fast switching of the dynamic mode between different control modules.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Power Engineering (AREA)
  • Manipulator (AREA)
  • Numerical Control (AREA)

Abstract

The present invention discloses a robot system, a driver, a memory device, and a control mode switching method. The method comprises: activating a virtual first control module when switching from a control mode of a second control module to a control mode of a first control module is required, wherein the first control module is a higher-level control module of the second control module; the virtual first control module generating, according to a received instruction from the second control module, a virtual instruction corresponding to the first control module; and the virtual first control module sending the virtual instruction corresponding to the first control module to the first control module, and switching from the control mode of the second control module to the control mode of the first control module. The present invention enables a driver to perform fast, dynamic mode switching between different control modules.

Description

机器人系统、驱动器、存储装置及控制模式的切换方法 Robot system, driver, storage device and control mode switching method
【技术领域】[Technical Field]
本发明涉及电机驱动技术,特别是涉及一种机器人系统、驱动器、存储装置及控制模式的切换方法。The invention relates to a motor drive technology, in particular to a robot system, a drive, a storage device and a switching method of a control mode.
【背景技术】 【Background technique】
伺服驱动器通常使用三个反馈控制模块来对伺服电机进行控制,分别是位置环、速度环和力矩环。位置环用于电机位置的精确控制,速度环用于电机速度的精确控制,力矩环用于电机出力的精确控制。在某些场合下,需要在电机工作的同时,实时的从某一个控制模块的指令切换到另一个控制模块的指令。现有技术中对伺服驱动器的动态模式的切换,需要用户首先配置要切换的两个环。因此,实际使用时只能在二个环之间动态切换,在切换的过程中,伺服驱动器需要失能,无法实现任意环动态模式切换,且切换需要消耗较长时间。Servo drives typically use three feedback control modules to control the servo motor, which are position loop, speed loop, and torque loop. The position loop is used for precise control of the motor position, the speed loop is used for precise control of the motor speed, and the torque loop is used for precise control of the motor output. In some cases, it is necessary to switch the command from one control module to another in real time while the motor is working. In the prior art, the switching of the dynamic mode of the servo driver requires the user to first configure the two rings to be switched. Therefore, in actual use, only the two rings can be dynamically switched. In the process of switching, the servo driver needs to be disabled, and any ring dynamic mode switching cannot be realized, and the switching takes a long time.
【发明内容】 [Summary of the Invention]
本发明提供一种机器人系统、驱动器、存储装置及控制模式切换方法,能够实现不同控制模块间动态模式的快速切换。The invention provides a robot system, a driver, a storage device and a control mode switching method, which can realize fast switching of dynamic modes between different control modules.
本发明采用的一个技术方案是:提供一种驱动器动态模式切换方法,所述方法包括:当需要第二控制模块的控制模式切换至第一控制模块的控制模式时,运行虚拟的第一控制模块,其中所述第一控制模块为所述第二控制模块的上位控制模块;所述虚拟的第一控制模块根据接收到的所述第二控制模块的指令,产生对应所述第一控制模块的虚拟指令;所述虚拟的第一控制模块将对应所述第一控制模块的虚拟指令发送至所述第一控制模块,并由第二控制模块的控制模式切换到第一控制模块的控制模式。A technical solution adopted by the present invention is to provide a method for switching a dynamic mode of a driver, the method comprising: running a virtual first control module when a control mode of the second control module is required to be switched to a control mode of the first control module The first control module is an upper control module of the second control module; the virtual first control module generates, according to the received instruction of the second control module, corresponding to the first control module a virtual instruction; the virtual first control module sends a virtual instruction corresponding to the first control module to the first control module, and is switched by a control mode of the second control module to a control mode of the first control module.
为解决上述技术问题,本发明采用的又一个技术方案是:提供一种驱动器,所述驱动器包括:第一接口、第二接口以及第三接口;处理器,与所述第一接口、第二接口、第三接口相连接,所述第一接口用于连接上位机,用以接收来自所述上位机的指令,所述第二接口用于连接电机,用以输出所述处理器的指令至所述电机,所述第三接口用于接收来自所述电机或负载的反馈信息;其中,当需要第二控制模块的控制模式切换至第一控制模块的控制模式时,运行虚拟的第一控制模块,其中第一控制模块为第二控制模块的上位控制模块;所述虚拟的第一控制模块根据接收到的所述第二控制模块的指令,产生对应所述第一控制模块的虚拟指令;所述虚拟的第一控制模块将对应所述第一控制模块的虚拟指令发送至所述第一控制模块,并由第二控制模块的控制模式切换到第一控制模块的控制模式。In order to solve the above technical problem, another technical solution adopted by the present invention is to provide a driver, the driver includes: a first interface, a second interface, and a third interface; a processor, and the first interface, the second The interface is connected to the third interface, the first interface is configured to be connected to the upper computer for receiving an instruction from the upper computer, and the second interface is configured to connect the motor to output the instruction of the processor to The motor, the third interface is configured to receive feedback information from the motor or a load; wherein, when a control mode of the second control module is required to be switched to a control mode of the first control module, the virtual first control is executed a module, wherein the first control module is a higher-level control module of the second control module; the virtual first control module generates a virtual instruction corresponding to the first control module according to the received instruction of the second control module; The virtual first control module sends a virtual instruction corresponding to the first control module to the first control module, and is controlled by a second control module A first control mode is switched to the control module.
为解决上述技术问题,本发明采用的又一个技术方案是:提供一种机器人系统,包括驱动器和电极,所述驱动器包括:第一接口、第二接口以及第三接口;处理器,耦接所述第一接口、第二接口、第三接口,所述第一接口用于连接上位机,用以接收来自所述上位机的指令,所述第二接口用于连接所述电机,用以输出所述处理器的指令至所述电机,所述第三接口用于接收来自所述电机或负载的反馈信息;其中,当需要第二控制模块的控制模式切换至第一控制模块的控制模式时,运行虚拟的第一控制模块,其中第一控制模块为第二控制模块的上位控制模块;所述虚拟的第一控制模块根据接收到的所述第二控制模块的指令,产生对应所述第一控制模块的虚拟指令;所述虚拟的第一控制模块将对应所述第一控制模块的虚拟指令发送至所述第一控制模块,并由第二控制模块的控制模式切换到第一控制模块的控制模式。In order to solve the above technical problem, another technical solution adopted by the present invention is to provide a robot system including a driver and an electrode, the driver including: a first interface, a second interface, and a third interface; a processor, a coupling a first interface, a second interface, and a third interface, the first interface is configured to be connected to the upper computer for receiving an instruction from the upper computer, and the second interface is configured to connect the motor to output An instruction of the processor to the motor, the third interface is configured to receive feedback information from the motor or a load; wherein, when a control mode of the second control module is required to be switched to a control mode of the first control module a virtual first control module, wherein the first control module is a higher control module of the second control module; the virtual first control module generates a corresponding one according to the received instruction of the second control module a virtual instruction of the control module; the virtual first control module sends a virtual instruction corresponding to the first control module to the first control module, and The second control mode is switched to the control module of the control mode of the first control module.
本发明的有益效果是:提供一种机器人系统、驱动器及控制模式的切换方法,在无需上位机预先配置控制模块参数的情况下,通过运行控制模块的虚拟控制模块,得到对应控制模块的指令,可解决对应控制模块由于未启用而无法及时得到相应指令的问题,进而可以实现不同控制模块间动态模式的快速切换。The invention has the beneficial effects of providing a robot system, a driver and a control mode switching method. When the control module parameters are not pre-configured by the host computer, the virtual control module of the control module is operated to obtain an instruction corresponding to the control module. The problem that the corresponding control module cannot obtain the corresponding instruction in time due to the failure of the control module can be solved, and the dynamic mode of the different control modules can be quickly switched.
【附图说明】 [Description of the Drawings]
图1是本发明控制模式切换方法第一实施方式的流程示意图;1 is a schematic flow chart of a first embodiment of a control mode switching method according to the present invention;
图2是本发明速度环切换至位置环一实施方式的结构示意图;2 is a schematic structural view of an embodiment of switching a speed loop of the present invention to a position loop;
图3是本发明力矩环切换至速度环一实施方式的结构示意图;3 is a schematic structural view of an embodiment of the present invention in which a torque ring is switched to a speed loop;
图4是本发明控制模式切换方法第二实施方式的流程示意图;4 is a schematic flow chart of a second embodiment of a control mode switching method according to the present invention;
图5是本发明位置环切换至速度环一实施方式的结构示意图;5 is a schematic structural view of an embodiment of a position loop switching to a speed loop according to the present invention;
图6是本发明速度环切换至力矩环一实施方式的结构示意图;6 is a schematic structural view of an embodiment of the speed loop switching to a torque ring of the present invention;
图7是本发明驱动器一实施方式的结构示意图;Figure 7 is a schematic structural view of an embodiment of a driver of the present invention;
图8是本发明机器人系统一实施方式的结构示意图;8 is a schematic structural view of an embodiment of a robot system of the present invention;
图9是本发明存储装置一实施方式的结构示意图。Figure 9 is a block diagram showing an embodiment of a memory device of the present invention.
【具体实施方式】【Detailed ways】
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅是本发明的一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
需要说明的是,本发明实施例中,术语“第一”、“第二”、“第三”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”、“第三”的特征可以明示或者隐含地包括至少一个该特征。It should be noted that, in the embodiments of the present invention, the terms “first,” “second,” and “third” are used for descriptive purposes only, and are not to be construed as indicating or implying relative importance or implicitly indicating the indicated technology. The number of features. Thus, features defining "first", "second", and "third" may include at least one of the features, either explicitly or implicitly.
请参阅图1,图1是本发明控制模式切换方法一实施方式的流程示意图。本发明中的驱动器可以为包括但不限于伺服驱动器,通常情况下,伺服驱动器通过位置环的位置指令、速度环的速度指令和力矩环的力矩指令来实现电机的精确运行。在某些场合下,需要在电机工作的同时,实时的从某一个控制模块的指令切换到另一个控制模块的指令。本发明提供一种控制模式的切换方法,如图所示,该方法包括如下步骤:Please refer to FIG. 1. FIG. 1 is a schematic flowchart diagram of an embodiment of a control mode switching method according to the present invention. The driver in the present invention may be, but not limited to, a servo driver. Generally, the servo driver realizes precise operation of the motor through a position command of a position loop, a speed command of a speed loop, and a torque command of a torque ring. In some cases, it is necessary to switch the command from one control module to another in real time while the motor is working. The present invention provides a method for switching a control mode. As shown, the method includes the following steps:
S1,当需要第二控制模块的控制模式切换至第一控制模块的控制模式时,运行虚拟的第一控制模块,其中第一控制模块为第二控制模块的上位控制模块。S1. When the control mode of the second control module is required to be switched to the control mode of the first control module, the virtual first control module is operated, where the first control module is the upper control module of the second control module.
本发明的控制模式的切换方法适用于任意的多模式切换控制的系统,且对于闭环控制系统和开环控制系统均适用。其中,第一控制模块为第二控制模块的上位控制模块,即第二控制模块的指令是由第一控制模块产生的,也即当处于第一控制模块的控制模式时,在指令传递方向第一控制模块将对应的第一控制模块的指令解析成第二控制模块的指令,再将第二控制模块的指令交由第二控制模块进行处理。在本发明中所指的第二控制模块可以为伺服驱动器的速度环或伺服驱动器的力矩环,第一控制模块可以对应为伺服驱动器的位置环或伺服驱动器的速度环。且在实际切换过程中的第二控制模块切换至第一控制模块可以表示为由速度环作为第二控制模块切换至由位置环作为第一控制模块、也可以表示为由力矩环作为第二控制模块切换至由速度环作为第一控制模块以及由力矩环作为第二控制模块切换至由位置环作为第一控制模块。The switching method of the control mode of the present invention is applicable to any multi-mode switching control system, and is applicable to both a closed-loop control system and an open-loop control system. The first control module is an upper control module of the second control module, that is, the instruction of the second control module is generated by the first control module, that is, when in the control mode of the first control module, in the instruction transmission direction A control module parses the instruction of the corresponding first control module into an instruction of the second control module, and then passes the instruction of the second control module to the second control module for processing. The second control module referred to in the present invention may be a speed loop of a servo drive or a torque loop of a servo drive, and the first control module may correspond to a position loop of a servo drive or a speed loop of a servo drive. And switching to the first control module during the actual switching process may be represented as switching from the speed loop as the second control module to the position loop as the first control module, or may be represented as the second control by the torque loop. The module switches to be switched by the speed loop as the first control module and by the torque loop as the second control module to the position loop as the first control module.
在具体实施例中,该控制模式的切换方法可以包括以下情况:In a specific embodiment, the switching method of the control mode may include the following situations:
1. 速度环作为第二控制模块切换至作为第一控制模块的位置环,在切换时运行虚拟的位置环。具体地,该虚拟的位置环可以由速度指令和电机产生的位置反馈信息产生虚拟指令,且该虚拟的位置环的虚不用于环路控制,仅仅用于从速度环到位置环的动态模式切换。1. The speed loop is switched as a second control module to the position loop as the first control module, and the virtual position loop is operated at the time of switching. Specifically, the virtual position loop can generate a virtual command by the speed command and the position feedback information generated by the motor, and the virtual position loop is not used for loop control, and is only used for dynamic mode switching from the speed loop to the position loop. .
进一步地,该速度指令是直接由上位机代替位置环发送给速度环,进而传送给该虚拟的位置环。该位置反馈信息可以包括但不限于电机所得到的被驱动对象的当前位置信息及负载信息。Further, the speed command is directly sent by the upper computer to the speed loop instead of the position loop, and then transmitted to the virtual position loop. The position feedback information may include, but is not limited to, current position information and load information of the driven object obtained by the motor.
2. 力矩环作为第二控制模块切换至作为第一控制模块的速度环,在切换时运行虚拟的速度环。具体地,该虚拟的速度环可以由力矩指令和由电机产生的速度反馈信息产生虚拟指令,且虚拟的该速度环不用于环路控制,仅仅用于从力矩环到速度环的动态模式切换。2. The torque loop is switched as a second control module to the speed loop as the first control module, and the virtual speed loop is operated during the switching. Specifically, the virtual speed loop can generate virtual commands from the torque command and the speed feedback information generated by the motor, and the virtual speed loop is not used for loop control, only for dynamic mode switching from the torque loop to the speed loop.
进一步地,该力矩指令是直接由上位机代替力矩环发送给速度环,进而传送给该速度环的虚拟环。该速度反馈信息可以包括但不限于电机所得到的被驱动对象的当前位置及负载信息。Further, the torque command is directly sent by the upper computer instead of the torque ring to the speed loop, and then transmitted to the virtual ring of the speed loop. The speed feedback information may include, but is not limited to, a current position of the driven object and load information obtained by the motor.
3.力矩环作为第二控制模块切换至作为第一控制模块的位置环。3. The torque ring is switched as a second control module to the position loop as the first control module.
其中,第一控制模块和第二控制模块之间包括第三控制模块,即第三控制模块为速度环,在运行虚拟的位置环之前包括:运行虚拟的速度环。即在此切换过程中,由于从力矩环不能直接跨越速度环切换至位置环,故力矩环需切换至速度环,再由速度环向位置环切换,已完成该动态模式的切换。故该情况和本实施例中的力矩环切换至速度环的过程相同,此处不再赘述。The first control module and the second control module include a third control module, that is, the third control module is a speed loop, and before running the virtual position ring, the virtual speed loop is operated. That is, during this switching process, since the torque ring cannot directly switch across the speed loop to the position loop, the torque loop needs to be switched to the speed loop, and then the speed loop is switched to the position loop, and the dynamic mode switching has been completed. Therefore, the situation is the same as the process of switching the torque ring to the speed loop in this embodiment, and details are not described herein again.
S2,虚拟的第一控制模块根据接收到的第二控制模块的指令,产生对应第一控制模块的虚拟指令。S2. The virtual first control module generates a virtual instruction corresponding to the first control module according to the received instruction of the second control module.
在具体实施例中,对于开环的控制系统,虚拟的第一控制模块根据接收到的第二控制模块的指令,产生对应第一控制模块的虚拟指令;对于闭环的控制系统,虚拟的第一控制模块根据接收到的第一控制模块的第一反馈信息以及第二控制模块的指令,产生对应所述第一模块的虚拟指令。以闭环的伺服驱动器控制为例,步骤S2对应上述步骤S1中所述的3种情况,也可以包括以下几种情况:In a specific embodiment, for the open-loop control system, the virtual first control module generates a virtual instruction corresponding to the first control module according to the received instruction of the second control module; for the closed-loop control system, the virtual first The control module generates a virtual instruction corresponding to the first module according to the received first feedback information of the first control module and the instruction of the second control module. Taking the closed-loop servo driver control as an example, step S2 corresponds to the three cases described in the above step S1, and may also include the following cases:
1. 第一控制模块为伺服驱动器的位置环,第二控制模块为伺服驱动器的速度环,速度环作为第二控制模块切换至作为第一控制模块的位置环时,具体可以参见图3,图3是本发明速度环切换至位置环一实施方式的结构示意图。1. The first control module is the position loop of the servo driver, the second control module is the speed loop of the servo driver, and the speed loop is switched as the second control module to the position loop as the first control module. For details, refer to FIG. 3, FIG. 3 is The schematic diagram of the embodiment in which the speed loop of the present invention is switched to the position loop.
虚拟的位置环接收位置环的位置反馈信息以及来自速度环的速度指令,利用位置反馈信息和速度指令进行计算产生对应位置环的虚拟指令。其中,该位置反馈信息可以为电机自身的位置信息,还可以为电机负载的当前位置信息。该虚拟指令可以包括配置信息,比如前一时刻的位置信息,目的是使位置环可以正常工作。进一步地,该速度环的速度指令直接由上位机代替位置环发送给速度环,且该上位机发送的速度指令与由原位置环发送的速度指令相同。The virtual position loop receives the position feedback information of the position loop and the speed command from the speed loop, and uses the position feedback information and the speed command to calculate and generate a virtual command corresponding to the position loop. The position feedback information may be position information of the motor itself, and may also be current position information of the motor load. The virtual command may include configuration information, such as location information at a previous moment, in order to make the location loop work properly. Further, the speed command of the speed loop is directly sent to the speed loop by the upper computer instead of the position loop, and the speed command sent by the upper computer is the same as the speed command sent by the original position loop.
需要说明的是,在由速度环切换到位置环过程中,位置环接收来自虚拟的位置环的虚拟指令等相关信息,进而正常发出速度指令至速度环,使后续环节正常工作,从而完成速度环的控制模式切换到位置环的控制模式。It should be noted that during the process of switching from the speed loop to the position loop, the position loop receives the virtual command and other related information from the virtual position loop, and then normally issues a speed command to the speed loop, so that the subsequent link works normally, thereby completing the speed loop. The control mode is switched to the control mode of the position loop.
2. 力矩环作为第二控制模块切换至作为第一控制模块的速度环,具体可以参见图4,图4是本发明力矩环切换至速度环一实施方式的结构示意图。2. The torque ring is switched to the speed loop as the first control module as a second control module. For details, refer to FIG. 4. FIG. 4 is a schematic structural diagram of an embodiment of the torque ring switching to the speed loop of the present invention.
虚拟的速度环接收来自速度环的速度反馈信息以及来自力矩环的指令,利用速度反馈信息和力矩指令进行计算产生对应速度环的虚拟指令。其中,该速度反馈信息可以为电机负载的当前速度信息,该第二反馈信息还可以为电机自身的速度信息。该虚拟指令可以包括配置信息,比如前一时刻的力矩信息,目的是使速度环可以正常工作。The virtual speed loop receives speed feedback information from the speed loop and commands from the torque loop, and uses the speed feedback information and the torque command to calculate a virtual command corresponding to the speed loop. The speed feedback information may be current speed information of the motor load, and the second feedback information may also be speed information of the motor itself. The virtual command may include configuration information, such as torque information from a previous moment, in order to make the speed loop work properly.
可选地,该力矩环的力矩指令直接由上位机代替速度环发送给力矩环,且该上位机发送的力矩指令与由原速度环发送的力矩指令相同。Optionally, the torque command of the torque ring is directly sent to the torque ring by the upper computer instead of the speed ring, and the torque command sent by the upper computer is the same as the torque command sent by the original speed ring.
需要说明的是,在由力矩环切换到速度环过程中,速度环接收来自虚拟的速度环的虚拟指令等相关信息,进而正常发出力矩指令至力矩环,使后续环节正常工作,从而完成力矩环的控制模式切换到速度环的控制模式。It should be noted that during the process of switching from the torque loop to the speed loop, the speed loop receives relevant information such as virtual commands from the virtual speed loop, and then normally issues a torque command to the torque loop to make the subsequent links work normally, thereby completing the torque loop. The control mode switches to the control mode of the speed loop.
3. 力矩环作为第二控制模块切换至作为第一控制模块的位置环,因力矩环不能直接跨越速度环而直接切换至位置环,故此情况力矩环先切换成速度环控制后,再由速度环切换成位置环,切换方法与上述对应的切换方法相同,此处不再赘述。3. The torque ring is switched as the second control module to the position loop as the first control module. Since the torque ring cannot directly cross the speed loop and directly switches to the position loop, the torque ring is first switched to the speed loop control, and then switched by the speed loop. The location loop is the same as the corresponding handover method, and is not described here.
S3,虚拟的第一控制模块将对应第一控制模块的虚拟指令发送至第一控制模块,并由第二控制模块的控制模式切换到第一控制模块的控制模式。S3. The virtual first control module sends the virtual instruction corresponding to the first control module to the first control module, and is switched by the control mode of the second control module to the control mode of the first control module.
在步骤S3中,在虚拟的第二控制模块计算出其虚拟指令后,需要将该虚拟指令发送给第一控制模块以实现由第一控制模块到第二控制模块的动态模式切换。In step S3, after the virtual second control module calculates its virtual instruction, the virtual instruction needs to be sent to the first control module to implement dynamic mode switching from the first control module to the second control module.
具体地,进一步参见图2及图3,可以分为以下情况:Specifically, referring further to FIG. 2 and FIG. 3, it can be divided into the following cases:
1. 速度环作为第一控制模块切换至作为第二控制模块的位置环。1. The speed loop is switched as the first control module to the position loop as the second control module.
在具体实施例中,由速度环向位置环切换的过程中,位置环此时是不运行的,且该位置环也不会保存其上一次的位置信息等参数,故在位置环的虚拟环将对应位置环的配置信息(指令和位置反馈信息)发送至位置环时,位置环可以根据其配置信息运行,以实现速度环到位置环的动态模式切换。需要说明的是,速度环到位置环的切换过程中,位置环的配置信息不需要上位机的预先设置,而是通过其虚拟的位置环根据速度环的速度指令以及位置反馈信息计算而得到,从而可以实现由速度环到位置环的快速切换。In a specific embodiment, during the process of switching from the speed loop to the position loop, the position loop does not run at this time, and the position loop does not save the last position information and other parameters, so the virtual ring in the position loop When the configuration information (command and position feedback information) of the corresponding position loop is sent to the position loop, the position loop can be operated according to the configuration information to realize the dynamic mode switching of the speed loop to the position loop. It should be noted that, during the switching process from the speed loop to the position loop, the configuration information of the position loop does not need to be preset by the upper computer, but is calculated by the virtual position loop according to the speed command of the speed loop and the position feedback information. Thereby a fast switching from the speed loop to the position loop can be achieved.
2. 力矩环作为第一控制模块切换至作为第二控制模块的速度环。2. The torque ring is switched as the first control module to the speed loop as the second control module.
在具体实施例中,由力矩环向速度环切换的过程中,位置环及速度环此时是不运行的,且该速度环也不会保存其上一次的速度信息等参数,故在速度的虚拟环将对应速度环的配置信息(指令和速度反馈信息)发送至速度环时,速度环可以根据其配置信息启动并运行,以实现力矩环到速度环的动态模式切换。需要说明的是,力矩环到速度环的切换过程中,速度环的配置信息不需要上位机的预先设置,而是通过其虚拟的速度环根据力矩环的力矩指令以及速度反馈信息计算而得到,从而可以实现由力矩环到速度环的快速切换。In a specific embodiment, during the process of switching from the torque ring to the speed loop, the position loop and the speed loop are not operated at this time, and the speed loop does not save the parameters of the previous speed information, etc., so the speed is When the virtual ring sends the configuration information (command and speed feedback information) corresponding to the speed loop to the speed loop, the speed loop can be started and run according to its configuration information to realize the dynamic mode switching of the torque loop to the speed loop. It should be noted that during the switching process from the torque ring to the speed loop, the configuration information of the speed loop does not need to be preset by the upper computer, but is calculated by the virtual speed loop according to the torque command of the torque ring and the speed feedback information. This enables a fast switching from the torque ring to the speed loop.
3. 当力矩环作为第一控制模块切换至作为第二控制模块的位置环时,该转换过程如下:3. When the torque loop is switched as the first control module to the position loop as the second control module, the conversion process is as follows:
当力矩环作为第一控制模块切换至位置环作为第二控制模块时,第一控制模块和第二控制模块之间包括第三控制模块,即力矩环与位置环间还包括作为速度环的第三控制模块。在运行虚拟的位置环之前先运行虚拟的速度环,虚拟的速度环通过接收到的第二反馈信息以及所述力矩环的指令,产生对应速度环的虚拟指令,也就是说由力矩环切换至位置环时,需要将力矩环先切换至速度环。其中,由力矩环切换至速度环的过程具体可以参见上述的描述,此处不再赘述。When the torque ring is switched as the first control module to the position loop as the second control module, the third control module is included between the first control module and the second control module, that is, the torque ring and the position ring are further included as the speed loop. Three control modules. Running a virtual speed loop before running the virtual position loop, the virtual speed loop generates a virtual command corresponding to the speed loop through the received second feedback information and the command of the torque loop, that is, the torque loop is switched to When positioning the ring, you need to switch the torque ring to the speed loop first. For the process of switching from the torque ring to the speed ring, refer to the above description, and details are not described herein again.
其中,在力矩环切换至速度环后,继续执行运行虚拟的位置环及其后续步骤,以实现力矩环向位置环的模式切换。进一步地,所述速度环向位置环的切换方法参见上述描述,此处不再赘述。After the torque ring is switched to the speed loop, the running of the virtual position loop and its subsequent steps are continued to implement the mode switching of the torque loop to the position loop. For the method of switching the speed loop to the position loop, refer to the foregoing description, and details are not described herein again.
上述实施例中,在无需上位机预先配置控制模块参数的情况下,通过运行虚拟的控制模块,得到对应控制模块的指令,可解决对应控制模块由于未启用而无法及时得到相应指令的问题,可以实现不同控制模块间动态模式的快速切换。In the above embodiment, when the parameter of the control module is not pre-configured by the host computer, the instruction of the corresponding control module is obtained by running the virtual control module, which can solve the problem that the corresponding control module cannot obtain the corresponding instruction in time because it is not enabled. Realize fast switching between dynamic modes between different control modules.
请参阅图4,图4是本发明控制模式切换方法第三实施方式的流程示意图。如图该方法包括以下步骤:Please refer to FIG. 4. FIG. 4 is a schematic flowchart diagram of a third embodiment of a control mode switching method according to the present invention. As shown in the figure, the method includes the following steps:
S20,在指令传递方向的第一控制模块切换至第二控制模块时,由上位机代替第一控制模块给第二控制模块发送指令。S20, when the first control module in the instruction transfer direction is switched to the second control module, the upper control unit replaces the first control module to send an instruction to the second control module.
在具体实施例中,指令传递方向的第一控制模块切换至第二控制模块时可以包括以下两种情况:In a specific embodiment, when the first control module of the instruction transfer direction is switched to the second control module, the following two situations may be included:
1. 作为第一控制模块的位置环向作为第二控制模块的速度环切换,具体可以参见图5,图5是本发明位置环切换至速度环一实施方式的结构示意图。1. The position loop of the first control module is switched to the speed loop of the second control module. For details, refer to FIG. 5. FIG. 5 is a schematic structural diagram of an embodiment of the position loop switching to the speed loop according to the present invention.
具体地,由位置指令切换为速度指令时,由于速度环指令是由位置环产生,所以从位置环切换到速度环时,直接由上位机代替位置环将速度指令给到速度环,新的速度指令代替了原来位置环产生的指令,因此模式切换无需做特殊处理。且需要说明的是由上位机直接给速度环的速度指令应与由原位置环给速度环的指令相同。Specifically, when the position command is switched to the speed command, since the speed loop command is generated by the position loop, when switching from the position loop to the speed loop, the speed command is directly sent to the speed loop by the upper machine instead of the position loop, the new speed. The instruction replaces the command generated by the original position loop, so mode switching does not require special handling. It should be noted that the speed command directly from the host computer to the speed loop should be the same as the command from the home position loop to the speed loop.
2. 作为第一控制模块的速度环向作为第二控制模块的力矩环切换,具体可以参见图6,图6是本发明速度环切换至力矩环一实施方式的结构示意图。2. The speed loop of the first control module is switched to the torque loop of the second control module. For details, refer to FIG. 6. FIG. 6 is a schematic structural diagram of an embodiment of the speed loop switching to the torque loop of the present invention.
具体地,由速度指令切换为力矩指令时,由于力矩环指令是由速度环产生,所以从速度环切换到力矩环时,直接由上位机代替速度环将力矩指令给到力矩环,新的力矩指令代替了原来速度环产生的指令,因此模式切换无需做特殊的预先配置。且需要说明的是由上位机直接给力矩环的力矩指令应与由原速度环给力矩环的指令相同。Specifically, when the speed command is switched to the torque command, since the torque ring command is generated by the speed loop, when switching from the speed loop to the torque loop, the upper limiter directly substitutes the speed loop to give the torque command to the torque ring, and the new torque The instruction replaces the command generated by the original speed loop, so mode switching does not require special pre-configuration. It should be noted that the torque command directly from the host computer to the torque ring should be the same as the command from the original speed ring to the torque ring.
S21,第二控制模块接收指令并处理。S21. The second control module receives the instruction and processes.
步骤S21对象上述步骤也包括如下情况:Step S21 Object The above steps also include the following cases:
1. 作为第一控制模块的位置环向作为第二控制模块的速度环切换。1. The position loop as the first control module switches to the speed loop as the second control module.
具体地,速度环接收由上位机发送的速度指令并处理,完成由位置环到速度环的动态模式切换。Specifically, the speed loop receives and processes the speed command sent by the host computer to complete the dynamic mode switching from the position loop to the speed loop.
2. 作为第一控制模块的速度环向作为第二控制模块的力矩环切换。2. The speed loop as the first control module switches to the torque loop as the second control module.
具体地,力矩环接收由上位机发送的力矩指令并处理,完成由速度环到力矩环的动态模式切换。Specifically, the torque loop receives and processes the torque command sent by the host computer to complete the dynamic mode switching from the speed loop to the torque loop.
需要说明的是,若需要由位置环切换到力矩环,则需要先将位置环切换到速度环,再由速度环切换到力矩环。It should be noted that if it is necessary to switch from the position loop to the torque ring, the position loop needs to be switched to the speed loop first, and then the speed loop is switched to the torque loop.
上述实施方式,通过由上位机直接发送指令给所述控制模块,且无需做特殊的预先配置,能够实现控制模块间动态模式间的转换。In the above embodiment, the instruction between the dynamic modes of the control modules can be realized by directly transmitting instructions to the control module by the host computer without special pre-configuration.
请参阅图7,图7是本发明驱动器一实施方式的结构示意图。如图所示,该驱动器10包括第一接口11、第二接口12以及第三接口13。Please refer to FIG. 7. FIG. 7 is a schematic structural diagram of an embodiment of a driver of the present invention. As shown, the drive 10 includes a first interface 11, a second interface 12, and a third interface 13.
其中,处理器14,与第一接口11、第二接口12、第三接口13相连接,第一接口11用于连接上位机20,用以接收来自上位机20的指令,第二接口12用于连接电机30,用以输出处理器14的指令至电机30,第三接口13用于接收来自电机30的反馈信息,且可省略,利用第二接口12接收来自电机30的或电机负载的反馈信息。在实际应用中,还可以包括外围电路以实现更多功能。The processor 14 is connected to the first interface 11, the second interface 12, and the third interface 13. The first interface 11 is configured to be connected to the host computer 20 for receiving commands from the host computer 20, and the second interface 12 is used. The motor 30 is connected to output an instruction of the processor 14 to the motor 30, and the third interface 13 is configured to receive feedback information from the motor 30, and may be omitted, and the second interface 12 is used to receive feedback from the motor 30 or the motor load. information. In practical applications, peripheral circuits can also be included to achieve more functions.
其中,处理器14用于当需要第二控制模块的控制模式切换至第一控制模块的控制模式时,运行虚拟的第一控制模块,其中第一控制模块为第二控制模块的上位控制模块,虚拟的第一控制模块根据接收到的所述第二控制模块的指令,产生对应所述第一控制模块的虚拟指令,处理器14通过虚拟的第一控制模块根据接收到的第一控制模块的第一反馈信息以及第二控制模块的指令,产生对应第一模块的虚拟指令;通过虚拟的第一控制模块将对应第一控制模块的虚拟指令发送至第一控制模块,并由第二控制模块的控制模式切换到第一控制模块的控制模式。The processor 14 is configured to run a virtual first control module when the control mode of the second control module is required to be switched to the control mode of the first control module, where the first control module is a higher-level control module of the second control module, The virtual first control module generates a virtual instruction corresponding to the first control module according to the received instruction of the second control module, and the processor 14 passes the virtual first control module according to the received first control module. The first feedback information and the instruction of the second control module generate a virtual instruction corresponding to the first module; the virtual instruction corresponding to the first control module is sent to the first control module by the virtual first control module, and is used by the second control module The control mode is switched to the control mode of the first control module.
可选地,当驱动器为伺服驱动器,第一控制模块为伺服驱动器的位置环,第二控制模块为伺服驱动器的速度环时,处理器14执行如下步骤:Optionally, when the driver is a servo driver, the first control module is a position loop of the servo driver, and the second control module is a speed loop of the servo driver, the processor 14 performs the following steps:
处理器14通过虚拟的位置环接收位置环的位置反馈信息以及速度环的速度指令;利用位置反馈信息和速度指令进行计算以获得位置环的虚拟位置指令;通过虚拟的位置环将位置环的虚拟位置指令发送至位置环,并由速度环的控制模式切换到位置环的控制模式。The processor 14 receives the position feedback information of the position loop and the speed command of the speed loop through the virtual position loop; calculates the virtual position command of the position loop by using the position feedback information and the speed command; and virtualizes the position loop through the virtual position loop The position command is sent to the position loop and switched from the control mode of the speed loop to the control mode of the position loop.
可选地,当第一控制模块为伺服驱动器的速度环,第二控制模块为伺服驱动器的力矩环时,处理器14执行如下步骤:Optionally, when the first control module is a speed loop of the servo driver and the second control module is a torque loop of the servo driver, the processor 14 performs the following steps:
通过虚拟的速度环接收速度环的速度反馈信息以及力矩环的力矩指令;利用速度反馈信息和力矩指令进行计算以获得速度环的虚拟速度指令;通过虚拟的速度环将速度环的虚拟速度指令发送至速度环,并由力矩环的控制模式切换到速度环的控制模式。The speed feedback information of the speed loop and the torque command of the torque loop are received through the virtual speed loop; the speed feedback information and the torque command are used to calculate the virtual speed command of the speed loop; and the virtual speed command of the speed loop is sent through the virtual speed loop. Go to the speed loop and switch from the control mode of the torque loop to the control mode of the speed loop.
可选地,第一控制模块和第二控制模块之间包括第三控制模块时,处理器14运行虚拟的第二控制模块之前先运行虚拟的第三控制模块,虚拟的第三控制模块通过接收到的第二控制模块的指令,产生对应第三控制模块的虚拟指令。Optionally, when the third control module is included between the first control module and the second control module, the processor 14 runs the virtual third control module before the virtual second control module is executed, and the virtual third control module receives the third control module. The instruction of the second control module to generate a virtual instruction corresponding to the third control module.
具体有通过虚拟的第三控制模块虚拟指令发送至第三控制模块,以实现第二控制模块向第三控制模块的模式切换。其中,第二控制模块的控制模式切换至第三控制模块的控制模式后,处理器14继续执行运行虚拟的第一控制模块及其后续步骤。Specifically, the virtual third control module virtual instruction is sent to the third control module to implement mode switching of the second control module to the third control module. After the control mode of the second control module is switched to the control mode of the third control module, the processor 14 continues to execute the virtual first control module and its subsequent steps.
可选地,当驱动器为伺服驱动器,第一控制模块为伺服驱动器的位置环,第二控制模块为伺服驱动器的力矩环,第三控制模块为伺服驱动器的速度环时,处理器14执行如下步骤:运行虚拟的位置环之前包括:运行虚拟的速度环;通过虚拟的速度环接收速度环的速度反馈信息以及力矩环的力矩指令;利用速度反馈信息和力矩指令进行计算以获得速度环的虚拟位置指令;通过虚拟的速度环将虚拟速度指令发送至速度环,并由力矩环的控制模式切换到速度环的控制模式;其中,力矩环的控制模式切换至速度环的控制模式后,处理器14继续执行运行虚拟的位置环及其后续步骤。Optionally, when the driver is a servo driver, the first control module is a position loop of the servo driver, the second control module is a torque ring of the servo driver, and the third control module is a speed loop of the servo driver, the processor 14 performs the following steps. : Before running the virtual position loop, it includes: running a virtual speed loop; receiving speed feedback information of the speed loop and torque command of the torque loop through the virtual speed loop; calculating by using the speed feedback information and the torque command to obtain the virtual position of the speed loop The virtual speed command is sent to the speed loop through the virtual speed loop, and is switched from the control mode of the torque loop to the control mode of the speed loop; wherein, after the control mode of the torque loop is switched to the control mode of the speed loop, the processor 14 Continue to run the virtual location loop and its subsequent steps.
需要说明的是,该驱动器可以执行上述方法中驱动器执行的步骤,相关内容请参见上述方法中的详细说明,在此不再赘叙。It should be noted that the driver can perform the steps performed by the driver in the above method. For details, refer to the detailed description in the above method, and details are not described herein.
请参阅图8,图8是本发明机器人系统一实施方式的结构示意图。如图所示,该机器人系统40包括:驱动器10和电机30。Please refer to FIG. 8. FIG. 8 is a schematic structural diagram of an embodiment of a robot system according to the present invention. As shown, the robot system 40 includes a driver 10 and a motor 30.
驱动器10包括:第一接口11、第二接口12以及第三接口13,且该驱动器的具体结构可以参见图8中的描述。The driver 10 includes a first interface 11, a second interface 12, and a third interface 13, and the specific structure of the driver can be referred to the description in FIG.
处理器14,耦接于第一接口11、第二接口12、第三接口13,第一接口11用于连接上位机20,用以接收来自上位机20的指令,第二接口用于连接电机30,用以输出处理器14的指令至电机,第三接口13用于接收来自电机30或负载的反馈信息。The processor 14 is coupled to the first interface 11, the second interface 12, and the third interface 13. The first interface 11 is configured to be connected to the host computer 20 for receiving commands from the upper computer 20, and the second interface is for connecting the motor. 30, for outputting instructions of the processor 14 to the motor, and the third interface 13 for receiving feedback information from the motor 30 or the load.
其中,处理器14当需要第二控制模块的控制模式切换至第一控制模块的控制模式时,运行虚拟的第一控制模块,其中第一控制模块为第二控制模块的上位控制模块虚拟的第一控制模块根据接收到的第二控制模块的指令,产生对应第一控制模块的虚拟指令;通过虚拟的第一控制模块将对应第一控制模块的虚拟指令发送至第一控制模块,并由第二控制模块的控制模式切换到第一控制模块的控制模式。The processor 14 runs a virtual first control module when the control mode of the second control module needs to be switched to the control mode of the first control module, where the first control module is a virtual control module of the second control module. a control module generates a virtual instruction corresponding to the first control module according to the received instruction of the second control module; and sends a virtual instruction corresponding to the first control module to the first control module by using the virtual first control module, and The control mode of the two control modules is switched to the control mode of the first control module.
需要说明的是,该驱动器可以执行上述方法中驱动器执行的步骤,相关内容请参见上述方法中的详细说明,在此不再赘叙。It should be noted that the driver can perform the steps performed by the driver in the above method. For details, refer to the detailed description in the above method, and details are not described herein.
参阅图9,图9为本发明存储装置一实施方式的结构示意图。本发明的存储装置存储有能够实现上述所有方法的程序文件31,其中,该程序文件21可以以软件产品的形式存储在上述存储装置中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本发明各个实施方式所述方法的全部或部分步骤。而前述的存储装置包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质,或者是计算机、服务器、手机、平板等终端设备。Referring to FIG. 9, FIG. 9 is a schematic structural diagram of an embodiment of a storage device according to the present invention. The storage device of the present invention stores a program file 31 capable of implementing all of the above methods, wherein the program file 21 may be stored in the storage device in the form of a software product, including a plurality of instructions for causing a computer device (which may be an individual) A computer, server, or network device, or the like, or a processor, performs all or part of the steps of the methods of the various embodiments of the present invention. The foregoing storage device includes: a U disk, a mobile hard disk, a read only memory (ROM, Read-Only) Memory), random access memory (RAM, Random Access Memory, memory, or optical disk, etc., which can store program code, or terminal devices such as computers, servers, mobile phones, and tablets.
在本发明所提供的几个实施方式中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施方式仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided by the present invention, it should be understood that the disclosed system, apparatus, and method may be implemented in other manners. For example, the device implementations described above are merely illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be another division manner, for example, multiple units or components may be used. Combinations can be integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施方式方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
另外,在本发明各个实施方式中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本发明各个实施方式所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention, which is essential or contributes to the prior art, or all or part of the technical solution, may be embodied in the form of a software product stored in a storage medium. A number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) or a processor to perform all or part of the steps of the methods of the various embodiments of the present invention. The foregoing storage medium includes: a U disk, a mobile hard disk, a read only memory (ROM, Read-Only) Memory, random access memory (RAM), disk or optical disk, and other media that can store program code.
综上所述,本领域技术人员容易理解,本发明提供一种机器人系统、驱动器、存储装置及控制模式的切换方法,在无需上位机预先配置控制模块参数的情况下,通过运行虚拟的控制模块,得到对应控制模块的指令,可解决对应控制模块由于未启用而无法及时得到相应指令的问题,进而可以实现不同控制模块间动态模式的快速切换。In summary, those skilled in the art will readily understand that the present invention provides a method for switching a robot system, a driver, a storage device, and a control mode, by running a virtual control module without pre-configuring control module parameters by the host computer. The instruction of the corresponding control module is obtained, which can solve the problem that the corresponding control module cannot obtain the corresponding instruction in time because it is not enabled, and thus can realize the fast switching of the dynamic mode between different control modules.
以上所述仅为本发明的实施方式,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。 The above is only the embodiment of the present invention, and is not intended to limit the scope of the invention, and the equivalent structure or equivalent process transformations made by the description of the invention and the drawings are directly or indirectly applied to other related technologies. The fields are all included in the scope of patent protection of the present invention.

Claims (14)

  1. 一种控制模式的切换方法,其特征在于,所述方法包括:A method for switching a control mode, the method comprising:
    当需要第二控制模块的控制模式切换至第一控制模块的控制模式时,运行虚拟的第一控制模块,其中所述第一控制模块为所述第二控制模块的上位控制模块;When the control mode of the second control module is required to be switched to the control mode of the first control module, the virtual first control module is operated, wherein the first control module is a higher-level control module of the second control module;
    所述虚拟的第一控制模块根据接收到的所述第二控制模块的指令,产生对应所述第一控制模块的虚拟指令;The virtual first control module generates a virtual instruction corresponding to the first control module according to the received instruction of the second control module;
    所述虚拟的第一控制模块将对应所述第一控制模块的虚拟指令发送至所述第一控制模块,并由第二控制模块的控制模式切换到第一控制模块的控制模式。The virtual first control module sends a virtual instruction corresponding to the first control module to the first control module, and is switched by a control mode of the second control module to a control mode of the first control module.
  2. 根据权利要求1所述的方法,其特征在于,所述虚拟的第一控制模块的根据接收到的所述第二控制模块的指令,产生对应所述第一控制模块的虚拟指令,包括:The method according to claim 1, wherein the virtual first control module generates a virtual instruction corresponding to the first control module according to the received instruction of the second control module, including:
    所述虚拟的第一控制模块根据接收到的第一控制模块的第一反馈信息以及第二控制模块的指令,产生对应所述第一模块的虚拟指令。The virtual first control module generates a virtual instruction corresponding to the first module according to the received first feedback information of the first control module and the instruction of the second control module.
  3. 根据权利要求2所述的方法,其特征在于,所述第一控制模块为伺服驱动器的位置环,所述第二控制模块为伺服驱动器的速度环;The method according to claim 2, wherein the first control module is a position loop of a servo driver, and the second control module is a speed loop of a servo driver;
    所述虚拟的第一控制模块的根据接收到的所述第二控制模块的指令,产生对应所述第一模块的虚拟指令包括:The generating, by the virtual first control module, the virtual instruction corresponding to the first module according to the received instruction of the second control module includes:
    所述虚拟的位置环接收所述位置环的位置反馈信息以及速度环的速度指令;The virtual position loop receives position feedback information of the position loop and a speed command of the speed loop;
    利用所述位置反馈信息和所述速度指令进行计算以获得所述位置环的虚拟位置指令;Calculating with the position feedback information and the speed command to obtain a virtual position command of the position loop;
    所述虚拟的位置环将所述位置环的虚拟位置指令发送至所述位置环,并由速度环的控制模式切换到位置环的控制模式。The virtual position loop sends a virtual position command of the position loop to the position loop and is switched from a control mode of the speed loop to a control mode of the position loop.
  4. 根据权利要求2所述的方法,其特征在于,所述第一控制模块为伺服驱动器的速度环,所述第二控制模块为伺服驱动器的力矩环;The method according to claim 2, wherein the first control module is a speed loop of a servo driver, and the second control module is a torque loop of a servo driver;
    所述虚拟的第一控制模块的根据接收到的所述第二控制模块的指令,产生对应所述第一模块的虚拟指令包括:The generating, by the virtual first control module, the virtual instruction corresponding to the first module according to the received instruction of the second control module includes:
    所述虚拟的速度环接收所述速度环的速度反馈信息以及力矩环的力矩指令;The virtual speed loop receives speed feedback information of the speed loop and a torque command of the torque loop;
    利用所述速度反馈信息和所述力矩指令进行计算以获得所述速度环的虚拟速度指令;Calculating with the speed feedback information and the torque command to obtain a virtual speed command of the speed loop;
    所述虚拟的速度环将所述速度环的虚拟速度指令发送至所述速度环,并由力矩环的控制模式切换到速度环的控制模式。The virtual speed loop transmits a virtual speed command of the speed loop to the speed loop and is switched from a control mode of the torque loop to a control mode of the speed loop.
  5. 根据权利要求1所述的方法,其特征在于,所述第一控制模块和所述第二控制模块之间包括第三控制模块;The method according to claim 1, wherein a third control module is included between the first control module and the second control module;
    所述运行所述虚拟的第一控制模块之前包括:Before the running the virtual first control module, the method includes:
    运行虚拟的第三控制模块;Running a virtual third control module;
    所述虚拟的第三控制模块根据接收到第二控制模块的指令,产生对应所述第三控制模块的虚拟指令;The virtual third control module generates a virtual instruction corresponding to the third control module according to an instruction received by the second control module;
    所述虚拟的第三控制模块将所述虚拟指令发送至所述第三控制模块,并由第二控制模块的控制模式切换到第三控制模块的控制模式;The virtual third control module sends the virtual instruction to the third control module, and is switched by a control mode of the second control module to a control mode of the third control module;
    其中,所述第二控制模块的控制模式切换至所述第三控制模块的控制模式后,继续执行所述运行所述虚拟的第一控制模块及其后续步骤。After the control mode of the second control module is switched to the control mode of the third control module, the execution of the virtual first control module and subsequent steps thereof are continued.
  6. 根据权利要求5所述的方法,其特征在于,所述第一控制模块为伺服驱动器的位置环,所述第二控制模块为伺服驱动器的力矩环,所述第三控制模块为伺服驱动器的速度环;The method according to claim 5, wherein the first control module is a position loop of a servo drive, the second control module is a torque ring of a servo drive, and the third control module is a speed of a servo drive. ring;
    运行所述虚拟的位置环之前包括:Before running the virtual location ring, include:
    运行所述虚拟的速度环;Running the virtual speed loop;
    所述虚拟的速度环接收所述速度环的速度反馈信息以及力矩环的力矩指令;The virtual speed loop receives speed feedback information of the speed loop and a torque command of the torque loop;
    利用所述速度反馈信息和所述力矩指令进行计算以获得所述速度环的虚拟位置指令;Calculating with the speed feedback information and the torque command to obtain a virtual position command of the speed loop;
    所述虚拟的速度环将所述虚拟速度指令发送至所述速度环,并由力矩环的控制模式切换到速度环的控制模式;The virtual speed loop sends the virtual speed command to the speed loop and is switched from a control mode of the torque loop to a control mode of the speed loop;
    其中,所述力矩环的控制模式切换至所述速度环的控制模式后,继续执行所述运行所述虚拟的位置环及其后续步骤。After the control mode of the torque ring is switched to the control mode of the speed loop, the running of the virtual position loop and its subsequent steps are continued.
  7. 一种驱动器,其特征在于,所述驱动器包括:A driver, characterized in that the driver comprises:
    第一接口、第二接口以及第三接口;a first interface, a second interface, and a third interface;
    处理器,与所述第一接口、第二接口、第三接口相连接,所述第一接口用于连接上位机,用以接收来自所述上位机的指令,所述第二接口用于连接电机,用以输出所述处理器的指令至所述电机,所述第三接口用于接收来自所述电机或负载的反馈信息;a processor, connected to the first interface, the second interface, and the third interface, where the first interface is used to connect to the upper computer for receiving an instruction from the upper computer, and the second interface is used for connecting a motor for outputting instructions of the processor to the motor, the third interface for receiving feedback information from the motor or load;
    其中,当需要第二控制模块的控制模式切换至第一控制模块的控制模式时,运行虚拟的第一控制模块,其中第一控制模块为第二控制模块的上位控制模块;Wherein, when the control mode of the second control module is required to be switched to the control mode of the first control module, the virtual first control module is operated, wherein the first control module is a higher-level control module of the second control module;
    所述虚拟的第一控制模块根据接收到的所述第二控制模块的指令,产生对应所述第一控制模块的虚拟指令;The virtual first control module generates a virtual instruction corresponding to the first control module according to the received instruction of the second control module;
    所述虚拟的第一控制模块将对应所述第一控制模块的虚拟指令发送至所述第一控制模块,并由第二控制模块的控制模式切换到第一控制模块的控制模式。The virtual first control module sends a virtual instruction corresponding to the first control module to the first control module, and is switched by a control mode of the second control module to a control mode of the first control module.
  8. 根据权利要求7所述的驱动器,其特征在于,所述虚拟的第一控制模块根据接收到的所述第二控制模块的指令,产生对应所述第一控制模块的虚拟指令,包括:The driver according to claim 7, wherein the virtual first control module generates a virtual instruction corresponding to the first control module according to the received instruction of the second control module, including:
    所述虚拟的第一控制模块根据接收到的第一控制模块的第一反馈信息以及第二控制模块的指令,产生对应所述第一模块的虚拟指令。The virtual first control module generates a virtual instruction corresponding to the first module according to the received first feedback information of the first control module and the instruction of the second control module.
  9. 根据权利要求8所述的驱动器,其特征在于,所述驱动器为伺服驱动器,所述第一控制模块为伺服驱动器的位置环,所述第二控制模块为伺服驱动器的速度环;The driver according to claim 8, wherein the driver is a servo driver, the first control module is a position loop of a servo driver, and the second control module is a speed loop of a servo driver;
    所述虚拟的第一控制模块的根据接收到的所述第二控制模块的指令,产生对应所述第一模块的虚拟指令包括:The generating, by the virtual first control module, the virtual instruction corresponding to the first module according to the received instruction of the second control module includes:
    所述虚拟的位置环接收所述位置环的位置反馈信息以及速度环的速度指令;The virtual position loop receives position feedback information of the position loop and a speed command of the speed loop;
    利用所述位置反馈信息和所述速度指令进行计算以获得所述位置环的虚拟位置指令;Calculating with the position feedback information and the speed command to obtain a virtual position command of the position loop;
    所述虚拟的位置环将所述位置环的虚拟位置指令发送至所述位置环,并由速度环的控制模式切换到位置环的控制模式。The virtual position loop sends a virtual position command of the position loop to the position loop and is switched from a control mode of the speed loop to a control mode of the position loop.
  10. 根据权利要求8所述的驱动器,其特征在于,所述第一控制模块为伺服驱动器的速度环,所述第二控制模块为伺服驱动器的力矩环;The driver according to claim 8, wherein the first control module is a speed loop of a servo driver, and the second control module is a torque loop of a servo driver;
    所述虚拟的第一控制模块的根据接收到的所述第二控制模块的指令,产生对应所述第一模块的虚拟指令包括:The generating, by the virtual first control module, the virtual instruction corresponding to the first module according to the received instruction of the second control module includes:
    所述虚拟的速度环接收所述速度环的速度反馈信息以及力矩环的力矩指令;The virtual speed loop receives speed feedback information of the speed loop and a torque command of the torque loop;
    利用所述速度反馈信息和所述力矩指令进行计算以获得所述速度环的虚拟速度指令;Calculating with the speed feedback information and the torque command to obtain a virtual speed command of the speed loop;
    所述虚拟的速度环将所述速度环的虚拟速度指令发送至所述速度环,并由力矩环的控制模式切换到速度环的控制模式。The virtual speed loop transmits a virtual speed command of the speed loop to the speed loop and is switched from a control mode of the torque loop to a control mode of the speed loop.
  11. 根据权利要求7所述的驱动器,其特征在于,所述第一控制模块和所述第二控制模块之间包括第三控制模块;The driver according to claim 7, wherein a third control module is included between the first control module and the second control module;
    所述运行所述虚拟的第二控制模块之前包括:Before the running the second virtual control module, the method includes:
    运行所述虚拟的第三控制模块;Running the virtual third control module;
    所述虚拟的第三控制模块根据接收到的第二控制模块的指令,产生对应所述第三控制模块的虚拟指令;The virtual third control module generates a virtual instruction corresponding to the third control module according to the received instruction of the second control module;
    所述虚拟的第三控制模块将所述虚拟指令发送至所述第三控制模块,并由第二控制模块的控制模式切换到第三控制模块的控制模式;The virtual third control module sends the virtual instruction to the third control module, and is switched by a control mode of the second control module to a control mode of the third control module;
    其中,所述第二控制模块的控制模式切换至所述第三控制模块的控制模式后,继续执行所述运行所述虚拟的第一控制模块及其后续步骤。After the control mode of the second control module is switched to the control mode of the third control module, the execution of the virtual first control module and subsequent steps thereof are continued.
  12. 根据权利要求11所述的驱动器,其特征在于,所述驱动器为伺服驱动器,所述第一控制模块为伺服驱动器的位置环,所述第二控制模块为伺服驱动器的力矩环,所述第三控制模块为伺服驱动器的速度环;The driver according to claim 11, wherein the driver is a servo driver, the first control module is a position loop of a servo driver, the second control module is a torque ring of a servo driver, and the third The control module is a speed loop of the servo drive;
    运行所述虚拟的位置环之前包括:Before running the virtual location ring, include:
    运行所述虚拟的速度环;Running the virtual speed loop;
    所述虚拟的速度环接收所述速度环的速度反馈信息以及力矩环的力矩指令;The virtual speed loop receives speed feedback information of the speed loop and a torque command of the torque loop;
    利用所述速度反馈信息和所述力矩指令进行计算以获得所述速度环的虚拟位置指令;Calculating with the speed feedback information and the torque command to obtain a virtual position command of the speed loop;
    所述虚拟的速度环将所述虚拟速度指令发送至所述速度环,并由力矩环的控制模式切换到速度环的控制模式;The virtual speed loop sends the virtual speed command to the speed loop and is switched from a control mode of the torque loop to a control mode of the speed loop;
    其中,所述力矩环的控制模式切换至所述速度环的控制模式后,继续执行所述运行所述虚拟的位置环及其后续步骤。After the control mode of the torque ring is switched to the control mode of the speed loop, the running of the virtual position loop and its subsequent steps are continued.
  13. 一种机器人系统,其特征在于,包括驱动器和电机,所述驱动器包括:A robot system, comprising: a driver and a motor, the driver comprising:
    第一接口、第二接口以及第三接口;a first interface, a second interface, and a third interface;
    处理器,耦接所述第一接口、第二接口、第三接口,所述第一接口用于连接上位机,用以接收来自所述上位机的指令,所述第二接口用于连接所述电机,用以输出所述处理器的指令至所述电机,所述第三接口用于接收来自所述电机或负载的反馈信息;The processor is coupled to the first interface, the second interface, and the third interface, where the first interface is used to connect to the upper computer to receive an instruction from the upper computer, and the second interface is used to connect to the a motor for outputting instructions of the processor to the motor, the third interface for receiving feedback information from the motor or load;
    其中,当需要第二控制模块的控制模式切换至第一控制模块的控制模式时,运行虚拟的第一控制模块,其中第一控制模块为第二控制模块的上位控制模块;Wherein, when the control mode of the second control module is required to be switched to the control mode of the first control module, the virtual first control module is operated, wherein the first control module is a higher-level control module of the second control module;
    所述虚拟的第一控制模块根据接收到的所述第二控制模块的指令,产生对应所述第一控制模块的虚拟指令;The virtual first control module generates a virtual instruction corresponding to the first control module according to the received instruction of the second control module;
    所述虚拟的第一控制模块将对应所述第一控制模块的虚拟指令发送至所述第一控制模块,并由第二控制模块的控制模式切换到第一控制模块的控制模式。The virtual first control module sends a virtual instruction corresponding to the first control module to the first control module, and is switched by a control mode of the second control module to a control mode of the first control module.
  14. 一种存储装置,其特征在于,存储有能够实现如权利要求1-6中任一项所述方法的程序文件。A storage device characterized by storing a program file capable of implementing the method of any one of claims 1-6.
PCT/CN2017/109157 2017-11-02 2017-11-02 Robot system, driver, memory device, and control mode switching method WO2019084881A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201780034125.8A CN109313420B (en) 2017-11-02 2017-11-02 Robot system, driver, storage device, and method for switching control modes
PCT/CN2017/109157 WO2019084881A1 (en) 2017-11-02 2017-11-02 Robot system, driver, memory device, and control mode switching method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/109157 WO2019084881A1 (en) 2017-11-02 2017-11-02 Robot system, driver, memory device, and control mode switching method

Publications (1)

Publication Number Publication Date
WO2019084881A1 true WO2019084881A1 (en) 2019-05-09

Family

ID=65225708

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/109157 WO2019084881A1 (en) 2017-11-02 2017-11-02 Robot system, driver, memory device, and control mode switching method

Country Status (2)

Country Link
CN (1) CN109313420B (en)
WO (1) WO2019084881A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113037141A (en) * 2021-03-10 2021-06-25 深圳市微秒控制技术有限公司 Anti-falling method for gravity load starting of servo motor
CN113163115B (en) * 2021-04-02 2023-05-26 桂林智神信息技术股份有限公司 Stability increasing method, stability increasing device, computer readable medium and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110237386A1 (en) * 2010-03-29 2011-09-29 Pierre Hirtt System and Method of Positional Control with Backlash Compensation
CN102624315A (en) * 2012-04-11 2012-08-01 上海三一精机有限公司 High-precision permanent magnetic servo motor three-closed-loop control system and method
CN105429517A (en) * 2015-12-14 2016-03-23 武汉钢铁(集团)公司 Master and slave drive synchronous method for motor driving apparatus
CN106155141A (en) * 2015-04-02 2016-11-23 北京航天计量测试技术研究所 Improve the rotating platform control system of turntable robustness and the adjustment method based on this system

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008152790A1 (en) * 2007-06-12 2008-12-18 Panasonic Corporation Multiprocessor control device, multiprocessor control method, and multiprocessor control circuit
JP4382123B2 (en) * 2007-12-13 2009-12-09 ファナック株式会社 Numerical control device having control mode switching function
CN102421159B (en) * 2011-12-19 2014-07-09 华为终端有限公司 Method and system for switching dual-mode communication terminal
JP6077108B2 (en) * 2013-04-05 2017-02-08 株式会社日立製作所 AC motor drive system and power system
JP2016159367A (en) * 2015-02-26 2016-09-05 ファナック株式会社 Robot control device for automatically switching operation mode of robot
CN105630374B (en) * 2015-12-17 2019-05-31 网易(杭州)网络有限公司 Virtual role control mode switch method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110237386A1 (en) * 2010-03-29 2011-09-29 Pierre Hirtt System and Method of Positional Control with Backlash Compensation
CN102624315A (en) * 2012-04-11 2012-08-01 上海三一精机有限公司 High-precision permanent magnetic servo motor three-closed-loop control system and method
CN106155141A (en) * 2015-04-02 2016-11-23 北京航天计量测试技术研究所 Improve the rotating platform control system of turntable robustness and the adjustment method based on this system
CN105429517A (en) * 2015-12-14 2016-03-23 武汉钢铁(集团)公司 Master and slave drive synchronous method for motor driving apparatus

Also Published As

Publication number Publication date
CN109313420B (en) 2021-07-09
CN109313420A (en) 2019-02-05

Similar Documents

Publication Publication Date Title
WO2011147324A1 (en) Multi-interface solid state disk (ssd), processing method and system thereof
WO2010094216A1 (en) Method, apparatus and system for configuring master-slave network devices
CN101442513A (en) Method for implementing various service treatment function and multi-nuclear processor equipment
WO2019084881A1 (en) Robot system, driver, memory device, and control mode switching method
WO2014015572A1 (en) Cross application automatic test apparatus and method for android
WO2013165088A1 (en) Distributed transcoding apparatus and method using multiple servers
WO2015169119A1 (en) Synchronization method for notification message of electronic device, server and electronic device
WO2016140416A1 (en) Method and apparatus for establishing a connection between devices
WO2018157412A1 (en) High-speed charging cable, high-speed charging system and high-speed charging method
WO2018058835A1 (en) Call mode monitoring method, system and communication terminal
WO2016023493A1 (en) Control method of human-machine interface responding to operation instruction and terminal
WO2017092387A1 (en) Wearable device communication method and system
WO2018032903A1 (en) Provision protocol transmission-based terminal configuration method and terminal
WO2020172802A1 (en) Master-slave device communication system and method
WO2018019137A1 (en) Data backup method and terminal
WO2018171570A1 (en) Method for loading driver during terminal startup process and terminal device
WO2019056452A1 (en) Circuit board and display
WO2020060124A1 (en) Electronic device for filtering packet and method for operating same
WO2012022036A1 (en) Terminal, and i/o extension apparatus, method and system
JP2003345478A (en) Intelligent type device capable of sharing identical user input/output interface by al intelligent type modules
CN216437089U (en) Eight asynchronous machine synchronous control systems based on converter
WO2021095957A1 (en) Iot device connected to server via nat, and iot communication method
JP2925215B2 (en) Line control system and line control device used in the line control system
WO2013062162A1 (en) Network storage device and method for controlling same
TW202333469A (en) Switching device and robot switching communication method

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17930656

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17930656

Country of ref document: EP

Kind code of ref document: A1