Numerically controlled machine tool, interference prevention control method, system, controller, and storage medium
By generating three-dimensional models of the machining head sweep body and the worktable envelope, the global interference problem between functional components and workpieces in CNC machine tools is solved, achieving efficient interference determination without sensors, and reducing costs and installation limitations.
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 have failed to effectively prevent global interference between machine tool functional components and workpieces during CNC machine tool processing, and their reliance on sensors leads to high costs and limited installation locations.
By acquiring parameter information of the worktable, workpiece, and machining head, a three-dimensional model of the machining head sweep body and the worktable envelope is generated. It is then determined whether the two intersect and whether the controlled position exceeds the threshold, thus achieving sensorless interference determination.
This reduces the likelihood of interference between the machining head and the workpiece during processing, and avoids the high costs and limited installation locations associated with sensor measurements.
Smart Images

Figure CN122308263A_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] In CNC machine tool machining, interference between components can have serious consequences. However, current research on interference in machine tool machining mostly focuses on local interference between the tool and the workpiece. In fact, the consequences of global interference between the machine tool's functional components and the workpiece / fixture are far more severe. Local interference will produce defective workpieces, while global interference may cause serious damage to the machine tool itself.
[0003] Currently, patent document CN118268928 A proposes a 3D anti-collision method for milling and turning composite machine tools. This 3D anti-collision method includes: inputting a 3D model of the machine tool with multiple anti-collision functional unit units into a CNC system; setting a safe distance between every two anti-collision functional unit units; and, during machine tool operation controlled by the CNC system, determining whether the actual distance between every two anti-collision functional unit units is greater than the safe distance. The anti-collision functional unit units include a tool rotation unit, a B-axis swing unit, a Y-axis movement unit, a first Z-axis movement unit, a second Z-axis movement unit, and a third Z-axis movement unit, etc.
[0004] However, the above technical solutions have shortcomings in at least the following aspects: (1) The 3D anti-collision method only focuses on anti-collision between functional component units of the machine tool itself, and ignores the possible interference between the functional component units of the machine tool and the workpiece to be processed during the processing; (2) The 3D anti-collision method relies on ultrasonic sensors, laser sensors or inductive sensors to determine the actual distance between each two anti-collision functional component units, which has the disadvantages of high cost, limited position for installing measuring elements, and poor effect of real-time measurement of the distance between moving parts. Summary of the Invention
[0005] The embodiments of this application aim to solve at least one of the problems of the prior art. The embodiments of this application provide a CNC machine tool, an anti-interference control method, a system, a controller, and a storage medium, which can reduce the probability of interference between machine tool functional units and the workpiece during machining, even without the use of sensors.
[0006] The technical solution of this application embodiment is as follows:
[0007] A 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 including:
[0008] 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.
[0009] 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.
[0010] If interference is initially determined to be possible, a three-dimensional model of the machining head sweep body and a three-dimensional model of the worktable envelope body are generated based on the next segment of the machining program code, the parameter information of the machining head, the parameter information of the worktable, and the parameter information of the workpiece. The machining head sweep body is the geometry formed by the machining head sweeping when it moves in space, and the worktable envelope body is the geometry that surrounds both the worktable and the workpiece.
[0011] Determine whether the sweeping body of the machining head intersects with the envelope of the worktable; if so, determine that 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, and output the determination result.
[0012] Based on the judgment result, the machine tool's actions are controlled.
[0013] Optionally, generating a 3D model of the machining head sweep body and a 3D model of the worktable envelope based on the next segment of the machining program code, the parameter information of the machining head, the parameter information of the worktable, and the parameter information of the workpiece further includes:
[0014] Based on the next segment of the machining program code and the parameter information of the machining head, a 3D model of the machining head sweep body at a certain time step is generated. The execution of the next segment of the program code is divided into m time steps, where m is an integer not less than 2.
[0015] Based on the next segment of the machining program code, the parameter information of the worktable, and the parameter information of the workpiece, a three-dimensional model of the worktable envelope at a certain discrete moment within a time step is generated, where each time step has n discrete moments, and n is an integer not less than 3.
[0016] If it is determined that the machining head sweep body and the table envelope do not intersect at the discrete time step, the three-dimensional model of the table envelope at the next discrete time step and / or the three-dimensional model of the machining head sweep body at the next time step are generated.
[0017] Furthermore, based on the next segment of the machining program code and the parameter information of the machining head, a three-dimensional model of the machining head sweep body at a certain time step is generated, further including:
[0018] By using the transformation matrix of the machining head coordinate system to the machine tool coordinate system and the transformation matrix of the workpiece coordinate system to the machine tool coordinate system, the position coordinate vector of any point on the machining head in the workpiece coordinate system can be solved.
[0019] The critical curve function with time parameter as independent variable is solved by the relationship between the instantaneous velocity vector at any point of the critical curve at any time within a certain time step and the normal vector of the profile surface of the processing head. Then, the surface formed by the profile of the processing head during the motion is constructed.
[0020] The envelope surface equation of the three-dimensional model of the sweeping body of the processing head at a certain time step is constructed using the profile surface of the processing head at the starting position, the profile surface of the processing head at the ending position, and the curved surface formed by the profile of the processing head during the movement.
[0021] Optionally, determining whether the three-dimensional model of the processing head sweep body intersects with the three-dimensional model of the worktable envelope further includes:
[0022] A spatial segmentation tree calculation model of the processing head sweep body is generated based on the three-dimensional model of the processing head sweep body, and a spatial segmentation tree calculation model of the worktable envelope body is generated based on the three-dimensional model of the worktable envelope body.
[0023] Starting from the root node of the spatial segmentation tree calculation model of the processing head sweep body and the spatial segmentation tree calculation model of the worktable envelope body, check whether they intersect; if they intersect, continue to check whether the next level leaf nodes of the two intersect until the last level leaf nodes of the two are checked; if they do not intersect, stop checking whether the next level leaf nodes of the two intersect.
[0024] Optionally, the anti-interference control method for the machine tool further includes:
[0025] After initially determining that no interference will occur, and after finally determining that the machining head will not interfere with at least one of the worktable and the workpiece during the execution of the next segment of the machining program, the next segment of the machining program is stored in the safety code cache area, and it continues to determine 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.
[0026] Optionally, based on the next segment of the machining program's code, it is predicted whether the controlled position of the machining head or the controlled position of the worktable exceeds the corresponding preset threshold position under different working modes. Based on the prediction results, it is preliminarily determined whether interference will occur during the execution of the next segment of the machining program's code, further including:
[0027] 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;
[0028] 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.
[0029] 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.
[0030] 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, the anti-interference control system including:
[0031] 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.
[0032] 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.
[0033] The model generation module is used to generate a three-dimensional model of the machining head sweep body and a three-dimensional model of the worktable envelope body based on the next segment of the machining program code, the parameter information of the machining head, the parameter information of the worktable, and the parameter information of the workpiece, when it is initially determined that interference may occur. The machining head sweep body is the geometry formed by the machining head sweeping when it moves in space, and the worktable envelope body is the geometry that surrounds both the worktable and the workpiece.
[0034] The final determination module is used to determine whether the sweeping body of the machining head intersects with the envelope of the worktable; if so, it is determined that 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, and the determination result is output.
[0035] The control module is used to control the operation of the machine tool based on the judgment result.
[0036] A third aspect of this application provides 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 motion anti-interference control method for a machine tool as described in any of the technical solutions of the first aspect of this application.
[0037] 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.
[0038] 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.
[0039] 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.
[0040] The anti-interference control method for machine tools in this application embodiment has at least the following technical effects: It constructs a three-dimensional model of the machining head sweep body and a three-dimensional model of the worktable envelope. By determining whether the machining head and the worktable / workpiece interfere with each other, it reduces the probability of interference between the machining head and the workpiece during machining. Furthermore, predicting whether the controlled position of the machining head or the controlled position of the worktable exceeds a corresponding preset threshold position based on program code, and determining whether the machining head sweep body and the worktable envelope intersect based on the generated model, both enable the determination of whether interference will occur without using sensors. This overcomes the drawbacks of high cost and limited installation location associated with using sensors to measure distances.
[0041] The other aspects mentioned above in the embodiments of this application (controller, CNC machine tool, anti-interference control system of machine tool, storage medium and computer program product) 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.
[0042] 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
[0043] 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;
[0044] Figure 2 for Figure 1 A flowchart illustrating some specific steps in the anti-interference control method for machine tools;
[0045] Figure 3(a) is a schematic diagram of the relative positions of the machining head and the worktable at a certain discrete moment;
[0046] Figure 3(b) is a schematic diagram of the relative positions of the machining head and the worktable at another discrete moment;
[0047] Figure 4 for Figure 2 A flowchart illustrating some specific steps in the anti-interference control method for machine tools;
[0048] Figure 5 for Figure 1 A flowchart illustrating some specific steps in the anti-interference control method for machine tools;
[0049] Figure 6 for Figure 1 A flowchart illustrating some specific steps in the anti-interference control method for machine tools;
[0050] Figure 7 This is a flowchart illustrating the anti-interference control method for machine tools in some embodiments of the first aspect of this application;
[0051] Figure 8(a) is a simplified schematic diagram (vertical working mode) of a CNC machine tool in some embodiments of the fourth aspect of this application;
[0052] Figure 8(b) is a simplified schematic diagram of another working mode of the CNC machine tool in Figure 8(a) (horizontal working mode).
[0053] In the picture:
[0054] 10-Swivel head; 12-Spindle box; 14-Spindle box mounting base; 20-Turntable; 30-Workpiece; 40-Bed; 50-Column; 60-Slide plate. Detailed Implementation
[0055] 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.
[0056] 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.
[0057] 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.
[0058] 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.
[0059] Please see Figures 1 to 7 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. Figure 1 As shown, the anti-interference control method includes steps S110, S130, S150, S170, and S190:
[0060] 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.
[0061] 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.
[0062] Step S130: Based on the next segment of the machining program code, 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 code based on the prediction result.
[0063] 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.
[0064] 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, and thus preliminarily determining whether interference will occur, simple and intuitive situations can be excluded from complex interference determination work, thereby improving the efficiency of interference prediction.
[0065] Step S150: If interference is initially determined to be possible, a three-dimensional model of the machining head sweep body and a three-dimensional model of the worktable envelope body are generated based on the next segment of the machining program code, the parameter information of the machining head, the parameter information of the worktable, and the parameter information of the workpiece. The machining head sweep body is the geometry formed by the machining head sweeping when it moves in space, and the worktable envelope body is the geometry that surrounds both the worktable and the workpiece.
[0066] For the intersection problem of the machining head sweep body and the table envelope body, the surface parametric equations of the envelope surfaces of both the machining head sweep body and the table envelope body can be obtained separately. Based on these surface parametric equations, three-dimensional models of both the machining head sweep body and the table envelope body can be constructed.
[0067] Depending on actual needs, the worktable envelope can be constructed using bounding box units such as bounding spheres, bounding boxes along coordinate axes, fixed-direction convex hulls, and directional bounding boxes. Among them, the bounding sphere is the smallest sphere that tightly surrounds both the worktable and the workpiece; the bounding box along the coordinate axis is the smallest cuboid that tightly surrounds both the worktable and the workpiece, and the normal vectors of the surface of the smallest cuboid are all along the coordinate axis direction; the fixed-direction convex hull is the smallest convex hull that tightly surrounds both the worktable and the workpiece, and the normal vectors of the surface of the smallest convex hull are along some pre-specified fixed directions; the directional bounding box is the smallest cuboid that tightly surrounds both the worktable and the workpiece, but the direction of the normal vectors of the surface of the smallest cuboid is not limited.
[0068] Step S170: Determine whether the sweeping body of the machining head intersects with the envelope of the worktable; if so, then determine that 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, and output the determination result.
[0069] At the same moment, the machining head sweep body and the worktable envelope body occupy at least part of the same space, that is, they intersect. Therefore, it can be finally determined that the machining head will interfere with the worktable envelope body during the execution of the next segment of the machining program code, where the worktable envelope body includes both the worktable and the workpiece.
[0070] Step S190: Control the machine tool's movements based on the judgment result.
[0071] 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.
[0072] 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.
[0073] The anti-interference control method for machine tools in this embodiment constructs a three-dimensional model of the machining head sweep body and a three-dimensional model of the worktable envelope. It determines whether the machining head interferes with the worktable / workpiece by judging whether the machining head sweep body intersects with the worktable envelope, thus reducing the probability of interference between the machining head and the workpiece during machining. Furthermore, the anti-interference control method in this embodiment predicts whether the controlled position of the machining head or the controlled position of the worktable exceeds a corresponding preset threshold position based on program code, and judges whether the machining head sweep body intersects with the worktable envelope based on the generated model. Both methods can determine whether interference will occur without using sensors, thus overcoming the high cost and limited installation location of sensors and other measuring elements used for distance measurement. It is understood that the technical solution in this embodiment does not exclude the use of sensors and other measuring elements, but rather effectively prevents interference even without such elements.
[0074] Optionally, such as Figure 2 As shown, in some embodiments of this application, step S150 further includes steps S151, S153, and S155:
[0075] Step S151: Based on the next segment of the machining program code and the parameter information of the machining head, generate a three-dimensional model of the machining head sweep body at a certain time step, wherein the execution of the next segment of the program code is divided into m time steps, where m is an integer not less than 2.
[0076] Step S153: Based on the next segment of the machining program code, the parameter information of the worktable, and the parameter information of the workpiece, generate a three-dimensional model of the worktable envelope at a certain discrete moment within a time step, wherein each time step has n discrete moments, and n is an integer not less than 3.
[0077] Step S155: If it is determined that the machining head sweep body and the table envelope do not intersect at the current discrete time, continue to generate the three-dimensional model of the table envelope at the next discrete time and / or the three-dimensional model of the machining head sweep body at the next time step.
[0078] The essence of the interference problem lies in the fact that at least two objects occupy the same space at the same time; therefore, determining whether interference exists requires the premise of simultaneous occurrence. During the execution of the next piece of program code, the machining head traverses multiple positions. Ignoring the time factor, during this period, the machining head forms a machining head sweep body in space.
[0079] The execution period of the next program code is divided into m time steps, each with n discrete moments, resulting in approximately m×n discrete moments. For each of these m×n discrete moments, it is determined whether the machining head sweep volume and the worktable envelope intersect. Figure 3(a) shows the relative positions of the machining head and the worktable at discrete moment t1. In the figure, the oscillating head 10 represents the machining head, the turntable 20 represents the worktable, and the workpiece 30 is located on the turntable 20. Figure 3(b) shows the relative positions of the machining head and the worktable at discrete moment t2 as shown in Figure 3(a), where discrete moment t2 is a moment after discrete moment t1 (not specifically the next adjacent moment). Figures 3(a) and 3(b) show that the 3D model of the worktable envelope is updated according to different discrete moments, while the 3D model of the machining head sweep volume is updated according to different time steps.
[0080] If an intersection exists at a certain discrete time step, the process jumps directly to step S190 without further checking for intersections between the machining head sweep volume and the table envelope at subsequent discrete time steps. If no intersection exists at a certain discrete time step, the process continues to generate the 3D model of the table envelope at the next discrete time step, or generates the 3D model of the machining head sweep volume at the next time step, or generates both.
[0081] Furthermore, such as Figure 4 As shown, in some embodiments of this application, step S151 includes sub-steps S1511, S1513, and S1515.
[0082] Sub-step S1511: Solve for the position coordinate vector of any point on the machining head in the workpiece coordinate system by using the transformation matrix of the machining head coordinate system to the machine tool coordinate system and the transformation matrix of the workpiece coordinate system to the machine tool coordinate system.
[0083] Sub-step S1513: Solve the critical curve function with time parameter as independent variable by the relationship satisfied by the instantaneous velocity vector of any point of the critical curve at any time within a certain time step and the normal vector of the profile surface of the processing head, and then construct the surface formed by the profile of the processing head during the motion.
[0084] Sub-step S1515: Construct the envelope surface equation of the three-dimensional model of the sweeping body of the processing head within a certain time step using the profile surface of the processing head at the starting position, the profile surface of the processing head at the ending position, and the curved surface formed by the profile of the processing head during the movement.
[0085] Specifically, let A be the transformation matrix of the machining head coordinate system with respect to the machine tool coordinate system. SThe transformation matrix of the workpiece coordinate system to the machine tool coordinate system is A. W The position coordinate vector of the contact point between the machining head and the worktable / workpiece in the machining head coordinate system is p. S The position coordinate vector of the contact point in the workpiece coordinate system is p. w And the position coordinate vector of the contact point in the machine tool coordinate system is p, then A S p S =A w p w =p.
[0086] The position coordinate vector p of the contact point in the workpiece coordinate system w for: That is, the position coordinate vector of any point on the machining head in the workpiece coordinate system is Through the above sub-steps, the problem of constructing the sweep volume of the machining head is transformed into the problem of the evolution of the machining head trajectory in the workpiece coordinate system over time.
[0087] During its motion, the machining head profile forms a family of single-parameter surfaces with time t as the parameter. The surfaces formed by the machining head profile during motion constitute the envelope of this family of single-parameter surfaces. Any surface in the family is tangent to the envelope; the tangent curve is the critical curve of the surface. Different time parameters t correspond to different critical curves, and the entire envelope is composed of all the critical curves.
[0088] The instantaneous velocity vector v at any point on the critical curve and the normal vector n of the profile surface of the machining head satisfy the following relationship: v·n=0, where both the instantaneous velocity vector v and the normal vector n of the profile surface of the machining head are related to the time parameter t. Therefore, the critical curve function with the time parameter t as the independent variable can be solved through the above relationship, and the surface formed by the profile of the machining head during the motion can be constructed. The envelope surface of the machining head sweep body includes the profile surface of the machining head at the starting position, the profile surface of the machining head at the ending position, and the surface formed by the profile of the machining head during the motion.
[0089] Optionally, such as Figure 5 As shown, in some embodiments of this application, step S170 further includes steps S171 and S173.
[0090] Step S171: Generate a spatial segmentation tree calculation model of the machining head sweep body based on the 3D model of the machining head sweep body, and generate a spatial segmentation tree calculation model of the worktable envelope body based on the 3D model of the worktable envelope body.
[0091] Step S173: The root nodes of the spatial segmentation tree calculation model of the self-processing head sweep volume and the spatial segmentation tree calculation model of the worktable envelope volume are checked to see if they intersect. If they intersect, the next level leaf nodes of the two are checked to see if they intersect until the last level leaf nodes of the two are checked. If they do not intersect, the next level leaf nodes of the two are no longer checked to see if they intersect.
[0092] Specifically, the discrete surfaces of the envelope of the machining head sweep body and the table envelope body are approximated by the triangular facets of the triangular facets. These triangular facets are then approximated by bounding box units such as bounding spheres, bounding boxes along coordinate axes, fixed-direction convex hulls, and directional bounding boxes. New triangular facets are then used to approximate these bounding box units, and so on, until a preset accuracy is achieved. The triangular facets are saved to the root node and divided along multiple directions. Each sub-unit of the divided triangular facet is saved to a different leaf node, and this process is repeated level by level to generate a spatial segmentation tree computational model of the machining head sweep body (for example, if the triangular facet is divided into two parts and each part is saved to a separate leaf node, the resulting spatial segmentation tree computational model is a binary tree computational model; if the triangular facet is divided into eight parts and each part is saved to a separate leaf node, the resulting spatial segmentation tree computational model is an octree computational model). Similarly, a spatial segmentation tree computational model of the table envelope body is also generated.
[0093] The spatial segmentation tree computational model of the processing head sweep body is designated as Model A, and the spatial segmentation tree computational model of the worktable envelope body is designated as Model B. For Model A and Model B, the intersection is checked starting from their root nodes. If the triangular facets or bounding box elements of the two root nodes do not intersect, then the two models do not intersect. If the triangular facets or bounding box elements of the two nodes intersect, then the intersection of one of the next-level leaf nodes of one model with one of the next-level leaf nodes of the other model is checked, completing the permutation and combination check of all leaf nodes from the two models. If there is an intersection between the above-mentioned next-level leaf nodes, the intersection check between the next-next-level leaf nodes is performed, until the intersection check between the last level leaf nodes is reached. During this process, if two nodes do not intersect, the check of their next-level leaf nodes is stopped.
[0094] Optionally, such as Figure 6 As shown, in some embodiments of this application, step S130 further includes steps S131, S133, and S135:
[0095] 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.
[0096] 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.
[0097] 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.
[0098] 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.
[0099] 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.
[0100] Optionally, such as Figure 7 As 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 final determination in step S170 that the machining head will not interfere with at least one of the worktable and the workpiece during the execution of the next segment of the machining program code, the next segment of the machining program code is stored in the safety code cache area, and it continues to determine 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. That is, after preliminary determination in step S130 that no interference will occur and final determination in step S170 that no interference will occur, the process directly jumps to step S180. After step S180 is executed, step S190 is executed.
[0101] If a preliminary determination or a final determination indicates that no interference will occur, the code segment can be considered safe code during its execution. This safe code is stored in a safe code cache for later execution by the machine tool's CNC system. By using a safe code cache, the impact of interference checks on the normal machining process is minimized.
[0102] 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. A pre-check for machine tool interference is performed in the code parsing cache. After the check is 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.
[0103] 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, the anti-interference control system including:
[0104] 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.
[0105] 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 make a preliminary judgment on whether interference will occur during the execution of the next segment of the machining program code based on the prediction results.
[0106] The model generation module is used to generate a three-dimensional model of the machining head sweep body and a three-dimensional model of the worktable envelope body based on the next segment of the machining program code, the parameter information of the machining head, the parameter information of the worktable and the parameter information of the workpiece, when it is initially determined that interference may occur. The machining head sweep body is the geometry formed by the machining head sweeping when it moves in space, and the worktable envelope body is the geometry that surrounds both the worktable and the workpiece.
[0107] The final determination module is used to determine whether the sweeping body of the machining head intersects with the envelope of the worktable; if so, it determines that 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, and outputs the determination result.
[0108] The control module is used to control the machine tool's movements based on the judgment results.
[0109] 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.
[0110] A third aspect of this application provides 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 motion anti-interference control method for a machine tool as described in any of the technical solutions of the first aspect of this application. As an independent hardware module, the controller storing the relevant computer program is installed on the machine tool body of the CNC machine tool, enabling it to control the movements of relevant components of the CNC machine tool, thereby effectively preventing interference between relevant components or between relevant components and the workpiece.
[0111] 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.
[0112] For example, as shown in Figures 8(a) and 8(b), this CNC machine tool can be a vertical / 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 8(a) shows the vertical working mode, and Figure 8(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 8(a) and 8(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.
[0113] It is understood that the CNC machine tool in the embodiments of this application may also be other forms of CNC machine tool.
[0114] 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.
[0115] 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.
[0116] 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 an anti-interference control method for a machine tool as described in any of the technical solutions of the first aspect of this application.
[0117] 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)).
[0118] 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 of interference prevention control of a machine tool including a table for placing a workpiece and a machining head for machining the workpiece, characterized by, The anti-interference control method includes: 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 machining head sweep body and a three-dimensional model of the worktable envelope body are generated based on the next segment of the machining program code, the parameter information of the machining head, the parameter information of the worktable, and the parameter information of the workpiece. The machining head sweep body is the geometry formed by the machining head sweeping when it moves in space, and the worktable envelope body is the geometry that surrounds both the worktable and the workpiece. Determine whether the sweeping body of the machining head intersects with the envelope of the worktable; if so, determine that 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, and output the determination result. Based on the judgment result, the machine tool's actions are controlled.
2. The interference prevention control method of a machine tool according to claim 1, characterized by, Based on the next segment of the machining program code, the parameter information of the machining head, the parameter information of the worktable, and the parameter information of the workpiece, a three-dimensional model of the machining head sweep body and a three-dimensional model of the worktable envelope body are generated, further including: Based on the next segment of the machining program code and the parameter information of the machining head, a 3D model of the machining head sweep body at a certain time step is generated. The execution of the next segment of the program code is divided into m time steps, where m is an integer not less than 2. Based on the next segment of the machining program code, the parameter information of the worktable, and the parameter information of the workpiece, a three-dimensional model of the worktable envelope at a certain discrete moment within a time step is generated, where each time step has n discrete moments, and n is an integer not less than 3. If it is determined that the machining head sweep body and the table envelope do not intersect at the discrete time step, the three-dimensional model of the table envelope at the next discrete time step and / or the three-dimensional model of the machining head sweep body at the next time step are generated.
3. The interference prevention control method of a machine tool according to claim 2, characterized by, Based on the next segment of the machining program and the parameter information of the machining head, a three-dimensional model of the machining head sweep body at a certain time step is generated, further including: By using the transformation matrix of the machining head coordinate system to the machine tool coordinate system and the transformation matrix of the workpiece coordinate system to the machine tool coordinate system, the position coordinate vector of any point on the machining head in the workpiece coordinate system can be solved. The critical curve function with time parameter as independent variable is solved by the relationship between the instantaneous velocity vector at any point of the critical curve at any time within a certain time step and the normal vector of the profile surface of the processing head. Then, the surface formed by the profile of the processing head during the motion is constructed. The envelope surface equation of the three-dimensional model of the sweeping body of the processing head at a certain time step is constructed using the profile surface of the processing head at the starting position, the profile surface of the processing head at the ending position, and the curved surface formed by the profile of the processing head during the movement.
4. The interference prevention control method of a machine tool according to claim 3, characterized by, Determining whether the 3D model of the processing head sweep body intersects with the 3D model of the worktable envelope further includes: A spatial segmentation tree calculation model of the processing head sweep body is generated based on the three-dimensional model of the processing head sweep body, and a spatial segmentation tree calculation model of the worktable envelope body is generated based on the three-dimensional model of the worktable envelope body. Starting from the root node of the spatial segmentation tree calculation model of the processing head sweep body and the spatial segmentation tree calculation model of the worktable envelope body, check whether they intersect; if they intersect, continue to check whether the next level leaf nodes of the two intersect until the last level leaf nodes of the two are checked; if they do not intersect, stop checking whether the next level leaf nodes of the two intersect.
5. The interference prevention control method of a machine tool according to Claim 1, characterized by, The anti-interference control method for the machine tool also includes: After initially determining that no interference will occur, and after finally determining that the machining head will not interfere with at least one of the worktable and the workpiece during the execution of the next segment of the machining program, the next segment of the machining program is stored in the safety code cache area, and it continues to determine 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.
6. The interference avoidance control method of a machine tool according to any one of claims 1 to 5, characterized in that, 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 under different working modes. Based on the prediction results, it is preliminarily determined whether interference will occur during the execution of the next segment of the machining program, 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. An interference prevention control system of a machine tool, the machine tool including a table for placing a workpiece and a machining head for machining the workpiece, characterized by, The anti-interference control system includes: 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 model generation module is used to generate a three-dimensional model of the machining head sweep body and a three-dimensional model of the worktable envelope body based on the next segment of the machining program code, the parameter information of the machining head, the parameter information of the worktable, and the parameter information of the workpiece, when it is initially determined that interference may occur. The machining head sweep body is the geometry formed by the machining head sweeping when it moves in space, and the worktable envelope body is the geometry that surrounds both the worktable and the workpiece. The final determination module is used to determine whether the sweeping body of the processing head intersects with the envelope of the worktable; if so, it is determined that the processing head will interfere with at least one of the worktable and the workpiece during the execution of the next segment of the processing program, and the determination result is output. The control module is used to control the operation of the machine tool based on the judgment result.
8. Controller for a numerically controlled machine tool, 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 motion anti-interference control method for a machine tool as described in any one of claims 1 to 6.
9. A numerically controlled machine tool comprising a table 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.