Method and device for implementing power-off continuous switching in numerical control system and medium

By saving and reading breakpoint information in the CNC system in real time, rebuilding the instruction queue context, and restoring the machine tool attitude, the problem that the CNC system cannot automatically recover after power outage is solved, and efficient and accurate power outage is achieved, improving production efficiency and product quality.

CN120065909APending Publication Date: 2025-05-30JINAN BODOR LASER CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510232662.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-28
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

When a CNC system encounters a sudden power outage, it lacks an effective automatic recovery mechanism, which leads to abnormal interruption of the processing process. It requires manual reset of processing parameters and positioning of processing positions, which is time-consuming and labor-consuming, and easily leads to a decrease in processing accuracy and impact on production efficiency.

Method used

During the automatic processing process of the CNC system, the current processing information is saved to the breakpoint information file in real time. After the system restarts, the breakpoint information is read from the breakpoint information file, the instruction queue context is reconstructed, and the breakpoint instruction where the breakpoint is located is combined with the breakpoint information, and the breakpoint position is located, the motion command control machine tool is used to restore the posture before power outage, so as to realize the power outage and continuous cutting of the processing.

Benefits of technology

The CNC system can quickly and accurately restore to the processing state before power outage after power outage, without manual manual settings, significantly improving production efficiency, ensuring processing accuracy and product quality, reducing labor costs and risks caused by human operation errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120065909A_ABST
    Figure CN120065909A_ABST
Patent Text Reader

Abstract

The invention provides a power-off continuous switching implementation method and device in a numerical control system and a medium, and belongs to the technical field of numerical control machining.The method comprises the following steps that in the automatic machining process of the numerical control system, an instruction queue is executed, and current machining information is stored in a breakpoint information file in real time; when the numerical control system is powered off and restarted, reading breakpoint information from the breakpoint information file; reconstructing a context of the instruction queue, and combining breakpoint information to position a breakpoint instruction where a breakpoint is located and a position where the breakpoint is located; and controlling the machine tool to recover the posture before power failure by using the motion instruction, and performing power failure continuous cutting of processing by combining the breakpoint instruction and the position of the breakpoint. According to the method, the machining information is stored in real time, and machining is recovered after power failure restarting, so that resource waste caused by machining interruption due to power failure is effectively reduced, and meanwhile, the machining consistency and accuracy are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of numerical control machining, and particularly relates to a method, device and medium for realizing power-off continuous cutting in a numerical control system. Background Art

[0002] When the current numerical control system processes large-profile machining, it usually relies on a stable power supply to ensure the continuity and accuracy of the machining process. However, in practical applications, due to external force majeure factors such as power grid failures or equipment failures, the numerical control system may encounter sudden power outages, and the normal machining process will be abnormally interrupted. At present, conventional numerical control systems lack effective response mechanisms. Once powered off, after power is restored, they cannot automatically resume the machining state before the power outage. Often, it is necessary to manually reset machining parameters, position the machining location, etc. This not only consumes a large amount of time and labor costs, but also easily leads to a decrease in machining accuracy due to human operation errors, and even scrapping of the machined parts, seriously affecting production efficiency and product quality.

[0003] To address this problem, some numerical control systems on the market often continue machining through simple recovery mechanisms at present, but these methods have many deficiencies. For example, first, the recording of the state before power outage is not fine enough, resulting in inaccurate positioning during resumed machining, thereby affecting machining accuracy and workpiece quality. Second, although some numerical control systems provide the function of power-off continuous cutting, the implementation method is relatively rough, lacking the function of accurately positioning the break point in combination with instructions, which limits its application in complex machining tasks. In addition, although related patents have covered the power-off continuous cutting function of numerical control systems, most of them focus on improvements at the hardware level or simple software recovery mechanisms, and fail to comprehensively solve the problem of accurately restoring the machining state after power outage. Summary of the Invention

[0004] In a first aspect, an embodiment of the present application provides a method for realizing power-off continuous cutting in a numerical control system, including the following steps: S1. During the automatic machining process of the numerical control system, execute the instruction queue and save the current machining information to the break point information file in real time; S2. After the numerical control system is powered off and restarted, read the break point information from the break point information file; S3. Reconstruct the instruction queue context, and combine the break point information to locate the break point instruction and the position where the break point is located; S4. Use motion instructions to control the machine tool to resume the posture before power outage, and perform power-off continuous cutting of the machining in combination with the break point instruction and the position where the break point is located.

[0005] Further, the specific steps of step S1 are as follows: S11. After the numerical control system starts automatic machining, construct a break point information file; S12. Parse the processing file to generate an instruction queue, and execute the instruction queue to start automatic processing; S13. During the automatic processing, obtain the current processing information in real time, and save the current processing information to the breakpoint information file.

[0006] Furthermore, the specific steps of step S11 are as follows: S111. Set the format and fields for the breakpoint information file in advance. The fields include breakpoint id, breakpoint location, and breakpoint ratio; S112. When the numerical control system starts automatic processing, automatically generate an empty breakpoint information file; The specific steps of step S12 are as follows: S121. Obtain the processing file and parse it to obtain the processing instructions and execution order; S122. Generate an instruction queue according to the execution order of the instructions; S123. Start automatic processing, and take out the instructions from the instruction queue in the execution order and execute them in sequence; The specific steps of step S13 are as follows: S131. Obtain the current processing information in real time; the current processing information includes the current instruction id, the current processing location, and the ratio of the current processing location to the overall processing length of the current instruction; S132. Judge whether the breakpoint information file is empty; If it is, go to step S133; If not, go to step S134; S133. Create a breakpoint record in the breakpoint information file, fill the current instruction id into the breakpoint id field, fill the current processing location into the breakpoint location field, fill the ratio of the current processing location to the overall processing length of the current instruction into the breakpoint ratio field, and enter step S2; S134. Overwrite the original breakpoint record in the breakpoint information file, use the current instruction id to overwrite the content of the original breakpoint id field, use the current processing location to overwrite the content of the original breakpoint location field, and use the ratio of the current processing location to the instruction to overwrite the content of the original breakpoint ratio field.

[0007] Furthermore, the specific steps of step S2 are as follows: S21. Judge whether the numerical control system has a power failure and restart; If it is, go to step S23; If not, go to step S22; S22. Judge whether the automatic processing of the numerical control system is completed; If it is, delete the breakpoint information file and end; If not, return to step S13; S23. Obtain the breakpoint information file and read out the breakpoint information.

[0008] Furthermore, the specific steps of step S3 are as follows: S31. Obtain the processing file again and parse it, reconstruct the instruction queue, and then locate the instruction corresponding to the breakpoint in the instruction queue according to the breakpoint information and use it as the breakpoint instruction to complete the reconstruction of the instruction queue context; S32. Determine the location of the breakpoint according to the execution completion status of the breakpoint instruction located according to the breakpoint information.

[0009] Furthermore, the specific steps of step S31 are as follows: S311. Read the instructions in the instruction queue in sequence; S312. Obtain the current instruction id read; S313. Determine whether the current instruction id is the same as the breakpoint id in the breakpoint information file; If they are the same, go to step S315; If they are not the same, go to step S314; S314. Read the next instruction in the instruction queue and return to step S312; S315. Determine that the current instruction is the breakpoint instruction, determine the position of the breakpoint instruction in the instruction queue, and complete the reconstruction of the instruction queue context; The specific steps of step S32 are as follows: S321. Read the location where the breakpoint is located in the breakpoint information file; S322. Read the breakpoint ratio in the breakpoint information file.

[0010] Furthermore, the specific steps of step S4 are as follows: S41. The numerical control system issues the motion instruction G00 to the motion control layer according to the position where the breakpoint is located to pull the machine tool position and posture to the state before the breakpoint to complete the breakpoint positioning; S42. Judge the attribute of the breakpoint instruction; If the breakpoint instruction is a non-motion instruction, go to step S43; If the breakpoint instruction is a motion instruction, go to step S44; S43. Issue the breakpoint instruction to the motion control layer and execute the subsequent instructions according to the instruction queue context to end; S44. Issue both the position where the breakpoint is located and the breakpoint instruction to the motion control layer, execute the breakpoint instruction according to the position where the breakpoint is located, and then execute the subsequent instructions according to the instruction queue context.

[0011] Furthermore, the specific steps of step S44 are as follows: S441. Use the breakpoint ratio of the breakpoint instruction as the starting ratio, use the original end point of the breakpoint instruction as the end point, and use the position where the breakpoint is located as the starting point to send to the motion control for execution; S442. After the breakpoint instruction is executed, determine and execute the subsequent instructions according to the breakpoint instruction in combination with the instruction queue context.

[0012] In a second aspect, an embodiment of the present application further provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it implements the steps of the power-off resume cutting implementation method in the numerical control system as described in the first aspect.

[0013] In a third aspect, an embodiment of the present application further provides a storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the steps of the power-off resume cutting implementation method in the numerical control system as described in the first aspect.

[0014] As can be seen from the above technical solutions, the present invention has the following advantages: In the power-off resume cutting implementation method, device, and medium provided by the present application, when the numerical control system encounters a sudden power failure, it can quickly and accurately restore to the processing state before the power failure, without the need for manual re-setting of processing parameters and positioning of the processing position, avoiding a large amount of time waste, and significantly improving production efficiency; by accurately recording breakpoint information and reconstructing in combination with the instruction queue context, it can ensure the continuity of the processing trajectory, avoid the accumulation of processing errors caused by reprocessing after power-off restart, ensure the processing accuracy of products, improve product quality, and reduce the defective rate; reduce manual intervention and operation complexity, so that operators do not need to spend a lot of energy to handle subsequent processing restoration work after power-off, reducing labor costs, and at the same time reducing the risk brought by human operation errors. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solutions of the present invention, the drawings required for description will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0016] Figure 1 It is a schematic flowchart of an embodiment of the power-off resume cutting implementation method in the numerical control system of the present invention.

[0017] Figure 2 It is a schematic flowchart of another embodiment of the power-off resume cutting implementation method in the numerical control system of the present invention. DETAILED DESCRIPTION

[0018] In the following detailed description of the specific steps of the implementation method of power-off continuation cutting in a numerical control system, various embodiments of the present disclosure will be more comprehensively described. The present disclosure can have various embodiments, and adjustments and changes can be made therein. However, it should be understood that there is no intention to limit the various embodiments of the present disclosure to the specific embodiments disclosed herein, but the present disclosure should be understood to cover all adjustments, equivalents, and / or alternative solutions that fall within the spirit and scope of the various embodiments of the present disclosure.

[0019] Exemplarily speaking, when processing large profiles, the numerical control system usually highly depends on a stable power supply to ensure the continuity and accuracy of the processing flow. However, in actual operation, due to external force majeure factors such as power grid failures and equipment failures, the numerical control system may face sudden power outages, resulting in abnormal interruption of the processing process. Conventional numerical control systems on the current market often lack an effective automatic recovery mechanism after a power outage. Once the power supply is restored, the system usually cannot automatically return to the processing state before the power outage, but requires manual resetting of processing parameters, adjustment of processing positions, etc. This process not only takes time and effort but also is extremely likely to cause a decrease in processing accuracy due to human operation errors, and may even lead to scrapping of processed parts, thereby seriously affecting production efficiency and product quality.

[0020] To make up for this deficiency, although some numerical control systems with simple recovery mechanisms have emerged on the market, these systems still have many limitations. For example, their recording of the state before power outage is often not detailed enough, resulting in inaccurate positioning during the recovery of processing, thereby affecting processing accuracy and workpiece quality. In addition, although some systems already have the function of power-off continuation cutting, their implementation methods are relatively rough and lack the precise positioning ability closely combined with processing instructions, thus limiting their application scope in complex processing tasks. More notably, although there are already relevant patents related to the power-off continuation cutting function of numerical control systems, most of these patents focus on improvements at the hardware level or simple software recovery strategies and fail to fundamentally solve the problem of precise recovery of the processing state after a power outage.

[0021] In summary, the current power-off challenges faced by numerical control systems in processing large profiles are still severe, and more refined and intelligent power-off continuation cutting solutions are needed to address them.

[0022] In view of the above problems, this embodiment provides an implementation method of power-off continuation cutting in a numerical control system, which ensures the recoverability of processing information after a power outage through a power-off information file, and improves the stability and reliability of the processing process.

[0023] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0024] Please refer to Figure 1 The figure shows a flowchart of a method for realizing power-off continuous cutting in a numerical control system in a specific embodiment. The method includes the following steps: S1. During the automatic machining process of the numerical control system, execute the instruction queue and save the current machining information to the breakpoint information file in real time; It should be noted that by saving the current machining information in real time, such as the current instruction id, machining position, and ratio, the machining state at the moment of power-off can be accurately recorded when a power-off occurs. When the system restarts, it can be restored to the state before the power-off based on this information, ensuring the continuity of the machining process. At the same time, saving information in real time also guarantees the timeliness and accuracy of the data, avoiding continuous cutting errors caused by untimely information update. S2. After the numerical control system is powered off and restarted, read the breakpoint information from the breakpoint information file; It should be noted that the machining state information before the power-off can be quickly obtained after the power-off and restart. After the power-off and restart, by reading the breakpoint information file, the numerical control system can accurately know the instruction, position, and ratio where the breakpoint is located, providing data support for the reconstruction of the instruction queue context and the breakpoint continuous cutting operation, enabling the numerical control system to quickly locate the position where the breakpoint was before the power-off and obtain the machining state information before the power-off after the power-off and restart, and making preparations for resuming machining. S3. Reconstruct the instruction queue context and locate the breakpoint instruction and the breakpoint position where the breakpoint is located in combination with the breakpoint information; It should be noted that the reconstruction of the instruction queue context ensures that the numerical control system can execute in the correct instruction order. Combining the breakpoint information can accurately locate the instruction being executed and the position reached at the moment of power-off, providing a basis for breakpoint positioning and continuous cutting operations, ensuring that the machining process can be accurately restored from the breakpoint, and avoiding errors and time waste caused by re-machining. S4. Use motion instructions to control the machine tool to restore the posture before the power-off, and perform power-off continuous cutting of the machining in combination with the breakpoint instruction and the breakpoint position; It should be noted that by using motion commands to control the machine tool to return to the posture before power-off, the continuity of the machining trajectory can be ensured; by combining the breakpoint command and the position where the breakpoint is located for continuous cutting operation, different processing methods can be adopted according to the attributes of the breakpoint command, ensuring that the machining process can be correctly restored in various situations, improving the machining accuracy and efficiency, and finally realizing the power-off continuous cutting function of the numerical control system.

[0025] In this embodiment, through information preservation during the automatic machining process, information reading after power-off restart, instruction queue context reconstruction, and finally power-off continuous cutting, the numerical control system can achieve power-off continuous cutting according to the established logic, ensuring the continuity and stability of the machining process.

[0026] Furthermore, as a refinement and extension of the specific implementation manner of the above embodiment, in order to fully illustrate the specific implementation process in this embodiment, as Figure 2 shown, another method for implementing power-off continuous cutting in a numerical control system is provided, and this method includes the following steps: S1. During the automatic machining process of the numerical control system, execute the instruction queue and save the current machining information to the breakpoint information file in real time; the specific steps of step S1 are as follows: S11. After the numerical control system starts automatic machining, construct a breakpoint information file; S12. Analyze the machining file to generate an instruction queue, and execute the instruction queue to start automatic machining; S13. During the automatic machining process, obtain the current machining information in real time and save the current machining information to the breakpoint information file; It should be noted that by constructing a breakpoint information file, analyzing the machining file to generate an instruction queue, and saving the machining information in real time, the recording of breakpoint information can be carried out during the automatic machining process, providing a basis for subsequent continuous cutting operations after power-off restart, and ensuring that the continuous cutting function can be accurately executed; S2. When the numerical control system undergoes a power-off restart, read the breakpoint information from the breakpoint information file; the specific steps of step S2 are as follows: S21. Determine whether the numerical control system has undergone a power-off restart; If so, go to step S23; If not, go to step S22; S22. Determine whether the automatic machining of the numerical control system is completed; If so, delete the breakpoint information file and end; If not, return to step S13; S23. Obtain the breakpoint information file and read out the breakpoint information; It should be noted that by judging whether the numerical control system has a power failure and restart and whether the automatic processing is completed, the breakpoint information file is processed, so that corresponding processing can be made according to different system states, avoiding retaining unnecessary breakpoint information files after normal processing is completed, and ensuring that accurate breakpoint information can be obtained in time after a power failure and restart; S3. Reconstruct the instruction queue context, and combine the breakpoint information to locate the breakpoint instruction and the location where the breakpoint is located; The specific steps of step S3 are as follows: S31. Obtain the processing file again and parse it, reconstruct the instruction queue, and then locate the instruction corresponding to the breakpoint in the instruction queue according to the breakpoint information and use it as the breakpoint instruction to complete the reconstruction of the instruction queue context; S32. Locate the location where the breakpoint is located according to the execution completion status of the breakpoint instruction; S4. Use the motion instruction to control the machine tool to restore the posture before the power failure, and perform power-off continuous cutting of the processing in combination with the breakpoint instruction and the location where the breakpoint is located; The specific steps of step S4 are as follows: S41. The numerical control system issues a motion instruction G00 to the motion control layer according to the location where the breakpoint is located to pull the position and posture of the machine tool to the state before the breakpoint, and complete the breakpoint positioning; S42. Judge the attribute of the breakpoint instruction; If the breakpoint instruction is a non-motion instruction, go to step S43; If the breakpoint instruction is a motion instruction, go to step S44; S43. Issue the breakpoint instruction to the motion control layer and execute the subsequent instructions according to the instruction queue context, and end; S44. Send the location where the breakpoint is located and the breakpoint instruction to the motion control layer at the same time, execute the breakpoint instruction according to the location where the breakpoint is located, and then execute the subsequent instructions according to the instruction queue context; It should be noted that by breakpoint positioning and different processing methods according to the attributes of the breakpoint instructions, it can be ensured that the processing process can be correctly restored in various situations, ensuring the continuity and accuracy of the processing trajectory, and further ensuring the effective implementation of the power-off continuous cutting function.

[0027] In an embodiment of the present invention, based on step S11, step S12, and step S13, the following will give a possible embodiment to non-restrictively elaborate on its specific implementation scheme.

[0028] The specific steps of step S11 are as follows: S111. Set the format and fields for the breakpoint information file in advance, and the fields include breakpoint id, the location where the breakpoint is located, and the breakpoint ratio; S112. Set that when the numerical control system starts automatic processing, an empty breakpoint information file is automatically generated; It should be noted that the breakpoint ID is a number of the instructions issued to the motion control layer during the processing. Each instruction to be issued to the motion control layer will be assigned a unique breakpoint ID. The breakpoint ID is also the only identifier for locating the instruction where the breakpoint is located. The location of the breakpoint indicates the position where the normal processing is abnormally interrupted. The breakpoint ratio represents the ratio value corresponding to the position where the motion instruction is abnormally interrupted during the normal processing; for the motion instructions G00 / G01 / G02 / G03, in addition to the starting point and ending point of the processing, the information carried by each instruction also has a starting ratio and an ending ratio, and their range is [0, 1]. This ratio range identifies the starting point and ending point of the processing start. When the motion control layer processes the motion instruction interpolation, it will recalculate the starting point and ending point of the interpolation according to the starting ratio and the ending ratio. The starting ratio and the ending ratio can facilitate the processing when resuming cutting after a power failure; The specific steps of step S12 are as follows: S121. Obtain the processing file and parse it to obtain the processing instructions and the execution order; S122. Generate an instruction queue according to the execution order of the instructions; S123. Start automatic processing and sequentially take out the instructions from the instruction queue according to the execution order and execute them; The specific steps of step S13 are as follows: S131. Obtain the current processing information in real time; the current processing information includes the current instruction ID, the current processing position, and the ratio of the current processing position to the overall processing length of the current instruction; S132. Determine whether the breakpoint information file is empty; If so, go to step S133; If not, go to step S134; S133. Create a breakpoint record in the breakpoint information file, fill the current instruction ID into the breakpoint ID field, fill the current processing position into the breakpoint location field, fill the ratio of the current processing position to the overall processing length of the current instruction into the breakpoint ratio field, and go to step S2; S134. Overwrite the original breakpoint record in the breakpoint information file, use the current instruction ID to overwrite the content of the original breakpoint ID field, use the current processing position to overwrite the content of the original breakpoint location field, and use the ratio of the current processing position to the instruction to overwrite the content of the original breakpoint ratio field; It should be noted that by setting the format and fields for the breakpoint information file, parsing the processing file to generate an instruction queue, and operating on the breakpoint information file when saving the processing information in real time, it ensures the accurate recording and timely update of the breakpoint information, enabling the accurate breakpoint information to be obtained from the file after a power failure and restart, providing data support for the subsequent resume cutting operation.

[0029] In an embodiment of the present invention, based on steps S31 and S32, a possible embodiment will be given below to non - restrictively elaborate on its specific implementation scheme.

[0030] The specific steps of step S31 are as follows: S311. Read the instructions in the instruction queue in sequence; S312. Obtain the current instruction id of the read instruction; S313. Determine whether the current instruction id is the same as the breakpoint id in the breakpoint information file; If they are the same, go to step S315; If they are not the same, go to step S314; S314. Read the next instruction in the instruction queue and return to step S312; S315. Determine that the current instruction is the breakpoint instruction, determine the position of the breakpoint instruction in the instruction queue, and complete the reconstruction of the instruction queue context; The specific steps of step S32 are as follows: S321. Read the position where the breakpoint is located in the breakpoint information file; S322. Read the breakpoint ratio in the breakpoint information file; It should be noted that by comparing the instruction id to locate the breakpoint instruction and accurately read the position where the breakpoint is located and the breakpoint ratio, the position of the breakpoint instruction in the instruction queue can be quickly and accurately found, and at the same time, the accurate position where the breakpoint is located and the ratio information can be obtained, providing data support for subsequent motion control and continuous cutting operations.

[0031] In an embodiment of the present invention, based on step S44, a possible embodiment will be given below to non - restrictively elaborate on its specific implementation scheme.

[0032] The specific steps of step S44 are as follows: S441. Use the breakpoint ratio of the breakpoint instruction as the starting ratio, use the original end point of the breakpoint instruction as the end point, and use the position where the breakpoint is located as the starting point to send to the motion control and execute; S442. After the breakpoint instruction is executed, determine the subsequent instructions according to the breakpoint instruction combined with the instruction queue context and execute them; It should be noted that the setting of the starting ratio, starting point and end point when the breakpoint instruction is a motion instruction is limited, and the subsequent instructions are determined to ensure that after a power failure occurs during the execution of the motion instruction, it can be accurately restored from the position where the breakpoint is located, ensuring the continuity of the motion trajectory.

[0033] It should be understood that the magnitudes of the sequence numbers of the steps in the above embodiments do not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.

[0034] The method for realizing power-off continuation cutting in the numerical control system provided by the embodiment of the present application can be applied to an electronic device. Those skilled in the art can understand that the structure of the electronic device involved in the embodiment of the present invention does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine some components, or have different component arrangements. In the embodiment of the present invention, the electronic device includes, but is not limited to, a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as, a personal digital processor, a cellular phone, a smart phone, a wearable device, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the embodiment of the present application described herein and / or claimed.

[0035] The electronic device may include a processor, an external memory interface, an internal memory, a universal serial bus (USB) interface, a charging management module, a power management module, a battery, a wireless communication module, an audio module, a speaker, a microphone, a sensor module, a key, a camera, a display screen, and a SIM card interface, etc.

[0036] It can be understood that the structure schematically shown in the embodiment of the present application does not constitute a specific limitation on the electronic device. In other embodiments of the present application, the electronic device may include more or fewer components than shown in the figure, or combine some components, or split some components, or have different component arrangements. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0037] The processor may include one or more processing units. For example, the processor may include a central processing unit (CPU), etc., an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors.

[0038] Among them, the processor can be the nerve center and command center of the electronic device. The controller can generate operation control signals according to the instruction operation code and timing signals to complete the control of fetching instructions and executing instructions.

[0039] A memory can also be set in the processor for storing instructions and data. In some embodiments, the memory in the processor is a cache memory. This memory can save the instructions or data that the processor has just used or recycled. If the processor needs to use the instruction or data again, it can directly call it from this memory. This avoids repeated accesses, reduces the waiting time of the processor, and thus improves the system efficiency.

[0040] The above electronic device implements the technical solution of the power-off continuous cutting implementation method in the numerical control system of the present application. During the automatic machining process of the numerical control system, it executes the instruction queue and saves the current machining information to the breakpoint information file in real time; when the numerical control system is powered off and restarted, it reads the breakpoint information from the breakpoint information file; reconstructs the instruction queue context, and combines the breakpoint information to locate the breakpoint instruction where the breakpoint is located and the position where the breakpoint is located; uses motion instructions to control the machine tool to restore the posture before power-off, and performs power-off continuous cutting of the machining in combination with the breakpoint instruction and the position where the breakpoint is located, achieving the beneficial effects of effectively reducing the waste of resources caused by machining interruption due to power-off, and ensuring the consistency and accuracy of machining at the same time.

[0041] In the storage medium provided by the present application, there is a program product capable of implementing the power-off continuous cutting implementation method in the numerical control system.

[0042] The power-off continuous cutting implementation method in the numerical control system includes: during the automatic machining process of the numerical control system, executing the instruction queue and saving the current machining information to the breakpoint information file in real time; when the numerical control system is powered off and restarted, reading the breakpoint information from the breakpoint information file; reconstructing the instruction queue context, and combining the breakpoint information to locate the breakpoint instruction where the breakpoint is located and the position where the breakpoint is located; using motion instructions to control the machine tool to restore the posture before power-off, and performing power-off continuous cutting of the machining in combination with the breakpoint instruction and the position where the breakpoint is located.

[0043] In some possible implementation manners, the power-off continuous cutting implementation method in the numerical control system of the present disclosure can be implemented in the form of a program product, which includes program code. When the program product runs on a terminal device, the program code is used to cause the terminal device to execute the steps according to various exemplary embodiments of the present disclosure described in the above "Exemplary Method" section of this specification.

[0044] The storage medium of the present disclosure may employ any combination of one or more readable media. The readable media may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0045] The foregoing description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Thus, the present invention will not be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for implementing power-off continuous cutting in a numerical control system, characterized in that: The steps include: S1. During the automatic processing of the CNC system, the command queue is executed and the current processing information is saved in real time to the breakpoint information file; S2. When the CNC system is restarted after power failure, the breakpoint information is read from the breakpoint information file; S3. Reconstruct the instruction queue context, and locate the breakpoint instruction and the breakpoint position in combination with the breakpoint information; S4. Use motion instructions to control the machine tool to restore the posture before power failure, and combine the breakpoint instructions and the location of the breakpoint to perform power-off continuation cutting.

2. The method for implementing power-off continuous switching in a numerical control system according to claim 1, characterized in that: The specific steps of step S1 are as follows: S11. After the CNC system starts automatic processing, a breakpoint information file is constructed; S12. Analyze the processing file to generate an instruction queue, and execute the instruction queue to start automatic processing; S13. During the automatic processing, the current processing information is obtained in real time, and the current processing information is saved in a breakpoint information file.

3. The method for implementing power-off continuous switching in a numerical control system according to claim 2, characterized in that: The specific steps of step S11 are as follows: S111. Pre-set the format and fields for the breakpoint information file, the fields including the breakpoint id, the breakpoint location and the breakpoint ratio; S112. When the CNC system is set to start automatic processing, an empty breakpoint information file is automatically generated; The specific steps of step S12 are as follows: S121. Obtain the processing file and parse it to obtain the processing instructions and execution order; S122. Generate an instruction queue according to the execution order of the instructions; S123. Start automatic processing, take out instructions from the instruction queue and execute them in order; The specific steps of step S13 are as follows: S131 real-time acquisition of current processing information; the current processing information includes the current instruction id, the current processing position and the current processing position of the current instruction ratio of the overall processing length; S132. Determine whether the breakpoint information file is empty; If yes, go to step S133; If not, proceed to step S134; S133. Create a breakpoint record in the breakpoint information file, fill the current instruction id into the breakpoint id field, fill the current processing position into the breakpoint position field, fill the current processing position to the current instruction overall processing length ratio into the breakpoint ratio field, and proceed to step S2; S134. Overwrite the original breakpoint record in the breakpoint information file, use the current instruction id to overwrite the original breakpoint id field content, use the current processing position to overwrite the original breakpoint location field content, and use the ratio of the current processing position to the current instruction to overwrite the original breakpoint ratio field content.

4. The method for implementing power-off continuous switching in a numerical control system according to claim 3, characterized in that: The specific steps of step S2 are as follows: S21. Determine whether the CNC system is powered off and restarted; If yes, go to step S23; If not, proceed to step S22; S22. Determine whether the automatic processing of the CNC system is completed; If yes, delete the breakpoint information file and end; If not, return to step S13; S23. Obtain the breakpoint information file and read out the breakpoint information.

5. The method for implementing power-off continuous switching in a numerical control system according to claim 3, characterized in that: The specific steps of step S3 are as follows: S31. Get the processing file again and parse it, rebuild the instruction queue, and then locate the corresponding instruction in the instruction queue according to the breakpoint information and use it as the breakpoint instruction to complete the context reconstruction of the instruction queue; S32. Determine the location of the breakpoint based on the completion of the execution of the breakpoint instruction based on the breakpoint information.

6. The method for implementing power-off continuous switching in a numerical control system according to claim 5, characterized in that: The specific steps of step S31 are as follows: S311. Read the instructions in the instruction queue in sequence; S312. Get the current instruction ID read; S313. Determine whether the current instruction id is consistent with the breakpoint id in the breakpoint information file; If they are consistent, go to step S315; If they are not consistent, go to step S314; S314. Read the next instruction in the instruction queue and return to step S312; S315. Determine that the current instruction is a breakpoint instruction, determine the position of the breakpoint instruction in the instruction queue, and complete the context reconstruction of the instruction queue; The specific steps of step S32 are as follows: S321. Read the breakpoint information file where the breakpoint is located; S322. Read the breakpoint ratio from the breakpoint information file.

7. The method for implementing power-off continuous switching in a numerical control system according to claim 6, characterized in that: The specific steps of step S4 are as follows: S41. The CNC system sends a motion command G00 to the motion control layer according to the location of the breakpoint to pull the machine tool position and posture to the state before the breakpoint, completing the breakpoint positioning; S42. Determine the breakpoint instruction attribute; If the breakpoint instruction is a non-motion instruction, go to step S43; If the breakpoint instruction is a motion instruction, go to step S44; S43. Send a breakpoint instruction to the motion control layer, and execute subsequent instructions according to the instruction queue context, and end; S44. Send the breakpoint location and the breakpoint instruction to the motion control layer at the same time, execute the breakpoint instruction according to the breakpoint location, and then execute subsequent instructions according to the instruction queue context.

8. The method for implementing power-off continuous switching in a numerical control system according to claim 7, characterized in that: The specific steps of step S44 are as follows: S441. The breakpoint ratio of the breakpoint instruction is used as the starting ratio, the original end point of the breakpoint instruction is used as the end point, and the position of the breakpoint is used as the starting point to be sent to the motion control and executed; S442. After the breakpoint instruction is executed, the subsequent instruction is determined and executed according to the breakpoint instruction and the instruction queue context.

9. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method for implementing power-off and power-on switching in a numerical control system as claimed in any one of claims 1 to 8 when executing the program.

10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, the steps of the method for implementing power-off and power-on switching in a numerical control system as described in any one of claims 1 to 8 are implemented.