Motion synchronization implementation method and device based on numerical control system, numerical control machine tool and medium

By adding synchronization instructions to the CNC system, synchronous execution between motion instructions and IO port operation instructions is achieved, and the problem of lax timing of motion and IO control in the CNC system is solved, and the machining accuracy and machine tool stability are improved.

CN119806046APending Publication Date: 2025-04-11JINAN BODOR LASER CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411782484.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-05
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

In CNC systems, there are problems of independent and relatedness between the motion of the interpolation axis and the control of the IO port, resulting in a lack of strict timing between the motion command and the IO port operation command, which may lead to machining errors and equipment damage.

Method used

Motion synchronization is achieved by adding synchronization instructions between motion instructions and IO port operation instructions, ensuring strict execution of processing timing. The specific methods include initializing the CNC system state variable, judging the completion status of motion synchronization, parsing the motion instructions and IO operation instructions in the processing file, and waiting for the motion instructions to be in place before executing the IO port operation instructions.

Benefits of technology

It realizes strict synchronous execution between motion instructions and IO port operation instructions, avoids processing errors and equipment damage caused by timing disorders, and improves machining accuracy and stable operation of the machine tool.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119806046A_ABST
    Figure CN119806046A_ABST
Patent Text Reader

Abstract

The invention provides a motion synchronization implementation method and device based on a numerical control system, a numerical control machine tool and a medium, and belongs to the technical field of numerical control machine tools. Judging whether the motion synchronization is finished or not, and reading and analyzing the processing file line by line under the state that the current motion synchronization action is finished; and performing interpolation operation on the motion instruction of the analyzed processing file, and driving the actual motion of an external machine tool in a pulse form. Through a reasonable interpolation algorithm and a motion control strategy, the motion track and speed of the machine tool are optimized, and the machining efficiency is improved. By executing corresponding function logic operation on the non-motion instruction, the flexibility and expandability of the numerical control system are enhanced, different machining requirements are met, and stable operation of the system is 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 machine tools, and in particular relates to a method and device for realizing motion synchronization based on a numerical control system, a numerical control machine tool and a medium. Background Art

[0002] In CNC systems, the motion of interpolation axes and the control of IO ports are usually treated as two relatively independent parts, and parallel processing is adopted, which can significantly improve the performance and efficiency of CNC systems.

[0003] At present, in actual processing application scenarios, the movement of the interpolation axis and the control of the IO port not only have independent parts, but also have interrelated parts. For example, in the actual processing process, when the user needs to execute the logical action of opening or closing the IO port after a certain motion instruction is completed and the movement is in place, the decoding module usually parses the processing file content in advance. Therefore, before the motion instruction generates an actual motion response, the decoding module may have been parsing and processing the operation of opening or closing the IO port. In this way, the actual external manifestation may be that the IO port has started to respond before the motion instruction action is completed, which may lead to a series of problems, such as opening or closing the cylinder at the wrong position, causing accidental collision damage to the cylinder, etc., which cannot meet the processing requirements and affect the stable operation of the machine tool. Summary of the invention

[0004] The present invention provides a method for realizing motion synchronization based on a numerical control system, which realizes motion synchronization by adding a synchronization instruction between a motion instruction and an IO port operation instruction, thereby ensuring strict execution of a processing sequence.

[0005] Methods include: In response to the initialization instruction, performing an initialization operation on the state variables of the numerical control system; Determine whether the motion synchronization is completed, and when the current motion synchronization action is completed, read and parse the processing file line by line. The parsed instructions include: motion instructions, motion synchronization instructions, and IO operation instructions.

[0006] The parsed motion instructions are interpolated and the actual motion of the external machine tool is driven in the form of pulses.

[0007] It should be further explained that, in the method, if the flag of the motion synchronization completion status is false, the current motion synchronization action is not completed, and the method waits for the motion synchronization action to be completed.

[0008] It should be further explained that the processing file is read and parsed line by line to parse out the motion synchronization instructions and the non-motion synchronization instructions.

[0009] It should be further explained that in the method, by judging whether the position to which the external machine tool actually moves is equal to the position of the interpolation end point, it can be judged whether the external machine tool has moved to the desired position.

[0010] It should be further explained that the step of performing the interpolation operation also includes: Determine whether the interpolation motion is in place, where the judgment condition is whether the actual motion position of the external machine tool is equal to the position of the interpolation end point: If the position to which the external machine tool actually moves is equal to the position of the interpolation end point, the interpolation movement is marked as in place, and the movement synchronization completion status is marked as true; If the position to which the external machine tool actually moves is not equal to the position of the interpolation end point, the interpolation movement is marked as not in place, the movement synchronization completion status is marked as false, and the process continues to wait for the interpolation movement to be in place.

[0011] It should be further explained that the method further includes: feeding back the system state variables of the actual motion state of the external machine tool to the decoding module.

[0012] It should be further explained that the step of performing the initialization operation on the state variables of the numerical control system also includes: Initialize the operation status based on the bool variable identification; The processing files are generated based on the CAM module; the processing files include: motion instructions, motion synchronization instructions and IO operation instructions.

[0013] The present application also provides a motion synchronization implementation device based on a numerical control system, the device comprising: An initialization module, used for performing an initialization operation on the state variables of the numerical control system in response to an initialization instruction; The decoding module is used to determine whether the motion synchronization is completed, and when the current motion synchronization action is completed, read and parse the processing file line by line; perform interpolation operations on the motion instructions of the parsed processing file, and the motion control processing module drives the actual movement of the external machine tool in the form of pulses; The state feedback module is used to feed back the system state variables of the actual motion state of the external machine tool to the decoding module.

[0014] According to another embodiment of the present application, a numerically controlled machine tool is provided, comprising 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 realizing motion synchronization based on a numerical control system when executing the program.

[0015] According to another embodiment of the present application, a storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the motion synchronization implementation method based on a numerical control system are implemented.

[0016] It can be seen from the above technical solutions that the present invention has the following advantages: In the motion synchronization implementation method based on the numerical control system provided in this application, When encountering a motion synchronization instruction, wait for the motion instruction before the motion synchronization instruction to move in place before parsing the next line of the processing file. If there is no motion synchronization instruction, the next line of the processing file will be parsed directly. When the state of motion synchronization completion is received, the blockage will be canceled, and the reading and parsing of the processing file content will continue. In this way, the motion instructions before the motion synchronization instruction will move to the actual interpolation end point position, and the parallel IO port operation instructions will be executed after the motion synchronization instruction, which can ensure the strict execution timing between the motion instruction and the IO port operation instruction.

[0017] This application decomposes the complex motion trajectory into a series of tiny stepping instructions through interpolation operations, thereby ensuring that the machine tool can move accurately according to the predetermined trajectory and improving the processing accuracy. By processing the motion synchronization instruction SYNC, the strict synchronization between the motion instruction and the IO instruction is ensured to avoid processing problems or equipment damage caused by asynchrony. It also optimizes the motion trajectory and speed of the machine tool and improves the processing efficiency through reasonable interpolation algorithms and motion control strategies. By performing corresponding functional logic operations on non-motion instructions, the flexibility and scalability of the CNC system are enhanced to meet different processing requirements and ensure the stable operation of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solution of the present invention, the accompanying drawings required for use in the description will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0019] Figure 1 It is a flow chart of the method for realizing motion synchronization based on numerical control system; Figure 2 It is a flow chart of an embodiment of a method for realizing motion synchronization based on a numerical control system; Figure 3 It is a schematic diagram of a motion synchronization implementation device based on a numerical control system; Figure 4 Schematic diagram of CNC machine tools. DETAILED DESCRIPTION

[0020] The following will describe in detail the steps of the motion synchronization implementation method based on the numerical control system. For the purpose of illustration rather than limitation, specific details such as specific system structures and technologies are proposed to facilitate a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application can also be implemented in other embodiments without these specific details.

[0021] The motion synchronization implementation method based on the numerical control system involved in the present application is that the motion instructions before the motion synchronization instruction are all moved to the actual interpolation end point position, and the parallel IO port operation instructions are executed after the motion synchronization instruction, which can ensure the execution timing between the motion instructions and the IO port operation instructions.

[0022] In the CNC system involved in this application, interpolation motion and IO port control are the main processes for achieving precision machining and automated operation. Ensuring the execution timing between motion instructions and IO port operation instructions can ensure machining accuracy and mechanical safety.

[0023] With respect to the interpolation motion process involved in the present application, interpolation is a process in which a machine tool numerical control system determines the tool motion trajectory according to a preset method.

[0024] The CNC system can calculate the movement of the tool in each micro-time period through the interpolation algorithm based on the given part contour shape and size. The interpolation algorithm can use linear interpolation and circular interpolation, etc., and continuously calculate the feed instructions of each coordinate axis involved in the interpolation motion based on the geometric characteristics of the planned path.

[0025] The motion instructions involved in the present application are sent to the servo drive system through the numerical control system, driving the servo motor to move according to the feed instructions calculated by interpolation.

[0026] During the movement, each coordinate axis moves in coordination according to the instructions to ensure that the tool can process according to the predetermined trajectory.

[0027] When the tool moves to the interpolation end point according to the interpolation instruction, the CNC system will detect and confirm the arrival. If the position to which the machine tool actually moves based on the motion instruction completely coincides with the position of the interpolation end point, motion synchronization is completed.

[0028] In this way, the method can avoid processing errors caused by timing confusion by ensuring the execution timing between the motion instruction and the IO port operation instruction. It can also perform precise processing according to the predetermined trajectory to improve the processing accuracy and surface quality of the parts. Executing the IO port operation instruction after the motion synchronization instruction can ensure that the control operation of the external device is performed when the mechanical part is in a stable state. Prevent mechanical failures or safety accidents caused by unstable movement of mechanical parts.

[0029] It should be understood that when used in the present specification, the term "includes" indicates the presence of the described features, integral bodies, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integral bodies, steps, operations, elements, components and / or their collections. The terms "include", "comprise", "have" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.

[0030] It should be understood that the "one or more" mentioned in this application refers to one, two or more than two, and the "multiple" mentioned in this application refers to two or more. In the description of this application, unless otherwise specified, " / " means or, for example, A / B can mean A or B. The "and / or" in this article is just a way to describe the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.

[0031] The phrases such as "one embodiment" or "some embodiments" described in the present application mean that the specific features, structures or characteristics described in the embodiment are included in one or more embodiments of the present application. Therefore, the phrases such as "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments" etc. that appear in different places in the present application do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways.

[0032] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0033] See also Figure 1 The figure is a flow chart of a method for realizing motion synchronization based on a numerical control system in a specific embodiment, the method comprising: S101: In response to an initialization instruction, an initialization operation is performed on the state variables of the numerical control system.

[0034] In some embodiments, when the CNC system receives the initialization instruction, the CNC system performs self-checking and preparation, and checks and resets all state variables related to motion control, including but not limited to the position, speed, acceleration, current interpolation state, etc. of each axis.

[0035] Optionally, initialization may include checking and calibrating hardware devices such as servo motors, sensors, encoders, etc. to ensure that they are in the correct initial state. This embodiment may also load default parameters and configurations of the system to prepare for subsequent processing tasks.

[0036] This embodiment can ensure that the numerical control system can stably and reliably start a new processing task through the initialization operation. By resetting the state variables and calibrating the equipment, it can avoid the interference of the current processing caused by the residual state information of the previous processing task.

[0037] S102: Determine whether the motion synchronization is completed, and read and parse the processing file line by line when the current motion synchronization action is completed.

[0038] In this embodiment, a line of code is read from the processing file of the numerical control system and parsed. If the current line of code is parsed as a non-motion synchronization instruction, it is directly sent to the motion control processing module for processing.

[0039] If the current line of code is interpreted as a motion synchronization instruction, the motion synchronization completion status SyncReady is set to false.

[0040] It should be noted that the present application can parse motion instructions, motion synchronization instructions, and IO operation instructions by reading and parsing the processing file line by line. In this embodiment, only the motion instructions need to perform interpolation operations, and the IO operation instructions do not need to perform interpolation.

[0041] The purpose of interpolation is to insert intermediate points between known data points in the CNC system according to the given feed speed and contour line shape requirements. The intermediate coordinate values ​​of the motion trajectory can be output, so that the machine tool servo drive system can control the coordinated motion of each coordinate axis to process the predetermined geometric shape.

[0042] In the processing of CNC systems, the contour shapes of the workpieces being processed vary greatly. In order to meet the requirements of geometric dimensional accuracy, the motion trajectory of the tool needs to accurately follow the contour curve of the part. Interpolation operations can process data points between the starting point and the end point of the processing trajectory curve, so that the tool moves along these tiny straight line segments, thereby approaching the required contour curve.

[0043] The IO operation instructions of this embodiment mainly involve data exchange and control with external devices, such as start, stop, read, write, etc. These operations usually do not require precise control of the processing trajectory, but focus on data transmission and processing.

[0044] Interpolation operations are mainly used to precisely control the machining trajectory, such as interpolation of straight lines, arcs, or other curves. However, IO operation instructions do not involve the control of machining trajectories, so interpolation operations do not need to be performed.

[0045] In the CNC system, interpolation operations are performed only for motion instructions that require precise control of the machining trajectory, while no interpolation operations are performed for IO operation instructions.

[0046] In some embodiments, after receiving the processing file, the numerical control system first performs lexical analysis and grammatical analysis. The lexical analysis used in this embodiment can decompose the file content into a series of words or tags.

[0047] Optionally, the machining file can be parsed for keywords, variables, operators, etc. Syntax analysis combines the words or tags of the machining file into meaningful statements or instructions according to the grammatical rules of the NC programming language. After parsing the motion instructions, check whether the motion instructions need to be executed synchronously. For instructions that need to be synchronized, process them to ensure that the machine tool can move synchronously.

[0048] In this embodiment, after the motion instruction synchronization action is completed, the remaining instructions are decoded and converted into line codes that can be understood by the machine tool.

[0049] In this embodiment, non-motion synchronization instructions are parsed, such as auxiliary function instructions, such as coolant switch, tool change, etc., and will be executed according to the program logic.

[0050] It can be seen that this embodiment can accurately parse and decode to ensure that the numerical control system can correctly perform the processing task. By synchronously processing the motion instructions, it can be ensured that the axes of the machine tool maintain a coordinated and consistent motion state during the processing.

[0051] In this embodiment, the non-motion synchronization instructions are parsed to realize the control in the processing and improve the processing efficiency and quality.

[0052] In this embodiment, the interpolation operation is performed on the interpolation instruction of the non-motion instruction, and when the actual motion position of the machine tool is equal to the position of the interpolation end point, it is defined as the interpolation motion in place state, and the motion instruction is completed.

[0053] In some embodiments, for the interpolation instructions in the non-motion synchronization instructions, interpolation calculation is performed. The interpolation calculation can calculate the position points reached by each axis of the machine tool during the motion process according to the given starting point, end point and path parameters.

[0054] In this embodiment, during the actual movement of the machine tool, the actual position and the target position calculated by interpolation are continuously compared. When the actual position and the position of the interpolation end point are equal or within a predetermined error range, the system considers that the interpolation movement is in place, which can be defined as the completion of movement synchronization.

[0055] Through interpolation calculation and real-time comparison of actual position, it can be ensured that each axis of the machine tool moves accurately according to the predetermined trajectory and speed.

[0056] S103: Perform interpolation operation on the motion instructions of the parsed processing file, and drive the actual movement of the external machine tool in the form of pulses.

[0057] In some embodiments, after the machine tool completes the motion synchronization task, the current system state variables are recorded.

[0058] Optionally, the state variables include but are not limited to the position, speed, acceleration, current interpolation state, error code, etc. of each axis. The state variables and processing information are formed into a motion synchronization implementation log. The processing information may include: processing time, processing file name, etc.

[0059] The log of this embodiment can be stored in the memory, and can also be exported to an external storage device for subsequent analysis and processing.

[0060] The method of this embodiment records the system state variables and motion synchronization implementation log, which is convenient for subsequent tracing and analysis of the processing process. By analyzing the log information, the actual motion state and performance of the machine tool during the processing can be understood, and the stability and reliability of the CNC system can be improved.

[0061] Further, as a refinement and expansion of the specific implementation of the above embodiment, in order to fully illustrate the specific implementation process of this embodiment, as shown below Figure 2 An example of a motion synchronization implementation method in the following embodiment is shown. For the convenience of explanation, the method can be executed using an initialization module, a decoding module, a motion control processing module and a state feedback module.

[0062] Specifically, the decoding module can parse the content of the processing file, the motion control processing module is used to control the actual movement of the machine tool according to the content analyzed by the decoding module, and the state feedback module is used to periodically feedback the actual movement state of the machine tool. Then, the decoding module can know the actual movement state of the machine tool through the information of the machine tool movement state fed back by the state feedback module. The present invention realizes motion control synchronization through the collaborative work among the decoding module, the motion control processing module and the state feedback module.

[0063] The specific execution steps can be performed in the following manner.

[0064] The initialization module performs initialization operations on the system state variables, wherein the motion synchronization completion state is defined as a bool type variable SyncReady, and the motion synchronization completion state variable SyncReady is set to true.

[0065] In an exemplary embodiment, SyncReady can be used to indicate whether motion synchronization has been completed. When the synchronization operation is successfully completed, the definition variable is set to true; if the synchronization operation has not been completed or failed, it may remain false.

[0066] In the CNC system, the value of SyncReady can be used to decide whether to continue subsequent processing tasks or perform other operations that depend on the completion of synchronization, ensuring that the system runs in the predetermined order and logic, and avoiding operations that may cause errors when synchronization is not completed.

[0067] If SyncReady remains false for a long time, error handling mechanisms can be triggered, such as issuing an alert, recording an error log, or attempting to re-execute the synchronization operation.

[0068] In this embodiment, a bool type variable defines a global variable, class or structure, and declares a SyncReady variable to specify the type. In this embodiment, according to the characteristics of the synchronization operation, the initial value of SyncReady is set to true, and when a synchronization instruction is encountered, it is set to false, and then set to true after the synchronization operation is completed.

[0069] During the implementation of the synchronization operation, the value of SyncReady is updated through control structures such as conditional judgments and loops. When all steps of the synchronization operation are successfully completed, SyncReady is set to true; if any errors or exceptions are encountered during the synchronization process, it may be necessary to set it to false and trigger the corresponding error handling code.

[0070] In this embodiment, in order to ensure the completion of the motion instruction synchronization action and implement a complex synchronization mechanism, synchronization signals, timers, interrupts or synchronization control algorithms can be used. The SyncReady variable can be used as an indicator of the synchronization state to transfer states and condition judgments between different stages of the synchronization operation.

[0071] In this embodiment, the decoding module is used to parse the content of the processed file, and read and parse the content information of the processed file line by line.

[0072] The processing file File is usually generated by CAM. The content of the processing file File includes common instruction formats such as F / G00 / G01 / M30 and the customized instruction format of the present invention, and also includes the synchronization instruction SYNC and the IO instruction LASER_ON for turning on the laser.

[0073] The present invention inserts the synchronization instruction SYNC between the motion instruction G00 and the IO instruction LASER_ON, so as to realize the synchronous execution between the motion instruction and the IO instruction in a strict sense. The specific steps of realizing motion synchronization inside the decoding module are as follows: Step S201 : before reading and parsing the content of the processing file, the decoding module first determines whether the motion synchronization has been completed, and the determination condition is that the motion synchronization completion state SyncReady is true.

[0074] S201-1, if the motion synchronization completion state SyncReady is true, indicating that the current motion synchronization action has been completed, then enter step S202 to continue the decoding operation.

[0075] S201 - 2, if the motion synchronization completion state SyncReady is false, indicating that the current motion synchronization action is not completed, then return to step S201 and wait for the motion synchronization action to be completed.

[0076] Step S202, read a line of code from the processing file File and parse it, and the decoding module processes the motion synchronization instruction and the non-motion synchronization instruction in the following manner.

[0077] S202-1, if the current line of code is parsed as a non-motion synchronization instruction, it is directly sent to the motion control processing module for processing.

[0078] S202-2, if the current line of code is parsed as a motion synchronization instruction, the motion synchronization completion state SyncReady is set to false, and the process returns to step S201 to wait for the motion synchronization to be completed.

[0079] It should be noted that the machining file File can be generated by CAM. The machining file includes common instruction formats such as F / G00 / G01 / M30 and user-defined instruction formats.

[0080] Alternatively, F / G00 / G01 / M30 can be interpreted as: F: specified feed rate; G00: idle movement; G01: linear interpolation movement; M30: end of program.

[0081] The custom command format includes the synchronization command SYNC and the IO command LASER_ON for turning on the laser.

[0082] In this embodiment, in order to solve the problem of diversified ways of interpreting the contents of the processed files, if hard-coded matching is adopted character by character, there will be problems such as frequent pointer manipulation, easy errors, and difficulty in processing blank characters such as spaces.

[0083] The file content parsing method of this embodiment adopts lexical and grammatical analysis to parse the content, and the parsing method has the advantages of being easy to read and easy to expand.

[0084] For example, by inserting the synchronization instruction SYNC between the motion instruction G00 and the IO instruction LASER_ON, the strictly synchronous execution between the motion instruction and the IO instruction can be achieved.

[0085] In an exemplary embodiment, in order to extract the instructions and data in the file so that the CNC system can understand and execute the instructions, the processing file contains various instructions for controlling the machine tool to process, such as G code motion instructions, IO instructions (such as laser on, off, etc.), etc.

[0086] In the exemplary embodiment, the parsed content mainly includes each line of code in the processing file File. The line code includes G00, G01, etc., which are used to control the linear and circular movements of the machine tool; LASER_ON, LASER_OFF, etc., which are used to control the switch of the external device. The parsed line code can be converted into a format that can be recognized by the CNC system, and the machine tool operation can be controlled according to the instructions.

[0087] In this embodiment, strict synchronous execution between motion instructions and IO instructions is achieved by inserting a synchronization instruction SYNC between the motion instructions and the IO instructions. The purpose of this is to ensure that the machine tool can be accurately turned on or off when it reaches a certain position or state, thereby achieving precise control during the processing and improving processing efficiency.

[0088] For the motion control processing module, it can further process the content of the processing file parsed by the decoding module, perform corresponding interpolation operations on the motion instructions, and finally drive the actual movement of the external machine tool in the form of pulses, and perform corresponding functional logic operations on non-motion instructions.

[0089] For example, for the IO port instruction, the corresponding operation of opening / closing the IO port is executed. The motion control processing module's processing of the motion synchronization instruction SYNC mainly focuses on the processing of the motion instruction moving into place. By judging whether the actual position of the external machine tool is equal to the position of the interpolation end point, it can be judged whether the external machine tool has moved into place.

[0090] In this embodiment, the specific steps of the motion control processing module to achieve motion synchronization are as follows: Step S301, judging whether the interpolation motion is in place, the judging condition is whether the position to which the external machine tool actually moves is equal to the position of the interpolation end point.

[0091] S301-1: If the position to which the external machine tool actually moves is equal to the position of the interpolation end point, indicating that the interpolation movement is in place, the movement synchronization completion state SyncReady is set to true.

[0092] S301-2: If the position to which the external machine tool actually moves is not equal to the position of the interpolation end point, indicating that the interpolation motion is not in place, the motion synchronization completion state SyncReady is set to false, and the process returns to step S301 to continue waiting for the interpolation motion to be in place.

[0093] The state feedback module in this embodiment periodically feeds back the system state variables reflecting the actual motion state of the machine tool.

[0094] Since the decoding module only reads and parses the contents of the processing file, and only the motion control processing module can know the actual position of the machine tool, the state feedback module is required to periodically feedback the actual motion status of the machine tool. In this way, the decoding module can know the actual motion information of the machine tool through the system status fed back by these state feedback modules, and then the decoding module and the motion control processing module can realize strict motion synchronization control.

[0095] In some specific embodiments, interpolation operations are performed on motion instructions to decompose continuous motion instructions in a numerical control system into pulses that are sent to a servo system of a machine tool, thereby driving the machine tool to move precisely along a predetermined trajectory.

[0096] The interpolation operation of this embodiment can ensure that the machine tool can smoothly and accurately complete the complex motion trajectory during the machining process, thereby improving the machining accuracy and efficiency.

[0097] The processing method of the motion synchronization instruction SYNC in this embodiment can ensure the strict synchronization execution between the motion instruction and the IO instruction.

[0098] Specifically: when the machine tool executes the SYNC instruction, it determines whether the motion instruction before SYNC is in place. If so, it will parse and execute the IO instruction.

[0099] When the IO instruction is ready, the subsequent motion instruction can be executed to ensure strict synchronization between the motion instruction and the IO instruction. In this way, it can be ensured that when the machine tool executes to a specific position or state, it can be accurately turned on or off, thereby achieving precise control during the processing.

[0100] In this embodiment, it is determined whether the position to which the external machine tool actually moves is equal to the position of the interpolation end point by comparing the coordinate values ​​or position information of the two, which can be achieved in the following manner: the current position information of the machine tool is acquired in real time. The current position information is compared with the end point position information calculated by the interpolation algorithm. If the difference between the two is within a predetermined error range, or meets the accuracy requirement, it is considered that the motion synchronization is completed.

[0101] Since various errors may exist during the movement of the machine tool, the judgment condition can set an error range to ensure the accuracy and reliability of the judgment.

[0102] S204: Periodically feed back the system state variables reflecting the actual motion state of the machine tool.

[0103] In this embodiment, since only the content of the processing file is read and parsed, and only the motion control processing module knows the actual position to which the machine tool has moved, the actual movement status of the machine tool is periodically fed back upward. In this way, the upward feedback of the system status can enable the decoding module to learn the actual movement information of the machine tool, thereby realizing strict motion synchronization control.

[0104] The following is an embodiment of a motion synchronization implementation device based on a numerical control system provided in an embodiment of the present disclosure. The device and the motion synchronization implementation method based on a numerical control system in the above-mentioned embodiments belong to the same inventive concept. For details not fully described in the embodiment of the motion synchronization implementation device based on a numerical control system, reference can be made to the embodiment of the motion synchronization implementation method based on a numerical control system.

[0105] like Figure 3 As shown, the device includes: an initialization module, a decoding module, a motion control processing module and a state feedback module; The initialization module is used to respond to the initialization instruction and perform the initialization operation on the state variables of the CNC system; the decoding module is used to determine whether the motion synchronization is completed, and when the current motion synchronization action is completed, read and parse the processing file line by line; the motion instruction of the parsed processing file is interpolated, and the motion control processing module drives the actual movement of the external machine tool in the form of pulses; the state feedback module is used to feed back the system state variables of the actual motion state of the external machine tool to the upper computer.

[0106] In the motion synchronization implementation device based on the numerical control system involved in the present application, motion control synchronization is achieved through the collaborative work between the decoding module, the motion control processing module and the state feedback module. When the decoding module encounters a motion synchronization instruction, the decoding module is blocked from reading and parsing the content of the current processing file, and at the same time waits for the motion instruction before the motion synchronization instruction to move in place. The movement of the motion instruction in place is processed by the motion control processing module.

[0107] The motion control processing module performs interpolation operations on the received motion instructions, and finally converts them into actual movements of the external machine tool in the form of pulses. Then, it judges whether the motion instruction has been moved in place according to the actual position of the external machine tool movement and the position of the motion instruction interpolation end point, and periodically feeds back the status of motion synchronization completion to the decoding module through the status feedback module. When the decoding module receives the status of motion synchronization completion, it will cancel the blocking of the decoding module, and then the decoding module will continue to read and parse the content of the processing file.

[0108] In this way, the motion instructions before the motion synchronization instruction move to the actual interpolation end point position, and the parallel IO port operation instructions are executed after the motion synchronization instruction, which can ensure the strict execution timing between the motion instructions and the IO port operation instructions.

[0109] Based on the above-mentioned method for realizing motion synchronization based on a numerical control system, this embodiment also provides a numerical control machine tool, such as Figure 4 As shown, it includes a memory 102, a processor 101, and a computer program stored in the memory 102 and executable on the processor 101. When the processor 101 executes the program, the steps of the motion synchronization implementation method based on the numerical control system are implemented.

[0110] In the embodiment of the present application, the processor 101 can be implemented by using at least one of an application-specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a programmable logic device (PLD), a field programmable gate array (FPGA), a processor, a controller, a microcontroller, a microprocessor, and an electronic unit designed to perform the functions described herein. In some cases, such an implementation can be implemented in a controller. For software implementation, implementations such as processes or functions can be implemented with separate software modules that allow execution of at least one function or operation. The software code can be implemented by a software application (or program) written in any appropriate programming language, and the software code can be stored in a memory and executed by a controller.

[0111] The processor provides users with wireless Internet access through the network module, realizing the transmission and communication of data information in this application.

[0112] According to actual needs, a display unit 103 may also be provided, and the display unit may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.

[0113] The input of data and instructions for the numerical control system may include but is not limited to a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be described in detail here.

[0114] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0115] The embodiment also provides a storage medium storing a program product capable of implementing the motion synchronization implementation method based on a numerical control system of the present specification.

[0116] In some possible implementations, various aspects of the present disclosure may also be implemented in the form of a program product, which includes program code. When the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps of various exemplary implementations of the present disclosure described in the above “Exemplary Method” section of this specification.

[0117] The storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0118] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one 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. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for realizing motion synchronization based on a numerical control system, characterized in that: Methods include: In response to the initialization instruction, performing an initialization operation on the state variables of the numerical control system; Determine whether the motion synchronization is completed, and read and parse the processing file line by line when the current motion synchronization action is completed; the parsed instructions include: motion instructions, motion synchronization instructions, and IO operation instructions; The parsed motion instructions are interpolated and the actual motion of the external machine tool is driven in the form of pulses.

2. The method for realizing motion synchronization based on a numerical control system according to claim 1, characterized in that: In the method, if the flag of the motion synchronization completion status is false, the current motion synchronization action is not completed, and the motion synchronization action is waited for to be completed.

3. The method for realizing motion synchronization based on a numerical control system according to claim 1, characterized in that: The processing file is read and parsed line by line to parse out the motion synchronization instructions and non-motion synchronization instructions.

4. The method for realizing motion synchronization based on a numerical control system according to claim 1, characterized in that: In the method, by judging whether the position to which the external machine tool actually moves is equal to the position of the interpolation end point, it can be judged whether the external machine tool has moved to the position.

5. The method for realizing motion synchronization based on a numerical control system according to claim 4, characterized in that: The steps of performing the interpolation operation also include: Determine whether the interpolation motion is in place, where the judgment condition is whether the actual motion position of the external machine tool is equal to the position of the interpolation end point: If the position to which the external machine tool actually moves is equal to the position of the interpolation end point, the interpolation movement is marked as in place, and the movement synchronization completion status is marked as true; If the position to which the external machine tool actually moves is not equal to the position of the interpolation end point, the interpolation movement is marked as not in place, the movement synchronization completion status is marked as false, and the process continues to wait for the interpolation movement to be in place.

6. The method for realizing motion synchronization based on a numerical control system according to claim 1, characterized in that: The method also includes: feeding back the system state variables of the actual motion state of the external machine tool to the decoding module.

7. The method for realizing motion synchronization based on a numerical control system according to claim 1, characterized in that: The step of performing initialization operation on the state variables of the numerical control system also includes: Initialize the operation status based on the bool variable identification; The processing files are generated based on the CAM module; the processing files include: motion instructions, motion synchronization instructions and IO operation instructions.

8. A motion synchronization implementation device based on a numerical control system, characterized in that: The device is used to implement the motion synchronization implementation method based on a numerical control system as described in any one of claims 1 to 7; The device includes: An initialization module, used for performing an initialization operation on the state variables of the numerical control system in response to an initialization instruction; The decoding module is used to determine whether the motion synchronization is completed, and when the current motion synchronization action is completed, read and parse the processing file line by line; perform interpolation operations on the motion instructions of the parsed processing file, and the motion control processing module drives the actual movement of the external machine tool in the form of pulses; The state feedback module is used to feed back the system state variables of the actual motion state of the external machine tool to the decoding module.

9. A numerically controlled machine tool, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the method for realizing motion synchronization based on a numerical control system as described in any one of claims 1 to 7 are implemented.

10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for realizing motion synchronization based on a numerical control system as claimed in any one of claims 1 to 7 are implemented.