A method, device and equipment for optimizing a non-ruled surface rotor shaft vector
By collecting and optimizing non-ruled surface machining feature data in real time, calculating and compensating for tool deformation, the machining error problem caused by tool deformation in the existing technology is solved, and high-precision and high-efficiency non-ruled surface machining is achieved.
Patent Information
- Application Number
- CN202411408902.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-10
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2044-10-10
AI Technical Summary
Existing technologies fail to effectively consider tool deformation in the machining of non-ruled surfaces, resulting in low machining accuracy and efficiency, and are unable to effectively compensate for errors caused by tool deformation.
By acquiring machining feature data of non-ruled surfaces in real time, calculating the deformation of the tool under force, and performing reverse compensation, the initial tool axis vector is optimized to obtain the optimal tool axis vector, thereby reducing machining errors.
It improves machining accuracy and efficiency, reduces production costs, extends machine tool life, and expands the application range of complex surface machining.
Smart Images

Figure CN119292183B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of industrial manufacturing automation, and in particular to a non-straight surface tool axis vector optimization method, device and equipment. BACKGROUND
[0002] Numerical control technology is one of the important symbols of a country's mechanical manufacturing industry level, and is also an important symbol of a mechanical manufacturing enterprise's technical level. The rapid development of numerical control technology has brought fundamental changes to traditional mechanical design and manufacturing methods. Especially with the wide use of modern multi-axis numerical control machine tools, the use of computer-aided programming tools has greatly shortened the product manufacturing cycle and improved the competitiveness of enterprises. According to the machining tool, straight surface machining can be divided into rigid tool machining and soft tool machining. For example, water jet cutting, laser cutting, plasma arc cutting, and electric spark line cutting are all "soft sword" straight surface machining, that is, soft tool straight surface machining; the milling cutter is a rigid tool.
[0003] The machining of complex mechanical parts is usually carried out by turning, milling and other multi-axis machining processes in machining centers, such as Figure 1 shows a milling cutter milling complex machining surface (non-straight surface). For non-straight surface machining, such as ball-end milling, fillet milling, engraving milling, and welding machining, the tool axis vector direction is determined by different methods. For example, five-axis milling machining, as shown in Figure 2 shows the basic concept of the tool axis vector determination method of Siemens five-axis milling machining programming. The tool axis vector direction is determined by the tool position point and a point (driven point) on the driving geometry such as point, line, and surface. Figure 3 shows the method of taking points on a straight line to determine the tool axis vector direction. From the list of Figure 4 , it can be seen that there are many methods to determine the tool axis vector direction, in addition to the straight line in Figure 3 , there are other methods of using points and surfaces. At present, there is no mathematical model of the method of determining the tool axis vector direction to be imported into the interpolator of the numerical control system for interpolation.
[0004] The prior art adopts a pure geometric interpolation method to perform densification interpolation processing on a machining path. The pure geometric interpolation method does not consider the change of a process variable in a machining process. For milling machining, the change of a relief amount caused by insufficient rigidity of a tool-workpiece-clamp-machine tool system is not considered, resulting in low machining precision. Common tool axis vector determination methods include: 1. Normal machining method: This method refers to that a tool axis vector is consistent with a normal vector of a curved surface at a tool contact point. The method has the following disadvantages: at a position where the curvature of the curved surface changes greatly, the tool axis vector will change suddenly, the change amount of the tool axis vector at adjacent tool contact points is large, and the machining quality of the machined curved surface is low. 2. Preset tool axis method: This method refers to that the tool axis vector is set in advance to form a certain angle with the normal vector of the curved surface at the tool contact point. In the machining process, the tool is caused to complete machining of the entire complex curved surface workpiece along the set tool axis vector. The method has the following disadvantages: the tool axis vector is fixed in actual machining, local overcutting is caused, and machining efficiency is low. 3. Interpolation method: This method refers to that on the basis of the normal machining method or the preset tool axis method, a new tool axis vector is inserted at a position where the tool axis vector changes suddenly, so that smooth transition of the tool axis vector is realized at the position where the tool axis vector changes suddenly. The method has the following disadvantages: the interpolation process is complex, and when the distance between two tool contact points is too close, the new tool axis vector is inserted, and repeated cutting is caused.
[0005] In summary, the prior art does not consider the deformation of the tool, so that machining errors caused by tool deformation cannot be compensated, and machining efficiency is low. SUMMARY
[0006] The purpose of the present application is to provide a non-straight surface tool axis vector optimization method, device and equipment. The tool deformation amount under force is calculated on the basis of the initial tool axis vector, and reverse compensation is performed according to the actual deformation amount, so that errors caused in the machining process can be effectively compensated, the optimal tool axis vector is obtained, the errors caused in the machining process are reduced, and the machining efficiency is improved.
[0007] The present application provides a non-straight surface tool axis vector optimization method, which comprises:
[0008] S1: determining an initial tool axis vector according to a preset cutting direction of a non-straight surface to be machined;
[0009] S2: judging whether the initial tool axis vector is deformed under force in a machining path process according to the initial tool axis vector and a workpiece model generating the machining path and performing a machining process;
[0010] S3: when the initial tool axis vector is deformed by force during the machining path, calculating the tool force deformation amount that needs to be compensated in reverse according to the machining feature data of the non-straight surface collected in real time, optimizing the deformed initial tool axis vector according to the tool force deformation amount that needs to be compensated in reverse to effectively compensate for the error caused during the machining process, and obtaining an optimal tool axis vector;
[0011] The machining feature data of the non-straight surface includes cutting three elements, the topographic features of the machined surface, machine tool errors, and data related to the non-straight surface machining process.
[0012] Preferably, in step S3, when the initial tool axis vector is deformed by force during the machining path, calculating the tool force deformation amount that needs to be compensated in reverse according to the machining feature data of the non-straight surface collected in real time includes:
[0013] The tool diameter, the force acting on the tool, and the tool protrusion length are obtained, and the tool force deformation amount δ is calculated according to the tool force deformation amount formula:
[0014]
[0015] Where D is the tool diameter, P is the force acting on the tool, L is the tool protrusion length, 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 non-straight surface to be machined further includes:
[0017] In the case where the workpiece three-dimensional model does not have a 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 to determine the direction of the tool axis vector;
[0018] After the direction of the tool axis vector is determined, the tool axis point is determined by the tool axis vector and the geometric model, or by the length of the given tool axis vector, and the geometric model includes the lower surface of the workpiece during cutting.
[0019] After fitting a series of tool axis points on the machining path, a mathematical model of the tool axis points is obtained, wherein the tool position point and the tool axis point position association function are expressed by a NURBS spline curve.
[0020] Preferably, determining the initial tool axis vector according to the preset cutting direction of the non-straight surface to be machined further includes:
[0021] In the case where the workpiece three-dimensional model does not have a machining surface, if the tool axis vector is defined by passing through the driving geometry point / line / surface to determine the direction of the tool axis vector;
[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 machining;
[0023] After a series of tool axis points on the machining path are fitted, a mathematical model of the tool axis points is obtained, wherein, when one 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 a driving straight line is used to determine the direction of the tool axis vector, the tool axis point trajectory model is the driving straight line.
[0024] As preferably, it further comprises:
[0025] According to the machining path information generated by the CAM software for the workpiece, the machining path information is obtained, the machining path information comprising a tool position point trajectory curve, a tool axis point trajectory curve, a tool position point and a tool axis point correlation function, and machining path attributes;
[0026] In the internal of 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 in the internal of the CAM software, the host computer module directly obtains the machining path information;
[0028] If the host computer module is placed outside the CAM software and on the same host computer, the machining path information is obtained from the host computer module by means of shared memory, and if not on the same host computer, the machining path information is expressed in the form of a text file, and the text file is transmitted to the host computer module to import the path information into the list of Entities.
[0029] As preferably, it further comprises: a step of geometric interpolation by the interpolator, specifically comprising:
[0030] According to the preset interpolation period and the theoretical machining speed, the interpolation step is calculated;
[0031] According to the interpolation period and the theoretical machining speed, the number of interpolation periods required for the interpolation step is calculated;
[0032] The interpolation tool position points are obtained by dividing the tool position point trajectory curve of the machining path by the interpolation step;
[0033] The interpolation points on the tool axis point trajectory curve are obtained by the tool position point and the tool axis point correlation function, and the tool axis point coordinates and the tool axis vector information corresponding to the interpolation tool position points are obtained;
[0034] For the NURBS spline curve, the NURBS spline curve mathematical model 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 NURBS spline curve mathematical model;
[0035] According to the tool position point and the tool axis point information, the tool axis inclination angle and the tool axis azimuth angle are calculated.
[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 structure bodies.
[0037] The application also provides a non-straight surface tool axis vector optimization device, which comprises:
[0038] An initial determination module is configured to determine an initial tool axis vector according to a preset cutting direction of a non-straight surface to be machined.
[0039] A deformation judgment module is configured to judge whether the initial tool axis vector is deformed by force during the machining path according to the initial tool axis vector and the workpiece model.
[0040] An optimization output module is configured to, when the initial tool axis vector is deformed by force during the machining path, calculate a tool force deformation amount that needs to be compensated in reverse according to the real-time collected machining characteristic data of the non-straight surface, optimize the deformed initial tool axis vector according to the tool force deformation amount that needs to be compensated in reverse to effectively compensate for errors caused in the machining process, and obtain an optimal tool axis vector.
[0041] The machining characteristic data of the non-straight surface comprises cutting three elements, the topographic features of the machined surface, machine tool errors, and data related to the non-straight surface machining process.
[0042] Preferably, when the initial tool axis vector is deformed by force during the machining path, the tool force deformation amount that needs to be compensated in reverse is calculated according to the real-time collected machining characteristic data of the non-straight surface, which comprises:
[0043] The tool diameter, the force acting on the tool, and the tool protruding length are obtained, and the tool force deformation amount δ is calculated according to a tool force deformation amount formula:
[0044]
[0045] Wherein, D is the tool diameter, P is the force acting on the tool, L is the tool protruding length, and E is a natural constant with a value of 2.718.
[0046] The application also provides an electronic device, which comprises:
[0047] A memory is configured to store a processing program.
[0048] The processor implements the non-straight surface tool axis vector optimization method according to the embodiments of the present application when executing the processing program.
[0049] The present application also provides a readable storage medium, characterized in that the processing program is stored on the readable storage medium, and the processing program is executed by the processor to implement the non-straight surface tool axis vector optimization method according to the embodiments of the present application.
[0050] For the prior art, the present application has the following beneficial effects:
[0051] The non-straight surface tool axis vector optimization method provided by the present application calculates the optimal tool axis vector according to the cutting three elements, the topographic features of the machined surface, and the errors of the machine tool, thereby optimizing the tool axis vector and reducing the machining errors caused by tool deformation.
[0052] Improve machining precision: The present application can effectively compensate for errors caused during the machining process by collecting real-time machining feature data of the non-straight surface during the machining process and calculating the tool deformation amount that needs to be compensated in the opposite direction based on these data. This method can ensure that the tool always maintains the best state during the machining process and avoids the decline in machining precision caused by tool deformation under stress.
[0053] Optimize machining path: The present application determines the initial tool axis vector according to the preset cutting direction of the non-straight surface to be machined before executing the machining path, and optimizes the initial tool axis vector by judging the deformation under stress 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 the machining efficiency and quality.
[0054] Reduce production cost: The present application can reduce production cost by reducing errors and unnecessary waste during the machining process. At the same time, the optimized machining path and tool axis vector can improve the efficiency of the machine tool and the tool, further reducing production cost.
[0055] Improve machining efficiency: The optimized tool axis vector of the present application can ensure efficient cutting of the tool during the machining process, thereby improving machining efficiency. At the same time, by reducing errors and downtime during the machining process, machining efficiency can be further improved.
[0056] Enhance machine tool performance: The present application can reduce the load and wear of the machine tool during the machining process by optimizing the tool axis vector, thereby prolonging the service life of the machine tool. At the same time, the optimized machining path and tool axis vector can ensure the stability and reliability of the machine tool during the machining process.
[0057] Expand application range: the non-straight surface cutter shaft vector optimization method provided by the application is not only suitable for the processing of non-straight surfaces, but also can be expanded to the processing of other complex surfaces. Through adjusting and optimizing the cutter shaft vector, high-precision processing of various complex surfaces can be realized. BRIEF DESCRIPTION OF DRAWINGS
[0058] Figure 1 For an embodiment of the application, the milling cutter milling complex machining surface example graph in the background art;
[0059] Figure 2 For an embodiment of the application, the cutter shaft vector direction determination method of five-axis milling machining programming in the background art example graph;
[0060] Figure 3 For an embodiment of the application, the example graph of using a guide surface to determine the direction of the cutter shaft vector in the background art;
[0061] Figure 4 For an embodiment of the application, the example graph of the various methods of determining the direction of the cutter shaft vector in the background art;
[0062] Figure 5 For an embodiment of the application, the non-straight surface cutter shaft vector optimization method step schematic diagram provided by the application;
[0063] Figure 6 For an embodiment of the application, the example graph of the cutter shaft vector perpendicular to the workpiece upper surface (cylindrical surface) in the background art;
[0064] Figure 7 For an embodiment of the application, the example graph of the cutter shaft vector parallel to the direction of the intersecting cylindrical surface axis in the background art;
[0065] Figure 8 For an embodiment of the application, the example graph of using a driving point to determine the direction of the cutter shaft vector in the background art;
[0066] Figure 9 For an embodiment of the application, the example graph of determining the direction of the cutter shaft vector perpendicular to a driving straight line in the background art;
[0067] Figure 10 For an embodiment of the application, the example graph of determining the direction of the cutter shaft vector perpendicular to a driving cylindrical surface in the background art;
[0068] Figure 11 For an embodiment of the application, the generation schematic diagram of the machining path in the CAM software;
[0069] Figure 12 For an embodiment of the application, the CODESYS numerical control system interpolation flowchart. DETAILED DESCRIPTION
[0070] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.
[0071] The term "comprising" and variations thereof as used herein are open-ended, and mean "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". Related definitions are given throughout the description.
[0072] It should be noted that the terms "one", "second", and the like mentioned in the present application disclosure 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 modification of "one" or "multiple" mentioned in the present application disclosure is illustrative but not restrictive, and those skilled in the art should understand that, unless otherwise explicitly indicated in the context, it should be understood as "one or more".
[0074] Embodiment one
[0075] As shown in Figure 5 The present application provides a non-straight surface tool shaft vector optimization method, comprising:
[0076] S1: determining an initial tool shaft vector according to a preset cutting direction of a non-straight surface to be machined;
[0077] S2: judging whether the initial tool shaft vector is deformed under force in the process of generating a machining path according to the initial tool shaft vector and a workpiece model and performing a machining process; the types of non-straight surfaces are more, taking milling as an example, for side milling, it can be considered as a straight surface, in this case, the direction determination of the initial tool shaft vector has no difference. However, since the rigidity of the milling cutter is good, it will not cause the rear drag or taper of the water jet or laser, so it is not necessary to establish a mathematical model, unnecessary procedures are reduced, and the machining efficiency is improved. However, the tool will be allowed to move under force during milling, and errors will also be generated.
[0078] S3: when the initial tool axis vector is deformed by force during the machining path, calculating the tool force deformation amount that needs to be compensated in reverse according to the machining characteristic data of the non-straight surface collected in real time, optimizing the deformed initial tool axis vector according to the tool force deformation amount compensated in reverse to effectively compensate the error caused during the machining process, and obtaining the optimal tool axis vector; wherein the machining characteristic data of the non-straight surface includes the three cutting elements, the topographic features of the machined surface, the machine tool error, and the data related to the non-straight surface machining process. The cutting allowance is calculated according to the three cutting elements, and the same method can be used for reverse compensation to reduce errors. The defects of commonly used tool axis vector determination methods such as normal machining method, preset tool axis method, and interpolation method are overcome.
[0079] Specifically, in step S3, when the initial tool axis vector is deformed by force during the machining path, calculating the tool force deformation amount that needs to be compensated in reverse according to the machining characteristic data of the non-straight surface collected in real time includes:
[0080] The tool diameter, the force acting on the tool, and the tool protrusion length are obtained, and the tool force deformation amount δ is calculated according to the tool force deformation amount formula:
[0081]
[0082] Wherein D is the tool diameter, P is the force acting on the tool, L is the tool protrusion length, 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 non-straight surface to be machined further includes:
[0084] In the case where the workpiece three-dimensional model does not have a machining surface, if the tool axis vector is perpendicular to the upper surface of the workpiece or the tool axis vector is parallel to the given vector to determine the direction of the tool axis vector;
[0085] After the direction of the tool axis vector is determined, the tool axis point is determined by the tool axis vector and the geometric model, or by the length of the given tool axis vector, and the geometric model includes the lower surface of the workpiece during cutting.
[0086] After fitting a series of tool axis points on the machining path, a mathematical model of the tool axis points is obtained, wherein the tool position point and the tool axis point position correlation function are expressed by NURBS spline curves.
[0087] In another embodiment, the step S1 of determining the initial tool axis vector according to the preset cutting direction of the non-straight surface to be machined further includes:
[0088] In the case where the workpiece three-dimensional model does not have a machining surface, if the tool axis vector is defined by passing through the driving geometry point / line / surface to determine the direction of the tool axis vector;
[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. When a driving line is perpendicular to a driving line to determine the direction of the tool axis vector, the tool axis point trajectory model is the driving 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 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 Figures 8-10 As shown, 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 Figures 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 is 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. Figure 9 The tool axis point trajectory model in is the driving straight line, and the correlation function can be divided equally.
[0092] The tool axis vector optimization method for unruled surfaces provided in this embodiment further includes:
[0093] Generating a milling machining path for a workpiece using 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 as 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 will understand that, in this embodiment, the CAM software Figure 9 The workpiece shown generates the machining path for milling. Figure 11 As shown, equally divided points are taken on the driving line. A plane is generated through each point and perpendicular to the driving line. The intersection of this plane and the machining surface is the machining line. The machining line is then discretized into a series of points. Each point is then offset outward along the normal direction of the machining line at that point by the tool tip radius. Assuming a ball-end tool, the offset points are fitted to obtain the tool location trajectory curve. The tool axis point trajectory corresponding to this tool location 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>The machining quality grade m_dQuality can be used to distinguish machining lines, cutting-in and cutting-out lines, fast-forward lines, etc. For example, 1-5 is a machining quality of 5, 9 is a cutting-in and cutting-out line, 10 is an empty path fast-forward line, and 13 is an empty path transition line. If the upper computer module is placed inside the CAM software, the upper computer module can directly obtain the above path information. An example of the class Entity is as follows:
[0099]
[0100]
[0101]
[0102] If the upper computer module is placed outside the CAM software but on the same computer, the upper computer module can obtain the above path information through shared memory. If not on the same computer, the machining path information can be expressed in a text file. For example, the following example expresses the information of a machining path line segment in three lines in a text file. The entire machining path is a combination of the information of the above single machining path line segment.
[0103] The first line: m_nEntityNo, m_dQuality, m_dThickness, m_nOffset;
[0104] The 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 general parameters of the path line segment, which can refer to the definition of the example of the class Entity above.
[0107] The parameters in the second line can refer to the definition of the example of the Entity class above, except the parameters within the braces. The parameters within the braces represent the parameters of the tool position NURBS spline curve when m_nEntityType_TCP is 4. P is the degree of the NURBS spline curve, X / Y / Z in the first parenthesis is the coordinate of the control point, R is the weight of the control point, and the number of control points is at least equal to the degree. K in the second parenthesis is the knot vector parameter, and the number of knot vectors is equal to the number of control points plus the degree.
[0108] The parameters in the third line can refer to the definition of the example of the Entity class above, except the parameters within the braces. The parameters within the braces represent the parameters of the tool axis NURBS spline curve when m_nEntityType_Axis is 4.
[0109] The first line of the text file provides the tool position and tool axis information at the machining path origin: 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] Figure 11 The machining path shown can be expressed by 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 it is passed to the host module through the above text file, the host module first imports the path information in the text file into a list of entities list <entity>.
[0122] Optionally, the host computer module adds a zero-length line segment / connection point at each line segment connection point, and the theoretical machining speed of the connection point reflects the change in the tangential direction of the adjacent line segments of the connection point. The greater the change in the tangential direction, the smaller the theoretical machining speed of the connection point. The connection point can also realize the transition of the tool axis vector direction of the adjacent line segments of the connection point, that is, there is no tool position point motion at the point, but there is multi-axis motion caused by the change in the tool axis direction.
[0123] The host computer module calls the process model to calculate the theoretical machining speed. The theoretical machining speed is calculated for each segment of the machining path and the end point of the path. This method requires that the machining path information include information about 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 machining speed takes the process parameters as the independent variable and considers the curvature change of the path curve. For example, the speed of a circular arc is different from the speed of a straight line. The smaller the radius of the circular arc, the slower the speed. When calculating the speed of the path end point, the change in the path direction of the adjacent two line segments is also considered.
[0124] The air fast-forward speed is generally directly obtained from the user setting parameters.
[0125] The air fast-forward speed and the calculated machining speed are stored in the list <entity>In the Entity.m_dSpeed member variable.
[0126] The host module inserts a transition arc into the list <entity>In the middle. For high-speed high-precision processing applications, such as laser cutting processing, it is necessary to insert a transition arc at the joint where the tangential direction of the processing path changes greatly, to improve the smoothness of the speed, acceleration, jerk, inhibit vibration and jitter, and improve the processing efficiency.
[0127] The host computer module generates and outputs the processing program text. The processing program can adopt the format shown in the above text file, or the G code format commonly used in the numerical control field, and insert IO commands during the generation of the processing program, generally at the start and end of processing, insert the corresponding IO control commands.
[0128] Figure 11 The processing path shown can be expressed in the following G code program file:
[0129] T10M6 / / tool change, T10 means No. 10 tool
[0130] S-1M3 / / spindle forward, S means spindle speed address
[0131] G90 / / G90 means absolute coordinate programming
[0132] G0X0.0000Y0.0000M08 / / positioning (mode) | oil cooling on
[0133] N1G0X3.16Y0Z58.94F1000 / / N1 represents line segment number 1, G0 represents air straight line fast forward, F1000 is the fast forward speed
[0134] G0X50Y0Z191.42 / / straight line does not need radius, line length can be calculated from the front and rear endpoints, can be omitted 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 represents NURBS interpolation mode is opened
[0135] G0X50Y10Z191.42
[0136] N3G0X96.84Y20Z58.94
[0137] G0X50Y20Z191.42 ...
[0139] M5M9 / / spindle stop, cool off
[0140] M30 / / program end.
[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 rows from the memory each time, and converts the N rows of code into an ST language array similar to CNCData: ARRAY [0..99] OF ENTITY, which is an array named CNCData, the data type of which is the array of the ENTITY structure body, and 100 is the assumed number of members ENTITY. The M code is converted into the IO command member of the ENTITY, such as bIO1. The data of the spline curve is converted into the member structure body SplineTCP and SplineAxis of the ENTITY.
[0142] Here, the ENTITY is an ST language structure body that collects the information converted from a line segment in the CNC code. The following is an example of the 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 a three-dimensional point information. 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, which is a collection of a NURBS spline curve information. The following is an example of SPLINE:
[0176] TYPE SPLINE:
[0177] STRUCT
[0178] nP:DINT; / / NURBS spline curve level, which is assumed to be 3
[0179] PtData: ARRAY [0..9] OF SPOINT / / control point array, the number of which is at least the number of times plus one, assuming 10 control points
[0180] KData: ARRAY [0..13] OF LREAL / / node vector, the number of which 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 information of a control point in a spline curve. The following is an example of SPOINT:
[0184] TYPE SPOINT
[0185] STRUCT
[0186] fX:LREAL; / / control point X coordinate
[0187] fY:LREAL; / / control point Y coordinate
[0188] fZ:LREAL; / / control point X coordinate
[0189] fR:LREAL; / / control point weight
[0190] END_STRUCT
[0191] END_TYPE
[0192] In this embodiment, the CNCData array is input to a poqDatain port of an interpolator module such as Figure 12 In this embodiment, the CNCData array is input to a poqDatain port of an interpolator module such as Figure 12 In this embodiment, the CODESYS numerical control system executes an interpolation flowchart as shown in
[0193] The interpolator (Interpolator) performs geometric interpolation on the N-line code converted data CNCData. Each segment 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 order. The steps are as follows:
[0194] A. Calculate the interpolation step length according to the preset interpolation period and the theoretical machining speed;
[0195] B、According to the interpolation period and the theoretical machining speed, the number of interpolation periods required for calculating the interpolation step is calculated. For example, if the speed is relatively slow, the interpolation step requires 10 interpolation periods, so within 10 interpolation periods, the position data output by the interpolator will not change, and until the 10th interpolation period arrives, the position data output by the interpolator will change. If the speed is relatively fast, an interpolation step only requires 0.1 interpolation periods, so within 1 interpolation period, the position data output by the interpolator will change by 10 interpolation steps, which may affect the machining accuracy, so for high-speed and high-precision application scenarios, a smaller interpolation period should be used.
[0196] C, the interpolation step is used to divide the machining path tool position point trajectory curve to obtain the interpolation tool position point; for zero-length line segments (joints), the angular change of the tool axis direction can also be divided. The densification interpolation technology of straight lines, circular arcs and spline curves belongs to the prior art and is not within the scope of the present application. The XYZ position information of the tool position point is saved in fXPos, fYPos and fZPos.
[0197] D, the interpolation point on the tool axis point trajectory curve is obtained by the tool position point and tool axis point association function, and the tool axis point coordinates and tool axis vector information corresponding to the interpolation tool position point are obtained; the association function only considers the uniform distribution. For NURBS spline curves, the NURBS spline curve mathematical model is reconstructed from the SPLINE structure data, and the arc length of the tool axis point curve is calculated according to 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, the tool axis inclination angle is calculated according to the tool position point and tool axis point information and saved in fInclination, and the azimuth angle is saved in fAzimuth;
[0199] F, the interpolation point data is stored in a target ST language array, i.e. an ST language array similar to PathData: ARRAY[0..999] OF PATHSTEP, which collects the interpolation information of each interpolation point after interpolation, and the data type of the target ST language array is an array of PATHSTEP structure bodies, and the array name is PathData.
[0200] Example two
[0201] Based on the same concept, the present application provides a non-straight surface tool axis vector optimization device / system, comprising:
[0202] An initial determination module is configured to determine an initial tool axis vector according to a preset cutting direction of a non-straight surface to be machined.
[0203] a deformation judgment module, configured to judge whether the initial tool axis vector is deformed by force during the process of generating a machining path according to the initial tool axis vector and a workpiece model and executing a machining process;
[0204] an optimization output module, configured to, when the initial tool axis vector is deformed by force during the process of generating a machining path, calculate a tool deformation amount that needs to be compensated in reverse according to machining characteristic data of the non-straight surface collected in real time, optimize the deformed initial tool axis vector according to the tool deformation amount that needs to be compensated in reverse to effectively compensate for errors caused in the machining process, and obtain an optimal tool axis vector.
[0205] The machining characteristic data of the non-straight surface includes cutting three elements, topographic features of a machined surface, machine tool errors, and data related to a non-straight surface machining process.
[0206] Specifically, when the initial tool axis vector is deformed by force during the process of generating a machining path, the optimization output module is configured to calculate a tool deformation amount that needs to be compensated in reverse according to machining characteristic data of the non-straight surface collected in real time, including:
[0207] obtaining a tool diameter, a force acting on the tool, and a tool protruding length, and calculating a tool deformation amount δ according to a tool deformation amount formula:
[0208]
[0209] wherein D is the tool diameter, P is the force acting on the tool, L is the tool protruding length, and E is a natural constant, and the value of E is 2.718.
[0210] The implementation principles of the initial determination module, the deformation judgment module, and the optimization output module have been described in the foregoing embodiments, and thus will not be repeated here.
[0211] Embodiment Three
[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. The memory is configured to store a processing program, and the processor is configured to execute the processing program according to instructions. When the processor executes the processing program, the non-straight surface tool axis vector optimization method in the foregoing embodiments is implemented.
[0213] In some embodiments of the present application, a readable storage medium is also provided. The readable storage medium can be a non-volatile readable storage medium or a volatile readable storage medium. The readable storage medium stores instructions. When the instructions run on a computer, the electronic device containing the readable storage medium executes the foregoing non-straight surface tool axis vector optimization method.
[0214] It is understandable that, for the aforementioned non-ruled surface tool axis vector optimization methods, if they are all implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, 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 and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the various embodiments of the present invention. The aforementioned storage media include: 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 a data signal propagated in baseband or as part of a carrier wave, which carries readable program code. Such propagated data signals may take a variety of 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, apparatus, or device. The program code contained on the readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination thereof.
[0216] The program code used to execute the technical solutions disclosed in this application can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as C or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a 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 via the Internet).
[0217] It should be pointed out finally that the above embodiments are only used to illustrate the technical solutions of the present application, but not to limit the same; and although the present application has been described in detail with reference to the foregoing embodiments, it should be appreciated by those skilled in the art that the technical solutions recorded in the foregoing embodiments can be modified, or some technical features thereof can be replaced equivalently; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.< / entity> < / entity> < / entity> < / entity>
Claims
1. A method for optimizing tool axis vector on unruled surface, characterized in that: The method comprises the following steps: S1: determining an initial tool axis vector according to a preset cutting direction of a non-straight surface to be machined; S2: judging whether the initial tool axis vector is deformed by force during the machining path and the machining process generated according to the initial tool axis vector and the workpiece model; S3: when the initial tool axis vector is deformed by force during the machining path, calculating a tool force deformation amount that needs to be compensated in reverse according to the real-time collected machining characteristic data of the non-straight surface, optimizing the deformed initial tool axis vector according to the tool force deformation amount that needs to be compensated in reverse to effectively compensate for the error caused in the machining process, and obtaining an optimal tool axis vector. The step of geometric interpolation by the interpolator specifically comprises the following steps: calculating an interpolation step according to a preset interpolation period and a theoretical machining speed; calculating the number of interpolation periods required by the interpolation step according to the interpolation period and the theoretical machining speed; dividing the machining path tool position point trajectory curve by the interpolation step to obtain interpolation tool position points; obtaining interpolation points on the tool axis point trajectory curve by a tool position point and tool axis point correlation function to obtain tool axis point coordinates and tool axis vector information corresponding to the interpolation tool position points; for a NURBS spline curve, reconstructing a NURBS spline curve mathematical model from the data of the SPLINE structure, and calculating the arc length of the tool axis point curve according to the reconstructed NURBS spline curve mathematical model; calculating the tool axis inclination angle and azimuth angle according to the tool position point and tool axis point information; storing the interpolation point data into a target array to collect the interpolation information of each interpolation point after interpolation; wherein the machining characteristic data of the non-straight surface comprises cutting three elements, the topographic features of the machined surface, machine tool errors, and data related to the non-straight surface machining process. In step S3, when the initial tool axis vector is deformed by force during the machining path, the tool force deformation amount that needs to be compensated in reverse is calculated according to the real-time collected machining characteristic data of the non-straight surface, which comprises the following steps: obtaining the tool diameter, the force acting on the tool, and the tool protrusion length, and calculating the tool force deformation amount δ according to the tool force deformation amount formula: , wherein D is the tool diameter, P is the force acting on the tool, L is the tool protrusion length, and E is a natural constant with a value of 2.
718.
2. The method of rudder shaft vector optimization of a non-ruled 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-straight surface to be machined further comprises the following steps: in the case that the workpiece three-dimensional model does not have a 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 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 tool axis vector and the geometric model, or by the length of the given tool axis vector, and the geometric model comprises the lower surface of the workpiece during cutting; after fitting a series of tool axis points on the machining path, a mathematical model of the tool axis point is obtained, wherein the tool position point and tool axis point position correlation function is expressed by a NURBS spline curve.
3. The method of rudder shaft vector optimization of a non-ruled surface according to claim 1, wherein, The step of determining the initial tool axis vector according to the preset cutting direction of the non-straight surface to be machined further comprises the following steps: in the case that the workpiece three-dimensional model does not have a machining surface, if the tool axis vector is defined by driving the points / lines / surfaces of the 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 a series of tool axis points on the machining path are fitted, a mathematical model of the tool axis point is obtained, wherein, when one 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 a driving straight line is used to determine the direction of the tool axis vector, the tool axis point trajectory model is the driving straight line.
4. The method of rudder shaft vector optimization of a non-ruled surface according to claim 1, wherein, Further comprising: According to the milling machining path generated by the CAM software for the workpiece, machining path information is obtained, the machining path information including tool position point trajectory curve, tool axis point trajectory curve, tool position point and tool axis point correlation function and machining path attribute; In the internal of 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 upper computer of the numerical control system is placed in the internal of the CAM software, the upper computer module directly obtains the machining path information; If the upper computer module is placed outside the CAM software and on the same host, the machining path information is obtained from the upper computer module by means of shared memory, and if not on the same host, the machining path information is expressed in the form of a text file, and the text file is transmitted to the upper computer module to import the path information into the list of Entity.
5. The method of rudder shaft vector optimization of a non-ruled surface according to claim 1, wherein, The data type of the target array is an array of PATHSTEP structure bodies.
6. A non-ruled surface rotor blade shaft vector optimization apparatus, comprising: Comprising: An initial determination module configured to determine an initial tool axis vector according to a preset cutting direction of a non-straight ruled surface to be machined; A deformation judgment module configured to judge whether the initial tool axis vector is deformed by force during the machining process according to the machining path generated according to the initial tool axis vector and the workpiece model; An optimization output module configured to, when the initial tool axis vector is deformed by force during the machining process, calculate a tool force deformation amount that needs to be compensated in reverse according to real-time collected machining characteristic data of the non-straight ruled surface, optimize the deformed initial tool axis vector according to the tool force deformation amount that needs to be compensated in reverse to effectively compensate for errors caused in the machining process, and obtain an optimal tool axis vector. The step of geometric interpolation by the interpolator specifically comprises: calculating an interpolation step according to a preset interpolation period and a theoretical machining speed; calculating the number of interpolation periods required for the interpolation step according to the interpolation period and the theoretical machining speed; segmenting the tool position point trajectory curve of the machining path by using the interpolation step to obtain interpolation tool position points; obtaining interpolation points on the tool axis point trajectory curve by using the tool position point and tool axis point correlation function to obtain tool axis point coordinates and tool axis vector information corresponding to the interpolation tool position points; for a NURBS spline curve, reconstructing a NURBS spline curve mathematical model from the data of the SPLINE structure body, and calculating the arc length of the tool axis point curve according to the reconstructed NURBS spline curve mathematical model; calculating the tool axis inclination angle and azimuth angle according to the tool position point and tool axis point information; storing the interpolation point data into a target ST language array to collect the interpolation information of each interpolation point after interpolation. The machining feature data of the non-straight surface includes three cutting elements, surface topography, machine tool error and data related to the non-straight surface machining process. 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 according to the real-time collected machining feature data of the non-straight surface. The tool diameter, the force acting on the tool and the tool protruding length are obtained, and the tool force deformation amount δ is calculated according to the tool force deformation amount formula: , Wherein, D is the tool diameter, P is the force acting on the tool, L is the tool protruding length, E is a natural constant, and the value is 2.
718.
7. An electronic device, comprising: It comprises: a memory for storing a processing program; a processor which, when executing the processing program, implements the non-straight surface tool axis vector optimization method according to any one of claims 1 to 5.
8. A readable storage medium, characterized by, The readable storage medium has a processing program stored thereon, and the processing program, when executed by the processor, implements the non-straight surface tool axis vector optimization method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Multiaxial numerical control machining tool axis vector optimization method based on tool stress deformation
CN107728576A
Tool path fairing and optimizing method based on measuring point cloud
CN113848808A