Servo motor key parameter storage method and system, electronic equipment and storage medium

By establishing an industrial Ethernet communication link and using a UPS power supply in the servo motor system, key parameters can be monitored and stored in real time, solving the problem of parameter loss caused by power outages or driver replacements in the servo motor, ensuring stable equipment operation and reducing maintenance costs.

CN121542104APending Publication Date: 2026-02-17JIANGSU PUDA DITAI TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511415631.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-30
Publication Date
2026-02-17

AI Technical Summary

Technical Problem

Incremental servo motors lose position information and key parameters after power failure or driver replacement, leading to unstable equipment operation and increased maintenance costs.

Method used

A target communication link is established through the industrial Ethernet protocol, key parameters of the servo motor are monitored in real time and stored in RAM memory, and the data is written to non-volatile memory in case of abnormal events using UPS power supply, and the data is written back to the servo drive after communication is restored.

Benefits of technology

This effectively avoids the loss of servo motor parameters, ensures the normal operation of the equipment, improves the reliability of the equipment, and reduces maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121542104A_ABST
    Figure CN121542104A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of servo motors, and discloses a servo motor key parameter storage method and system, electronic equipment and a storage medium, and the method comprises the steps: obtaining an index address of a key parameter of a servo motor, carrying out the PDO mapping, and building a target communication link with a servo driver through an industrial Ethernet protocol; based on the target communication link, reading real-time values of key parameters of the servo motor from the servo driver, refreshing and storing the real-time values into an RAM (Random Access Memory); when an abnormal event is detected, writing data currently stored in an RAM (Random Access Memory) into a nonvolatile memory for storage by utilizing a UPS (Uninterrupted Power Supply); and when the target communication link recovers normal communication, reading the stored data from the nonvolatile memory to the RAM memory, and writing the data currently stored in the RAM memory into the servo driver through the target communication link. The problem of parameter loss caused by power failure or driver replacement can be avoided, normal operation of equipment is guaranteed, and the reliability of the equipment is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of servo motor technology, and in particular to a method, system, electronic device, and storage medium for storing key parameters of a servo motor. Background Technology

[0002] Servo motors are widely used in high-precision moving mechanisms due to their high precision, long stroke, and high load capacity. However, incremental servo motors suffer from the problem of losing position and critical parameters after a power outage. In the event of a sudden power failure or driver replacement, the user-calibrated process parameters will also be lost, seriously affecting the normal operation and reliability of the equipment.

[0003] In modern industrial automation, servo motors are widely used as power sources for high-precision, long-stroke, and high-load moving mechanisms. However, incremental servo motors suffer from the problem of losing position information and critical process parameters after power failure. Once the equipment loses power or the driver is replaced, the user-calibrated parameters are also lost, causing workflow interruptions and requiring recalibration. This significantly increases maintenance costs and seriously affects the normal operation and reliability of the equipment.

[0004] Therefore, there is an urgent need to provide a technical solution to address the above problems. Summary of the Invention

[0005] To address the aforementioned technical problems, this invention provides a method, system, electronic device, and storage medium for storing key parameters of a servo motor.

[0006] Firstly, the present invention provides a method for storing key parameters of a servo motor, the technical solution of which is as follows: Obtain the index address of the key parameters of the servo motor, map the index address to PDO, and establish a target communication link with the servo driver through the industrial Ethernet protocol; Based on the target communication link, the real-time values ​​of the key parameters of the servo motor are read from the servo driver and refreshed and stored in the RAM memory. When an abnormal event is detected, the power provided by the UPS power supply is used to write the data currently stored in the RAM memory into the non-volatile memory for storage. Once the target communication link resumes normal communication, the stored data is read from the non-volatile memory into the RAM memory, and the data currently stored in the RAM memory is written to the servo driver through the target communication link to restore the working state of the servo motor before the power failure.

[0007] The beneficial effects of the servo motor key parameter storage method of the present invention are as follows: The method of this invention monitors the key parameters of the servo motor in real time and stores them in RAM. Combined with UPS support, it quickly writes temporary data during power outages into non-volatile memory and writes it back to the servo driver after communication is restored. This effectively avoids the problem of parameter loss caused by power outages or driver replacement, ensuring normal operation of the equipment and improving equipment reliability.

[0008] Based on the above solution, the method for storing key parameters of a servo motor according to the present invention can be further improved as follows.

[0009] In one alternative approach, the step of obtaining the index address of the key parameters of the servo motor includes: Based on the object dictionary of the servo driver, obtain the index address of the key parameter of the servo motor.

[0010] In one alternative approach, the steps of establishing a target communication link with the servo drive via the Industrial Ethernet protocol include: Using the EtherCAT master software based on the industrial Ethernet protocol, along with a real-time kernel, a network cable is connected to the servo drive, and the XML description file of the servo drive is imported to establish the target communication link.

[0011] In one alternative approach, the key parameters include: actual position, electronic gear ratio, control mode, and user process parameters.

[0012] In one alternative approach, the types of abnormal events include: power failure of the servo driver, interruption of the target communication link, power failure of the industrial control computer, and replacement of the servo driver.

[0013] Secondly, this invention provides a servo motor key parameter storage system, the technical solution of which is as follows: It includes: a communication establishment module, a real-time storage module, an anomaly storage module, and a data recovery module; The communication establishment module is used to: obtain the index address of the key parameters of the servo motor, perform PDO mapping on the index address, and establish a target communication link with the servo driver through the industrial Ethernet protocol; The real-time storage module is used to: read the real-time values ​​of the key parameters of the servo motor from the servo driver based on the target communication link and refresh and store them in RAM memory; The abnormal storage module is used to: when an abnormal event is detected, use the power provided by the UPS power supply to write the data currently stored in the RAM memory into the non-volatile memory for storage; The data recovery module is used to: read the stored data from the non-volatile memory to the RAM memory after the target communication link resumes normal communication, and write the data currently stored in the RAM memory to the servo driver through the target communication link to restore the working state of the servo motor before the power failure.

[0014] The beneficial effects of the servo motor key parameter storage system of the present invention are as follows: The system of this invention monitors key parameters of the servo motor in real time and stores them in RAM. Combined with UPS support, it quickly writes temporary data during power outages into non-volatile memory and writes it back to the servo driver after communication is restored. This effectively avoids parameter loss caused by power outages or driver replacements, ensuring normal equipment operation and improving equipment reliability.

[0015] Based on the above solution, the servo motor key parameter storage system of the present invention can be further improved as follows.

[0016] In one alternative approach, the communication establishment module is specifically used for: Based on the object dictionary of the servo driver, obtain the index address of the key parameter of the servo motor.

[0017] In one alternative approach, the communication establishment module is specifically used for: Using the EtherCAT master software based on the industrial Ethernet protocol, along with a real-time kernel, a network cable is connected to the servo drive, and the XML description file of the servo drive is imported to establish the target communication link.

[0018] Thirdly, the technical solution of an electronic device according to the present invention is as follows: It includes a memory, a processor, and a program stored in the memory and running on the processor, wherein the processor executes the program to implement the steps of the servo motor key parameter storage method of the present invention.

[0019] Fourthly, the technical solution of a computer-readable storage medium provided by the present invention is as follows: The computer-readable storage medium stores instructions that, when read, cause the computer-readable storage medium to perform the steps of the servo motor key parameter storage method of the present invention.

[0020] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description

[0021] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 This is a flowchart illustrating an embodiment of a servo motor key parameter storage method according to the present invention. Figure 2 This is a schematic diagram of an embodiment of a servo motor key parameter storage system according to the present invention; Figure 3 This is a schematic diagram of an embodiment of an electronic device according to the present invention. Detailed Implementation

[0022] Exemplary embodiments of the invention will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be implemented in various forms and should not be limited to the embodiments set forth herein.

[0023] Figure 1 The diagram illustrates a flowchart of an embodiment of a servo motor key parameter storage method provided by the present invention, which is executed by an industrial control computer. Figure 1 As shown, it includes the following steps: S1. Obtain the index address of the key parameters of the servo motor, perform PDO mapping on the index address, and establish a target communication link with the servo driver through the industrial Ethernet protocol.

[0024] Here, a servo motor refers to an electric motor capable of precisely controlling position, speed, or torque; specifically, an incremental servo motor, typically used in automated equipment requiring high-precision positioning. Key parameters refer to the core data that directly affects the control accuracy and performance of the servo motor during operation. An index address is a storage location number in the servo driver object dictionary used to uniquely identify a parameter. PDO mapping refers to process data object mapping, a configuration process in industrial Ethernet communication that binds the index address of a specific parameter to a communication data frame. The Industrial Ethernet protocol is a real-time Ethernet communication protocol used in industrial control, characterized by high real-time performance and determinism. A servo driver is an electronic device used to drive and control servo motors, responsible for receiving commands and outputting power. The target communication link is the real-time data communication channel established between the industrial computer and the servo driver via the Industrial Ethernet protocol.

[0025] S2. Based on the target communication link, read the real-time values ​​of the key parameters of the servo motor from the servo driver and refresh and store them in the RAM memory.

[0026] RAM refers to Random Access Memory, a volatile storage medium used for temporary storage of runtime data.

[0027] Specifically, data request frames are periodically sent to the servo driver through the established target communication link. The response data frames returned by the servo driver are received and parsed. The real-time values ​​of the key parameters contained in the mapped process data object are extracted from the response data frames. The real-time values ​​are written to the specified address area of ​​RAM memory and overwrite the original data.

[0028] S3. When an abnormal event is detected, the power provided by the UPS power supply is used to write the data currently stored in the RAM memory into the non-volatile memory for storage.

[0029] Abnormal events refer to abnormal states occurring in the system that may affect the maintenance and recovery of servo motor parameters. UPS power supplies are uninterruptible power supplies that provide temporary power support in the event of a main power failure.

[0030] Specifically, the monitoring unit continuously monitors the status of the system (a system consisting of an industrial control computer, a servo driver, and a servo motor) and immediately triggers a power outage protection process when an abnormal event is detected. Then, it switches to UPS power supply and starts a data transfer task. The current key parameter data block stored in the specified address area of ​​RAM memory is completely read in a predetermined format, and the read data block is written into the non-volatile storage area of ​​non-volatile memory.

[0031] S4. When the target communication link resumes normal communication, the stored data is read from the non-volatile memory to the RAM memory, and the data currently stored in the RAM memory is written to the servo driver through the target communication link to restore the working state of the servo motor before the power failure.

[0032] Non-volatile memory (NVM) refers to storage devices that can retain data for a long time after power is lost, in contrast to volatile memory (such as RAM) that requires continuous power. The core value of non-volatile memory lies in data persistence, low power consumption, and reliability. Non-volatile memory includes EPROM, EEPROM, Flash, etc.

[0033] Specifically, the monitoring unit continuously monitors the communication status and, after confirming that the target communication link has been restored to normal, reads the previously saved key parameter data from the non-volatile memory, writes the data completely into the original storage area of ​​the RAM memory for restoration, and then rewrites the restored key parameter data in the RAM memory into the corresponding parameter address of the servo driver according to the original PDO mapping relationship through the restored target communication link, so as to restore the working state of the servo motor before the power failure.

[0034] The technical solution of this embodiment monitors the key parameters of the servo motor in real time and stores them in RAM. Combined with UPS support, it quickly writes temporary data during power outages into non-volatile memory and writes it back to the servo driver after communication is restored. This effectively avoids the problem of parameter loss caused by power outages or driver replacement, ensures normal operation of the equipment, and improves equipment reliability.

[0035] In one alternative approach, the step of obtaining the index address of the key parameters of the servo motor includes: Based on the object dictionary of the servo driver, obtain the index address of the key parameter of the servo motor.

[0036] The object dictionary refers to the standardized data structure used in the servo driver to store all parameters, data, and their index addresses.

[0037] Specifically, the object dictionary of the servo driver is read, the parameter entry corresponding to the key parameter name is queried in the object dictionary, and the index address of the key parameter is extracted from the matching parameter entry.

[0038] In the above optional methods, the key parameter index address is further obtained from the servo driver object dictionary to ensure the accuracy and relevance of parameter acquisition, providing a reliable foundation for subsequent parameter storage and recovery.

[0039] In one alternative approach, the steps of establishing a target communication link with the servo drive via the Industrial Ethernet protocol include: Using the EtherCAT master software based on the industrial Ethernet protocol, along with a real-time kernel, a network cable is connected to the servo drive, and the XML description file of the servo drive is imported to establish the target communication link.

[0040] In this context, EtherCAT master software refers to the software running on an industrial control computer used to configure and manage EtherCAT communication. Real-time kernel refers to the operating system kernel capable of providing deterministic responses and real-time task scheduling. XML description file refers to a configuration file used to describe the hardware functions and parameter structure of the servo driver.

[0041] Specifically: 1) Start the EtherCAT master software and load the real-time kernel to ensure real-time communication performance; 2) Connect the industrial control computer running the software to the servo drive via a network cable, and import the XML description file of the servo drive into the EtherCAT master software to identify the drive parameters and communication configuration; 3) Automatically configure the process data object mapping and activate the target communication link of the industrial Ethernet protocol according to the content of the XML description file.

[0042] It should be noted that the Industrial Ethernet Protocol defines a series of standards and specifications for real-time data communication using Ethernet in industrial control environments. The EtherCAT master software is a software entity that is based on and implements the EtherCAT communication standard in the Industrial Ethernet Protocol. It establishes a real-time target communication link that meets the requirements of the Industrial Ethernet Protocol at the application layer by parsing the protocol specifications and interacting with the servo driver.

[0043] In the above-mentioned optional methods, the EtherCAT master software is further utilized in conjunction with the real-time kernel. By connecting the servo driver via network cable and importing the XML description file, the target communication link can be efficiently established, ensuring the real-time performance and stability of data transmission.

[0044] In one alternative approach, the key parameters include: actual position, electronic gear ratio, control mode, and user process parameters.

[0045] Here, "actual position" refers to the current absolute or relative position information of the servo motor rotor. "Electronic gear ratio" refers to the proportional relationship between the servo motor feedback pulses and the output shaft movement. "Control mode" refers to the operating mode of the servo driver, such as position mode, speed mode, or torque mode. "User process parameters" refers to the servo motor operating parameters set by the user according to specific application requirements.

[0046] Among the above-mentioned optional methods, key parameters such as actual position and electronic gear ratio are further clarified to provide specific basis for real-time monitoring and storage, and to ensure accurate control of the servo motor's operating status.

[0047] In one alternative approach, the types of abnormal events include: power failure of the servo driver, interruption of the target communication link, power failure of the industrial control computer, and replacement of the servo driver.

[0048] Servo drive power failure refers to the state where the servo drive stops working due to a lack of power supply. Target communication link interruption refers to the break in the real-time communication connection between the industrial control computer and the servo drive. Industrial control computer power failure refers to the state where the industrial control computer stops working due to a lack of power supply. Servo drive replacement refers to the operation of replacing a faulty or needing-to-upgrade servo drive with a new device.

[0049] Among the above optional methods, a variety of abnormal event types are further covered, such as servo drive power failure and communication link interruption, which can effectively protect parameters under different fault scenarios and enhance the equipment's ability to cope with emergencies.

[0050] To better illustrate the technical solution of this embodiment, the following example is used for explanation. This example is executed by an industrial control computer and includes the following steps: S10. Based on the object dictionary of the X-axis servo driver of the CNC machine tool, obtain the index address of the key parameters of the servo motor, including the actual position (index address 0x607A), electronic gear ratio (index address 0x6091), control mode (index address 0x6060), and user process parameters (index address 0x2000).

[0051] S20. Map the index addresses of key parameters to PDO, and use the EtherCAT master software TwinCAT in conjunction with the MotionRT7 real-time kernel via the industrial Ethernet protocol to connect to the X-axis servo drive via a network cable, and import the XML description file of the drive to complete the target communication link configuration with the X-axis servo drive.

[0052] S30. Based on the established target communication link, periodically read the real-time values ​​of actual position, electronic gear ratio, control mode, and user process parameters from the X-axis servo drive, and refresh and store them in the RAM memory of the industrial control computer in real time. The communication delay is controlled within 1ms to ensure high real-time data performance.

[0053] S40. When an abnormal event is detected, such as a sudden power failure of the X-axis servo drive, interruption of the target communication link, power failure of the industrial control computer, or replacement of the servo drive, the UPS power supply equipped with it is activated. Using the backup power provided by the UPS power supply, the key parameter data currently stored in the RAM memory is written to the non-volatile memory for storage.

[0054] S50. When the industrial control computer is powered on again and the target communication link is restored to normal, the key parameter data previously saved in the non-volatile memory is read into the RAM memory. Then, through the target communication link, the data in the RAM memory is written into the X-axis servo driver to restore the servo motor to the running state before the power failure, including the actual position, control mode and all user process parameters.

[0055] It should be noted that the X-axis servo motor of the CNC machine tool can continue to perform high-precision machining tasks without recalibration after the parameters are restored, effectively avoiding maintenance costs caused by production interruption and parameter loss.

[0056] Figure 2A schematic diagram of an embodiment of a servo motor key parameter storage system 200 provided by the present invention is shown. Figure 2 As shown, the system 200 includes: a communication establishment module 210, a real-time storage module 220, an anomaly storage module 230, and a data recovery module 240; The communication establishment module 210 is used to: obtain the index address of the key parameters of the servo motor, perform PDO mapping on the index address, and establish a target communication link with the servo driver through the industrial Ethernet protocol; The real-time storage module 220 is used to: read the real-time values ​​of the key parameters of the servo motor from the servo driver based on the target communication link and refresh and store them in RAM memory; The abnormal storage module 230 is used to: when an abnormal event is detected, use the power provided by the UPS power supply to write the data currently stored in the RAM memory into the non-volatile memory for storage; The data recovery module 240 is used to: read the stored data from the non-volatile memory to the RAM memory after the target communication link resumes normal communication, and write the data currently stored in the RAM memory to the servo driver through the target communication link to restore the working state of the servo motor before the power failure.

[0057] In an alternative embodiment, the communication establishment module 210 is specifically used for: Based on the object dictionary of the servo driver, obtain the index address of the key parameter of the servo motor.

[0058] In an alternative embodiment, the communication establishment module 210 is specifically used for: Using the EtherCAT master software based on the industrial Ethernet protocol, along with a real-time kernel, a network cable is connected to the servo drive, and the XML description file of the servo drive is imported to establish the target communication link.

[0059] In one alternative approach, the key parameters include: actual position, electronic gear ratio, control mode, and user process parameters.

[0060] In one alternative approach, the types of abnormal events include: power failure of the servo driver, interruption of the target communication link, power failure of the industrial control computer, and replacement of the servo driver.

[0061] It should be noted that the beneficial effects of the servo motor key parameter storage system 200 provided in the above embodiments are the same as those of the servo motor key parameter storage method described above, and will not be repeated here. Furthermore, the system provided in the above embodiments is only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the system can be divided into different functional modules according to the actual situation to complete all or part of the functions described above. In addition, the system and method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process is detailed in the method embodiments, and will not be repeated here.

[0062] The servo motor key parameter storage system 200 of the present invention can be a computer program (including program code) running on a computer device. For example, the servo motor key parameter storage system 200 of the present invention is an application software that can be used to execute the corresponding steps in the servo motor key parameter storage method of the present invention.

[0063] In some embodiments, the servo motor key parameter storage system 200 of the present invention can be implemented in a combination of hardware and software. As an example, the servo motor key parameter storage system 200 of the present invention can be a processor in the form of a hardware decoding processor, which is programmed to execute the servo motor key parameter storage method of the present invention. For example, the processor in the form of a hardware decoding processor can be one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.

[0064] The modules described in the embodiments of this invention can be implemented in software or hardware. The names of the modules are not, in some cases, limiting the scope of the module itself.

[0065] An electronic device according to an embodiment of the present invention includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements any of the above-mentioned methods for storing key parameters of a servo motor. That is, an electronic device according to an embodiment of the present invention may include, but is not limited to: a processor and a memory; the memory is used to store the computer program; the processor is used to execute the method for storing key parameters of a servo motor shown in any embodiment of the present invention by calling the computer program.

[0066] In one alternative embodiment, an electronic device is provided, such as Figure 3 As shown, Figure 3 The illustrated electronic device 4000 includes a processor 4001 and a memory 4003. The processor 4001 and the memory 4003 are connected, for example, via a bus 4002. Optionally, the electronic device 4000 may further include a transceiver 4004, which can be used for data interaction between the electronic device and other electronic devices, such as sending and / or receiving data. It should be noted that in practical applications, the transceiver 4004 is not limited to one type, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of the present invention.

[0067] Processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this invention. Processor 4001 may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.

[0068] Bus 4002 may include a path for transmitting information between the aforementioned components. Bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. Bus 4002 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 3The bus 4002 is represented by only one thick line, but this does not mean that there is only one bus or one type of bus.

[0069] The memory 4003 may be ROM (Read Only Memory) or other types of static storage devices capable of storing static information and instructions, RAM (Random Access Memory) or other types of dynamic storage devices capable of storing information and instructions, or EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read Only Memory) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto.

[0070] The memory 4003 stores application code (computer program) for executing the present invention, and its execution is controlled by the processor 4001. The processor 4001 executes the application code stored in the memory 4003 to implement the content shown in the foregoing method embodiments.

[0071] Among them, electronic devices can also be terminal devices. A terminal device can be any terminal device that can install applications and access web pages through applications, including at least one of smartphones, tablets, laptops, desktop computers, smart speakers, smartwatches, smart TVs, and smart in-vehicle devices.

[0072] It should be noted that, Figure 3 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of the present invention.

[0073] An embodiment of the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements any of the above-described methods for storing key parameters of a servo motor.

[0074] Alternatively, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), magnetic tape, a floppy disk, and an optical data storage device, etc.

[0075] In an exemplary embodiment, a computer program product or computer program is also provided, which includes computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the electronic device to perform the aforementioned servo motor key parameter storage method.

[0076] Computer program code for performing the operations of this invention can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0077] It should be understood that the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of methods and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0078] The computer-readable storage medium provided in this invention can be, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0079] The aforementioned computer-readable storage medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the method shown in the above embodiments.

[0080] The above description is merely a preferred embodiment of the present invention and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of disclosure in this invention is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-disclosed concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in this invention.

[0081] It should be noted that the terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and represent a limitation on a specific order or sequence. Where appropriate, the order of use for similar objects can be interchanged so that the embodiments of this application described herein can be implemented in an order other than that shown or described.

[0082] Those skilled in the art will recognize that this invention can be implemented as a system, method, or computer program product. Therefore, this invention can be specifically implemented in the following forms: it can be entirely hardware, entirely software (including firmware, resident software, microcode, etc.), or a combination of hardware and software, generally referred to herein as a "circuit," "module," or "system." Furthermore, in some embodiments, this invention can also be implemented as a computer program product contained in one or more computer-readable media, which includes computer-readable program code.

[0083] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.

Claims

1. A method for storing key parameters of a servo motor, applied to an industrial control computer, characterized in that, include: Based on the object dictionary of the servo driver, the index address of the key parameters of the servo motor is obtained, and the index address is mapped by PDO. The target communication link between the servo driver and the servo driver is established through the industrial Ethernet protocol. Based on the target communication link, the real-time values ​​of the key parameters of the servo motor are read from the servo driver and refreshed and stored in the RAM memory. When an abnormal event is detected, the power provided by the UPS power supply is used to write the data currently stored in the RAM memory into the non-volatile memory for storage. Once the target communication link resumes normal communication, the stored data is read from the non-volatile memory into the RAM memory, and the data currently stored in the RAM memory is written to the servo driver through the target communication link to restore the working state of the servo motor before the power failure.

2. The method for storing key parameters of a servo motor according to claim 1, characterized in that, The steps for establishing a target communication link with the servo drive using the Industrial Ethernet protocol include: Using the EtherCAT master software based on the industrial Ethernet protocol, along with a real-time kernel, a network cable is connected to the servo drive, and the XML description file of the servo drive is imported to establish the target communication link.

3. The method for storing key parameters of a servo motor according to claim 1 or 2, characterized in that, The key parameters include: actual position, electronic gear ratio, control mode, and user process parameters.

4. The method for storing key parameters of a servo motor according to claim 1 or 2, characterized in that, The types of abnormal events include: power failure of the servo driver, interruption of the target communication link, power failure of the industrial control computer, and replacement of the servo driver.

5. A servo motor key parameter storage system, characterized in that, include: The system includes a communication establishment module, a real-time storage module, an anomaly storage module, and a data recovery module. The communication establishment module is used to: obtain the index address of the key parameters of the servo motor according to the object dictionary of the servo driver, perform PDO mapping on the index address, and establish a target communication link with the servo driver through the industrial Ethernet protocol; The real-time storage module is used to: read the real-time values ​​of the key parameters of the servo motor from the servo driver based on the target communication link and refresh and store them in RAM memory; The abnormal storage module is used to: when an abnormal event is detected, use the power provided by the UPS power supply to write the data currently stored in the RAM memory into the non-volatile memory for storage; The data recovery module is used to: read the stored data from the non-volatile memory to the RAM memory after the target communication link resumes normal communication, and write the data currently stored in the RAM memory to the servo driver through the target communication link to restore the working state of the servo motor before the power failure.

6. The servo motor key parameter storage system according to claim 5, characterized in that, The communication establishment module is specifically used for: Using the EtherCAT master software based on the industrial Ethernet protocol, along with a real-time kernel, a network cable is connected to the servo drive, and the XML description file of the servo drive is imported to establish the target communication link.

7. An electronic device, characterized in that, The electronic device includes a processor coupled to a memory, the memory storing at least one computer program, which is loaded and executed by the processor to enable the electronic device to implement the servo motor key parameter storage method as described in any one of claims 1 to 4.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one computer program, which is loaded and executed by a processor to enable the computer-readable storage medium to implement the servo motor key parameter storage method as described in any one of claims 1 to 4.