Numerically controlled machine tool, interference prevention control method, system, controller, and storage medium
By acquiring parameter information of CNC machine tools, generating a three-dimensional model, and calculating curvature values and distances, the problem of the inability to comprehensively prevent local and global interference of CNC machine tools in existing technologies is solved, achieving more accurate interference prevention.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GENESIS EQUIP (XIAN) CO LTD
- Filing Date
- 2024-12-31
- Publication Date
- 2026-06-30
AI Technical Summary
Existing technologies cannot effectively prevent local and global interference between moving parts in CNC machine tools. Offline simulation cannot guarantee consistency with the real environment, and real-time measurement is affected by the installation position and cannot fully prevent local interference.
By acquiring parameter information of the worktable, workpiece, and machining head, possible interference in the machining program is predicted, a three-dimensional model is generated, curvature values and distances are calculated, local and global interferences are determined, and machine tool movements are controlled to avoid interference.
It enables comprehensive prevention of local and global interference without installing measuring elements, improving the accuracy and efficiency of interference inspection and avoiding damage to equipment and workpieces.
Smart Images

Figure CN122308264A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of machine tool technology, and in particular to a CNC machine tool, an anti-interference control method, a system, a controller, and a storage medium. Background Technology
[0002] Monitoring and preventing interference between moving parts during CNC machine tool processing is crucial. Currently, the industry mainly uses two methods to monitor or prevent interference: (1) Using offline virtual machining simulation (e.g., Vericut software) to verify the machining program: After the machining program simulation verification is passed, actual machining is carried out; (2) Real-time distance measurement or motion posture perception: Cameras and sensors are installed at relevant positions on the machine tool to measure distance or perceive motion posture, and monitor the movement of each component in real time. For example, patent document CN104871100A provides a collision avoidance system for a machine tool, which uses a non-contact distance sensor to avoid collision accidents caused by operator error.
[0003] However, both of the above methods still have drawbacks: (1) The virtual processing environment of offline simulation cannot ensure that it is consistent with the real environment, and in practice, the processing of some workpieces requires the operator to manually input and modify the processing program; (2) The installation position of the camera and sensor affects the effect of distance measurement and motion posture perception, so it is difficult to effectively prevent motion interference; (3) Both of the above methods only focus on global interference, and do not propose targeted preventive measures for local interference. Summary of the Invention
[0004] The embodiments of this application aim to solve at least one of the problems of existing technologies. The embodiments of this application provide a CNC machine tool, an anti-interference control method, a system, a controller, and a storage medium to overcome the respective shortcomings of offline simulation and real-time measurement methods, and to effectively prevent both types of interference.
[0005] The technical solution of this application embodiment is as follows:
[0006] The first aspect of this application provides an anti-interference control method for a machine tool, the machine tool including a worktable for placing a workpiece and a machining head for machining the workpiece. The anti-interference control method for the machine tool includes:
[0007] The parameter information of the worktable, the parameter information of the workpiece, the parameter information of the processing head, and the processing program for processing the workpiece are obtained, wherein the parameter information includes position parameters, shape parameters, and size parameters.
[0008] Based on the next segment of the machining program, it is predicted whether the controlled position of the machining head or the controlled position of the worktable exceeds the corresponding preset threshold position. Based on the prediction result, it is preliminarily determined whether interference will occur during the execution of the next segment of the machining program.
[0009] If interference is initially determined to be possible, a three-dimensional model of the worktable envelope is generated based on the next segment of the machining program code, the parameter information of the worktable, and the parameter information of the workpiece. The curvature values of each envelope surface of the three-dimensional model of the worktable envelope are calculated. The reciprocal of the radius of the working end side of the machining head is compared with the curvature values of each envelope surface to determine whether there is local interference between the machining head and the worktable envelope and the determination result is output. The worktable envelope is a geometric body that can completely surround both the worktable and the workpiece.
[0010] If it is determined that there is no local interference between the processing head and the envelope of the worktable, the distance between the center point of the processing head and the envelope is measured; if the distance is not greater than the radius of the processing head, it is determined that there is global interference between the processing head and the envelope of the worktable and the judgment result is output.
[0011] Based on the judgment result, the machine tool's actions are controlled.
[0012] Optionally, calculating the curvature values of each envelope surface of the three-dimensional model of the worktable envelope, and comparing the reciprocal of the radius of the working end side of the machining head with the curvature values of each envelope surface to determine whether there is local interference between the machining head and the worktable envelope, further includes:
[0013] Calculate the curvature value of the envelope surface;
[0014] If the reciprocal of the radius of the working end side of the processing head is not greater than the curvature value of the envelope surface, then it is determined that there is local interference between the processing head and the envelope of the worktable.
[0015] Further, calculating the curvature value of the envelope surface further includes:
[0016] Randomly sample n1 points on the envelope surface;
[0017] Calculate the first principal curvature of each point on the envelope surface, and take the minimum value of each first principal curvature as the curvature value of the envelope surface, where n1 is an integer not less than 2.
[0018] Optionally, measuring the distance between the center point of the processing head and the envelope surface further includes:
[0019] Randomly sample n² points on the envelope surface;
[0020] The distance between the center point of the processing head and each sampling point is measured respectively, and the minimum value of each distance is taken as the distance between the center point of the processing head and the envelope surface, where n2 is an integer not less than 2.
[0021] Optionally, the anti-interference control method for the machine tool further includes: after initially determining that no interference will occur, and after determining that there is neither local interference nor global interference between the machining head and the worktable envelope, storing the next segment of the machining program code in a safe code cache area, and determining whether the machining head will interfere with at least one of the worktable and the workpiece during the execution of the next segment of the machining program code until all segments of the machining program are determined.
[0022] Optionally, based on the next segment of the machining program code and the three-dimensional model of the machine tool, it is predicted whether the controlled position of the machining head or the controlled position of the worktable in different working modes exceeds the corresponding preset threshold position, and based on the prediction result, it is preliminarily determined whether interference may occur during the execution of the next segment of the machining program code, further including:
[0023] Extract the real-time position information from the parameter information of the worktable and the real-time position information from the parameter information of the processing head;
[0024] If the current working mode is vertical working mode, it is predicted whether the controlled position of the processing head will be below the first threshold position, where the first threshold position is a preset position in the vertical direction; if so, it is determined that interference may occur.
[0025] If the current working mode is horizontal working mode, it is predicted whether the controlled position of the processing head will be below the second threshold position, where the second threshold position is a preset position in the vertical direction; if so, it is predicted whether the controlled position of the worktable will exceed the third threshold position, where the third threshold position is a preset position in the horizontal direction; if so, it is determined that interference may occur.
[0026] A second aspect of this application provides an anti-interference control system for a machine tool, the machine tool including a worktable for placing a workpiece and a machining head for machining the workpiece, comprising:
[0027] The acquisition module is used to acquire parameter information of the worktable, parameter information of the workpiece, parameter information of the processing head, and processing program for processing the workpiece, wherein the parameter information includes position parameters, shape parameters, and size parameters.
[0028] The preliminary judgment module is used to predict whether the controlled position of the machining head or the controlled position of the worktable exceeds the corresponding preset threshold position based on the next segment of the machining program code, and to preliminarily determine whether interference will occur during the execution of the next segment of the machining program code based on the prediction result.
[0029] The local interference determination module is used to generate a three-dimensional model of the worktable envelope during the execution of the next segment of the machining program based on the next segment of the machining program code, the parameter information of the worktable, and the parameter information of the workpiece, when it is initially determined that interference may occur. The module calculates the curvature value of each envelope surface of the three-dimensional model of the worktable envelope and compares the reciprocal of the radius of the working end side of the machining head with the curvature value of each envelope surface to determine whether there is local interference between the machining head and the worktable envelope. The worktable envelope is a geometric body that can completely surround both the worktable and the workpiece.
[0030] A global interference determination module is used to, when determining that there is no local interference on any of the envelope surfaces of the machining head and the worktable envelope, measure the distance between the center point of the machining head and the envelope surface for the envelope surface where no local interference exists; if the distance is not greater than the radius of the machining head, then it is determined that there is global interference between the machining head and the worktable envelope; and
[0031] The control module is used to control the operation of the machine tool based on the judgment result.
[0032] A third aspect of this application provides a controller for a CNC machine tool, the controller storing a computer program including program instructions adapted for loading by a processor to execute steps in the anti-interference control method for a machine tool as described in any of the technical solutions of the first aspect of this application.
[0033] A fourth aspect of this application provides a CNC machine tool, the CNC machine tool including a worktable for placing workpieces and a machining head for machining workpieces, and further including an anti-interference control system for the machine tool as described in the technical solution of the second aspect of this application or a controller applied to the CNC machine tool as described in the technical solution of the third aspect of this application, wherein the controller is at least used to control the movement of the machining head and the worktable.
[0034] A fifth aspect of this application provides a computer-readable storage medium storing a computer program, the computer program including program instructions adapted for loading by a processor to perform steps in the anti-interference control method for a machine tool as described in any of the technical solutions of the first aspect of this application.
[0035] A sixth aspect of this application provides a computer program product comprising program instructions adapted for loading by a processor to perform steps in an anti-interference control method for a machine tool as described in any of the technical solutions of the first aspect of this application.
[0036] The anti-interference control method for machine tools in this application embodiment has at least the following technical effects: This application embodiment adopts an online interference check method, overcoming the deficiency that offline simulation virtual machining environments cannot ensure consistency with the real environment; and by using program code to predict the curvature value and distance between the machining head and the workpiece / worktable in the next step, interference checks can be performed without installing measuring elements. Furthermore, in this application embodiment, both local and global interference are determined separately, thus taking into account the checks for both types of interference. The method provides a more comprehensive consideration of how to avoid interference between the machining head and the workpiece / worktable.
[0037] The other aspects mentioned above in the embodiments of this application (controller, CNC machine tool, anti-interference control system of machine tool and storage medium) also have at least the technical effects of the anti-interference control method of machine tool in the foregoing embodiments, and will not be repeated here.
[0038] Additional aspects and advantages of this application will be set forth in part in the description which follows. Some will become apparent from the description, or may be learned by practice of this application. Attached Figure Description
[0039] Figure 1 This is a flowchart illustrating the anti-interference control method for machine tools in some embodiments of the first aspect of this application;
[0040] Figure 2 for Figure 1 A flowchart illustrating some specific steps in the anti-interference control method for machine tools;
[0041] Figure 3 for Figure 1 A flowchart illustrating some specific steps in the anti-interference control method for machine tools;
[0042] Figure 4 This is a flowchart illustrating the anti-interference control method for machine tools in some embodiments of the first aspect of this application;
[0043] Figure 5(a) is a simplified schematic diagram (vertical working mode) of a CNC machine tool in some embodiments of the fourth aspect of this application;
[0044] Figure 5(b) is a simplified schematic diagram of another working mode of the CNC machine tool in 5(a) (horizontal working mode).
[0045] In the picture:
[0046] 10-Swivel head; 12-Spindle box; 14-Spindle box mounting base; 20-Turntable; 30-Workpiece; 40-Bed; 50-Column; 60-Slide plate. Detailed Implementation
[0047] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the accompanying drawings used in the description of the embodiments of this application or the prior art will be briefly introduced below.
[0048] Obviously, the accompanying drawings described below are merely some embodiments of this application. Those skilled in the art can obtain drawings of other embodiments based on the technical solutions illustrated in these drawings without any inventive effort.
[0049] It should be understood that "multiple" as used herein refers to two or more. In the description of this application, unless otherwise stated, " / " means "or", for example, "A / B" means A or B; "and / or" in this document is merely a description of the relationship between related objects, and it can represent three relationships, for example, "A and / or B" can represent: A exists alone, A and B exist simultaneously, B exists alone, etc.
[0050] Furthermore, in order to clearly describe the technical solutions of the embodiments of this application, the terms "first" or "second" are used in the embodiments of this application to distinguish identical or similar items with substantially the same function and effect. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and the terms "first" and "second" are not necessarily different.
[0051] Please see Figures 1 to 4 The first aspect of this application provides an anti-interference control method for a machine tool. The machine tool includes a worktable for placing a workpiece and a machining head for machining the workpiece. See also... Figure 1 The anti-interference control method includes steps S110, S130, S150, S170, and S190:
[0052] Step S110: Obtain parameter information of the worktable, parameter information of the workpiece, parameter information of the machining head, and machining program for machining the workpiece, wherein the parameter information includes position parameters, shape parameters, and size parameters.
[0053] The parameters of the worktable, workpiece, and machining head can be provided in advance by the user using relevant 3D models; alternatively, a scanning device can scan the actual shapes of the worktable, workpiece, and machining head to obtain relevant point cloud data, from which a 3D model can be constructed. Shape and dimension parameters are extracted from the 3D model, and the machine tool CNC system obtains the positional parameters of the worktable, workpiece, and machining head. The machining program can be automatically generated by CNC programming software or manually programmed by the user and input into the machine tool CNC system.
[0054] Step S130: Based on the next segment of the machining program, predict whether the controlled position of the machining head or the controlled position of the worktable exceeds the corresponding preset threshold position, and preliminarily determine whether interference will occur during the execution of the next segment of the machining program based on the prediction result.
[0055] The controlled position refers to the location of the feature point. By comparing the location of the feature point with a preset threshold position, the position of the machining head or worktable can be controlled within a safe travel range. The preset threshold position is set with a safety margin. Even if the controlled position of the machining head or the controlled position of the worktable exceeds the corresponding preset threshold position, it does not mean that interference will occur between the machining head and the worktable / workpiece. Therefore, whether interference will occur requires further determination.
[0056] If the next code segment involves the movement of the machining head or the worktable, the controlled position of the machining head or the controlled position of the worktable during the execution of the next code segment is predicted based on its content. The next code segment consists of several lines of code that will be checked for interference, such as the next line of code, the next two lines of code, the next three lines of code, and so on, or more lines of code. If it is preliminarily determined that the machining head and the worktable / workpiece will not interfere during the execution of the next code segment, the process jumps directly to step S190; otherwise, it jumps to step S150. By parsing the content of the code segment and predicting the controlled position of the machining head or the worktable, a preliminary determination of whether interference will occur is made. This helps to exclude simple and intuitive situations from complex interference determination work, thereby improving the efficiency of interference prediction.
[0057] Step S150: If interference is initially determined to be possible, a three-dimensional model of the worktable envelope is generated based on the next segment of the machining program code, the parameter information of the worktable, and the parameter information of the workpiece. The curvature values of each envelope surface of the three-dimensional model of the worktable envelope are calculated. The reciprocal of the radius of the working end side of the machining head is compared with the curvature values of each envelope surface to determine whether there is local interference between the machining head and the worktable envelope and the judgment result is output. The worktable envelope is a geometry that can completely surround both the worktable and the workpiece.
[0058] Local interference mainly refers to the phenomenon of undercutting or overcutting of the workpiece surface by the machining head during the machining process. Local interference often leads to the defective of the machined workpiece.
[0059] For the local interference problem between the machining head and the worktable envelope, the surface parametric equations of the worktable envelope surface can be obtained. A three-dimensional model of the worktable envelope is then constructed based on these surface parametric equations. Depending on the actual needs, the worktable envelope can be constructed using bounding box elements such as bounding spheres, bounding boxes along coordinate axes, fixed-direction convex hulls, and directional bounding boxes. A bounding sphere is the smallest sphere that tightly encloses both the worktable and the workpiece. A bounding box along coordinate axes is the smallest cuboid that tightly encloses both the worktable and the workpiece, with the normal vectors of its surface along the coordinate axes. A fixed-direction convex hull is the smallest convex hull that tightly encloses both the worktable and the workpiece, with the normal vectors of its surface along some pre-specified fixed directions. A directional bounding box is the smallest cuboid that tightly encloses both the worktable and the workpiece, but the direction of the normal vectors of its surface is not limited.
[0060] Whether the curvatures of the machining head and the worktable envelope (including the workpiece) satisfy a certain relationship directly affects the existence of local interference. Curvature and radius of curvature are numerically reciprocals of each other, and the working end side is typically a cylindrical side. The radius value is the same at different positions on the working end side, and the radius of the working end side is easily obtained. Therefore, in this embodiment, the reciprocal of the radius of the working end side of the machining head is compared with the curvature value of each envelope surface to determine whether local interference exists between the machining head and a certain envelope surface of the worktable envelope. It is understood that if local interference is determined to exist between the machining head and a certain envelope surface of the worktable envelope, it is not necessary to determine whether local interference exists between the machining head and other envelope surfaces of the worktable envelope.
[0061] Step S170: If it is determined that there is no local interference between the processing head and the envelope of the worktable, measure the distance between the center point of the processing head and the envelope. If the distance is not greater than the radius of the processing head, it is determined that there is global interference between the processing head and the envelope of the worktable and the judgment result is output.
[0062] Global interference refers to the collision interference between the machining head and the worktable / workpiece during machining. Global interference can lead to damage to the machine tool or workpiece. If the distance between the center point of the machining head and the envelope surface of the worktable is equal to the radius of the machining head, it can be considered that the machining head and the worktable envelope have come into contact, and therefore there is a risk of collision.
[0063] Theoretically, there are situations where global interference may occur but local interference does not, and there are also situations where local interference may occur but global interference does not. Therefore, in this embodiment, the existence of local interference and global interference are determined separately. If local interference is determined to exist, it is not necessary to continue determining whether global interference exists, and the process can directly jump to step S190. If local interference is determined not to exist, the determination of whether global interference exists continues.
[0064] Step S190: Control the machine tool's movements based on the judgment result.
[0065] Specifically, controlling the machine tool's movements can be based on sending control commands according to a judgment result. These control commands are used to stop the worktable and at least one of them from continuing to move or to return to their previous positions. The control commands can be to brake the worktable or the machining head, or both. Alternatively, the control commands can be to return at least one of the worktable and the machining head to its previous position.
[0066] Controlling the machine tool's actions can also be based on sending prompts based on the judgment results. These prompts can include at least one of text prompts, sound prompts, and light prompts. For example, sound prompts can be alarm sounds or beeps, and light prompts can use different colored lights or flash at different frequencies as needed.
[0067] In the embodiments of this application, both local and global interference are determined, thus taking into account the detection of both types of interference. The consideration of how to avoid interference between the machining head and the workpiece / worktable is more comprehensive. Furthermore, the embodiments of this application employ an online interference detection method, overcoming the deficiency that offline simulation virtual machining environments cannot guarantee consistency with the real environment; and by using program code to predict the curvature value and distance between the machining head and the workpiece / worktable in the next step, interference detection can be performed without installing measuring elements. It is understood that the embodiments of this application do not preclude the use of measuring elements to measure relevant distances or radii of curvature.
[0068] Optionally, in some embodiments of this application, such as Figure 2 As shown, step S150 further includes steps S151 and S153:
[0069] Step S151: Calculate the curvature value of the envelope surface.
[0070] Step S153: If the reciprocal of the radius of the working end side of the machining head is not greater than the curvature value of the envelope surface, then it is determined that there is local interference between the machining head and the envelope of the worktable.
[0071] A larger curvature value means that the corresponding area of the surface is more curved. The more curved the workpiece surface, the more prone it is to local interference. The problem of determining whether local interference exists is transformed into comparing the curvature values of the side of the machining head and a certain envelope surface of the worktable. If the curvature value of the working end side of the machining head is less than or equal to the curvature value of the envelope surface, then local interference between the machining head and the worktable envelope is determined to exist.
[0072] Furthermore, in some embodiments of this application, step S153 further includes sub-steps S1511 and S1513:
[0073] Sub-step S1511: Randomly sample n1 points on the envelope surface.
[0074] Sub-step S1513: Calculate the first principal curvature of each point on the envelope surface, and take the minimum value of each first principal curvature as the curvature value of the envelope surface, where n1 is an integer not less than 2.
[0075] For any curved surface, there are two normal curvatures: a first principal curvature and a second principal curvature, with the first principal curvature being the largest normal curvature. In this embodiment, the curvature value of the largest normal curvature is used as the comparison object to determine whether local interference exists, thus providing a certain safety margin. It is understood that the more random sampling points, the more accurate the calculation results.
[0076] Specifically, the Gaussian curvature and mean curvature of each point on the envelope surface are calculated, and the first principal curvature and the second principal curvature are obtained from the Gaussian curvature and the mean curvature.
[0077] Optionally, in some embodiments of this application, step S170 further includes steps S171 and S173:
[0078] Step S171: Randomly sample n2 points on the envelope surface.
[0079] Step S173: Measure the distance between the center point of the processing head and each sampling point respectively, and take the minimum value of each distance as the distance between the center point of the processing head and the envelope surface, where n2 is an integer not less than 2.
[0080] In theory, for a given envelope surface, its distance to the center point of the processing head should be the shortest distance among all tangent planes on the envelope surface from that center point. Considering computational efficiency, this embodiment randomly samples multiple points on a given envelope surface and calculates their distances to the center point of the processing head. It is understood that the more random sampling points, the more accurate the calculation results.
[0081] Optionally, such as Figure 3As shown, in some embodiments of this application, step S130 further includes steps S131, S133, and S135:
[0082] Step S131: Extract the real-time position information from the parameter information of the worktable and the real-time position information from the parameter information of the processing head.
[0083] Step S133: If the current working mode is vertical working mode, predict whether the controlled position of the processing head will be below the first threshold position, where the first threshold position is a preset position in the vertical direction; if so, determine that interference may occur.
[0084] Step S135: If the current working mode is horizontal working mode, predict whether the controlled position of the processing head will be below the second threshold position, where the second threshold position is a preset position in the vertical direction; if so, predict whether the controlled position of the worktable will exceed the third threshold position, where the third threshold position is a preset position in the horizontal direction; if so, determine that interference may occur.
[0085] For vertical working mode, if one condition is "yes", it is determined that interference may occur between the machining head and the worktable. For horizontal working mode, if both conditions are "yes", it is determined that interference may occur between the oscillating machining head and the worktable.
[0086] This application embodiment distinguishes between vertical and horizontal working modes. According to the preset threshold position of different working modes, it determines whether interference may occur in the corresponding working mode, so that the machine tool can move the maximum working stroke as much as possible in different working modes, thereby reducing the sacrifice of working stroke to prevent interference.
[0087] Optionally, such as Figure 4As shown, in some embodiments of this application, the anti-interference control method for the machine tool further includes step S180: after preliminary determination in step S130 that no interference will occur, and after determining that there is neither local interference (step S150) nor global interference (step S170) between the machining head and the worktable envelope, the next segment of the machining program code is stored in the safety code cache area, and it is determined whether the machining head will interfere with at least one of the worktable and the workpiece during the execution of the next segment of the machining program code until all segments of the machining program are determined. That is, after preliminary determination in step S130 that no interference will occur, and after determination in step S150 that no interference will occur due to local interference and step S170 that no interference will occur due to global interference, the process jumps to step S180. After step S180 is executed, step S190 is executed. After determination in step S150 that interference will occur due to local interference or step S170 that interference will occur due to global interference, the process jumps directly to step S190.
[0088] If a preliminary determination, a local interference check, or a global interference check all indicate that no interference will occur, then this section of code can be considered safe code, meaning it will not cause interference during execution. This safe code is stored in a safe code cache for the machine tool's CNC system to execute. By using a safe code cache, the impact of machine tool interference checks on the normal machining process is minimized.
[0089] Specifically, a code parsing cache and a safety code cache are set up separately. A portion of the obtained machining program code is entered into the code parsing cache. Pre-interference checks for the machine tool are performed in the code parsing cache. After the checks are completed, the relevant program code determined not to cause interference is stored in the safety code cache. Both the interference pre-check in the code parsing cache and the reception of safety codes in the safety code cache are processed in the background and do not affect the foreground execution of the CNC system's machining program. Before the first segment of the CNC system's machining program is executed in the foreground, an interference check is performed in the background.
[0090] Some embodiments of the second aspect of this application provide an anti-interference control system for a machine tool. The anti-interference control system for the machine tool includes:
[0091] The program and parameter acquisition module is used to acquire the machining program, the parameter information of the machining head, the parameter information of the worktable, and the parameter information of the workpiece. The parameter information includes position parameters, shape parameters, and size parameters.
[0092] The interference preliminary judgment module is used to predict, based on the next segment of the machining program code, whether the controlled position of the machining head or the controlled position of the worktable in different working modes exceeds the corresponding preset threshold position, and to preliminarily determine, based on the prediction results, whether interference will occur during the execution of the next segment of the machining program code, wherein the working modes include vertical working mode and horizontal working mode.
[0093] The local interference determination module, upon preliminary determination that interference may occur, generates a 3D model of the worktable envelope during the execution of the next segment of the machining program, based on the next segment of the machining program's code, the parameter information of the worktable, and the parameter information of the workpiece. It calculates the curvature values of each envelope surface of the 3D model of the worktable envelope and compares the reciprocal of the radius of the working end side of the machining head with the curvature values of each envelope surface to determine whether local interference exists between the machining head and the worktable envelope. The worktable envelope is a geometric body that completely surrounds both the worktable and the workpiece.
[0094] The global interference determination module is used to determine that, in the case where there is no local interference on any of the envelope surfaces of the machining head and the worktable, for the envelope surfaces where there is no local interference, the distance between the center point of the machining head and the envelope surface is measured. If the distance is not greater than the radius of the machining head, then the global interference between the machining head and the worktable envelope is determined.
[0095] The technical solution of the second aspect of this application also has at least the technical effects of the anti-interference control method for machine tools described in the corresponding embodiment of the first aspect of this application, and will not be repeated here.
[0096] Some embodiments of the third aspect of this application provide a controller for a CNC machine tool. The controller stores a computer program, which includes program instructions adapted for loading by a processor to execute steps in the anti-interference control method for the machine tool as described in any embodiment of the first aspect of this application. As a separate hardware module, the controller storing the relevant computer program is installed on the machine body of the CNC machine tool and is capable of controlling the actions of relevant components of the CNC machine tool, thereby effectively preventing interference between relevant components or between relevant components and the workpiece.
[0097] A fourth aspect of this application provides a CNC machine tool, the CNC machine tool including a worktable for placing workpieces and a machining head for machining workpieces, and further including an anti-interference control system for the machine tool as described in the technical solution of the second aspect of this application or a controller applied to the CNC machine tool as described in the technical solution of the third aspect of this application, wherein the controller is at least used to control the movement of the machining head and the worktable.
[0098] For example, as shown in Figures 5(a) and 5(b), this CNC machine tool can be a dual-purpose vertical and horizontal CNC machine tool, which has a machining head, a workpiece 30, and a worktable, wherein the worktable is exemplified by a rotary table 20, and the machining head includes a spindle head mounting base 14, a spindle head 12, and a swivel head 10. The CNC machine tool includes a bed 40, a column 50, a slide plate 60, and the aforementioned controller applied to the CNC machine tool. The column 50 and the rotary table 20 are mounted on the bed 40, and the spindle head 12 is mounted on the slide plate 60 via the spindle head mounting base 14. The slide plate 60 can move horizontally relative to the column 50, the spindle head mounting base 14 can move vertically relative to the slide plate 60, and the rotary table 20 can move horizontally relative to the bed 40. The swivel head 10 is mounted on the spindle head 12, and the workpiece 30 is placed on the rotary table 20. The swivel head 10 has both vertical and horizontal states. The rotary table 20 can move in the horizontal plane, and the swivel head 10 can swing within a certain angle range. The machining head of this CNC machine tool has different postures and can be used in both vertical and horizontal modes; Figure 5(a) shows the vertical working mode, and Figure 5(b) shows the horizontal working mode. The controller is used to control at least the movements of the swivel head 10 and the rotary table 20. In the embodiments of this application, "set at" and "installed at" both include indirect setting / indirect installation. Using the anti-interference control method in the first aspect embodiment of this application, the CNC machine tools shown in Figures 5(a) and 5(b) can effectively predict whether interference will occur between the machining head and the worktable / workpiece, even without sensors, thereby effectively avoiding accidents such as collisions.
[0099] Some embodiments of the fifth aspect of this application provide a computer-readable storage medium storing a computer program, the computer program including program instructions adapted for loading by a processor to perform steps in the anti-interference control method for a machine tool as described in any embodiment of the first aspect of this application.
[0100] For technical details not disclosed in the embodiments of the computer-readable storage medium involved in this application, please refer to the description of any embodiment of the anti-interference control method for machine tools in the first aspect of this application. As an example, program instructions may be deployed on a computer device, executed on multiple computer devices located in one location, or executed on multiple computer devices distributed in multiple locations and interconnected via a communication network.
[0101] Some embodiments of the sixth aspect of this application provide a computer program product including program instructions adapted for loading by a processor to perform steps in the anti-interference control method for a machine tool as described in any embodiment of the first aspect of this application.
[0102] In any of the above embodiments, implementation can be achieved, in whole or in part, by software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in or transmitted through a computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data processing device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk (SSD)).
[0103] The above-listed embodiments are merely preferred embodiments of this application and should not be construed as limiting the scope of this application. Therefore, any equivalent variations made in accordance with the claims of this application shall still fall within the scope of this application.
Claims
1. A method for preventing interference in a machine tool, the machine tool comprising a worktable for placing a workpiece and a machining head for machining the workpiece, characterized in that, include: The parameter information of the worktable, the parameter information of the workpiece, the parameter information of the processing head, and the processing program for processing the workpiece are obtained, wherein the parameter information includes position parameters, shape parameters, and size parameters. Based on the next segment of the machining program, it is predicted whether the controlled position of the machining head or the controlled position of the worktable exceeds the corresponding preset threshold position. Based on the prediction result, it is preliminarily determined whether interference will occur during the execution of the next segment of the machining program. If interference is initially determined to be possible, a three-dimensional model of the worktable envelope is generated based on the next segment of the machining program code, the parameter information of the worktable, and the parameter information of the workpiece. The curvature values of each envelope surface of the three-dimensional model of the worktable envelope are calculated. The reciprocal of the radius of the working end side of the machining head is compared with the curvature values of each envelope surface to determine whether there is local interference between the machining head and the worktable envelope and the determination result is output. The worktable envelope is a geometric body that can completely surround both the worktable and the workpiece. If it is determined that there is no local interference between the processing head and the envelope of the worktable, the distance between the center point of the processing head and the envelope is measured; if the distance is not greater than the radius of the processing head, it is determined that there is global interference between the processing head and the envelope of the worktable and the judgment result is output. Based on the judgment result, the machine tool's actions are controlled.
2. The anti-interference control method for machine tools according to claim 1, characterized in that, Calculate the curvature values of each envelope surface of the three-dimensional model of the worktable envelope, compare the reciprocal of the radius of the working end side of the machining head with the curvature values of each envelope surface to determine whether there is local interference between the machining head and the worktable envelope, and output the determination result, further including: Calculate the curvature value of the envelope surface; If the reciprocal of the radius of the working end side of the processing head is not greater than the curvature value of the envelope surface, then it is determined that there is local interference between the processing head and the envelope of the worktable.
3. The anti-interference control method for machine tools according to claim 2, characterized in that, Calculating the curvature value of the envelope surface further includes: Randomly sample n1 points on the envelope surface; Calculate the first principal curvature of each point on the envelope surface, and take the minimum value of each first principal curvature as the curvature value of the envelope surface, where n1 is an integer not less than 2.
4. The anti-interference control method for machine tools according to claim 1, characterized in that, Measuring the distance between the center point of the processing head and the envelope surface further includes: Randomly sample n² points on the envelope surface; The distance between the center point of the processing head and each sampling point is measured respectively, and the minimum value of each distance is taken as the distance between the center point of the processing head and the envelope surface, where n2 is an integer not less than 2.
5. The anti-interference control method for machine tools according to claim 1, characterized in that, The anti-interference control method for the machine tool further includes: after initially determining that no interference will occur, and after determining that there is neither local interference nor global interference between the machining head and the worktable envelope, storing the next segment of the machining program code in a safe code cache area, and determining whether the machining head will interfere with at least one of the worktable and the workpiece during the execution of the next segment of the machining program code until all segments of the machining program are determined.
6. The anti-interference control method for a machine tool according to any one of claims 1 to 5, characterized in that, Based on the next segment of the machining program code and the three-dimensional model of the machine tool, predict whether the controlled position of the machining head or the controlled position of the worktable in different working modes exceeds the corresponding preset threshold position. Based on the prediction results, preliminarily determine whether interference may occur during the execution of the next segment of the machining program code, further including: Extract the real-time position information from the parameter information of the worktable and the real-time position information from the parameter information of the processing head; If the current working mode is vertical working mode, it is predicted whether the controlled position of the processing head will be below the first threshold position, where the first threshold position is a preset position in the vertical direction; if so, it is determined that interference may occur. If the current working mode is horizontal working mode, it is predicted whether the controlled position of the processing head will be below the second threshold position, where the second threshold position is a preset position in the vertical direction; if so, it is predicted whether the controlled position of the worktable will exceed the third threshold position, where the third threshold position is a preset position in the horizontal direction; if so, it is determined that interference may occur.
7. A motion interference prevention control system for a machine tool, the machine tool comprising a worktable for placing a workpiece and a machining head for machining the workpiece, characterized in that, include: The acquisition module is used to acquire parameter information of the worktable, parameter information of the workpiece, parameter information of the processing head, and processing program for processing the workpiece, wherein the parameter information includes position parameters, shape parameters, and size parameters. The preliminary judgment module is used to predict whether the controlled position of the machining head or the controlled position of the worktable exceeds the corresponding preset threshold position based on the next segment of the machining program code, and to preliminarily determine whether interference will occur during the execution of the next segment of the machining program code based on the prediction result. The local interference determination module is used to generate a three-dimensional model of the worktable envelope during the execution of the next segment of the machining program based on the next segment of the machining program code, the parameter information of the worktable, and the parameter information of the workpiece, when it is initially determined that interference may occur. The module calculates the curvature value of each envelope surface of the three-dimensional model of the worktable envelope and compares the reciprocal of the radius of the working end side of the machining head with the curvature value of each envelope surface to determine whether there is local interference between the machining head and the worktable envelope. The worktable envelope is a geometric body that can completely surround both the worktable and the workpiece. The global interference determination module is used to measure the distance between the center point of the processing head and the envelope surface of the worktable when it is determined that there is no local interference between the processing head and each envelope surface of the worktable. If the distance is not greater than the radius of the processing head, it is determined that there is global interference between the processing head and the worktable envelope. as well as The control module is used to control the operation of the machine tool based on the judgment result.
8. A controller applied to CNC machine tools, characterized in that, The system stores a computer program, which includes program instructions adapted for loading by a processor to perform the steps in the anti-interference control method for a machine tool as claimed in any one of claims 1 to 6.
9. A CNC machine tool, comprising a worktable for placing a workpiece and a machining head for machining the workpiece, characterized in that, It also includes the anti-interference control system for the machine tool as described in claim 7 or the controller for a CNC machine tool as described in claim 8, wherein the controller is at least used to control the movement of the machining head and the worktable.
10. A computer-readable storage medium, characterized in that, The system stores a computer program, which includes program instructions adapted for loading by a processor to perform the steps in the anti-interference control method for a machine tool as claimed in any one of claims 1 to 6.