A tool magazine servo system power-off position memory and zero-reset-free recovery method

CN123010608APending Publication Date: 2026-10-30ZHEJIANG TAIBANG XINGPU INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611276812.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-21
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

现有各类位置保持方案存在明显短板:采用电池搭配绝对编码器的方案,机床高温、油污、振动工况会大幅缩短电池使用寿命,频繁更换电池增加运维成本,电池漏液还会腐蚀电路板;采用大容量超级电容后备供电的方案,电容体积大难以适配紧凑伺服驱动器,且长期停机自放电会导致位置数据丢失;采用机械原点开关强制回零的方案,断电刀盘偏移后回零易发生撞刀,存在重大安全隐患;采用抱闸、棘轮机械锁止的方案结构复杂、装配成本高,长期磨损会持续降低定位精度;

Benefits of technology

[0020]本发明全程无需配置供电电池,依托电机断电惯性反电动势配合微型陶瓷电容短时供能完成位置存储,彻底消除电池更换、漏液腐蚀电路板、废旧电池环保处理等一系列运维隐患,大幅降低机床全生命周期维护成本。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123010608A_ABST
    Figure CN123010608A_ABST
Patent Text Reader

Abstract

The application discloses a tool magazine servo system power-off position memory and zero-reset-free recovery method, and belongs to the field of numerical control machine tool control. The system comprises a main control, a flash, a FRAM, a micro ceramic energy storage capacitor and an energy management circuit. During normal operation, the main control periodically writes position anchor data with CRC check into the flash; at the moment of power failure, the hardware cuts off the non-core load, relies on the motor back electromotive force to cooperate with the energy storage capacitor for short-time power supply, writes an emergency position data packet into the FRAM based on an adaptive threshold, and executes a write-read-back atomic check. After power-on, the effective snapshot of the FRAM is read first to realize zero-reset-free; if the snapshot is invalid, the anchor point of the flash is called to perform low-speed point searching and self-recovery calibration, and a background silent check is additionally arranged for the first time tool changing to serve as a bottom line. The application does not need a battery, an ultralarge capacitor and a complex mechanical locking, the dual nonvolatile storage redundancy guarantees that the power-off data is stored for a long time, the capacitor aging can be adaptively adapted, the application has a fault early warning function, the hardware cost is low, the power-on tool collision is effectively avoided, and the machining efficiency and operation reliability of the machine tool are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of CNC machine tool control technology, specifically to a method for power-off position memory and zero-recovery recovery of a tool magazine servo system. Background Technology

[0002] Machining center tool magazines are highly susceptible to losing absolute position after a power outage, necessitating a mechanical homing operation upon power restoration. Existing position-keeping solutions have significant drawbacks: Batteries paired with absolute encoders suffer from reduced battery lifespan due to high machine temperatures, oil contamination, and vibration; frequent battery replacements increase maintenance costs; and battery leakage can corrode circuit boards. Large-capacity supercapacitors for backup power are bulky and difficult to integrate with compact servo drives; prolonged shutdowns and self-discharge can lead to position data loss. Mechanical origin switches for forced homing pose a significant safety hazard, as tool head misalignment after power failure can cause collisions. Brake and ratchet mechanical locking solutions are complex, costly to assemble, and their long-term wear continuously reduces positioning accuracy.

[0003] Currently, the industry lacks a control scheme that can stably retain the power-off position by relying solely on the electrical characteristics of the servo itself, without batteries, large energy storage devices, or complex additional mechanical structures. This technological gap directly restricts the tool changing efficiency and operational safety of machine tools.

[0004] Therefore, we propose a method for power-off position memory and zero-recovery recovery of the tool magazine servo system. Summary of the Invention

[0005] The purpose of this invention is to provide a method for power-off position memory and zero-return recovery of a tool magazine servo system, which solves the problems mentioned in the background art.

[0006] To achieve the above objectives, the present invention provides the following technical solution: a method for power-off position memory and zero-return recovery of a tool magazine servo system, wherein the servo system is configured with a main control unit, a first non-volatile memory, a second non-volatile memory, an energy storage unit, and an energy management circuit; the method is divided into three stages: normal operation, power-off processing, and power-on recovery.

[0007] During normal operation, the main control unit generates anchor point data packets with verification information and writes them into the first non-volatile memory according to a preset rotation angle or time period.

[0008] During the power outage process, the energy management circuit detects an external power supply interruption. The energy storage unit provides short-term power to the main control unit and the second non-volatile memory. The main control unit generates an emergency location data packet, writes it to the second non-volatile memory, and performs a read-back verification operation. After successful verification, a data validity flag is written.

[0009] During the power-on recovery phase, after the device is powered on, it first reads the data validity flag in the second non-volatile memory. If the flag is valid, it directly parses the emergency data packet to restore the absolute position of the tool magazine, achieving power-on zeroing without mechanical homing. If the flag is invalid, it retrieves the valid anchor point data packet in the first non-volatile memory to complete the degraded position recovery.

[0010] In a preferred embodiment of the present invention, during the power outage process, the energy management circuit collects the DC bus voltage in real time. When the bus voltage drops to the first threshold Vth1, the inverter drive circuit, communication interface, operation panel, and cooling fan are quickly cut off by a hardware switch, leaving only the independent power supply path from the energy storage unit to the main control unit and the second non-volatile memory.

[0011] In a preferred embodiment of the present invention, the triggering condition for writing an emergency data packet to the second non-volatile memory is that the energy storage capacitor voltage drops to an adaptive write threshold Vth2; Vth2 has self-learning update logic, and records the final discharge voltage V of the energy storage capacitor after each successful power-off write. actual The threshold for the next power outage write will satisfy Vth2(N+1)=V actual ×1.1~1.2, to compensate for the decrease in power supply margin caused by the aging of energy storage capacitors and fluctuations in ambient temperature.

[0012] In a preferred embodiment of the present invention, after the main control unit writes the emergency data packet, it immediately reads all the data from the same storage address and compares it bit by bit with the original data in the local cache. The data validity flag is written only when the data matches completely. If the comparison is inconsistent, the validity flag is not set. The write operation is retried up to two times when the energy storage capacitor has sufficient remaining power.

[0013] In a preferred embodiment of the present invention, a circular buffer is provided in the first non-volatile memory. The buffer can store 3 to 10 anchor data packets. New data packets overwrite the earliest historical records in the buffer to achieve wear leveling of the storage medium. The system counts the number of failed anchor data packet writes in real time. When the number of consecutive failures exceeds a preset threshold, an abnormal warning for the storage unit is sent to the upper digital control system.

[0014] As a preferred embodiment of the present invention, the degradation recovery process during the power-on recovery phase includes: taking the position corresponding to the effective anchor point data packet in the first non-volatile memory as the initial position of the servo, controlling the tool magazine servo motor to move towards the nearest mechanical reference point at a low speed not exceeding 10% of the rated speed; after detecting the reference point trigger signal, automatically calibrating to the standard absolute zero point, and synchronously updating all position data in the first and second non-volatile memories.

[0015] In a preferred embodiment of the present invention, the first non-volatile memory is SPINOR Flash, used for long-term storage of periodic security anchors; the second non-volatile memory is FRAM ferroelectric memory, used for storing emergency position snapshots at the moment of power failure. FRAM can be written quickly without pre-erasing, and does not require continuous power supply to maintain stored data after power failure.

[0016] In a preferred embodiment of the present invention, the emergency data packet includes the absolute position of the tool magazine, the number of multiple revolutions, an emergency write special identifier code, and a CRC16 check code; the anchor data packet includes the absolute position of the tool magazine, the number of multiple revolutions, a system timestamp, and a CRC16 check code. Both types of data packets use cyclic redundancy check to ensure the integrity and reliability of the stored data.

[0017] In a preferred embodiment of the present invention, after the zero-return start is completed by relying on the data of the second non-volatile memory, a background silent verification step is performed; when the system performs the tool change action for the first time, the background thread continuously monitors the encoder index pulse or limit reference point; after capturing the reference point signal, the actual physical position is compared with the theoretical position calculated by FRAM. If the absolute value of the position deviation is less than 2 degrees, the silent verification is passed; if the deviation exceeds ±2 degrees, the position is automatically calibrated and diagnostic prompt information is uploaded through the fieldbus.

[0018] In a preferred embodiment of the present invention, the energy storage unit adopts a miniature ceramic capacitor. After the capacitor is fully charged, it can continuously supply power to the main control unit and the second non-volatile memory for 5ms to 50ms. The system accumulates and counts the number of emergency write failures and the number of silent verification position deviations. When the statistical value exceeds the preset threshold, it pushes an aging warning of the energy storage unit or storage medium to the host computer.

[0019] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0020] This invention eliminates the need for a power supply battery throughout the entire process. It relies on the back electromotive force of the motor's inertia when it is powered off, combined with the short-term power supply of a miniature ceramic capacitor, to complete the position storage. This completely eliminates a series of maintenance risks such as battery replacement, leakage corrosion of circuit boards, and environmentally friendly disposal of used batteries, and significantly reduces the maintenance cost of the machine tool throughout its entire life cycle.

[0021] It adopts a dual non-volatile media redundancy architecture with Flash periodic anchor storage and FRAM power failure instantaneous snapshot. The writing timing and power supply of the two types of storage media are isolated from each other. Even if a single storage unit fails, it can still operate safely in a degraded manner. Location data will not be lost for several years after power failure, solving the self-discharge failure defect of traditional supercapacitors.

[0022] The power-off writing process employs an atomic verification mechanism of "write-readback-bit-bit comparison-valid flag setting". Only when the data is complete and error-free is it marked as valid, eliminating the risk of collision caused by loading data in the wrong position from the bottom layer. At the same time, an adaptive writing threshold is set, which can automatically adjust the triggering time according to the aging of the energy storage capacitor and the ambient temperature, ensuring the success rate of power-off writing even after long-term use of the device.

[0023] Power-on self-healing recovery is achieved in stages. Under normal working conditions, the system can start directly without returning to zero by relying on FRAM snapshots, saving auxiliary time for power-on zero return. When FRAM writing fails, the system automatically retrieves the Flash anchor point to search for the reference point for calibration at low speed. Combined with the background silent verification during tool changing, there is a double safety net. No manual intervention is required throughout the process, and the host computer does not alarm or interrupt the machining process.

[0024] It has the capability of proactively warning about hardware health. The system automatically counts the frequency of storage write failures and location verification errors, and pushes diagnostic prompts in advance when indicators exceed limits, which facilitates preventive maintenance and avoids sudden equipment downtime.

[0025] The incremental cost of hardware upgrades is low, requiring only the addition of a low-cost FRAM and a small ceramic capacitor. There is no need to modify the servo motor or encoder structure. It can be directly integrated into the existing servo driver hardware platform and is compatible with the mass production of various disc and hat-shaped CNC tool magazines. Attached Figure Description

[0026] Other features, objects, and advantages of the present invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings:

[0027] Figure 1 This is a block diagram of the system structure of the present invention;

[0028] Figure 2 Flowchart for recording safety anchor points during normal operation;

[0029] Figure 3 A comprehensive timing diagram for energy management, write timing, and verification logic during the power outage processing phase;

[0030] Figure 4 A flowchart illustrating the graded recovery and self-healing calibration process during the power-on recovery phase;

[0031] Figure 5 A schematic diagram illustrating the adaptive write threshold learning principle;

[0032] Figure 6 This is a flowchart of the background silent verification process. Detailed Implementation

[0033] To make the technical means, creative features, objectives and effects of this invention easier to understand, the invention will be further described below in conjunction with specific embodiments.

[0034] Example 1: System Hardware Setup and Function Configuration

[0035] The tool magazine servo hardware in this embodiment consists of a main control unit, dual-channel non-volatile memory, a micro ceramic energy storage unit, a hardware-level energy management circuit, a servo drive module, and a position encoder. (Refer to the attached diagram.) Figure 1 Hardware routing and functional matching are achieved. The main controller uses an ARM Cortex-M4 core DSP processor with a main frequency of 168MHz, which has high-speed SPI peripherals and hardware interrupt capture capabilities, enabling microsecond-level power-down signal response and ensuring zero-delay execution of emergency power-down procedures. The first non-volatile memory uses 16Mbit SPI NOR Flash, which relies on a large-capacity circular buffer to achieve long-term reliable storage of periodic position anchors. Data can be stored at room temperature for up to 20 years, effectively avoiding the problem of data loss during short-term power outages. The second non-volatile memory uses 256Kbit FRAM ferroelectric memory, which has nanosecond-level write speed and ultra-high erase and write life. Emergency data packets can be written instantly during power-down without pre-erasure, significantly reducing the time consumed by power-down operations. The energy storage unit uses 47μF / 50VX7R surface-mount ceramic capacitors, which significantly reduce the size compared to traditional farad-level supercapacitors, making it suitable for the compact installation space of servo drives. The energy management circuit is equipped with an adjustable threshold voltage comparator and a P-channel MOS hardware switch, which can cut off all non-core loads within 5μs when the bus voltage drops, creating an independent energy supply channel. This concentrates all the motor's inertial back electromotive force to supply the main controller and FRAM, maximizing the utilization of residual energy during power failure and providing sufficient power margin for atomic-level data writing. The positioning end is equipped with a 23-bit single-turn absolute encoder, which acquires the tool head angle and multi-turn count values ​​in real time with high precision, ensuring that the original position data of the stored data packets is accurate and without deviation.

[0036] Example 2: Implementation of periodic anchor point storage during normal operation

[0037] See attached document Figure 2The system executes a safety anchor point recording process under normal machining conditions. During continuous equipment operation, the main controller polls the cumulative rotation angle of the tool magazine in real time. When the cumulative rotation of the tool head is detected to be ≥90°, the anchor point packaging and storage process is automatically triggered. This angle triggering mechanism balances the frequency of storage writes with wear and tear, taking into account both position recording density and Flash lifespan. The main controller synchronously captures the encoder's absolute position, number of revolutions, and high-precision timestamp, splices these three types of information into the original data packet, and adds a CRC16 checksum. A cyclic redundancy check mechanism is used to prevent random bit errors during data transmission and storage. Five circular buffer storage areas are allocated within the Flash memory. After a new data packet is written, the storage pointer is automatically updated, and the buffer end automatically wraps around and overwrites the earliest historical record. A wear leveling mechanism prevents frequent erasure and writing of local storage addresses, extending the lifespan of the Flash hardware. The main controller tracks the results of each Flash write operation in real time. If three consecutive write operations fail, a storage anomaly warning is immediately pushed to the upper digital control system via the fieldbus, alerting maintenance personnel to investigate storage hardware faults in advance. This prevents long-term operation without records, which could lead to a lack of anchor point data after a power outage, thus improving the equipment's fault tolerance.

[0038] Example 3: Implementation of Adaptive Atomic Writing Process during Power-Off Processing

[0039] See attached document Figure 3 Appendix Figure 5The system executes data snapshot storage logic under sudden power outage conditions. After the external power supply is disconnected, the motor continues to rotate due to inertia, generating back electromotive force to continuously replenish the energy storage capacitor. When the DC bus voltage drops to the preset first hardware threshold Vth1=240V, the energy management circuit hardware quickly shuts down non-core peripherals such as the inverter drive, operation panel, and cooling fan, isolating ineffective power loss and ensuring that all the energy in the energy storage capacitor is used for core storage operations. After the main controller detects the hardware power failure interruption, it immediately shields other interrupt sources in the system, concentrates computing power to quickly collect tool magazine position, multi-turn count, and motor phase current polarity information, and encapsulates an emergency data packet carrying a unique emergency identification code 0x5A5A and a CRC check code. The current polarity data can help determine the tool head rotation direction at the moment of power failure, further improving the position recovery calibration accuracy. The system dynamically updates the FRAM write trigger threshold Vth2 based on self-learning logic. The initial conservative threshold is set to 4.0V. After each successful write operation after power failure, the final voltage of the capacitor discharge is recorded. The threshold is automatically updated to the measured voltage × 1.15 for the next operation. As the capacitor ages and the ambient temperature rises, the write trigger timing is automatically advanced. The system compensates for the insufficient power supply margin caused by the decay of energy storage capacity throughout the entire process, ensuring stable and reliable write operation during power failure throughout the entire life cycle of the device. When the voltage of the energy storage capacitor drops to the adaptive Vth2 threshold, the main controller writes an emergency data packet to the FRAM via the SPI bus. After the write is completed, all data is immediately read back from the same address and compared bit by bit with the local cache. Only when the data completely matches is a valid flag 0xA5A5A5A5 written, forming an indivisible atomic operation. This completely eliminates the risk of incomplete or incorrect data being marked as valid and causing collisions. If the comparison fails and the capacitor still has residual power, the write will be retried up to two times, maximizing the success rate of power-off snapshot storage. The total write and verification time is less than 100μs. The 8~12ms power supply duration of the energy storage capacitor provides sufficient redundancy, ensuring that the data stored in the FRAM will not be lost even after several years of power outage.

[0040] Example 4: Implementation of Power-On Graded Position Recovery and Low-Speed ​​Self-Healing Calibration

[0041] See attached document Figure 4The system executes hierarchical location recovery logic after the device is powered on again. After the system is powered on and initialized, it prioritizes reading the valid data flag bit inside the FRAM to quickly determine whether the snapshot of the last power failure was successfully stored, thereby achieving rapid routing of the recovery path and reducing the power-on waiting time. If the FRAM valid flag matching verification passes, the absolute position and multi-turn count in the emergency data packet are directly parsed and loaded into the servo position register. Simultaneously, the FRAM emergency flag is cleared. The tool magazine can complete the position readiness without any mechanical rotation, achieving zero-return start-up. This saves the auxiliary time of power-on zeroing in traditional solutions and greatly improves the machine tool's start-up and processing efficiency. If the FRAM has no valid flag or the data packet CRC verification fails, the system automatically switches to the degradation recovery path, traversing the Flash circular buffer and searching for valid anchor point data packets from newest to oldest according to the timestamp. The verified anchor point position is used as the servo initial position enable, controlling the tool magazine to move at a low speed of 5% of the rated speed towards the nearest mechanical reference point. The low-speed movement mode can avoid mechanical collisions during high-speed zeroing when the offset is large, ensuring the safety of equipment startup. When the reference point limit trigger signal is detected, the system automatically calibrates the servo position counter to the standard absolute zero point, simultaneously refreshes all data in the Flash and FRAM storage areas, and clears the historical emergency flags in the FRAM. The entire self-healing calibration process is completely transparent to the upper CNC system, with no fault alarms and no interruption of subsequent processing tasks, achieving unattended automatic repair.

[0042] Example 5: Implementation of Power-On Background Silent Verification Closed-Loop Protection

[0043] See attached document Figure 6 The background silent verification process following the FRAM snapshot-free startup is triggered only after the system completes position recovery using FRAM data. The verification thread runs independently in the background, without consuming the computational power of the motion control main thread, and does not interfere with the machine tool's normal tool changing and machining operations. When the equipment first receives the tool changing command and the tool magazine begins to rotate, the background thread continuously monitors the encoder index pulse and the mechanical reference point switch signal, passively acquiring signals without any additional mechanical action. Once the first reference point trigger signal is captured, the current actual physical position is immediately latched, and the angular deviation Δθ between the actual position and the theoretical position calculated from the FRAM data packet is calculated. When the absolute value of the deviation is less than 2°, the verification is considered qualified. The verification mark is silently cleared in the background without any pop-up windows or bus prompts, and the user is completely unaware of the verification process. If the deviation exceeds the ±2° allowable threshold, the system automatically corrects the servo position with the reference point standard zero point and updates the Flash and FRAM stored data simultaneously. At the same time, it sends a low-priority diagnostic message to the host computer through the fieldbus, prompting maintenance personnel to regularly check the capacity of the energy storage capacitor and the health status of the FRAM storage chip. This forms a three-layer reliability closed loop of "power-off storage - power-on recovery - operation verification", which covers extremely low-probability faults such as occasional soft errors in the storage medium and slight capacitor decay, further enhancing the safety of tool changer operation.

[0044] Example 6: Implementation of Intelligent Early Warning Logic for Equipment Health Status

[0045] Throughout system operation, two types of fault statistics are continuously accumulated: the number of consecutive failures in periodic anchor point writing to the Flash memory, and the number of failures in emergency writes during power outages and the number of times the position exceeds tolerance during silent background verification. All statistical values ​​are stored in local registers in real time, ensuring that the data is retained even when power is off. When the number of any type of statistical count exceeds the system's preset threshold, a hardware warning signal is continuously pushed to the upper-level digital control system to accurately pinpoint the source of the fault as either damaged storage media or aging energy storage capacitors. Unlike traditional indiscriminate fault alarms, this facilitates precise troubleshooting by maintenance personnel, enabling them to proactively perform preventative replacements, avoid sudden position loss and machine shutdowns during processing, and improve the overall stability of the machine tool's continuous operation.

[0046] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or basic characteristics. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, it is intended that all variations falling within the meaning and scope of equivalents of the claims be included within the present invention.

[0047] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.

Claims

1. A method for power-off position memory and zero-return recovery in a tool magazine servo system, characterized in that: The servo system is equipped with a main control unit, a first non-volatile memory, a second non-volatile memory, an energy storage unit, and an energy management circuit; the method consists of three stages: normal operation, power failure processing, and power-on recovery. During normal operation, the main control unit generates anchor point data packets with verification information and writes them into the first non-volatile memory according to a preset rotation angle or time period. During the power outage process, the energy management circuit detects an external power supply interruption. The energy storage unit provides short-term power to the main control unit and the second non-volatile memory. The main control unit generates an emergency location data packet, writes it to the second non-volatile memory, and performs a read-back verification operation. After successful verification, a data validity flag is written. During the power-on recovery phase, after the device is powered on, it first reads the data validity flag in the second non-volatile memory. If the flag is valid, it directly parses the emergency data packet to restore the absolute position of the tool magazine, thus achieving power-on zeroing without mechanical homing. If the flag is invalid, retrieve the valid anchor data packet from the first non-volatile memory to complete the downgraded position recovery.

2. The method for power-off position memory and zero-return recovery of a tool magazine servo system according to claim 1, characterized in that: During the power outage process, the energy management circuit collects the DC bus voltage in real time. When the bus voltage drops to the first threshold Vth1, it quickly cuts off all non-core loads, including the inverter drive circuit, communication interface, operation panel, and cooling fan, through a hardware switch, leaving only the independent power supply path from the energy storage unit to the main control unit and the second non-volatile memory.

3. The method for power-off position memory and zero-return recovery of a tool magazine servo system according to claim 1, characterized in that: The trigger condition for writing an emergency data packet to the second non-volatile memory is that the energy storage capacitor voltage drops to the adaptive write threshold Vth2; Vth2 has self-learning update logic, and records the final discharge voltage V of the energy storage capacitor after each successful power-off write. actual The threshold for the next power outage write will satisfy Vth2(N+1)=V actual ×1.1~1.2, to compensate for the decrease in power supply margin caused by aging of energy storage capacitors and fluctuations in ambient temperature.

4. The method for power-off position memory and zero-return recovery of a tool magazine servo system according to claim 1, characterized in that: After the main control unit writes the emergency data packet, it immediately reads all the data from the same storage address and compares it bit by bit with the original data in the local cache. The data validity flag is only written when the data matches completely. If the comparison is inconsistent, the validity flag is not set. The write operation will be retried up to two times when the energy storage capacitor has sufficient remaining power.

5. The method for power-off position memory and zero-return recovery of a tool magazine servo system according to claim 1, characterized in that: A circular buffer is set in the first non-volatile memory. The buffer can store 3 to 10 anchor data packets. New data packets overwrite the earliest historical records in the buffer to achieve wear leveling of the storage medium. The system counts the number of failed anchor data packet writes in real time. When the number of consecutive failures exceeds a preset threshold, it sends a storage unit abnormality warning to the upper digital control system.

6. The method for power-off position memory and zero-return recovery of a tool magazine servo system according to claim 1, characterized in that: The degradation recovery process during the power-on recovery phase includes: taking the position corresponding to the valid anchor point data packet in the first non-volatile memory as the initial position of the servo, controlling the tool magazine servo motor to move towards the nearest mechanical reference point at a low speed not exceeding 10% of the rated speed; after detecting the reference point trigger signal, automatically calibrating to the standard absolute zero point, and synchronously updating all position data in the first and second non-volatile memories.

7. The method for power-off position memory and zero-return recovery of a tool magazine servo system according to claim 1, characterized in that: The first non-volatile memory is SPINOR Flash, used for long-term storage of periodic security anchors; The second non-volatile memory is FRAM ferroelectric memory, which is used to store emergency position snapshots when power is off. FRAM can be written quickly without pre-erasing, and no continuous power supply is required to maintain the stored data after power failure.

8. The method for power-off position memory and zero-return recovery of a tool magazine servo system according to claim 1, characterized in that: The emergency data packet includes the absolute position of the tool magazine, the number of multiple revolutions, a special identifier for emergency writing, and a CRC16 checksum; the anchor data packet includes the absolute position of the tool magazine, the number of multiple revolutions, a system timestamp, and a CRC16 checksum. Both types of data packets use cyclic redundancy check to ensure the integrity and reliability of the stored data.

9. The method for power-off position memory and zero-return recovery of a tool magazine servo system according to claim 1, characterized in that: After completing the zero-return start-up using data from the second non-volatile memory, a background silent verification step is executed. When the system performs the tool change action for the first time, the background thread continuously monitors the encoder index pulse or limit reference point. After capturing the reference point signal, the actual physical position is compared with the theoretical position calculated by FRAM. If the absolute value of the position deviation is less than 2 degrees, the silent verification is passed. If the deviation exceeds ±2 degrees, the position is automatically calibrated, and diagnostic prompt information is uploaded through the fieldbus.

10. The method for power-off position memory and zero-return recovery of a tool magazine servo system according to claim 1, characterized in that: The energy storage unit uses a miniature ceramic capacitor. After the capacitor is fully charged, it can continuously supply power to the main control unit and the second non-volatile memory for 5ms to 50ms. The system accumulates the number of emergency write failures and the number of silent verification position deviations. When the statistical value exceeds the preset threshold, it pushes an aging warning of the energy storage unit or storage medium to the host computer.