Servo driver control method and device and computer readable storage medium

By setting a predetermined identifier on the client interface, the servo drive is directly controlled, and the problem of indirect control through the motion controller in the prior art is solved, and simple and efficient servo drive control is achieved.

CN120386240APending Publication Date: 2025-07-29GREE ELECTRIC APPLIANCE INC OF ZHUHAI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510464366.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-14
Publication Date
2025-07-29

AI Technical Summary

Technical Problem

In the prior art, control of the servo drive must be implemented indirectly through the motion controller, resulting in increased debugging complexity and the inability to directly understand the servo drive status in the event of a motion controller failure.

Method used

By setting a plurality of predetermined identifiers on the client interface, the client determines the target control parameters in response to the predetermined operation, and configures the target message to be sent directly to the servo drive, bypassing the motion controller for control.

Benefits of technology

It realizes simple control of the servo drive directly through the client, and can still control normally when the motion controller fails, simplifying control steps and improving debugging efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120386240A_ABST
    Figure CN120386240A_ABST
Patent Text Reader

Abstract

The invention provides a control method and device of a servo driver and a computer readable storage medium, the method is applied to a client, the client is in communication connection with the servo driver, the client is provided with a client interface, and the control method of the servo driver comprises the following steps: responding to a predetermined operation acting on a target predetermined identifier of the client interface, a target control parameter is determined, a plurality of predetermined identifiers are arranged on the client interface, each predetermined identifier corresponds to one control parameter, each control parameter represents one state of the servo driver, the target predetermined identifier is one of the plurality of predetermined identifiers, and the target control parameter is a control parameter corresponding to the target predetermined identifier; and configuring a target message according to the target control parameter, and sending the target message to the servo driver to control the servo driver to enter a state corresponding to the target control parameter. According to the invention, the problem that the servo driver cannot be directly controlled through the client in the prior art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of robot control technology, and more particularly, to a control method, device, computer-readable storage medium, and control system for a servo drive. Background Art

[0002] In modern industrial robots, the servo drive, as a key component connecting the motion controller and the motor, directly affects the response speed and accuracy of the robot. A typical servo system consists of a motion controller, a teach pendant, a servo drive, a motor, etc. Among them, the motion controller acts as the master station, responsible for generating control words and transmitting instructions to the servo drive, which acts as the slave station, through EtherCAT or other real-time communication protocols. This process enables the servo drive to perform corresponding actions, such as positioning, speed regulation, or torque control, according to the received control word.

[0003] When debugging the servo drive, currently the control transmission path can only rely on the motion controller to send control words to the servo drive. This means that the control of traditional servo drives must be indirectly achieved through the motion controller, which not only increases the complexity of debugging but also limits the ability of debug personnel to directly understand the status of the servo drive when the motion controller fails. Summary of the Invention

[0004] The main objective of this application is to provide a control method, device, computer-readable storage medium, and control system for a servo drive, so as to at least solve the problem that the servo drive cannot be directly controlled by a client in the prior art.

[0005] To achieve the above objective, according to one aspect of this application, a control method for a servo drive is provided, which is applied to a client. The client is communicatively connected to the servo drive, and the client has a client interface. The control method for the servo drive includes: determining a target control parameter in response to a predetermined operation acting on a target predetermined identifier on the client interface, where multiple predetermined identifiers are set on the client interface, each predetermined identifier corresponds to a control parameter, each control parameter represents a state of the servo drive, the target predetermined identifier is one of the multiple predetermined identifiers, and the target control parameter is the control parameter corresponding to the target predetermined identifier; configuring a target message according to the target control parameter and sending the target message to the servo drive to control the servo drive to enter the state corresponding to the target control parameter.

[0006] Optionally, configuring the target message according to the target control parameter includes: obtaining the type of the target control parameter, where the type of the target control parameter includes a control type and a data transmission type; when the target control parameter is the control type, obtaining the control state parameter corresponding to the target control parameter, and generating at least one frame of message data from the control state parameter to obtain the target message, where the control state parameter at least includes a startup parameter, and the startup parameter is a parameter for starting the servo driver; when the target control parameter is the data transmission type, obtaining target transmission data, and generating at least one frame of message data from the target transmission data to obtain the target message.

[0007] Optionally, obtaining target transmission data, and generating at least one frame of message data from the target transmission data to obtain the target message includes at least one of the following: obtaining initialization target transmission data, and generating at least one frame of message data from the initialization target transmission data to obtain the target message, where the initialization target transmission data at least includes data representing the working mode of the servo driver, and the working mode is one of a position control mode, a speed control mode, and a torque control mode; obtaining mode target transmission data, and generating at least one frame of message data from the mode target transmission data to obtain the target message, where the mode target transmission data is one of the parameters corresponding to the position control mode, the parameters corresponding to the speed control mode, and the parameters corresponding to the torque control mode.

[0008] Optionally, sending the target message to the servo driver includes: determining a target URL and a device address, where the target URL is the address of the network where the servo driver is located, and the device address is the address of the servo driver in the network; sending the target message to the servo driver corresponding to the device address in the target URL.

[0009] Optionally, after sending the target message to the servo driver, the method further includes: generating a communication status request, where the communication status request is a request to view the communication status between the servo driver and the client, and the communication status at least includes communication success and communication failure; sending the communication status request to the target register of the servo driver, so that the servo driver writes a response code into the target register and sends the response code to the client, where the response code is a code representing the communication status; receiving the response code sent by the servo driver, and determining whether the servo driver and the client communicate successfully according to the response code.

[0010] Optionally, after sending the target message to the servo driver to control the servo driver to enter the state corresponding to the target control parameter, the method further includes: obtaining state parameters corresponding to the target control parameter, where the state parameter is a code representing the current state of the servo driver; outputting the state parameter to the client interface.

[0011] Optionally, the method further includes: when it is detected that the servo driver fails, outputting a fault identifier to the client interface, where the fault identifier characterizes that the servo driver is in a fault state.

[0012] According to another aspect of the present application, there is provided a control device for a servo driver, which is applied to a client. The client is communicatively connected to the servo driver, and the client has a client interface. The control device for the servo driver includes: a determination unit, configured to determine a target control parameter in response to a predetermined operation on a target predetermined identifier on the client interface, where a plurality of predetermined identifiers are set on the client interface, each predetermined identifier corresponds to a control parameter, each control parameter represents a state of the servo driver, the target predetermined identifier is one of the plurality of predetermined identifiers, and the target control parameter is the control parameter corresponding to the target predetermined identifier; a first sending unit, configured to configure a target message according to the target control parameter and send the target message to the servo driver to control the servo driver to enter the state corresponding to the target control parameter.

[0013] According to still another aspect of the present application, there is provided a computer-readable storage medium, which includes a stored program. When the program runs, it controls the device where the computer-readable storage medium is located to execute any one of the control methods for the servo driver.

[0014] According to yet another aspect of the present application, there is provided a control system for a servo driver, including: a client, a servo driver, and a motor. The client is communicatively connected to the servo driver, and the servo driver is communicatively connected to the motor. The servo driver is configured to control the movement of the motor; the client includes one or more processors, a memory, and one or more programs, where the one or more programs are stored in the memory and are configured to be executed by the one or more processors. The one or more programs include those for executing any one of the control methods for the servo driver.

[0015] Applying the technical solution of the present application, by setting a plurality of predetermined identifiers on the client interface, the client determines the target control parameter in response to a predetermined operation on the target predetermined identifier on the client interface, configures the target message according to the target control parameter, and sends the target message to the servo driver to control the servo driver to enter the state corresponding to the target control parameter, so as to directly control the servo driver through the client. Compared with the prior art where it is necessary to issue a control instruction to the motion controller, and then the motion controller issues the control instruction to the servo driver, which has a cumbersome process, the steps of the present application are simple, and the servo driver can still be directly controlled through the client even when the motion controller fails. Therefore, it can solve the problem in the prior art that the servo driver cannot be directly controlled through the client, and achieve the effect of simple control steps of directly controlling the servo controller through the client. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The specification drawings forming a part of the present application are used to provide a further understanding of the present application. The schematic embodiments and descriptions thereof of the present application are used to explain the present application and do not constitute an improper limitation to the present application. In the drawings:

[0017] Figure 1 The flowchart of a control method for a servo driver provided by an embodiment of the present application is shown;

[0018] Figure 2 The structural schematic diagram of a control system for a servo driver provided by an embodiment of the present application is shown;

[0019] Figure 3 The internal structure connection schematic diagram of a PC master station and a servo driver slave station provided by an embodiment of the present application is shown;

[0020] Figure 4 The flowchart of a specific control method for a servo driver provided by an embodiment of the present application is shown;

[0021] Figure 5 The flowchart of a process for querying the communication status of a servo driver provided by an embodiment of the present application is shown;

[0022] Figure 6 The schematic diagram of a client interface provided by an embodiment of the present application is shown;

[0023] Figure 7 The structural block diagram of a control device for a servo driver provided by an embodiment of the present application is shown. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0024] It should be noted that, without conflict, the embodiments in the present application and the features in the embodiments may be combined with each other. The present application will be described in detail below with reference to the drawings and in conjunction with the embodiments.

[0025] In order to enable those skilled in the art to better understand the solution of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without making creative efforts shall fall within the protection scope of the present application.

[0026] It should be noted that the terms "first", "second", etc. in the description and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that such used data can be interchanged under appropriate circumstances so as to describe the embodiments of the present application herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units does not necessarily limit to those clearly listed steps or units, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0027] For the convenience of description, the following explains the terms or nouns involved in the embodiments of the present application:

[0028] Motion controller: Responsible for planning and controlling the motion trajectory, speed, acceleration and other high-level control logics of the robot. The main functions of the motion controller include: Motion planning and algorithms: Calculating the position, speed and acceleration commands of the robot to achieve smooth and precise motion. Multi-axis coordination: When multiple servo motors need to work together, the motion controller can simultaneously control multiple servo drivers to ensure the synchronization and coordination of each axis. Advanced control strategies: It can implement complex control algorithms, such as PID control, adaptive control, predictive control, etc., to cope with different working environments and task requirements. Programming and setting: Users can set motion parameters, such as target position, speed, acceleration, and various motion modes, through the programming interface. Safety check: During the control process, the motion controller will also perform various safety checks to ensure that the motion is within a safe range.

[0029] Servo drive: Receives instructions from the motion controller and converts them into specific power outputs to drive the motor. The main responsibilities of the servo drive are: Motor control: According to the received control signals (such as position, speed, or torque signals), adjust the output voltage and current to control the speed and position of the motor. Feedback loop: The servo drive is built-in with a feedback device (such as an encoder), which can monitor the actual position and speed of the motor in real time and feedback them to the motion controller to form a closed-loop control. Protection functions: Include overcurrent, overvoltage, overheat protection, and motor stall detection, etc., to prevent the motor and the drive from being damaged due to abnormal conditions. Communication interface: Has an interface for communicating with the motion controller and other system components, and supports multiple communication protocols (such as EtherCAT, CANopen, Profinet, etc.).

[0030] As introduced in the background art, in the prior art, it is only possible to rely on the motion controller to send control words to the servo drive, that is, the control of the traditional servo drive must be indirectly achieved through the motion controller, and the client can only view the status of the servo drive. To solve the problem that the servo drive cannot be directly controlled by the client, the embodiments of the present application provide a control method, device, computer-readable storage medium, and control system for a servo drive.

[0031] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention.

[0032] In this embodiment, a control method for a servo drive running on a mobile terminal, a computer terminal, or a similar computing device is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.

[0033] Figure 1 is a flowchart of the control method for a servo drive according to an embodiment of the present application. As Figure 1 shown, this method is applied to the client, the client is communicatively connected to the servo drive, the client has a client interface, and the method includes the following steps:

[0034] Step S201, in response to a predetermined operation acting on a target predetermined identifier on the client interface, determine a target control parameter, where a plurality of predetermined identifiers are set on the client interface, each predetermined identifier corresponds to a control parameter, each control parameter represents a state of the servo drive, the target predetermined identifier is one of the plurality of predetermined identifiers, and the target control parameter is the control parameter corresponding to the target predetermined identifier;

[0035] Specifically, the client can be a PC. By setting multiple predefined identifiers on the PC, such as buttons, each predefined identifier corresponds to a specific target control parameter. The target control parameter can be a control word. For example, each number from 1 to 16 is used as a control word, and this control word represents a state of the servo drive. Different letters can also be used as control parameters. In the debugging interface, the user only needs to perform a predefined operation (such as clicking a certain button with the mouse), and then determine the target control parameter corresponding to this button. The target control parameter can be determined through the one-to-one mapping relationship between the predefined identifier and the control parameter set in advance. For example, when the user clicks the digital label 3 (representing the "turn on the switch" state of the servo drive), after the system recognizes this operation, it will convert the state of the servo drive to "turn on the switch". This process bypasses the motion controller, and the PC interface directly serves as the master station, communicates with the servo drive through the EtherCAT bus, sends control commands, and at the same time receives the real-time status feedback of the servo drive.

[0036] Step S202: Configure a target message according to the target control parameter, and send the target message to the servo drive to control the servo drive to enter the state corresponding to the target control parameter.

[0037] Specifically, configure the content of the target message according to the target control parameter. In this step, the PC software will encode the control instruction corresponding to the target control parameter into a message format that conforms to the EtherCAT communication standard according to communication protocols such as CIA402, and then directly send it to the servo drive through the EtherCAT bus. After receiving the target message, the servo drive will parse the control instruction therein, and adjust its own state according to the received instruction to perform corresponding motor control actions. For example, if the received control instruction is "turn on the switch", the servo drive will perform internal motor activation and voltage regulation and switch to the "turn on the switch" state.

[0038] Through this embodiment, by setting a plurality of predetermined identifiers on the client interface, the client determines a target control parameter in response to a predetermined operation on the target predetermined identifier acting on the client interface, configures a target message according to the target control parameter, and sends the target message to the servo drive to control the servo drive to enter the state corresponding to the target control parameter, so as to directly control the servo drive through the client. Compared with the prior art where it is necessary to send a control instruction to the motion controller, and then the motion controller sends the control instruction to the servo drive with cumbersome steps, the steps of this application are concise, and the servo drive can still be directly controlled through the client when the motion controller fails. Therefore, it can solve the problem in the prior art that the servo drive cannot be directly controlled through the client, and achieve the effect of concise control steps of directly controlling the servo controller through the client.

[0039] In the specific implementation process, the above step S202 of configuring the target message according to the target control parameter can be implemented through the following steps: Step S2021: Obtain the type of the target control parameter, where the type of the target control parameter includes a control type and a data transmission type; Step S2022: When the target control parameter is of the control type, obtain the control state parameter corresponding to the target control parameter, and generate at least one frame of message data from the control state parameter to obtain the target message, where the control state parameter at least includes a startup parameter, and the startup parameter is a parameter for starting the servo drive; Step S2023: When the target control parameter is of the data transmission type, obtain target transmission data, and generate at least one frame of message data from the target transmission data to obtain the target message. This method accurately controls the state of the servo drive by identifying the type of the target control parameter and adopting different message generation strategies.

[0040] Specifically, when the user selects a target control parameter on the client interface, it is first necessary to identify the type of the parameter. If the parameter belongs to the control type, the system will obtain the control status parameters, such as the startup parameter (the instruction for starting the servo drive). Next, the system will encapsulate these control status parameters into a frame of message data to form the target message, and then directly send it to the servo drive through the EtherCAT bus to achieve immediate control of the servo drive status. On the other hand, if the target control parameter belongs to the data transfer type, it means that the user hopes to perform data interaction operations such as parameter setting or status query. In this case, the system will obtain the target transfer data, also encapsulate it into message data, and send it to the servo drive to meet the data transfer requirements. For example, the working mode or parameters of the servo drive are set through the Service Data Object (SDO), or control commands are sent through the Process Data Object (PDO). This processing flow not only reflects the system's adaptability to different operation requirements but also enhances the accuracy of control instructions and the security of data transfer.

[0041] In some alternative embodiments, step S2023 can be implemented by at least one of the following steps: obtaining the initialization target transfer data, generating at least one frame of message data from the initialization target transfer data to obtain the target message, where the initialization target transfer data at least includes data characterizing the working mode of the servo drive, and the working mode is one of the position control mode, speed control mode, and torque control mode; obtaining the mode target transfer data, generating at least one frame of message data from the mode target transfer data to obtain the target message, where the mode target transfer data is one of the parameters corresponding to the position control mode, the parameters corresponding to the speed control mode, and the parameters corresponding to the torque control mode. This method generates different messages to perform data transfer through different transmission methods.

[0042] Specifically, the PC debugging interface simulates the Ethercat master station to send instructions or data to the servo drive through the PDO (Process Data Object) and SDO (Service Data Object). Initializing the servo drive is to send an initialization command through the SDO, that is, to configure the target message through the initialization target transfer data to set the working mode of the servo drive, etc. The parameters corresponding to different working modes are sent through the PDO. First, configure the PDO to determine that some data needs to be sent from the PC to the servo drive (output PDO), and some data needs to be received from the servo drive back to the PC (input PDO), map the input PDO and output PDO, and then set the transmission type, cycle time, etc. of the PDO, configure to obtain the target message, and send it to the servo drive through the PDO. The parameters corresponding to different working modes are such as position, speed, torque, etc.

[0043] In some other alternative embodiments, the above step S202 of sending the target message to the servo driver can also be implemented through the following steps: step S2024: determine the target URL and the device address, where the target URL is the address of the network where the servo driver is located, and the device address is the address of the servo driver in the network; step S2025: send the target message to the servo driver corresponding to the device address in the target URL. By the above steps, the method determines the servo driver to be sent, ensuring that the system can accurately locate the position of the servo driver in the network to achieve direct control and data transmission, and avoiding target misalignment or delay in the communication process.

[0044] Specifically, within one communication cycle, the PC master station sends an Ethernet data frame to the slave station. After the data frame arrives at the slave station, the slave station extracts the corresponding data from the data frame according to the addressing and writes the feedback data into the data frame. Then it is returned from the slave station to the master station. The EtherCAT message first finds the EtherCAT network segment where the slave station is located (i.e., the target URL) through network segment addressing, and then finds the slave station device corresponding to the message data (i.e., the device address) through device addressing, thus completing the data exchange. EtherCAT communication is carried out in a master-slave communication mode, where the master station controls the EtherCAT system communication. In actual automation control applications, communication data can generally be divided into time-critical and non-time-critical. In EtherCAT, periodic process data communication is used for time-critical data communication, while non-periodic mailbox communication is used to achieve non-time-critical data communication. The EtherCAT message is processed by the slave station controller, and a dual-port memory area is used to complete the data exchange between the master and slave stations. Each slave station ESC shifts and reads / writes data in its own order on the loop, and the loop includes a current loop, a speed loop, and a position loop. When the data frame passes through the slave station, the ESC reads the command data sent to itself from it and puts it into the internal memory area, and the inserted data is written from the internal memory area into the sub-message. The servo driver can be one or more.

[0045] In some alternative embodiments, after sending the target message to the servo driver, the method further includes step S203: generating a communication status request, where the communication status request is a request to check the communication status between the servo driver and the client, and the communication status at least includes communication success and communication failure; step S204: sending the communication status request to the target register of the servo driver, so that the servo driver writes a response code into the target register and sends the response code to the client, where the response code is a code representing the communication status; step S205: receiving the response code sent by the servo driver, and determining whether the servo driver and the client communicate successfully according to the response code. By the above steps, the method checks the communication status of the slave servo driver during the communication process to ensure that the message can be successfully transmitted to the servo driver.

[0046] Specifically, during the communication process, the PC master station (client) can check the status of the slave servo driver. Generate a communication status request, and the master station writes the above request into the target register of the ESC (slave controller, EtherCAT Slave Controller, abbreviated as ESC) of the slave servo driver. The target register can be the AL (lower 8 bits) control register. If the memory space configuration of the requested status is valid, the slave responds to the requested status by writing a response code representing communication success into the AL status register. If the memory space configuration of the requested status is invalid, the slave sets an error flag in the AL status register and writes a response code representing communication failure into the AL status code register. To ensure correct data transmission and check the status, and if there is an error, the status and feedback of the servo driver can also be monitored through the PC interface function to ensure that the control command is executed.

[0047] In some alternative embodiments, the method further includes: step S206: after sending the target message to the servo driver to control the servo driver to enter the state corresponding to the target control parameter, obtaining the status parameter corresponding to the target control parameter, where the status parameter is a code representing the current state of the servo driver; step S207: outputting the status parameter to the client interface. After controlling the state of the servo driver, the method displays the corresponding status parameter on the client interface, so that the user can judge whether the servo driver has successfully switched to the required state or whether there is a fault that needs to be further investigated by observing these real-time updated status information.

[0048] Specifically, when the target message is successfully sent to the servo drive and its entry into the target state is controlled, the system will subsequently obtain status parameters from the servo drive, which are codes representing the current state of the servo drive. These status parameters are real-time information fed back to the master station (PC interface) via EtherCAT communication after the servo drive responds to the control instruction. They can reflect whether the control instruction has been correctly executed by the servo drive, as well as its current working mode, operating parameters, and fault status, etc. The obtained status parameters will then be output to the client interface and displayed through a graphical interface or code, enabling the user to intuitively understand the current state of the servo drive. Different status parameters are represented by specific digital labels and status descriptions. The user can judge whether the servo drive has successfully switched to the required state or whether there are faults that need further investigation by observing these real-time updated status information. For example, the status parameter corresponding to "turn on the switch" is "xxxx.xxxx.0xxx.x111".

[0049] In some alternative embodiments, the method further includes step S208: when it is detected that the servo drive has a fault, output a fault identifier to the client interface, where the fault identifier characterizes that the servo drive is in a fault state. When the servo drive has a fault, the fault status identifier can be immediately displayed on the client interface to take timely measures to avoid greater losses.

[0050] Specifically, when a fault is detected, it automatically enters the fault state and displays the fault identifier, and this predetermined identifier does not need to be triggered by a predetermined operation, so that the user can discover and handle the fault in a timely manner.

[0051] To enable those skilled in the art to more clearly understand the technical solution of the present application, the implementation process of the control method of the servo drive of the present application will be described in detail below in conjunction with specific embodiments.

[0052] This embodiment relates to a schematic structural diagram of a control system of a servo drive, as Figure 2 shown, a teach pendant is provided on the motion controller. In the prior art, control instructions are input through the teach pendant, and the motion controller further sends bus instructions to the servo drive, and the servo drive drives the motor to operate. The PC interface can view the status of the servo drive. That is to say, in the prior art, the motion controller is the master station and the servo drive is the slave station. In the present application, the PC (interface) is directly used as the master station and the servo drive is used as the slave station, that is, the PC interface directly sends control instructions to the servo drive to control the state of the servo drive.

[0053] Figure 3 Shows a schematic internal structure connection diagram of a PC master station and a servo drive slave station, as Figure 3As shown, the PC (interface) master station is connected to the RJ45 interface of the servo driver through a network port for two-way communication; inside the servo driver, the RJ45 interface is connected to a network isolation transformer, a physical layer chip PHY, an Ethercat slave controller ESC, a slave control microprocessor, and other application devices in sequence. The Ethercat slave controller ESC is also connected to an EEPROM, and data transmission and storage are carried out through the above connection structure.

[0054] Figure 4 The flowchart of a specific control method for a servo driver is shown, as Figure 4 shown, including the following steps:

[0055] Step S1: The PC interface (master station) configures PDO parameters;

[0056] Step S2: Send control commands (target messages generated by mode target transmission data), such as position, speed, and torque, to the servo driver through the PDO;

[0057] Step S3: The PC interface (master station) configures SDO parameters;

[0058] Step S4: Send an initialization command (target message generated by initialization target transmission data) through the SDO to set the working mode and parameters of the servo driver to the servo driver;

[0059] Figure 5 The schematic diagram of a process for querying the communication status of a servo driver is shown, as Figure 5 shown, including the following steps:

[0060] Step S5: The master station sends an ESM request status (communication status request) to the AL control register (target register) of the slave ESC (slave controller);

[0061] Step S6: The slave station determines whether the configuration is valid. If it is valid, execute Step S7; if it is invalid, execute Step S8;

[0062] Step S7: Set an answer request (answer code indicating successful communication) to the AL control register;

[0063] Step S8: Set an error flag (answer code indicating communication failure) to the AL control register.

[0064] Figure 6 The schematic diagram of a client interface is shown, as Figure 6As shown, among the digital labels 1 - 16, different digital labels (predetermined identifiers) correspond to different control words (target control parameters). When actually using the software interface to control the servo drive, the servo drive can be controlled by clicking on different digital labels (i.e., sending different control words). The corresponding status and status word (status parameters) of the servo drive are as shown in the figure. First, in the normal startup state, the user can first click on digital label 0 to enter the state of not ready to open the switch (status word: xxxx.xxxx.x0xx.0000). Subsequently, click on digital label 1 to enter the state where the switch is disabled (status word: xxxx.xxxx.x1xx.0000). Click on digital label 2 to send the control word for shutdown (status word: xxxx.xxxx.0xxx.0000), and then enter the state of ready to open the switch (status word: xxxx.xxxx.x01x.0001). Continue to click on digital number 3 to send the control word to open the switch and enter the switch - opened state (status word: xxxx.xxxx.x011.0011). Subsequently, click on digital label 4 to enter the state where the operation is enabled (status word: xxxx.xxxx.x011.0111). Between digital labels 11 and 16, it is possible to switch back and forth between quick stop (status word: xxxx.xxxx.0xxx.x01x) and enabled operation (status word: xxxx.xxxx.0xxx.1111). Click on digital label 12 to return to the state where the switch is disabled. Digital labels 5, 6, 7, 8, 9, and 10 all return to their corresponding states. Digital label 13 is to automatically enter the fault - response activity when an error is detected (status word: xxxx.xxxx.x0xx.1111), and here it automatically enters without the need to click. Digital labels 14 and 15 are to perform fault reset (status word: xxxx.xxxx.(0 to 1)xxx.xxxx) when a fault is detected (status word: xxxx.xxxx.x0xx.1000).

[0065] The embodiment of the present application also provides a control device for a servo drive. It should be noted that the control device for the servo drive in the embodiment of the present application can be used to execute the control method for the servo drive provided in the embodiment of the present application. This device is used to implement the above - mentioned embodiment and preferred implementation manners, and those that have been described will not be repeated. As used hereinafter, the term "module" can be a combination of software and / or hardware that can achieve a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.

[0066] The following introduces the control device for the servo drive provided in the embodiment of the present application.

[0067] Figure 7It is a schematic diagram of a control device of a servo driver according to an embodiment of the present application. As Figure 7 shown, the device includes:

[0068] A determination unit 10, configured to determine a target control parameter in response to a predetermined operation acting on a target predetermined identifier on the client interface, where a plurality of predetermined identifiers are set on the client interface, each of the predetermined identifiers corresponds to a control parameter, each of the control parameters represents a state of the servo driver, the target predetermined identifier is one of the plurality of predetermined identifiers, and the target control parameter is the control parameter corresponding to the target predetermined identifier;

[0069] Specifically, the client can be a PC. By setting a plurality of predetermined identifiers, such as buttons, on the PC, each predetermined identifier corresponds to a specific target control parameter. The target control parameter can be a control word. For example, each number from 1 to 16 is used as a control word, and this control word represents a state of the servo driver. Different letters can also be used as control parameters. In the debugging interface, the user only needs to perform a predetermined operation (for example, clicking a certain button with the mouse), and then determine the target control parameter corresponding to the button. The target control parameter can be determined through the one-to-one mapping relationship between the preset predetermined identifier and the control parameter. For example, when the user clicks the digital label 3 (representing the "turn on the switch" state of the servo driver), after the system recognizes this operation, it will convert the state of the servo driver to "turn on the switch". This process bypasses the motion controller, and the PC interface directly serves as the master station, communicates with the servo driver through the EtherCAT bus, sends control commands, and simultaneously receives the real-time status feedback of the servo driver.

[0070] A first sending unit 20, configured to configure a target message according to the target control parameter, and send the target message to the servo driver to control the servo driver to enter the state corresponding to the target control parameter.

[0071] Specifically, configure the content of the target message according to the target control parameter. In this step, the PC software will encode the control instruction corresponding to the target control parameter into a message format that conforms to the EtherCAT communication standard according to communication protocols such as CIA402, and then directly send it to the servo driver through the EtherCAT bus. After receiving the target message, the servo driver will parse the control instruction therein, and adjust its own state according to the received instruction to perform corresponding motor control actions. For example, if the received control instruction is "turn on the switch", the servo driver will perform internal motor activation and voltage regulation and switch to the "turn on the switch" state.

[0072] Through this embodiment, by setting a plurality of predetermined identifiers on the client interface, the client determines a target control parameter in response to a predetermined operation on the target predetermined identifier acting on the client interface, configures a target message according to the target control parameter, and sends the target message to the servo driver to control the servo driver to enter the state corresponding to the target control parameter, so as to directly control the servo driver through the client. Compared with the prior art in which it is necessary to issue a control instruction to the motion controller, and then the motion controller issues the control instruction to the servo driver, the steps are cumbersome. The steps of this application are simple, and the servo driver can still be directly controlled through the client when the motion controller fails. Therefore, it can solve the problem that the servo driver cannot be directly controlled through the client in the prior art, and achieve the effect of simple control steps of directly controlling the servo controller through the client.

[0073] In the specific implementation process, the above-mentioned first sending unit includes a first obtaining module, a first generating module and a second generating module. The first obtaining module is used to obtain the type of the target control parameter, where the type of the target control parameter includes a control type and a data transmission type; the first generating module is used to obtain the control state parameter corresponding to the target control parameter when the target control parameter is of the control type, and generate at least one frame of message data from the control state parameter to obtain the target message, where the control state parameter at least includes a startup parameter, and the startup parameter is a parameter for starting the servo driver; the second generating module is used to obtain target transmission data when the target control parameter is of the data transmission type, and generate at least one frame of message data from the target transmission data to obtain the target message. The device accurately controls the state of the servo driver by identifying the type of the target control parameter and adopting different message generation strategies.

[0074] Specifically, when the user selects the target control parameter on the client interface, it is first necessary to identify the type of the parameter. If the parameter belongs to the control type, the system will obtain the control status parameter, such as the startup parameter (the instruction for starting the servo driver). Next, the system will encapsulate these control status parameters into a frame of message data to form the target message, and then directly send it to the servo driver through the EtherCAT bus to achieve the immediate control of the servo driver status. On the other hand, if the target control parameter belongs to the data transmission type, it means that the user hopes to perform data interaction operations such as parameter setting or status query. In this case, the system will obtain the target transmission data, also encapsulate it into message data, and send it to the servo driver to meet the data transmission requirements. For example, the working mode or parameters of the servo driver are set through the Service Data Object (SDO), or the control command is sent through the Process Data Object (PDO). This processing flow not only reflects the system's adaptability to different operation requirements but also enhances the accuracy of control instructions and the security of data transmission.

[0075] In some alternative embodiments, the second generation module includes a first generation sub-module and a second generation sub-module. The first generation sub-module is used to obtain the initialization target transmission data and generate at least one frame of message data from the initialization target transmission data to obtain the target message, where the initialization target transmission data at least includes data representing the working mode of the servo driver, and the working mode is one of the position control mode, the speed control mode, and the torque control mode; the second generation sub-module is used to obtain the mode target transmission data and generate at least one frame of message data from the mode target transmission data to obtain the target message, where the mode target transmission data is one of the parameters corresponding to the position control mode, the parameters corresponding to the speed control mode, and the parameters corresponding to the torque control mode. This device transmits data through different transmission methods by generating different messages.

[0076] Specifically, the PC debugging interface simulates the Ethercat master station to send instructions or data to the servo driver through the PDO (Process Data Object) and SDO (Service Data Object). Initializing the servo driver is to send an initialization command through the SDO, that is, to configure the target message through the initialization target transmission data to set the working mode of the servo driver, etc. The parameters corresponding to different working modes are sent through the PDO. First, configure the PDO to determine that some data needs to be sent from the PC to the servo driver (output PDO), and some data needs to be received from the servo driver back to the PC (input PDO), map the input PDO and output PDO, and then set the transmission type, cycle time, etc. of the PDO, configure to obtain the target message, and send it to the servo driver through the PDO. The parameters corresponding to different working modes are such as position, speed, torque, etc.

[0077] In some other alternative embodiments, the above-mentioned first sending unit includes a determination module and a sending module. The determination module is used to determine a target URL and a device address, where the target URL is the address of the network where the servo driver is located, and the device address is the address of the servo driver in the network; the sending module is used to send the target message to the servo driver corresponding to the device address in the target URL. By determining the servo driver to be sent through the above steps, the system can accurately locate the position of the servo driver in the network to achieve direct control and data transmission, avoiding target misalignment or delay in the communication process.

[0078] Specifically, within a communication cycle, the PC master station sends an Ethernet data frame to the slave station. After the data frame arrives at the slave station, the slave station extracts corresponding data from the data frame according to the addressing and writes the feedback data into the data frame. Then it returns to the master station. The EtherCAT message first finds the EtherCAT network segment where the slave station is located (i.e., the target URL) through network segment addressing, and then finds the slave station device corresponding to the message data (i.e., the device address) through device addressing, thus completing data exchange. EtherCAT communication is carried out in a master-slave communication mode, where the master station controls the EtherCAT system communication. In actual automation control applications, communication data can generally be divided into time-critical and non-time-critical. In EtherCAT, periodic process data communication is used for time-critical data communication, while non-periodic mailbox communication is used to implement non-time-critical data communication. The EtherCAT message is processed by the slave station controller, and a dual-port memory area is used to complete data exchange between the master and slave stations. Each slave station ESC shifts and reads / writes data in its own order on the loop, and the loop includes a current loop, a speed loop, and a position loop. When the data frame passes through the slave station, the ESC reads the command data sent to itself from it and puts it into the internal memory area, and the inserted data is written from the internal memory area into the sub-message. The servo driver can be one or more.

[0079] In some alternative embodiments, after sending the target message to the servo driver, the device further includes a first generation unit, a second sending unit, and a third sending unit. The first generation unit is configured to generate a communication status request, where the communication status request is a request to check the communication status between the servo driver and the client, and the communication status at least includes communication success and communication failure. The second sending unit is configured to send the communication status request to a target register of the servo driver, so that the servo driver writes a response code into the target register and sends the response code to the client, where the response code is a code representing the communication status. The third sending unit is configured to receive the response code sent by the servo driver and determine whether the servo driver and the client communicate successfully according to the response code. The device checks the communication status of the slave servo driver during the communication process through the above steps to ensure that the message can be successfully transmitted to the servo driver.

[0080] Specifically, during the communication process, the PC master station (client) can check the status of the slave servo driver. Generate a communication status request, and the master station writes the above request into the target register of the slave servo driver ESC (slave controller, EtherCAT Slave Controller, abbreviated as ESC). The target register can be the AL (lower 8 bits) control register. If the memory space configuration of the requested status is valid, the slave responds to the requested status by writing a response code representing communication success into the AL status register. If the memory space configuration of the requested status is invalid, the slave sets an error flag in the AL status register and writes a response code representing communication failure into the AL status code register. To ensure correct data transmission and check the status. If an error occurs, the status and feedback of the servo driver can also be monitored through the PC interface function to ensure that the control command is executed.

[0081] In some alternative embodiments, the device further includes an acquisition unit and a first output unit. The acquisition unit is configured to acquire status parameters corresponding to the target control parameter after sending the target message to the servo driver to control the servo driver to enter the state corresponding to the target control parameter, where the status parameter is a code representing the current state of the servo driver. The first output unit is configured to output the status parameter to the client interface. After controlling the state of the servo driver, the device displays the corresponding status parameter on the client interface, so that the user can judge whether the servo driver has successfully switched to the required state or whether there is a fault that needs to be further investigated by observing these real-time updated status information.

[0082] Specifically, when the target message is successfully sent to the servo driver and it is controlled to enter the target state, the system will then obtain the status parameters from the servo driver, which are the codes representing the current state of the servo driver. These status parameters are real-time information fed back to the master station (PC interface) via EtherCAT communication after the servo driver responds to the control instruction, and they can reflect whether the servo driver has correctly executed the control instruction, as well as its current working mode, operating parameters, and fault status, etc. The obtained status parameters will then be output to the client interface and displayed through a graphical interface or code, allowing the user to intuitively understand the current state of the servo driver. Different status parameters are represented by specific digital labels and status descriptions, and the user can judge whether the servo driver has successfully switched to the required state or whether there are faults that need to be further investigated by observing these real-time updated status information. For example, the status parameter corresponding to "turn on the switch" is "xxxx.xxxx.0xxx.x111".

[0083] In some alternative embodiments, the device further includes a second output unit for outputting a fault identifier to the client interface when it is detected that the servo driver has a fault, where the fault identifier represents that the servo driver is in a fault state. When the servo driver has a fault, the fault status identifier can be immediately displayed on the client interface to take timely measures to avoid greater losses.

[0084] Specifically, when a fault is detected, it automatically enters the fault state and displays the fault identifier, and this predetermined identifier does not need to be triggered by a predetermined operation, so that the user can timely discover and handle the fault.

[0085] The control device of the servo driver includes a processor and a memory. The determination unit and the first sending unit, etc. are all stored in the memory as program units, and the corresponding functions are implemented by the processor executing the above program units stored in the memory. The above modules are all located in the same processor; or, the above each module is located in different processors in any combination form.

[0086] The processor contains a kernel, and the kernel retrieves the corresponding program unit from the memory. One or more kernels can be set, and the servo driver can be directly controlled through the client by adjusting the kernel parameters.

[0087] The memory may include non-permanent memory in a computer-readable medium, in the form of random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.

[0088] An embodiment of the present invention provides a computer-readable storage medium, which includes a stored program. When the program runs, it controls the device where the computer-readable storage medium is located to execute the control method of the servo driver.

[0089] Specifically, the control method of the servo driver includes:

[0090] Step S201: In response to a predetermined operation on a target predetermined identifier on the client interface, determine a target control parameter. There are multiple predetermined identifiers set on the client interface, each predetermined identifier corresponds to a control parameter, and each control parameter represents a state of the servo driver. The target predetermined identifier is one of the multiple predetermined identifiers, and the target control parameter is the control parameter corresponding to the target predetermined identifier;

[0091] Specifically, the client can be a PC. By setting multiple predetermined identifiers (such as buttons) on the PC, each predetermined identifier corresponds to a specific target control parameter. The target control parameter can be a control word. For example, each number from 1 to 16 is used as a control word, and this control word represents a state of the servo driver. Different letters can also be used as control parameters. In the debugging interface, the user only needs to perform a predetermined operation (such as clicking a certain button with the mouse), and then determine the target control parameter corresponding to the button. The target control parameter can be determined through the one-to-one mapping relationship between the preset predetermined identifier and the control parameter. For example, when the user clicks the digital label 3 (representing the "turn on the switch" state of the servo driver), after the system recognizes this operation, it converts the state of the servo driver to "turn on the switch". This process bypasses the motion controller, and the PC interface directly serves as the master station, communicates with the servo driver through the EtherCAT bus, sends control commands, and simultaneously receives the real-time status feedback of the servo driver.

[0092] Step S202: Configure a target message according to the target control parameter, and send the target message to the servo driver to control the servo driver to enter the state corresponding to the target control parameter.

[0093] Specifically, configure the content of the target message according to the target control parameter. In this step, the PC software encodes the control instruction corresponding to the target control parameter into a message format that conforms to the EtherCAT communication standard according to communication protocols such as CIA402, and then directly sends it to the servo drive through the EtherCAT bus. After receiving the target message, the servo drive parses the control instruction therein, and adjusts its own state according to the received instruction to perform corresponding motor control actions. For example, if the received control instruction is "turn on the switch", the servo drive will perform internal motor activation and voltage regulation and switch to the "turn on the switch" state.

[0094] An embodiment of the present invention provides an electronic device, including a processor, a memory, and a program stored on the memory and executable on the processor. When the processor executes the program, at least the following steps are implemented:

[0095] Step S201, in response to a predetermined operation on a target predetermined identifier on the client interface, determine a target control parameter, where a plurality of predetermined identifiers are set on the client interface, each predetermined identifier corresponds to a control parameter, and each control parameter represents a state of the servo drive. The target predetermined identifier is one of the plurality of predetermined identifiers, and the target control parameter is the control parameter corresponding to the target predetermined identifier;

[0096] Specifically, the client can be a PC. By setting a plurality of predetermined identifiers on the PC, such as buttons, each predetermined identifier corresponds to a specific target control parameter. The target control parameter can be a control word. For example, each number from 1 to 16 is used as a control word, and this control word represents a state of the servo drive. Different letters can also be used as control parameters. In the debugging interface, the user only needs to perform a predetermined operation (for example, click a certain button with the mouse), and then determine the target control parameter corresponding to the button. The target control parameter can be determined through the one-to-one mapping relationship between the preset predetermined identifier and the control parameter. For example, when the user clicks the digital label 3 (representing the "turn on the switch" state of the servo drive), after the system recognizes this operation, it converts the state of the servo drive to "turn on the switch". This process bypasses the motion controller, and the PC interface directly serves as the master station, communicates with the servo drive through the EtherCAT bus, sends control commands, and at the same time receives the real-time state feedback of the servo drive.

[0097] Step S202, configure a target message according to the target control parameter, and send the target message to the servo drive to control the servo drive to enter the state corresponding to the target control parameter.

[0098] Specifically, the content of the target message is configured according to the target control parameter. In this step, the PC software encodes the control instruction corresponding to the target control parameter into a message format conforming to the EtherCAT communication standard according to communication protocols such as CIA402, and then directly sends it to the servo driver through the EtherCAT bus. After receiving the target message, the servo driver parses the control instruction therein, adjusts its own state according to the received instruction, and performs corresponding motor control actions. For example, if the received control instruction is "turn on the switch", the servo driver will perform internal motor activation and voltage regulation and switch to the "turn on the switch" state.

[0099] The devices in this article can be servers, PCs, PADs, mobile phones, etc.

[0100] This application also provides a computer program product, including a computer program, and when the computer program is executed by a processor, it realizes the steps of the methods in the various embodiments of this application:

[0101] Step S201, in response to a predetermined operation on the target predetermined identifier on the client interface, determine the target control parameter, where multiple predetermined identifiers are set on the client interface, each predetermined identifier corresponds to a control parameter, and each control parameter represents a state of the servo driver. The target predetermined identifier is one of the multiple predetermined identifiers, and the target control parameter is the control parameter corresponding to the target predetermined identifier;

[0102] Specifically, the client can be a PC. By setting multiple predetermined identifiers on the PC, such as buttons, each predetermined identifier corresponds to a specific target control parameter. The target control parameter can be a control word. For example, each number from 1 to 16 is used as a control word, and this control word represents a state of the servo driver. Different letters can also be used as control parameters. In the debugging interface, the user only needs to perform a predetermined operation (for example, click a certain button with the mouse), and then determine the target control parameter corresponding to the button. The target control parameter can be determined through the one-to-one mapping relationship between the preset predetermined identifier and the control parameter. For example, when the user clicks the digital label 3 (representing the "turn on the switch" state of the servo driver), after the system recognizes this operation, it converts the state of the servo driver to "turn on the switch". This process bypasses the motion controller, and the PC interface directly serves as the master station, communicates with the servo driver through the EtherCAT bus, sends control commands, and at the same time receives the real-time status feedback of the servo driver.

[0103] Step S202, configure the target message according to the target control parameter, and send the target message to the servo driver to control the servo driver to enter the state corresponding to the target control parameter.

[0104] Specifically, configure the content of the target message according to the target control parameter. In this step, the PC software encodes the control instructions corresponding to the target control parameter into a message format that conforms to the EtherCAT communication standard according to communication protocols such as CIA402, and then directly sends it to the servo drive through the EtherCAT bus. After receiving the target message, the servo drive parses the control instructions therein, adjusts its own state according to the received instructions, and performs corresponding motor control actions. For example, if the received control instruction is "turn on the switch", the servo drive will perform internal motor activation and voltage regulation and switch to the "turn on the switch" state.

[0105] Obviously, those skilled in the art should understand that the various modules or steps of the present invention described above can be implemented by a general-purpose computing device. They can be concentrated on a single computing device or distributed on a network composed of multiple computing devices. They can be implemented by program code executable by the computing device, so that they can be stored in a storage device and executed by the computing device. And in some cases, the steps shown or described herein can be executed in a different order, or they can be separately made into individual integrated circuit modules, or multiple modules or steps among them can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.

[0106] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0107] The present application is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram, and the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the functions specified in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.

[0108] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to operate in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction means that implements the function specified in one or more of the processes and / or blocks Figure 1 in one or more of the processes and / or blocks Figure 1 specified in one or more of the blocks or processes.

[0109] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, so that the instructions executed on the computer or other programmable apparatus provide steps for implementing the function specified in one or more of the processes and / or blocks Figure 1 in one or more of the processes and / or blocks Figure 1 specified in one or more of the blocks or processes.

[0110] In a typical configuration, a computing device includes one or more processors (CPUs), an input / output interface, a network interface, and memory.

[0111] The memory may include non-permanent memory in the form of computer-readable media, random access memory (RAM) and / or non-volatile memory such as read-only memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.

[0112] Computer-readable media includes both permanent and non-permanent, removable and non-removable media implemented by any method or technology for storing information. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile discs (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices, or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory media such as modulated data signals and carrier waves.

[0113] It should also be noted that the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, such that a process, method, commodity or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, commodity or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, commodity or device comprising the element.

[0114] From the above description, it can be seen that the above embodiments of the present application achieve the following technical effects:

[0115] 1) In the control method of the servo driver of the present application, by setting a plurality of predetermined identifiers on the client interface, the client determines the target control parameter in response to a predetermined operation on the target predetermined identifier acting on the client interface, configures the target message according to the target control parameter, and sends the target message to the servo driver to control the servo driver to enter the state corresponding to the target control parameter, so as to directly control the servo driver through the client. Compared with the prior art where it is necessary to send the control instruction to the motion controller, and then the motion controller sends the control instruction to the servo driver with a cumbersome process, the steps of the present application are simple, and the servo driver can still be directly controlled through the client when the motion controller fails. Therefore, it can solve the problem that the servo driver cannot be directly controlled through the client in the prior art, and achieve the effect of simple control steps of directly controlling the servo controller through the client.

[0116] 2) In the control device of the servo driver of the present application, by setting a plurality of predetermined identifiers on the client interface, the client determines the target control parameter in response to a predetermined operation on the target predetermined identifier acting on the client interface, configures the target message according to the target control parameter, and sends the target message to the servo driver to control the servo driver to enter the state corresponding to the target control parameter, so as to directly control the servo driver through the client. Compared with the prior art where it is necessary to send the control instruction to the motion controller, and then the motion controller sends the control instruction to the servo driver with a cumbersome process, the steps of the present application are simple, and the servo driver can still be directly controlled through the client when the motion controller fails. Therefore, it can solve the problem that the servo driver cannot be directly controlled through the client in the prior art, and achieve the effect of simple control steps of directly controlling the servo controller through the client.

[0117] The above are only the preferred embodiments of the present application and are not intended to limit the present application. For those skilled in the art, various changes and modifications can be made to the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the protection scope of the present application.

Claims

1. A control method for a servo driver, characterized in that, Applied to a client, the client is communicatively connected to a servo drive, the client has a client interface, and the control method of the servo drive includes: In response to a predetermined operation on a target predetermined identifier on the client interface, determining a target control parameter, wherein a plurality of predetermined identifiers are set on the client interface, each of the predetermined identifiers corresponds to a control parameter, each of the control parameters represents a state of the servo drive, the target predetermined identifier is one of the plurality of predetermined identifiers, and the target control parameter is the control parameter corresponding to the target predetermined identifier; Configuring a target message according to the target control parameter, and sending the target message to the servo drive to control the servo drive to enter the state corresponding to the target control parameter.

2. The control method of the servo driver according to claim 1, wherein Configuring a target message according to the target control parameter includes: Obtaining the type of the target control parameter, wherein the type of the target control parameter includes a control type and a data transmission type; When the target control parameter is of the control type, obtaining the control state parameter corresponding to the target control parameter, and generating at least one frame of message data from at least the control state parameter to obtain the target message, wherein the control state parameter at least includes a startup parameter, and the startup parameter is a parameter for starting the servo drive; When the target control parameter is of the data transmission type, obtaining target transmission data, and generating at least one frame of message data from at least the target transmission data to obtain the target message.

3. The control method of the servo driver according to claim 2, wherein, Obtaining target transmission data, and generating at least one frame of message data from at least the target transmission data to obtain the target message includes at least one of the following: Obtaining initialization target transmission data, and generating at least one frame of message data from at least the initialization target transmission data to obtain the target message, wherein the initialization target transmission data at least includes data representing the working mode of the servo drive, and the working mode is one of a position control mode, a speed control mode, and a torque control mode; Obtaining mode target transmission data, and generating at least one frame of message data from at least the mode target transmission data to obtain the target message, wherein the mode target transmission data is one of the parameters corresponding to the position control mode, the parameters corresponding to the speed control mode, and the parameters corresponding to the torque control mode.

4. The control method of the servo driver according to claim 1, characterized in that, Sending the target message to the servo drive includes: Determining a target website and a device address, wherein the target website is the address of the network where the servo drive is located, and the device address is the address of the servo drive in the network; Sending the target message to the servo drive corresponding to the device address in the target website.

5. The control method of the servo driver according to claim 1, characterized in that After sending the target message to the servo drive, the method further includes: Generating a communication status request, wherein the communication status request is a request to view the communication status between the servo drive and the client, and the communication status at least includes communication success and communication failure; Send the communication status request to the target register of the servo driver, so that the servo driver writes a response code into the target register and sends the response code to the client, where the response code is a code representing the communication status; Receive the response code sent by the servo driver and determine whether the servo driver and the client communicate successfully according to the response code.

6. The control method of the servo driver according to claim 1, characterized in that, After sending the target message to the servo driver to control the servo driver to enter the state corresponding to the target control parameter, the method further includes: Obtain the status parameter corresponding to the target control parameter, where the status parameter is a code representing the current state of the servo driver; Output the status parameter to the client interface.

7. The control method of the servo driver according to claim 1, wherein The method further includes: When it is detected that the servo driver fails, output a fault identifier to the client interface, where the fault identifier represents that the servo driver is in a fault state.

8. A control device for a servo driver, characterized in that, Applied to a client, the client is communicatively connected to a servo driver, the client has a client interface, and the control device of the servo driver includes: A determination unit, configured to determine a target control parameter in response to a predetermined operation on a target predetermined identifier on the client interface, where a plurality of predetermined identifiers are set on the client interface, each predetermined identifier corresponds to a control parameter, each control parameter represents a state of the servo driver, the target predetermined identifier is one of the plurality of predetermined identifiers, and the target control parameter is the control parameter corresponding to the target predetermined identifier; A first sending unit, configured to configure a target message according to the target control parameter and send the target message to the servo driver to control the servo driver to enter the state corresponding to the target control parameter.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, where when the program runs, it controls the device where the computer-readable storage medium is located to execute the control method of the servo driver according to any one of claims 1 to 7.

10. A control system for a servo drive, characterized in that, Including: A client, a servo driver and a motor, the client is communicatively connected to the servo driver, the servo driver is communicatively connected to the motor, and the servo driver is used to control the movement of the motor; The client includes one or more processors, a memory, and one or more programs, where the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include the control method of the servo driver according to any one of claims 1 to 7.