Power-off control method and device for servo drive system

By caching historical control commands in the servo motor driver and monitoring the status of the synchronization bus, synchronous rollback of the servo drive system is achieved, solving the problem of workpiece and equipment protection when CNC machine tools experience abnormal power failure, and improving safety and reliability.

CN121906349APending Publication Date: 2026-04-21BEIJING JINGDIAO GRP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511945988.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-22
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

When a CNC machine tool experiences an abnormal power outage, the servo drive system cannot control the motor to stop in a controlled manner, resulting in workpiece damage and loss of machine tool accuracy. Existing methods cannot effectively avoid collisions and damage.

Method used

By caching historical control commands in the servo motor driver and monitoring the status of the synchronization bus, the timing of the synchronization backoff trigger is determined, and deceleration braking and reverse backoff operations are performed to ensure synchronous linkage of multiple servo motor drivers.

Benefits of technology

It improves the safety and intelligence of abnormal power failure handling in servo drive systems, protects workpieces and equipment, avoids collisions and damage, and enhances the reliability of CNC machine tools.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121906349A_ABST
    Figure CN121906349A_ABST
Patent Text Reader

Abstract

The invention provides a power-off control method and device for a servo driving system, and the method comprises the steps: responding to a power-off alarm signal of the servo driving system, and executing deceleration braking; determining the braking moments of all servo motor drivers as synchronous rollback triggering moments; based on the synchronous fallback triggering moment, a historical control instruction is called from an instruction cache region, and a fallback operation is executed according to a reverse time sequence of the historical control instruction; wherein the historical control instruction in the instruction cache region is obtained by receiving a real-time control instruction issued by a numerical control system in the servo driving system in real time in the operation process of the servo motor driver and storing the real-time control instruction according to a receiving time sequence. Safety and intelligence of abnormal power failure processing of the servo driving system are improved, workpiece and equipment protection during power failure of the numerical control machine tool is better achieved, and reliability of workpiece and equipment protection during power failure of the numerical control machine tool is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of industrial control technology, and in particular to a power-off control method and device for a servo drive system. Background Technology

[0002] Sometimes, the servo drive system of CNC machine tools will encounter abnormal power outages during the machining process. At this time, because the machine tool cannot be controlled to power down according to the process and the machine tool's operating status is uncertain at the moment of power outage, there is a high probability that the machine tool's moving mechanism will collide, causing damage to the workpiece being processed, loss of machine tool accuracy, or even machine tool damage, resulting in huge economic losses.

[0003] Existing methods for controlling servo drive systems after an abnormal power outage typically involve stopping the motor as quickly as possible after detecting the power failure, achieving a controlled braking process. However, this simple controlled braking cannot move the machine away from the workpiece. After a power outage, mechanical backlash, especially on gravity axes, can still cause collisions, leading to workpiece damage or machine tool shaft deformation that could compromise precision.

[0004] Improving the reliability of workpiece and equipment protection during power outages in CNC machine tools is a crucial issue that the industry urgently needs to address. Summary of the Invention

[0005] This invention provides a power failure control method and device for a servo drive system, which improves the reliability of workpiece and equipment protection when a CNC machine tool is powered off.

[0006] This invention provides a power-off control method for a servo drive system, applicable to multiple servo motor drivers in a servo drive system, comprising the following steps: In response to the power failure alarm signal of the servo drive system, deceleration and braking are performed. The moment when all servo motor drivers come to a complete stop is determined as the synchronous backoff trigger moment; Based on the synchronous rollback trigger time, historical control instructions are retrieved from the instruction buffer and the rollback operation is executed in reverse order of the historical control instructions. The historical control instructions in the instruction buffer are obtained by the servo motor driver receiving real-time control instructions from the CNC system in the servo drive system during operation and storing the real-time control instructions according to the receiving sequence.

[0007] According to the power-off control method of a servo drive system provided by the present invention, the plurality of servo motor drivers are respectively connected to the servo drive system through a wired-AND logic synchronization bus, and determining the time when all servo motor drivers stop as the synchronization backoff trigger time includes: Monitor the level state of the synchronization bus, and when it is determined that the level state of the synchronization bus changes from the first level signal to the second level signal, confirm that all servo motor drivers stop, and determine the change time as the synchronization back-off trigger time; Wherein, the first level signal is a signal output by each servo motor driver to the synchronous bus indicating that it is in an unstopped state; the second level signal is a signal output by each servo motor driver to the synchronous bus indicating that it is in a stopped state.

[0008] According to the power-off control method of a servo drive system provided by the present invention, the step of performing deceleration and braking includes: Obtain the preset deceleration time parameter; Based on the preset deceleration time parameter, a deceleration curve is determined, and based on the deceleration curve, the motor is controlled to decelerate to zero speed within the duration of the preset deceleration time parameter.

[0009] According to the power-off control method of a servo drive system provided by the present invention, before performing the rollback operation according to the reverse timing of the historical control instructions, the method further includes: Determine the displacement increment generated by the servo motor driver from the moment it receives the power failure alarm signal to the moment it triggers the synchronization backoff; Control the motor to reverse the displacement increment.

[0010] According to the power-off control method of a servo drive system provided by the present invention, the storage process of the real-time control command includes: A first-in-first-out queue structure is constructed in the instruction buffer; During the operation of the servo motor driver, the received real-time control commands are written into the queue structure in the order of receipt. When the queue structure is full, the earliest real-time control command stored in the queue structure is discarded, and the latest received real-time control command is written into the queue structure.

[0011] According to a power-off control method for a servo drive system provided by the present invention, before writing the received real-time control commands sequentially into the queue structure according to the receiving time sequence, the method further includes: Analyze whether the real-time control command contains a flag to prevent rollback; If it is determined that the real-time control instruction includes the anti-backoff flag, then storing the real-time control instruction into the queue structure is stopped.

[0012] According to the power failure control method of the servo drive system provided by the present invention, the power failure alarm signal is generated when the AC input power waveform of the servo drive system is abnormally missing, or when the DC bus voltage of the servo drive system is lower than a preset voltage threshold.

[0013] The present invention also provides a power-off control device for a servo drive system, applied to multiple servo motor drivers in a servo drive system, comprising the following modules: The stop module is used to perform deceleration and braking in response to the power failure alarm signal of the servo drive system; The trigger timing determination module is used to determine the moment when all servo motor drivers stop as the synchronous backoff trigger timing; The rollback module is used to retrieve historical control instructions from the instruction buffer based on the synchronous rollback trigger time, and execute the rollback operation in reverse order of the historical control instructions; The historical control instructions in the instruction buffer are obtained by the servo motor driver receiving real-time control instructions from the CNC system in the servo drive system during operation and storing the real-time control instructions according to the receiving sequence.

[0014] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the program to implement a power-off control method for any of the servo drive systems described above.

[0015] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the power-off control method of any of the above-described servo drive systems.

[0016] The power failure control method and apparatus for a servo drive system provided by this invention caches historical control commands on the servo motor driver side and determines the synchronous rollback trigger time for all servo motor drivers to stop. This allows multiple servo motor drivers in the servo drive system to synchronously execute rollback operations in the event of a power failure. This improves the safety and intelligence of abnormal power failure handling in the servo drive system, better protects the workpiece and equipment during CNC machine tool power failures, and enhances the reliability of workpiece and equipment protection during CNC machine tool power failures. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0018] Figure 1 This is a flowchart illustrating the power-off control method for the servo drive system provided by the present invention.

[0019] Figure 2 This is a schematic diagram of the servo drive system provided by the present invention.

[0020] Figure 3 This is a schematic diagram of the synchronous bus topology provided by the present invention.

[0021] Figure 4 This is a schematic diagram of the rollback processing time displacement provided by the present invention.

[0022] Figure 5 This is a schematic diagram of the control instruction cache provided by the present invention.

[0023] Figure 6 This is a schematic diagram of the power-off control device for the servo drive system provided by the present invention.

[0024] Figure 7 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

[0025] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0026] CNC machine tools are high-value industrial equipment. During machining, CNC machine tools sometimes encounter abnormal power outages. Because the machine tool cannot be controlled and its operating status is uncertain at the time of the power outage, there is a high probability of collisions occurring in the machine tool's moving parts, causing damage to the workpiece being machined, loss of machine tool accuracy, or even complete machine damage, resulting in significant economic losses. Therefore, it is essential to have comprehensive protection measures in place for potential abnormal power outages of CNC machine tools.

[0027] The first step in handling abnormal power outages in CNC machine tools is to achieve rapid detection of power failures. When an abnormal power outage occurs, the CNC system or servo drive system of the machine tool should be quickly notified. Various methods exist for detecting abnormal power outages, including using the machine tool's phase sequence monitor module, employing a separate power failure detection module, and integrating power failure detection into the servo motor driver. The power supply being detected also varies; some detect AC power, while others detect the DC bus of the driver.

[0028] When a power outage is detected, the drive system or CNC machine tool system will respond according to a preset program. Among the relevant methods applied to servo drive systems, there are two power outage handling methods: one is to control the motor to stop as quickly as possible after a power outage is detected, achieving controlled braking; the other is that when an abnormal power outage is detected, the driver controls the motor to move according to a preset acceleration / deceleration curve, performing deceleration and retraction operations, keeping each axis away from the workpiece being machined to avoid collisions.

[0029] Among the related methods that rely solely on servo drive systems to handle abnormal power outages, the first method simply provides controlled braking and cannot move the machine away from the workpiece. After the equipment is powered off, due to mechanical clearances, especially the clearances of the gravity axis, collisions still occur, leading to workpiece damage or machine tool axis deformation that impairs accuracy. The second power outage handling method can move the machine away from the workpiece and avoid collisions, but in complex machining scenarios on five-axis CNC machine tools, individual axis retraction is not applicable, and the retraction motion itself may even cause collisions.

[0030] To address the shortcomings of related methods, this invention provides a power-off control method for a servo drive system, applicable to multiple servo motor drivers in a servo drive system. Figure 1 This is a flowchart illustrating the power-off control method for the servo drive system provided by the present invention, as shown below. Figure 1 As shown, it includes the following: Step 110: In response to the power failure alarm signal of the servo drive system, deceleration and braking are performed; Step 120: Determine the moment when all servo motor drivers come to a complete stop as the synchronous backoff trigger moment; Step 130: Based on the synchronous rollback trigger time, retrieve the historical control instructions from the instruction buffer and execute the rollback operation in reverse order of the historical control instructions; The historical control instructions in the instruction buffer are obtained by the servo motor driver receiving real-time control instructions from the CNC system in the servo drive system during operation and storing the real-time control instructions according to the receiving sequence.

[0031] Specifically, in step 110, in response to the power failure alarm signal of the servo drive system, deceleration and braking are performed.

[0032] In this invention, the servo drive system is applied to high-precision machining equipment such as CNC machine tools. When a power outage occurs due to an abnormal power grid supply or an internal system malfunction, emergency procedures are required to protect the workpiece surface from scratches and the machine tool's mechanical structure from collisions.

[0033] A power failure alarm signal can be issued by the detection circuit in the servo drive system to indicate that the current power supply is insufficient to maintain normal processing operation. Upon receiving the power failure alarm signal, each servo motor driver will cease executing the original processing commands and immediately enter a deceleration and braking state to prevent the motor from running out of control after power failure.

[0034] Optionally, multiple servo motor drivers can be connected to the servo drive system separately via a wired-AND logic synchronization bus. Receiving power failure alarm signals can be done through synchronization signals; that is, the rectifier unit in the servo drive system pulls the synchronization bus low to send a power alarm to all servo motor drivers. Upon detecting the high-to-low signal, all servo motor drivers synchronously begin deceleration and braking. It should be noted that synchronous deceleration and braking are crucial; if all servo motor drivers do not perform deceleration and braking synchronously, it may lead to deviation from the machining path.

[0035] In step 120, the moment when all servo motor drivers stop is determined as the synchronous backoff trigger moment.

[0036] Since a servo drive system contains multiple servo motor drivers (which may correspond to multiple axes of a machine tool), the load, speed, and mechanical characteristics of each axis may be different, so the time it takes for them to come to a complete stop may vary slightly.

[0037] To ensure that multi-axis machine tools maintain the relationship between their axes during retraction, the retraction action must begin uniformly only after all servo motor drives have completely stopped. This unified moment when all drives have come to a complete stop is the synchronous retraction trigger moment.

[0038] In step 130, based on the synchronous rollback trigger time, historical control instructions are retrieved from the instruction buffer and the rollback operation is performed in reverse order of the historical control instructions.

[0039] In this invention, the servo motor driver has an internal instruction buffer. This instruction buffer is used to store historical control instructions. These historical control instructions are obtained by the servo motor driver during its previous normal operation by receiving real-time control instructions from the CNC system and storing them according to the order of receipt.

[0040] Multiple servo motor drivers can simultaneously control the motors to perform retraction operations. When a CNC machine tool encounters an abnormal power outage, it can retract in the opposite direction of the motion path before the power outage to avoid damaging the workpiece. This ensures that the motors of each axis of the machine tool are controlled to stop safely and power off, and that the gravity axis does not fall off.

[0041] Specifically, the real-time control commands issued by the CNC system typically include position increment information (such as the displacement within a unit command cycle), which can specifically include information on the speed and direction of motion. Once the synchronous backtracking trigger moment is determined, the servo motor driver reads the previously stored commands from the command buffer, but the order of reading and execution is the reverse of the storage order, i.e., reverse reading, thereby driving the motor to move in the opposite direction along the previous motion trajectory, achieving backtracking.

[0042] Understandably, the servo drive system has a built-in position command cache function, which can independently complete power failure processing without relying on the CNC system; it can broadcast and interact with information during power failure at high speed and reliability through the internal bus, and can realize the synchronous operation of multiple drives in time; through high time synchronization, it can realize multi-axis linkage backtracking, solve the protection problem of abnormal power failure under complex machining paths, and has a high degree of automation and high reliability.

[0043] Based on the power-off control method for the servo drive system provided by this invention, the constructed CNC machine tool servo drive system can be as follows: Figure 2 The structural schematic diagram of the servo drive system provided by this invention is shown.

[0044] The system includes a rectifier unit with a common DC bus, an energy storage unit, a numerical control system or other control system, multiple servo motor drivers, multiple motors, a synchronous bus, and a servo drive control bus with a daisy-chain topology.

[0045] The power failure detection circuit is integrated into the rectifier unit of the servo drive system. When an abnormal power failure is detected, an alarm signal is issued. On the one hand, it notifies the machine tool CNC system that a power failure has occurred, stops sending position commands from the servo motor driver system, and starts the CNC system power failure handling program. On the other hand, it notifies all servo motor drivers to stop receiving CNC system position commands and immediately start the power failure handling program.

[0046] All servo motor drivers receive the power failure alarm signal from the rectifier unit almost synchronously via the internal bus within a very short time. Upon receiving the power failure alarm signal, they can reduce the speed to zero according to the preset deceleration time. During each position command cycle, the movement is uniform; therefore, as long as each axis performs deceleration and braking synchronously during deceleration, it can be ensured that the machine tool position remains on the machining path during and after deceleration, preventing overcutting of the workpiece. Each driver synchronously performs retraction after completing the braking motion.

[0047] The power failure control method for servo drive systems provided by this invention caches historical control commands on the servo motor driver side and determines the synchronous rollback trigger time for all servo motor drivers to stop. This allows multiple servo motor drivers in the servo drive system to synchronously execute rollback operations in the event of a power failure. This improves the safety and intelligence of abnormal power failure handling in servo drive systems, better protects workpieces and equipment during CNC machine tool power failures, and enhances the reliability of workpiece and equipment protection during CNC machine tool power failures.

[0048] In one embodiment, the plurality of servo motor drivers are respectively connected to the servo drive system via a wired-AND logic synchronization bus, and determining the moment when all servo motor drivers stop as the synchronization backoff trigger moment includes: Monitor the level state of the synchronization bus, and when it is determined that the level state of the synchronization bus changes from the first level signal to the second level signal, confirm that all servo motor drivers stop, and determine the change time as the synchronization back-off trigger time; Wherein, the first level signal is a signal output by each servo motor driver to the synchronous bus indicating that it is in an unstopped state; the second level signal is a signal output by each servo motor driver to the synchronous bus indicating that it is in a stopped state.

[0049] Multiple servo motor drivers are connected to the servo drive system via a wired-AND synchronous bus. It should be noted that the characteristic of wired-AND logic is that if any node on the bus outputs a low level, the entire bus is at a low level; the bus is only at a high level when all nodes output high levels.

[0050] Monitor the level status of the synchronization bus. When the level status of the synchronization bus changes from a first level signal to a second level signal, confirm that all servo motor drivers have stopped, and determine the change time as the synchronization back-off trigger time.

[0051] The first level signal is a signal output by each servo motor driver to the synchronization bus when it is in an unstopped state, such as a low level. When the servo motor driver is operating normally or performing deceleration and braking but has not yet completely stopped, it will output this first level signal to the synchronization bus, pulling the bus level low.

[0052] The second level signal is the signal output by each servo motor driver to the synchronous bus when it is in a braking state, such as a high level. When a servo motor driver completes the braking action, it will stop outputting the first level signal, for example, by releasing the bus, setting it to a high impedance state, or outputting a high level.

[0053] Only when all servo motor drivers in the system have come to a complete stop and all drivers have released control of the bus, i.e., have switched to outputting the second-level signal, will the overall level of the synchronization bus change, for example, from low to high. The rising or falling edge of this change serves as the trigger signal for all axes to synchronously begin retraction.

[0054] Optionally, when the servo motor drivers synchronously begin the reversing motion, each servo motor driver will report its status via the synchronization bus after completing the braking motion. The synchronization bus is a wired-AND logic bus, such as... Figure 3 The schematic diagram of the synchronous bus topology provided by this invention is a wire-AND logic circuit structure based on open-drain output. This circuit provides a high-level reference for the synchronization bus. R is a pull-up resistor, which pulls the voltage of the synchronization bus high in the default state. The MOSFET gate receives control signals from each module (rectifier module or servo motor driver). Whenever any module turns on its internal MOSFET (e.g., servo motor driver 1 detects a fault and sets its MOSFET gate high), the synchronization bus is directly connected to ground. This circuit shows the output circuit of the synchronization bus. Each servo motor driver detects the bus status while outputting. Each driver is at a low level when it has not completed braking; after braking, it sets the bus high. A low-to-high transition edge on the bus is considered a trigger signal to start the rollback. This enables state sharing and rapid linkage between multiple servo motor drivers.

[0055] In this way, multi-axis synchronous detection can be achieved without complex communication protocols, simply by utilizing the level characteristics of the hardware circuit, ensuring that all axes start retraction at the same time and guaranteeing retraction accuracy.

[0056] In one embodiment, the deceleration and braking includes: Obtain the preset deceleration time parameter; Based on the preset deceleration time parameter, a deceleration curve is determined, and based on the deceleration curve, the motor is controlled to decelerate to zero speed within the duration of the preset deceleration time parameter.

[0057] The preset deceleration time parameter can be configured according to the machine tool's mechanical characteristics and machining requirements. When a power failure alarm signal is received, the drive will not stop freely, but will instead plan a deceleration curve according to the set time parameter.

[0058] It should be noted that the motion is generally considered to be uniform within each position command cycle. Therefore, as long as the same deceleration time parameter is used for each axis, it can be guaranteed that the tool tip position remains on the original machining path during and after deceleration, without deviation that could lead to workpiece cutting. This parameter setting should be within the range of the driver's deceleration capability and should not cause excessive impact on the machine tool's mechanical structure.

[0059] In one embodiment, before performing the rollback operation in reverse sequence according to the historical control instructions, the method further includes: Determine the displacement increment generated by the servo motor driver from the moment it receives the power failure alarm signal to the moment it triggers the synchronization backoff; Control the motor to reverse the displacement increment.

[0060] During an actual power outage, from the moment the alarm signal is received and the motor begins to decelerate until it comes to a complete stop and the synchronous reversal triggers, the motor, although decelerating, still generates a displacement. If this displacement is not processed and the historical command is directly reversed, it will lead to positional errors.

[0061] Therefore, before performing the rollback operation in reverse sequence according to the historical control instructions, it is necessary to eliminate errors.

[0062] The displacement increment generated by the servo motor driver from the moment it receives the power failure alarm signal to the moment the synchronization reversal is triggered is determined. The displacement increment corresponds to the coasting distance during deceleration and braking.

[0063] Control the motor to reverse the displacement increment.

[0064] In practice, the servo motor driver records the difference between the position command at the moment of the power failure alarm and the actual position at the moment of final braking. When initiating rollback, the braking displacement is first reversed to return to the position where the power failure alarm occurred, and then the historical instructions in the instruction buffer are called one by one for subsequent rollback.

[0065] Optionally, when starting the rollback, special handling is required because the most recent position instruction has not yet completed. The driver will rollback according to the actual position increment of the last position instruction, following a one-instruction-cycle time plan. Then, it will execute the reverse motion one by one according to the cached position instructions to achieve the rollback motion. The rollback motion execution time-displacement graph is shown below. Figure 4 The schematic diagram of the rollback processing time displacement provided by this invention is shown.

[0066] From time t0 to t2, the driver operates normally according to the position commands of the machine tool CNC system, buffering the position commands with a command cycle Δt. At time t2, the driver receives a power failure alarm signal from the rectifier unit, begins deceleration and braking, and then... t Deceleration is completed almost simultaneously. All drives in the system are at t. t The deceleration process is completed at any given moment, so t t The time is also the trigger time for the backtracking motion. The steps from t1 to t2 represent the position instructions that were not fully executed, and there is also the step from t2 to t... t The displacement during the braking process, therefore the first command cycle t that begins the retraction motion. t The rollback from t3 is from t1 to t. t The displacement. After time t3, the driver gradually backs up according to the position instructions of the complete cache cycle.

[0067] During the retraction process, the drivers of multiple axes can move synchronously through the internal bus to achieve multi-axis linkage retraction, ensuring safe retraction under complex machining paths, moving away from the contour of the workpiece being machined, and ensuring the safety of the workpiece and machine tool equipment in the event of a power failure.

[0068] During the power outage reversal process, the rectifier unit in this device monitors the DC bus voltage. When the bus voltage drops to a preset threshold, it will be broadcast through the internal power bus. When each driver receives the signal, it will also decelerate and brake the motor according to the preset parameters to avoid uncontrolled movement after power failure.

[0069] In one embodiment, the stored procedure for the real-time control instructions includes: A first-in-first-out queue structure is constructed in the instruction buffer; During the operation of the servo motor driver, the received real-time control commands are written into the queue structure in the order of receipt. When the queue structure is full, the earliest real-time control command stored in the queue structure is discarded, and the latest received real-time control command is written into the queue structure.

[0070] Construct a first-in, first-out (FIFO) queue structure in the instruction buffer. The length of this queue (the number of instructions cached) can be set via parameters, for example, to cache 100 instructions.

[0071] During the operation of the servo motor driver, received real-time control commands are written into the queue structure sequentially according to their reception time. When the queue structure is full, the earliest real-time control command stored in the queue structure is discarded, and the most recently received real-time control command is written into the queue structure.

[0072] This circular caching mechanism ensures that the servo motor driver always retains the motion trajectory from the most recent period. In the event of a power outage, the path that was just executed needs to be rolled back, saving storage resources while meeting the requirements of power outage protection.

[0073] Optionally, taking a 62.5µs instruction cycle as an example, the servo motor driver stores real-time control instructions with directional position increments in 62.5µs units during normal operation to record the motion trajectory. A schematic diagram of the driver control instruction cache is shown below. Figure 5 The control instruction cache diagram provided by this invention is shown below. Real-time control instructions are organized in a queue structure; that is, when the cache size exceeds the required amount, the oldest record is discarded one by one. The number of cached instructions can be set as needed.

[0074] In one embodiment, before writing the received real-time control commands sequentially into the queue structure according to the receiving time sequence, the method further includes: Analyze whether the real-time control command contains a flag to prevent rollback; If it is determined that the real-time control instruction includes the anti-backoff flag, then storing the real-time control instruction into the queue structure is stopped.

[0075] In certain machining scenarios (such as rigid tapping), the tool and workpiece are tightly engaged. If the power is cut off and the tool is retracted arbitrarily, the tap or the workpiece thread may be damaged. Therefore, this invention provides a mechanism to prevent retraction.

[0076] If it is determined that the real-time control instruction includes the anti-backoff flag, then storing the real-time control instruction into the queue structure is stopped. Optionally, existing instructions in the current queue structure can also be cleared.

[0077] Once the flag is detected to be deactivated, the cached instructions restart. In this way, intelligent identification and protection of specific process segments are achieved, avoiding secondary damage caused by forced rollback.

[0078] In one embodiment, the power failure alarm signal is generated when the AC input power waveform of the servo drive system is abnormally missing, or when the DC bus voltage of the servo drive system is lower than a preset voltage threshold.

[0079] Specifically, the detection circuit can be integrated into the rectifier unit. For AC input power, a 1 / 4 power frequency sinusoidal waveform anomaly detection technology can be used to detect power failure within a very short time (e.g., within a quarter cycle) after the power supply becomes abnormal, thus buying valuable time for subsequent deceleration and back-off. At the same time, monitoring the DC bus voltage can assess the remaining energy of the system.

[0080] Optionally, during the rollback operation, the rectifier unit continuously monitors the DC bus voltage. If the bus voltage is detected to be too low before the rollback is complete, a signal will be sent again to force each driver to stop immediately, in order to prevent motor runaway due to insufficient voltage, maximize the use of remaining energy to protect the workpiece, and prioritize ensuring that the equipment does not run away when energy is insufficient.

[0081] The power-off control device for the servo drive system provided by the present invention is described below. The power-off control device for the servo drive system described below can be referred to in correspondence with the power-off control method for the servo drive system described above.

[0082] like Figure 6 As shown, the device includes: The stop module 610 is used to perform deceleration and braking in response to the power failure alarm signal of the servo drive system; The trigger timing determination module 620 is used to determine the moment when all servo motor drivers stop as the synchronous backoff trigger timing; The rollback module 630 is used to retrieve historical control instructions from the instruction buffer based on the synchronous rollback trigger time, and execute the rollback operation in the reverse sequence of the historical control instructions; The historical control instructions in the instruction buffer are obtained by the servo motor driver receiving real-time control instructions from the CNC system in the servo drive system during operation and storing the real-time control instructions according to the receiving sequence.

[0083] The power failure control device for a servo drive system provided by this invention caches historical control commands on the servo motor driver side and determines the synchronous rollback trigger time for all servo motor drivers to stop. This allows multiple servo motor drivers in the servo drive system to synchronously execute rollback operations in the event of a power failure. This improves the safety and intelligence of abnormal power failure handling in the servo drive system, better protects the workpiece and equipment during CNC machine tool power failures, and enhances the reliability of workpiece and equipment protection during CNC machine tool power failures.

[0084] In one embodiment, the stop module 610 is specifically used for: The multiple servo motor drivers are connected to the servo drive system via a wired-AND logic synchronization bus. Determining the moment when all servo motor drivers come to a complete stop as the synchronization backoff trigger moment includes: Monitor the level state of the synchronization bus, and when it is determined that the level state of the synchronization bus changes from the first level signal to the second level signal, confirm that all servo motor drivers stop, and determine the change time as the synchronization back-off trigger time; Wherein, the first level signal is a signal output by each servo motor driver to the synchronous bus indicating that it is in an unstopped state; the second level signal is a signal output by each servo motor driver to the synchronous bus indicating that it is in a stopped state.

[0085] In one embodiment, the stop module 610 is further configured to: The deceleration and braking process includes: Obtain the preset deceleration time parameter; Based on the preset deceleration time parameter, a deceleration curve is determined, and based on the deceleration curve, the motor is controlled to decelerate to zero speed within the duration of the preset deceleration time parameter.

[0086] In one embodiment, the fallback module 630 is specifically used for: Before performing the rollback operation in reverse sequence according to the historical control instructions, the method further includes: Determine the displacement increment generated by the servo motor driver from the moment it receives the power failure alarm signal to the moment it triggers the synchronization backoff; Control the motor to reverse the displacement increment.

[0087] In one embodiment, the fallback module 630 is specifically used for: The stored procedure for determining the real-time control instructions includes: A first-in-first-out queue structure is constructed in the instruction buffer; During the operation of the servo motor driver, the received real-time control commands are written into the queue structure in the order of receipt. When the queue structure is full, the earliest real-time control command stored in the queue structure is discarded, and the latest received real-time control command is written into the queue structure.

[0088] In one embodiment, the rollback module 630 is further configured to: Before writing the received real-time control commands into the queue structure according to the receiving time sequence, the method further includes: Analyze whether the real-time control command contains a flag to prevent rollback; If it is determined that the real-time control instruction includes the anti-backoff flag, then storing the real-time control instruction into the queue structure is stopped.

[0089] In one embodiment, the stop module 610 is further configured to: The power failure alarm signal is determined to be generated when the AC input power waveform of the servo drive system is found to be abnormally missing, or when the DC bus voltage of the servo drive system is found to be lower than a preset voltage threshold.

[0090] Figure 7 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 7 As shown, the electronic device may include: a processor 710, a communications interface 720, a memory 730, and a communication bus 740, wherein the processor 710, the communications interface 720, and the memory 730 communicate with each other through the communication bus 740. The processor 710 can call logical instructions in the memory 730 to execute a power-off control method for the servo drive system, the method including: in response to a power-off alarm signal from the servo drive system, performing deceleration and braking; The moment when all servo motor drivers come to a complete stop is determined as the synchronous backoff trigger moment; Based on the synchronous rollback trigger time, historical control instructions are retrieved from the instruction buffer and the rollback operation is executed in reverse order of the historical control instructions. The historical control instructions in the instruction buffer are obtained by the servo motor driver receiving real-time control instructions from the CNC system in the servo drive system during operation and storing the real-time control instructions according to the receiving sequence.

[0091] Furthermore, the logical instructions in the aforementioned memory 730 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0092] On the other hand, the present invention also provides a computer program product, the computer program product including a computer program, the computer program being able to be stored on a non-transitory computer-readable storage medium, the computer program being executed by a processor, the computer being able to execute the power failure control method of the servo drive system provided by the above methods, the method including: in response to the power failure alarm signal of the servo drive system, performing deceleration and braking. The moment when all servo motor drivers come to a complete stop is determined as the synchronous backoff trigger moment; Based on the synchronous rollback trigger time, historical control instructions are retrieved from the instruction buffer and the rollback operation is executed in reverse order of the historical control instructions. The historical control instructions in the instruction buffer are obtained by the servo motor driver receiving real-time control instructions from the CNC system in the servo drive system during operation and storing the real-time control instructions according to the receiving sequence.

[0093] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a power-off control method for a servo drive system provided by the above methods, the method comprising: in response to a power-off alarm signal of the servo drive system, performing deceleration and braking; The moment when all servo motor drivers come to a complete stop is determined as the synchronous backoff trigger moment; Based on the synchronous rollback trigger time, historical control instructions are retrieved from the instruction buffer and the rollback operation is executed in reverse order of the historical control instructions. The historical control instructions in the instruction buffer are obtained by the servo motor driver receiving real-time control instructions from the CNC system in the servo drive system during operation and storing the real-time control instructions according to the receiving sequence.

[0094] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0095] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0096] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A power-off control method for a servo drive system, characterized in that, The method, which applies to multiple servo motor drivers in a servo drive system, includes: In response to the power failure alarm signal of the servo drive system, deceleration and braking are performed. The moment when all servo motor drivers come to a complete stop is determined as the synchronous backoff trigger moment; Based on the synchronous rollback trigger time, historical control instructions are retrieved from the instruction buffer and the rollback operation is executed in reverse order of the historical control instructions. The historical control instructions in the instruction buffer are obtained by the servo motor driver receiving real-time control instructions from the CNC system in the servo drive system during operation and storing the real-time control instructions according to the receiving sequence.

2. The power-off control method for the servo drive system according to claim 1, characterized in that, The multiple servo motor drivers are connected to the servo drive system via a wired-AND logic synchronization bus. Determining the moment when all servo motor drivers come to a complete stop as the synchronization backoff trigger moment includes: Monitor the level state of the synchronization bus, and when it is determined that the level state of the synchronization bus changes from the first level signal to the second level signal, confirm that all servo motor drivers stop, and determine the change time as the synchronization back-off trigger time; Wherein, the first level signal is a signal output by each servo motor driver to the synchronous bus indicating that it is in an unstopped state; the second level signal is a signal output by each servo motor driver to the synchronous bus indicating that it is in a stopped state.

3. The power-off control method for the servo drive system according to claim 1, characterized in that, The deceleration and braking process includes: Obtain the preset deceleration time parameter; Based on the preset deceleration time parameter, a deceleration curve is determined, and based on the deceleration curve, the motor is controlled to decelerate to zero speed within the duration of the preset deceleration time parameter.

4. The power-off control method for the servo drive system according to claim 1, characterized in that, Before performing the rollback operation in reverse sequence according to the historical control instructions, the method further includes: Determine the displacement increment generated by the servo motor driver from the moment it receives the power failure alarm signal to the moment it triggers the synchronization backoff; Control the motor to reverse the displacement increment.

5. The power-off control method for the servo drive system according to claim 1, characterized in that, The storage process for the real-time control commands includes: A first-in-first-out queue structure is constructed in the instruction buffer; During the operation of the servo motor driver, the received real-time control commands are written into the queue structure in the order of receipt. When the queue structure is full, the earliest real-time control command stored in the queue structure is discarded, and the latest received real-time control command is written into the queue structure.

6. The power-off control method for the servo drive system according to claim 5, characterized in that, Before writing the received real-time control commands into the queue structure in the order of receipt, the method further includes: Analyze whether the real-time control command contains a flag to prevent rollback; If it is determined that the real-time control instruction includes the anti-backoff flag, then storing the real-time control instruction into the queue structure is stopped.

7. The power-off control method for the servo drive system according to claim 1, characterized in that, The power failure alarm signal is generated when the AC input power waveform of the servo drive system is found to be abnormally missing, or when the DC bus voltage of the servo drive system is found to be lower than a preset voltage threshold.

8. A power-off control device for a servo drive system, characterized in that, Multiple servo motor drivers used in servo drive systems include: The stop module is used to perform deceleration and braking in response to the power failure alarm signal of the servo drive system; The trigger timing determination module is used to determine the moment when all servo motor drivers stop as the synchronous backoff trigger timing; The rollback module is used to retrieve historical control instructions from the instruction buffer based on the synchronous rollback trigger time, and execute the rollback operation in reverse order of the historical control instructions; The historical control instructions in the instruction buffer are obtained by the servo motor driver receiving real-time control instructions from the CNC system in the servo drive system during operation and storing the real-time control instructions according to the receiving sequence.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the power-off control method of the servo drive system as described in any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the power-off control method of the servo drive system as described in any one of claims 1 to 7.