Non-ruled surface cutter axis vector optimization method, device and equipment
By collecting processing feature data in real time, the tool axis vector is optimized, and the error problem caused by tool deformation in non-linear surface processing is solved, which improves accuracy and efficiency and reduces costs.
Patent Information
- Application Number
- CN202411408902.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-10
- Publication Date
- 2025-01-10
- Estimated Expiration
- 2044-10-10
AI Technical Summary
The prior art fails to effectively consider tool deformation in non-linear surface processing, resulting in low machining accuracy and efficiency, and cannot compensate for machining errors caused by tool deformation.
By collecting processing characteristic data of non-linear surfaces in real time during the processing process, calculating the tool's stress deformation amount, and optimizing the initial tool axis vector based on these data to compensate for the error, and obtaining the optimal tool axis vector.
Improves processing accuracy and efficiency, reduces errors and unnecessary waste, reduces production costs, and extends the service life of the machine tool.
Smart Images

Figure CN119292183A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of industrial manufacturing automation technology, and in particular to a method, device and equipment for optimizing a tool axis vector on a non-ruled surface. Background Art
[0002] CNC technology is one of the important indicators to measure the level of a country's machinery manufacturing industry, and it is also an important indicator of the technical level of a machinery manufacturing enterprise. The rapid development of CNC technology has brought fundamental changes to the traditional mechanical design and manufacturing methods. In particular, the widespread use of modern multi-axis CNC machine tools, with the help of computer-aided programming tools, has greatly shortened the manufacturing cycle of products and improved the competitiveness of enterprises. According to the processing tools, straight surface processing can be divided into rigid tool processing and soft tool processing. For example, water jet cutting, laser cutting, plasma arc cutting, and electric spark wire cutting are all "soft knife" straight surface processing, that is, soft tool straight surface processing; milling cutters are rigid tools.
[0003] The processing of complex mechanical parts is usually done by multi-axis processing such as turning and milling in a machining center. Figure 1 The figure shows a milling cutter milling a complex surface (non-straight surface). For non-straight surface processing, such as ball-end milling, chamfer milling, engraving milling, welding, etc., the cutter axis vector direction is determined by different methods. For example, five-axis milling, such as Figure 2 The following is the basic concept of the tool axis vector determination method for Siemens five-axis milling programming. The tool axis vector direction is determined by the tool position point and a point (driving point) on the driving geometry such as a point, line, or surface. Figure 3 Shows how to determine the tool axis vector direction by picking points on a straight line. Figure 4 As can be seen from the list, there are many ways to determine the direction of the tool axis vector, except Figure 3 In addition to using straight lines, there are other methods that use points and surfaces. Currently, there is no method for determining the direction of the tool axis vector in the form of a mathematical model to be introduced into the interpolator of the CNC system for interpolation.
[0004] The prior art uses a pure geometric interpolation method to perform densification interpolation processing on the machining path. This pure geometric interpolation method does not consider the changes in process variables during the machining process. For milling, the change in the amount of cutter clearance caused by the insufficient rigidity of the tool-workpiece-fixture-machine system is not taken into account, resulting in low machining accuracy. Commonly used methods for determining the tool axis vector include: 1. Normal machining method: This method refers to the direction of the tool axis vector and the surface normal vector at the tool contact point being consistent. The disadvantage of this method is that the tool axis vector will change suddenly at the place where the curvature of the surface changes greatly, and the change amount of the tool axis vector at the adjacent contact points is large, resulting in low machining quality of the machined surface. 2. Preset tool axis method: This method refers to setting the tool axis vector in advance so that the tool axis vector and the surface normal vector at the contact point are at a certain angle. During the machining process, the tool is made to complete the machining of the entire complex surface workpiece along the set tool axis vector. The disadvantage of this method is that the tool axis vector is fixed in actual machining, which is easy to cause local overcutting and low machining efficiency. 3. Interpolation method: This method refers to inserting a new tool axis vector at the point where the tool axis vector changes suddenly, based on the normal machining method or the preset tool axis method, so that the tool axis vector can smoothly transition at the point where the tool axis vector changes suddenly. The disadvantage of this method is that the interpolation process is complicated. When the distance between the two tool contact points is too close, reinserting a new tool axis vector can easily cause repeated cutting.
[0005] In summary, the prior art does not take the deformation of the tool into consideration, which results in an inability to compensate for the machining error caused by the deformation of the tool, thereby resulting in low machining efficiency. Summary of the invention
[0006] The purpose of the present invention is to provide a method, device and equipment for optimizing the tool axis vector of a non-straight surface, which calculates the force deformation of the tool based on the initial tool axis vector, and performs reverse compensation according to the actual deformation, thereby effectively compensating for the error caused by the processing process and obtaining the optimal tool axis vector, thereby reducing the error generated in the processing process and improving processing efficiency.
[0007] The present invention provides a method for optimizing a tool axis vector on a non-ruled surface, comprising:
[0008] S1: Determine the initial tool axis vector according to the preset cutting direction of the non-ruled surface to be processed;
[0009] S2: determining whether the tool is deformed by force during the machining process of generating a machining path according to the initial tool axis vector and the workpiece model and executing the machining process;
[0010] S3: When the initial tool axis vector is deformed by force during the machining process, the tool force deformation amount that needs to be reversely compensated is calculated based on the machining feature data of the non-ruled surface collected in real time, and the deformed initial tool axis vector is optimized based on the reversely compensated tool force deformation amount to effectively compensate for the error caused by the machining process, so as to obtain the optimal tool axis vector;
[0011] The processing characteristic data of the non-straight surface include three cutting elements, topographical characteristics of the processed surface, machine tool errors and data related to the non-straight surface processing technology.
[0012] Preferably, in step S3, when the initial tool axis vector is deformed by force during the machining process, the tool force deformation amount that needs to be reversely compensated is calculated based on the machining feature data of the non-ruled surface collected in real time, including:
[0013] Obtain the tool diameter, the force on the tool and the tool protruding length, and calculate the tool force deformation δ according to the tool force deformation formula:
[0014]
[0015] Where D is the tool diameter, P is the force acting on the tool, L is the protruding length of the tool, and E is a natural constant with a value of 2.718.
[0016] Preferably, determining the initial tool axis vector according to the preset cutting direction of the unruled surface to be processed further comprises:
[0017] In the case that the three-dimensional model of the workpiece has no machining surface, if the tool axis vector is perpendicular to the upper surface of the workpiece or the tool axis vector is parallel to a given vector, the direction of the tool axis vector is determined;
[0018] After the direction of the tool axis vector is determined, the tool axis point is determined by comparing the tool axis vector with a geometric model, or by giving a length of the tool axis vector, wherein the geometric model includes a lower surface of the workpiece during cutting;
[0019] After fitting a series of tool axis points on the machining path, the mathematical model of the tool axis point is obtained, in which the correlation function between the tool position point and the tool axis point position is expressed by a NURBS spline curve.
[0020] Preferably, determining the initial tool axis vector according to the preset cutting direction of the unruled surface to be processed further comprises:
[0021] In the case where the workpiece 3D model does not have a machining surface, if the tool axis vector is defined by the point / line / surface of the driving geometry, the direction of the tool axis vector is determined;
[0022] After the direction of the tool axis vector is determined, the tool axis point is determined by the intersection of the driving point / line / surface of the milling process;
[0023] After fitting a series of tool axis points on the machining path, the mathematical model of the tool axis point is obtained. When a driving point is used to determine the direction of the tool axis vector, the tool axis point trajectory model is the coordinates of the driving point, and when the tool axis vector direction is determined perpendicular to a driving straight line, the tool axis point trajectory model is the driving straight line.
[0024] As preferably, it also includes:
[0025] Generating a milling machining path for a workpiece according to CAM software to obtain machining path information, wherein the machining path information includes a tool position point trajectory curve, a tool axis point trajectory curve, a tool position point and tool axis point correlation function, and machining path attributes;
[0026] Inside the CAM software, each line segment on the machining path generated according to the machining path information is expressed by a C++ class Entity;
[0027] If the CNC system host computer is placed inside the CAM software, the host computer module directly obtains the processing path information;
[0028] If the host computer module is placed outside the CAM software and is on the same host, the processing path information is obtained from the host computer module through shared memory. If it is not on the same host, the processing path information is expressed in the form of a text file, and the text file is passed to the host computer module to import the path information into the Entity list.
[0029] Preferably, the method further includes: performing geometric interpolation by an interpolator, specifically comprising:
[0030] Calculate the interpolation step length according to the preset interpolation cycle and theoretical processing speed;
[0031] Calculate the number of interpolation cycles required for the interpolation step length according to the interpolation cycle and theoretical processing speed;
[0032] The interpolation step length is used to segment the tool position point trajectory curve of the machining path to obtain the interpolation tool position point;
[0033] The interpolation point on the tool axis point trajectory curve is obtained through the tool position point and tool axis point correlation function, and the tool axis point coordinates and tool axis vector information corresponding to the interpolation tool position point are obtained;
[0034] For the NURBS spline curve, the mathematical model of the NURBS spline curve is reconstructed from the data of the SPLINE structure, and the arc length of the tool axis point curve is calculated according to the reconstructed mathematical model of the NURBS spline curve;
[0035] Calculate the tool axis inclination and azimuth according to the tool position point and tool axis point information;
[0036] The interpolation point data is stored in a target ST language array to collect the interpolation information of each interpolation point after interpolation, and the data type of the target ST language array is an array of PATHSTEP structures.
[0037] The present invention also provides a device for optimizing a tool axis vector for a non-ruled surface, comprising:
[0038] An initial determination module, used to determine an initial tool axis vector according to a preset cutting direction of a non-ruled surface to be processed;
[0039] A deformation judgment module, used for judging whether the tool is deformed by force during the machining process when a machining path is generated according to the initial tool axis vector and the workpiece model and the initial tool axis vector is executed during the machining process;
[0040] An optimization output module is used to calculate the tool force deformation amount that needs to be reversely compensated according to the processing feature data of the non-ruled surface collected in real time when the initial tool axis vector is deformed by force during the processing path, and optimize the deformed initial tool axis vector according to the reversely compensated tool force deformation amount to effectively compensate for the error caused by the processing process, so as to obtain the optimal tool axis vector;
[0041] The processing characteristic data of the non-straight surface include three cutting elements, topographical characteristics of the processed surface, machine tool errors and data related to the non-straight surface processing technology.
[0042] Preferably, in the optimization output module, when the initial tool axis vector is deformed by force during the machining path, the tool force deformation amount that needs to be reversely compensated is calculated based on the machining feature data of the non-ruled surface collected in real time, including:
[0043] Obtain the tool diameter, the force on the tool and the tool protruding length, and calculate the tool force deformation δ according to the tool force deformation formula:
[0044]
[0045] Where D is the tool diameter, P is the force acting on the tool, L is the protruding length of the tool, and E is a natural constant with a value of 2.718.
[0046] The present invention also provides an electronic device, comprising:
[0047] A memory, the memory being used to store a processing program;
[0048] A processor, wherein when executing the processing program, the processor implements the tool axis vector optimization method for a non-ruled surface as described in an embodiment of the present invention.
[0049] The present invention further provides a readable storage medium, characterized in that a processing program is stored on the readable storage medium, and when the processing program is executed by a processor, the non-straight surface tool axis vector optimization method as described in an embodiment of the present invention is implemented.
[0050] With respect to the prior art, the present invention has the following beneficial effects:
[0051] The present invention provides a non-straight surface tool axis vector optimization method, which calculates the optimal tool axis vector based on the three cutting elements, the morphological characteristics of the machined surface, the error of the machine tool, etc., thereby optimizing the tool axis vector and reducing the machining error caused by tool deformation.
[0052] Improve machining accuracy: The present invention can effectively compensate for the errors caused by the machining process by collecting the machining feature data of the non-straight surface in real time during the machining process and calculating the tool force deformation that needs to be reversely compensated based on these data. This method can ensure that the tool always maintains the best state during the machining process and avoid the reduction of machining accuracy due to tool force deformation.
[0053] Optimize machining path: Before the machining path is executed, the present invention determines the initial tool axis vector according to the preset cutting direction of the non-straight surface to be machined, and optimizes the initial tool axis vector by judging the stress deformation of the initial tool axis vector during the machining process. The optimized tool axis vector can ensure the smoothness and accuracy of the machining path, thereby improving machining efficiency and quality.
[0054] Reducing production costs: The present invention can reduce production costs by reducing errors and unnecessary waste during the processing. At the same time, the optimized processing path and tool axis vector can improve the efficiency of machine tools and tools, further reducing production costs.
[0055] Improved machining efficiency: The optimized tool axis vector of the present invention can ensure efficient cutting of the tool during machining, thereby improving machining efficiency. At the same time, machining efficiency can be further improved by reducing errors and downtime during machining.
[0056] Enhanced machine tool performance: The present invention can reduce the load and wear of the machine tool during the processing by optimizing the tool axis vector, thereby extending the service life of the machine tool. At the same time, the optimized processing path and tool axis vector can ensure the stability and reliability of the machine tool during the processing.
[0057] Expanded application scope: The non-ruled surface tool axis vector optimization method provided by the present invention is not only applicable to the processing of non-ruled surfaces, but can also be extended to the processing of other complex curved surfaces. By adjusting and optimizing the tool axis vector, high-precision processing of various complex curved surfaces can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1 This is an example diagram of a milling cutter milling a complex surface in the background technology of an embodiment of the present invention;
[0059] Figure 2 An example diagram of a method for determining the direction of a tool axis vector in five-axis milling programming in the background technology of an embodiment of the present invention;
[0060] Figure 3 This is an example diagram of using a guide surface to determine the direction of a tool axis vector in the background technology of an embodiment of the present invention;
[0061] Figure 4 It is an example diagram of various methods for determining the direction of the tool axis vector in the background technology of an embodiment of the present invention;
[0062] Figure 5 A schematic diagram of the steps of a method for optimizing a tool axis vector for a non-ruled surface provided by an embodiment of the present invention;
[0063] Figure 6 This is an example diagram of a case where the tool axis vector is perpendicular to the upper surface (cylindrical surface) of a workpiece in one embodiment of the present invention;
[0064] Figure 7 This is an example diagram of an embodiment of the present invention in which the knife axis vector is parallel to the axis direction of the intersecting cylindrical surface;
[0065] Figure 8 This is an example diagram of using a driving point to determine the direction of the tool axis vector in one embodiment of the present invention;
[0066] Fig. 9 An example diagram of determining the direction of a tool axis vector perpendicular to a driving straight line in one embodiment of the present invention;
[0067] Fig.10 An example diagram of determining the direction of a tool axis vector perpendicular to a driving cylindrical surface in one embodiment of the present invention;
[0068] Fig.11 A schematic diagram of generating a machining path in CAM software in one embodiment of the present invention;
[0069] Fig.12 This is a CODESYS numerical control system interpolation flow chart in one embodiment of the present invention. DETAILED DESCRIPTION
[0070] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0071] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0072] It should be noted that the concepts such as "once" and "second" mentioned in the present application are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0073] It should be noted that the modifications of "one" and "plurality" mentioned in the disclosure of this application are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0074] Embodiment 1
[0075] like Figure 5 As shown, the present invention provides a method for optimizing a tool axis vector on a non-ruled surface, comprising:
[0076] S1: Determine the initial tool axis vector according to the preset cutting direction of the non-ruled surface to be processed;
[0077] S2: Determine whether the tool is deformed by force during the machining process according to the initial tool axis vector and the workpiece model to generate a machining path and execute the initial tool axis vector during the machining process; there are many types of non-straight surfaces. Taking milling as an example, for side milling, it can be considered a straight surface. In this case, there is no difference in the direction of the initial tool axis vector. However, since the rigidity of the milling cutter is relatively good, it will not cause the back drag or taper similar to water jet and laser. Therefore, there is no need to establish a mathematical model, reduce unnecessary processes, and improve machining efficiency. However, when the milling cutter is processed, the tool will be deformed under force, which will also cause errors.
[0078] S3: When the initial tool axis vector is deformed by force during the machining process, the tool force deformation amount that needs to be reversely compensated is calculated based on the real-time collected processing feature data of the non-straight surface, and the deformed initial tool axis vector is optimized based on the reversely compensated tool force deformation amount to effectively compensate for the error caused by the machining process and obtain the optimal tool axis vector; wherein the processing feature data of the non-straight surface includes the three cutting elements, the morphological characteristics of the machined surface, the machine tool error and data related to the non-straight surface machining process. The tool yield is calculated based on the three cutting elements, and the same method can be used for reverse compensation to reduce errors. Overcome the defects of commonly used tool axis vector determination methods such as the normal machining method, the preset tool axis method, and the interpolation method.
[0079] Specifically, in step S3, when the initial tool axis vector is deformed by force during the machining process, the tool force deformation amount that needs to be reversely compensated is calculated based on the machining feature data of the non-ruled surface collected in real time, including:
[0080] Obtain the tool diameter, the force on the tool and the tool protruding length, and calculate the tool force deformation δ according to the tool force deformation formula:
[0081]
[0082] Where D is the tool diameter, P is the force acting on the tool, L is the protruding length of the tool, and E is a natural constant with a value of 2.718.
[0083] In one embodiment, the step S1 of determining the initial tool axis vector according to the preset cutting direction of the unruled surface to be processed further comprises:
[0084] In the case that the three-dimensional model of the workpiece has no machining surface, if the tool axis vector is perpendicular to the upper surface of the workpiece or the tool axis vector is parallel to a given vector, the direction of the tool axis vector is determined;
[0085] After the direction of the tool axis vector is determined, the tool axis point is determined by comparing the tool axis vector with a geometric model, or by giving a length of the tool axis vector, wherein the geometric model includes a lower surface of the workpiece during cutting;
[0086] After fitting a series of tool axis points on the machining path, the mathematical model of the tool axis point is obtained, in which the correlation function between the tool position point and the tool axis point position is expressed by a NURBS spline curve.
[0087] In another embodiment, determining the initial tool axis vector according to the preset cutting direction of the unruled surface to be processed in step S1 further comprises:
[0088] In the case where the workpiece 3D model does not have a machining surface, if the tool axis vector is defined by the point / line / surface of the driving geometry, the direction of the tool axis vector is determined;
[0089] After the direction of the tool axis vector is determined, the tool axis point is determined by the intersection of the driving point / line / surface of the milling process;
[0090] After fitting a series of tool axis points on the machining path, the mathematical model of the tool axis point is obtained. When a driving point is used to determine the direction of the tool axis vector, the tool axis point trajectory model is the coordinates of the driving point, and when the tool axis vector direction is determined perpendicular to a driving straight line, the tool axis point trajectory model is the driving straight line.
[0091] Those skilled in the art can understand that, during interpolation, there are both mathematical models of tool position points and mathematical models of tool axis points. For non-ruled surface machining in the above two embodiments, the tool axis vector and the tool axis point are not on the machining surface, and the tool axis vector needs to be defined by another method, for example: the tool axis vector is perpendicular to the upper surface of the workpiece, such as Figure 6 As shown, or the tool axis vector is parallel to a given vector, such as Figure 7 As shown, or the tool axis vector is defined by a driving geometry (point / line / surface), such as Figure 8-10 As shown in the figure, after the direction of the tool axis vector is determined, the tool axis point can be connected to a certain geometric model through the tool axis vector, such as the lower surface of the workpiece during cutting. Figure 6 and 7 , or driving points / lines / surfaces for milling, such as Figure 8-10 It can also be determined by giving the length of the tool axis vector, such as Figure 6 The wall thickness in the path can be obtained by fitting a series of tool axis points on the path to obtain the mathematical model of the tool axis points. Figure 6 and Figure 7 The tool axis point trajectory model can be expressed by NURBS spline curve, and the correlation function can be divided equally. Figure 8 The tool axis point trajectory model in is the coordinate of the driving point, and the correlation function can be divided equally. Fig. 9 The tool axis point trajectory model in is the driving straight line, and the correlation function can be divided equally.
[0092] The non-ruled surface tool axis vector optimization method provided in this embodiment also includes:
[0093] Generating a milling machining path for a workpiece according to CAM software to obtain machining path information, wherein the machining path information includes a tool position point trajectory curve, a tool axis point trajectory curve, a tool position point and tool axis point correlation function, and machining path attributes;
[0094] Inside the CAM software, each line segment on the machining path generated according to the machining path information is expressed by a C++ class Entity;
[0095] If the CNC system host computer is placed inside the CAM software, the host computer module directly obtains the processing path information;
[0096] If the host computer module is placed outside the CAM software and is on the same host, the processing path information is obtained from the host computer module through shared memory. If it is not on the same host, the processing path information is expressed in the form of a text file, and the text file is passed to the host computer module to import the path information into the Entity list.
[0097] Those skilled in the art can understand that, in this embodiment, the CAM software Fig. 9 The workpiece shown generates the machining path for milling. Fig.11 As shown in the figure, take equally divided points on the driving line, generate a plane through each point and perpendicular to the driving line, and the intersection of the plane and the processing surface is the processing line. Then discretize the processing line into a series of points, and then offset each point outward along the normal direction of the processing line at the point by a tool head radius. Assuming it is a ball-end tool, fit the offset points to obtain the tool position point trajectory curve. The tool axis point trajectory corresponding to the tool position point trajectory curve is point (50, 191.42).
[0098] In the CAM software, each line segment of the machining path generated above can be expressed as a C++ class Entity, and the entire machining path can be represented by a C++ Entity list. <entity>To express. The processing quality level m_dQuality can be used to distinguish processing lines, cut-in and cut-out lines, fast-forward lines, etc. For example, 1-5 is 5-level processing quality, 9 is cut-in and cut-out, 10 is empty fast-forward, and 13 is empty transition line. If the CNC system host computer is placed inside the CAM software, the host computer module can directly obtain the above path information. The example of class Entity is as follows:
[0099]
[0100]
[0101]
[0102] If the host computer module is placed outside the CAM software but on the same computer, the host computer module can obtain the above path information through shared memory. If it is not on the same computer, the processing path information can be expressed in a text file. For example, the following example uses three lines in a text file to express the information of a processing path segment. The entire processing path is a combination of the information of the above single-segment processing path segments.
[0103] First row: m_nEntityNo, m_dQuality, m_dThickness, m_nOffset;
[0104] Second line: m_nEntityType_TCP,m_EPt_TCP_X,m_EPt_TCP_Y,m_EPt_TCP_Z,m_dRadius_TCP,m_dLength_TCP,{P; (X,Y,Z,R;X,Y,Z,R;...;X,Y,Z,R;X,Y,Z,R);(K;...K)};
[0105] The third line: m_nEntityType_Axis,m_EPt_Axis_X,m_EPt_Axis_Y,m_EPt_Axis_Z,m_dRadius_Axis,m_dLength_Axis,{P; (X,Y,Z,R;X,Y,Z,R;...;X,Y,Z,R;X,Y,Z,R);(K;...K)};
[0106] The parameters in the first line are the common parameters of the path segment, which can be defined by referring to the definition of the Entity class example above.
[0107] The parameters in the second line, except for the parameters in {}, can also refer to the definition of the Entity class example above. When m_nEntityType_TCP is 4, the parameters in {} are used instead. The parameters in {} represent the parameters of the tool point NURBS spline curve. P is the level of the NURBS spline curve. X / Y / Z in the first () are the control point coordinates, R is the weight of the control point, and the number of control points is at least equal to the number of levels; K in the second () is the node vector parameter, and the number of node vectors must be equal to the number of control points plus the level.
[0108] The parameters in the third line can also refer to the definition of the Entity class example above, except for the parameters in {}. The parameters in {} are only available when m_nEntityType_Axis is 4. The parameters in {} represent the parameters of the NURBS spline curve of the tool axis point.
[0109] The first line of the text file should give the tool position point and tool axis point information at the origin of the machining path: m_StartPt_TCP_X, m_StartPt_TCP_Y, m_StartPt_TCP_Z, m_StartPt_Axis_X, m_StartPt_Axis_Y, m_StartPt_Axis_Z.
[0110] Fig.11 The machining path shown can be expressed in the following text file:
[0111] 1,10,0,0;
[0112] 1,3.16,0,58.94,0,10.21;
[0113] 1,50,0,191.42,0,10;
[0114] 2,3,0.2,1;
[0115] 4,3;(3.16,10,58.94,0.8;24.36,10,46.20,8;53.86,10,57.81,0.8;82.89,10,46.96,0.8;96.84,10,58.94,0.8);(0,0,0,0,1,1,1,1);
[0116] 0,50,10,191.42,0,0;
[0117] 3,3,0.2,1;
[0118] 1,96.84,20,58.94,0,10;
[0119] 1,50,20,191.42,0,10; ......
[0121] If the above text file is passed to the host computer module, the host computer module must first import the path information in the text file into an Entity list list <entity>.
[0122] Optionally, the host computer module adds a zero-length line segment / joint at each line segment connection point. The theoretical processing speed of the joint should reflect the change in the tangential direction of the adjacent line segments of the joint. The greater the change in the tangential direction, the smaller the theoretical processing speed of the joint. The joint can also realize the transition of the tool axis vector direction of the adjacent line segments of the joint, that is, although there is no movement of the tool position point at this point, there is multi-axis movement caused by the change in the tool axis direction.
[0123] The host computer module calls the process model to calculate the theoretical processing speed. The theoretical processing speed is calculated for each processing path and the endpoint of the path. This method requires that the processing path information contains information on the changes in process parameters, such as thickness information. The thickness information is obtained by calculating the distance between the tool position point and the tool axis point or by the workpiece thickness parameter. The process model for calculating the processing speed should use the process parameters as independent variables and consider the curvature changes of the path curve. For example, the speed of the arc is different from the speed of the straight line. The smaller the arc radius, the slower the speed. When calculating the speed of the path endpoint, the change in the path direction of the two adjacent line segments must also be considered.
[0124] The idle fast forward speed is usually obtained directly from the user setting parameters.
[0125] The idle fast forward speed and the calculated processing speed are stored in the list <entity>In the Entity.m_dSpeed member variable.
[0126] The host computer module inserts the transition arc into the list <entity>For high-speed and high-precision machining applications, such as laser cutting, it is necessary to insert transition arcs at the joints where the tangential direction of the machining path changes greatly to improve the smoothness of motion speed, acceleration, and jerk, suppress vibration and jitter, and improve machining efficiency.
[0127] The host computer module generates and outputs the processing program text. The processing program can adopt the format of the above text file example, or the G code format commonly used in the numerical control field, and insert IO commands in the process of generating the processing program, generally inserting corresponding IO control commands at the processing start and end points.
[0128] Fig.11 The machining path shown can be expressed by the following G code program file:
[0129] T10M6 / / Change tool, T10 refers to tool No. 10
[0130] S-1M3 / / spindle forward rotation, S refers to the spindle speed address
[0131] G90 / / G90 represents absolute coordinate programming
[0132] G0X0.0000Y0.0000M08 / / Positioning (modal) | Oil cooling on
[0133] N1G0X3.16Y0Z58.94F1000 / / N1 represents the line segment number 1, G0 represents the fast forward in the empty straight line, and F1000 is the fast forward speed
[0134] G0X50Y0Z191.42 / / A straight line does not need a radius, the line length can be calculated from the front and rear endpoints, which can save N2G06.2P3K0X3.16Y10Z58.94R0.8;K0X24.36Y10Z46.20R0.8;K0X53.86Y10Z57.81R0.8;K0X82.89Y10Z46.96R0.8;K1X96.84Y10Z58.94R0.8;K1;K1;K1; / / G06.2 means NURBS interpolation mode is turned on
[0135] G0X50Y10Z191.42
[0136] N3G0X96.84Y20Z58.94
[0137] G0X50Y20Z191.42 ......
[0139] M5M9 / / Spindle stops, cooling off
[0140] M30 / / Program ends.
[0141] In this embodiment, the machining program is imported into the memory of the lower computer. The code parser of the lower computer takes out N lines from the memory each time and converts these N lines of code into an ST language array similar to CNCData:ARRAY[0..99]OF ENTITY. This is an array named CNCData, and the data type is an array of ENTITY structure. 100 is the number of assumed member ENTITY. M code is converted into IO command members of ENTITY, such as bIO1. The data of the spline curve is converted into member structures SplineTCP and SplineAxis of ENTITY.
[0142] Here ENTITY is an ST language structure that collects the information converted from a line segment in the CNC code. The following is an example of ENTITY:
[0143] TYPE ENTITY:
[0144] STRUCT
[0145] nEntityNo: DINT;
[0146] nEntityTypeTCP:DINT;
[0147] SPtTCP:POINT;
[0148] EPtTCP:POINT;
[0149] CPtTCP:POINT;
[0150] fRadiusTCP:LREAL;
[0151] nEntityTypeAxis: DINT;
[0152] SPtAxis:POINT;
[0153] EPtAxis:POINT;
[0154] CPtAxis:POINT;
[0155] fRadius_Axis:LREAL;
[0156] fQuality:LREAL;
[0157] fThickness:LREAL;
[0158] nOffset: DINT;
[0159] bIO1: BOOL;
[0160] bIO2: BOOL;
[0161] bio3: BOOL;
[0162] bIO4: BOOL;
[0163] SplineTCP:SPLINE;
[0164] SplineAxis:SPLINE;
[0165] END_STRUCT
[0166] END_TYPE
[0167] Here POINT is an ST language structure, which is information about a three-dimensional point. The following is an example of POINT:
[0168] TYPE POINT
[0169] STRUCT
[0170] fX:LREAL; / / Point X coordinate
[0171] fY:LREAL; / / Point Y coordinate
[0172] fZ:LREAL; / / Point X coordinate
[0173] END_STRUCT
[0174] END_TYPE
[0175] Here SPLINE is an ST language structure that collects information about a NURBS spline curve. The following is an example of SPLINE:
[0176] TYPE SPLINE:
[0177] STRUCT
[0178] nP: DINT; / / NURBS spline curve level, here it is assumed to be 3
[0179] PtData:ARRAY[0..9]OF SPOINT / / array of control points, the number is at least equal to the number of times plus 1, assuming 10 control points
[0180] KData: ARRAY[0..13]OF LREAL / / Node vector, the number is equal to the number of control points plus the number of levels
[0181] END_STRUCT
[0182] END_TYPE
[0183] Here SPOINT is an ST language structure that collects the information of a control point in a spline curve. The following is an example of SPOINT:
[0184] TYPE SPOINT
[0185] STRUCT
[0186] fX:LREAL; / / X coordinate of control point
[0187] fY:LREAL; / / Control point Y coordinate
[0188] fZ:LREAL; / / X coordinate of control point
[0189] fR:LREAL; / / Control point weight
[0190] END_STRUCT
[0191] END_TYPE
[0192] In this embodiment, the CNCData array is input into an interpolator module such as Fig.12 In this embodiment, the CODESYS numerical control system executes the interpolation flow chart as shown in the poqDatain port of the Interpolator. Fig.12 As shown, the data converted by N lines of code, namely CNCData, is input to the poqDataIn port of the interpolator. The interpolation period, assuming 1000 microseconds, is input to the dwIpoTime port. The acceleration / deceleration mode code, assuming 1, namely trapezoidal acceleration / deceleration, is input to the iVelMode port.
[0193] The interpolator performs geometric interpolation on the CNCData converted from N lines of code. Each section of the machining path is decomposed into interpolation steps, and the data of all interpolation steps are arranged into an array according to the machining sequence. The steps are:
[0194] A. Calculate the interpolation step length according to the preset interpolation cycle and theoretical processing speed;
[0195] B. Calculate the number of interpolation cycles required for the interpolation step length based on the interpolation cycle and theoretical processing speed; for example, if the speed is slow, the interpolation step length requires 10 interpolation cycles, then within 10 interpolation cycles, the position data output by the interpolator will not change until the 10th interpolation cycle. If the speed is fast, an interpolation step length only requires 0.1 interpolation cycle, then within 1 interpolation cycle, the position data output by the interpolator will change by the equivalent of 10 interpolation steps, which may affect the processing accuracy. Therefore, for high-speed and high-precision application scenarios, a smaller interpolation cycle should be used.
[0196] C. Use the interpolation step length to segment the tool position trajectory curve of the machining path to obtain the interpolated tool position; for zero-length line segments (joints), the arc angle of the tool axis direction change can also be segmented. The densification interpolation technology of straight lines, arcs, and spline curves belongs to the prior art and is not within the scope of the present invention. The XYZ position information of the tool position is stored in fXPos, fYPos, and fZPos.
[0197] D. Obtain the interpolation points on the tool axis point trajectory curve through the tool position point and tool axis point association function, and obtain the tool axis point coordinates and tool axis vector information of the corresponding interpolated tool position point; the association function only considers the case of equal division. For NURBS spline curves, reconstruct the NURBS spline curve mathematical model from the data of the SPLINE structure, and calculate the arc length of the tool axis point curve based on the reconstructed NURBS spline curve mathematical model; the XYZ position information of the tool axis point is saved in fXPosAxis, fYPosAxis, and fZPosAxis.
[0198] E. Calculate the tool axis inclination angle and save it in fInclination and the azimuth angle in fAzimuth according to the tool position point and tool axis point information;
[0199] F. Store the interpolation point data into the target ST language array, that is, an ST language array similar to PathData:ARRAY[0..999]OFPATHSTEP to collect the interpolation information of each interpolation point after interpolation. The data type of the target ST language array is an array of PATHSTEP structures, and this array is named PathData.
[0200] Embodiment 2
[0201] Based on the same concept, the present invention provides a non-ruled surface cutter axis vector optimization device / system, comprising:
[0202] An initial determination module, used to determine an initial tool axis vector according to a preset cutting direction of a non-ruled surface to be processed;
[0203] A deformation judgment module, used for judging whether the tool is deformed by force during the machining process when a machining path is generated according to the initial tool axis vector and the workpiece model and the initial tool axis vector is executed during the machining process;
[0204] An optimization output module is used to calculate the tool force deformation amount that needs to be reversely compensated according to the processing feature data of the non-ruled surface collected in real time when the initial tool axis vector is deformed by force during the processing path, and optimize the deformed initial tool axis vector according to the reversely compensated tool force deformation amount to effectively compensate for the error caused by the processing process, so as to obtain the optimal tool axis vector;
[0205] The processing characteristic data of the non-straight surface include three cutting elements, topographical characteristics of the processed surface, machine tool errors and data related to the non-straight surface processing technology.
[0206] Specifically, in the optimization output module, when the initial tool axis vector is deformed by force during the machining path, the tool force deformation amount that needs to be reversely compensated is calculated based on the machining feature data of the non-ruled surface collected in real time, including:
[0207] Obtain the tool diameter, the force on the tool and the tool protruding length, and calculate the tool force deformation δ according to the tool force deformation formula:
[0208]
[0209] Where D is the tool diameter, P is the force acting on the tool, L is the protruding length of the tool, and E is a natural constant with a value of 2.718.
[0210] The implementation principles of the above-mentioned initial determination module, deformation judgment module and optimization output module have been described in the above-mentioned embodiments, so they will not be repeated here.
[0211] Embodiment 3
[0212] Based on the same concept, in some embodiments of the present application, an electronic device is also provided. The electronic device includes a memory and a processor, wherein the memory is used to store a processing program, and the processor executes the processing program according to instructions. When the processor executes the processing program, the non-straight surface tool axis vector optimization method in the above-mentioned embodiment is implemented.
[0213] In some embodiments of the present application, a readable storage medium is further provided, which may be a non-volatile readable storage medium or a volatile readable storage medium. The readable storage medium stores instructions, and when the instructions are executed on a computer, an electronic device including the readable storage medium executes the above-mentioned non-straight surface tool axis vector optimization method.
[0214] It is understandable that, for the aforementioned non-straight surface tool axis vector optimization method, if it is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program codes.
[0215] Computer readable storage media may include data signals propagated in baseband or as part of a carrier wave, wherein readable program codes are carried. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The readable storage medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, device, or device. The program codes contained on the readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination thereof.
[0216] The program code involved in executing the technical solution disclosed in the present application can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and also conventional procedural programming languages such as C language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, as an independent software package, partially on the user computing device and partially on the remote computing device, or completely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect through the Internet).
[0217] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.< / entity> < / entity> < / entity> < / entity>
Claims
1. A method for optimizing the tool axis vector of an unruled surface, characterized in that: include: S1: Determine the initial tool axis vector according to the preset cutting direction of the non-ruled surface to be processed; S2: determining whether the tool is deformed by force during the machining process of generating a machining path according to the initial tool axis vector and the workpiece model and executing the machining process; S3: When the initial tool axis vector is deformed by force during the machining process, the tool force deformation amount that needs to be reversely compensated is calculated based on the machining feature data of the non-ruled surface collected in real time, and the deformed initial tool axis vector is optimized based on the reversely compensated tool force deformation amount to effectively compensate for the error caused by the machining process, so as to obtain the optimal tool axis vector; The processing characteristic data of the non-straight surface include three cutting elements, topographical characteristics of the processed surface, machine tool errors and data related to the non-straight surface processing technology.
2. The method for optimizing the tool axis vector of an unruled surface according to claim 1, characterized in that: In step S3, when the initial tool axis vector is deformed by force during the machining process, the tool force deformation amount that needs to be reversely compensated is calculated based on the machining feature data of the non-ruled surface collected in real time, including: Obtain the tool diameter, the force on the tool and the tool protruding length, and calculate the tool force deformation δ according to the tool force deformation formula: Where D is the tool diameter, P is the force acting on the tool, L is the protruding length of the tool, and E is a natural constant with a value of 2.
718.
3. The method for optimizing the tool axis vector of an unruled surface according to claim 1, characterized in that: The step of determining the initial tool axis vector according to the preset cutting direction of the non-ruled surface to be processed further comprises: In the case that the three-dimensional model of the workpiece has no machining surface, if the tool axis vector is perpendicular to the upper surface of the workpiece or the tool axis vector is parallel to a given vector, the direction of the tool axis vector is determined; After the direction of the tool axis vector is determined, the tool axis point is determined by comparing the tool axis vector with a geometric model, or by giving a length of the tool axis vector, wherein the geometric model includes a lower surface of the workpiece during cutting; After fitting a series of tool axis points on the machining path, the mathematical model of the tool axis point is obtained, in which the correlation function between the tool position point and the tool axis point position is expressed by a NURBS spline curve.
4. The method for optimizing the tool axis vector of an unruled surface according to claim 1, characterized in that: The step of determining the initial tool axis vector according to the preset cutting direction of the non-ruled surface to be processed further comprises: In the case where the workpiece 3D model does not have a machining surface, if the tool axis vector is defined by the point / line / surface of the driving geometry to determine the direction of the tool axis vector; After the direction of the tool axis vector is determined, the tool axis point is determined by the intersection of the driving point / line / surface of the milling process; After fitting a series of tool axis points on the machining path, the mathematical model of the tool axis point is obtained. When a driving point is used to determine the direction of the tool axis vector, the tool axis point trajectory model is the coordinates of the driving point, and when the tool axis vector direction is determined perpendicular to a driving straight line, the tool axis point trajectory model is the driving straight line.
5. The method for optimizing the tool axis vector of an unruled surface according to claim 1, characterized in that: Also includes: Generating a milling machining path for a workpiece according to CAM software to obtain machining path information, wherein the machining path information includes a tool position point trajectory curve, a tool axis point trajectory curve, a tool position point and tool axis point correlation function, and machining path attributes; Inside the CAM software, each line segment on the machining path generated according to the machining path information is expressed by a C++ class Entity; If the CNC system host computer is placed inside the CAM software, the host computer module directly obtains the processing path information; If the host computer module is placed outside the CAM software and is on the same host, the processing path information is obtained from the host computer module through shared memory. If it is not on the same host, the processing path information is expressed in the form of a text file, and the text file is passed to the host computer module to import the path information into the Entity list.
6. The method for optimizing the tool axis vector of an unruled surface according to claim 1, characterized in that: Also includes: The steps of geometric interpolation by the interpolator include: Calculate the interpolation step length according to the preset interpolation cycle and theoretical processing speed; Calculate the number of interpolation cycles required for the interpolation step length according to the interpolation cycle and theoretical processing speed; The interpolation step length is used to segment the tool position point trajectory curve of the machining path to obtain the interpolation tool position point; The interpolation point on the tool axis point trajectory curve is obtained through the tool position point and tool axis point correlation function, and the tool axis point coordinates and tool axis vector information corresponding to the interpolation tool position point are obtained; For the NURBS spline curve, the mathematical model of the NURBS spline curve is reconstructed from the data of the SPLINE structure, and the arc length of the tool axis point curve is calculated according to the reconstructed mathematical model of the NURBS spline curve; Calculate the tool axis inclination and azimuth according to the tool position point and tool axis point information; The interpolation point data is stored in a target ST language array to collect the interpolation information of each interpolation point after interpolation, and the data type of the target ST language array is an array of PATHSTEP structures.
7. A device for optimizing the tool axis vector of a non-ruled surface, characterized in that: include: An initial determination module, used to determine an initial tool axis vector according to a preset cutting direction of a non-ruled surface to be processed; A deformation judgment module, used for judging whether the tool is deformed by force during the machining process when a machining path is generated according to the initial tool axis vector and the workpiece model and the initial tool axis vector is executed during the machining process; An optimization output module is used to calculate the tool force deformation amount that needs to be reversely compensated according to the processing feature data of the non-ruled surface collected in real time when the initial tool axis vector is deformed by force during the processing path, and optimize the deformed initial tool axis vector according to the reversely compensated tool force deformation amount to effectively compensate for the error caused by the processing process, so as to obtain the optimal tool axis vector; The processing characteristic data of the non-straight surface include three cutting elements, topographical characteristics of the processed surface, machine tool errors and data related to the non-straight surface processing technology.
8. The tool axis vector optimization device for non-straight surface according to claim 7, characterized in that: In the optimization output module, when the initial tool axis vector is deformed by force during the machining path, the tool force deformation amount that needs to be reversely compensated is calculated based on the machining feature data of the non-ruled surface collected in real time, including: Obtain the tool diameter, the force on the tool and the tool protruding length, and calculate the tool force deformation δ according to the tool force deformation formula: Where D is the tool diameter, P is the force acting on the tool, L is the protruding length of the tool, and E is a natural constant with a value of 2.
718.
9. An electronic device, characterized in that: include: A memory, the memory being used to store a processing program; A processor, wherein when executing the processing program, the processor implements the non-straight surface tool axis vector optimization method according to any one of claims 1 to 6.
10. A readable storage medium, characterized in that: The readable storage medium stores a processing program, and when the processing program is executed by a processor, the method for optimizing the tool axis vector of a non-straight surface according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Tool locus planning method for closed non-ruled surface numerical control machining
CN103934726A
Ball-end cutter multi-axis machining cutter axis vector optimization method
CN104102171A
Deflection error compensation method for five-axis machining center tool
CN105234743A
Method for planning paths on the basis of image feature data
CN105955191A
Multiaxial numerical control machining tool axis vector optimization method based on tool stress deformation
CN107728576A