A method for selecting and solving an angle of a rotary shaft in post-processing of a five-axis machine tool and a readable storage medium

By optimizing the post-processing rotation axis angle selection method for five-axis machine tools, eliminating singular points and selecting the nearest solution as the target solution, the machining accuracy and stability issues of five-axis machine tools are solved, and an efficient and safe machining process is achieved.

CN119644904BActive Publication Date: 2025-12-09SUZHOU QIANJI INTELLIGENT SOFTWARE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411635004.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-15
Publication Date
2025-12-09
Estimated Expiration
2044-11-15

AI Technical Summary

Technical Problem

The improper selection of post-processing angles in existing five-axis machine tools leads to overcutting and collisions of parts, affecting machining accuracy and stability, especially in variable spindle machining and variable plane machining scenarios.

Method used

By obtaining the solutions for the current and previous tool positions of the five-axis machine tool, singular points are eliminated, four-axis and five-axis values ​​are updated, deviations are optimized, the nearest solution is selected as the initial preferred solution, and correction and overtravel back-off operations are performed when necessary to ensure machining safety and continuity.

Benefits of technology

The motion path of the five-axis machine tool was optimized, reducing the risk of sudden angle changes and collisions, improving machining accuracy and efficiency, and reducing production costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119644904B_ABST
    Figure CN119644904B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of angle processing of general five-axis machine tools, and discloses a five-axis machine tool post-processing rotary shaft angle selection method and a readable storage medium, comprising: obtaining and correcting a target solution of a five-axis machine tool at a previous tool position; obtaining a first solution and a second solution of a current tool position, eliminating singular points, and updating, so that each group of updated solutions is close to the target solution of the previous tool position after correction; determining an initial preferred solution and an initial alternative solution from each group of updated solutions; firstly, judging the initial preferred solution, if it is valid and the solution is continuous, then outputting the target solution of the current tool position; if it is valid but the solution is discontinuous, then judging again after correction, if it is still out of range, then changing the solution to the initial alternative solution and judging whether the initial alternative solution is valid; if the alternative solution is still invalid, then marking it as no solution. The present application considers the deviation of adjacent two tool positions to select the target solution, so as to optimize the movement path of the five-axis machine tool, shorten the processing cycle, and improve the processing precision.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of general five-axis machine tool angle processing, in particular to a five-axis machine tool post-processing rotary axis angle selection and resolution method and a readable storage medium. BACKGROUND

[0002] Five-axis linkage numerical control machining, including three linear coordinate axes and two rotary coordinate axes, can simultaneously control the workpiece in five directions, and is increasingly widely used in the field of machining complex and high-precision parts such as aerospace, automobiles and molds. Among them, the three linear coordinate axes X, Y and Z are linear axes, which control the movement of the tool in the horizontal and vertical directions, so that the tool can be precisely positioned and adjusted along the three-dimensional space of the workpiece, thereby realizing cutting machining; the two rotary coordinate axes A-axis and C-axis (or B-axis, depending on the machine tool configuration) are rotary axes, which allow the tool or workpiece to rotate around a specific axis, providing convenience for machining various complex surfaces, allowing the tool to approach the workpiece from multiple angles, and realizing multi-surface machining and complex shape machining.

[0003] Machine tool machining programs, as a set of instructions to guide the machine tool to process parts, are usually written by professionals. However, in the application of five-axis linkage numerical control machine tools, the complexity and diversity of these programs pose challenges to direct execution. Therefore, the post-processing conversion process is particularly important, which is responsible for converting the written machine tool machining program into machine tool code that can be recognized and executed by the machine tool controller, so that the five-axis machine tool controls the relative position and coordinated motion between the tool and the workpiece according to the machine tool code control to realize workpiece machining.

[0004] However, the post-processing conversion of five-axis linkage numerical control machine tools is not easy. Due to the introduction of two rotary axes, manually preparing numerical control machining programs not only takes time and effort, but also is difficult to ensure correctness. In addition, the multi-solution nature of five-axis machine tools makes machine tool angle selection and resolution processing a key issue. Currently, the common processing method mainly focuses on selecting feasible solutions within the stroke range and tends to select points close to the previous tool position as solutions.

[0005] Although this method can meet the requirements of simple machining operations in the plane, the selected solution is only the closest solution, not the optimal solution, which may lead to angle mutation of the tool during machining and the problem of tool axis mutation caused by singular tool axes; angle mutation can cause tool wear, and even cause the risk of overcutting and collision of parts; and singular tool axes can also cause the tool to be unable to continue stable cutting, affecting machining precision.

[0006] Moreover, in the variable spindle machining and variable plane machining scenarios, the spindle direction and the machining plane of the tool need to be frequently changed. Although the method of selecting the adjacent solution performs well in processing the solutions within the range of the machine tool stroke, it is not competent for the complex machining scenarios such as variable spindle machining and variable plane machining, and can lead to unstable machining precision and limit the versatility of the machining mode. SUMMARY

[0007] To this end, the technical problem to be solved by the present application is to overcome the problems of overcutting and collision of parts and poor machining precision caused by unreasonable selection of post-processing angles of five-axis machine tools in the prior art.

[0008] To solve the above technical problems, the present application provides a method for selecting solutions of post-processing rotation axis angles of a five-axis machine tool, comprising:

[0009] obtaining and correcting a target solution of the five-axis machine tool at a previous tool position;

[0010] obtaining a first solution and a second solution of the five-axis machine tool at a current tool position, and eliminating singular points in each group of solutions, each group of solutions containing a four-axis value and a five-axis value;

[0011] updating the four-axis value and the five-axis value in each group of solutions after the singular points are eliminated, so that the four-axis deviation and the five-axis deviation between each group of updated solutions and the corrected target solution at the previous tool position are not greater than 180°;

[0012] determining an initial preferred solution and an initial alternative solution based on the four-five-axis total deviation and the five-axis deviation between each group of updated solutions and the corrected target solution at the previous tool position;

[0013] judging whether the initial preferred solution is out of range:

[0014] if the initial preferred solution is not out of range, marking the state of the initial preferred solution as valid and solution continuous, and outputting the initial preferred solution as the target solution at the current tool position;

[0015] if the initial preferred solution is out of range, correcting the initial preferred solution, and then judging whether the corrected initial preferred solution is out of range again:

[0016] if the corrected initial preferred solution is not out of range, marking the state of the initial preferred solution as valid but solution discontinuous, and performing modulo and correction on the four-axis value and the five-axis value in the initial preferred solution to obtain a candidate preferred solution at the current tool position; updating the corrected target solution at the previous tool position so that the four-axis deviation and the five-axis deviation between the updated target solution at the previous tool position and the candidate preferred solution at the current tool position are not greater than 180°, and then judging whether the updated target solution at the previous tool position is out of range:

[0017] If the updated previous tool position target solution does not exceed the range, the candidate preferred solution is output as the target solution of the current tool position;

[0018] If the updated previous tool position target solution exceeds the range, the state of the candidate preferred solution is marked as a solution change, and the solution is changed to the initial alternative solution;

[0019] If the modified initial preferred solution still exceeds the range, the state of the initial preferred solution is marked as a solution change, and the solution is changed to the initial alternative solution;

[0020] The initial alternative solution is modified to obtain a candidate alternative solution of the current tool position. The previous tool position target solution is updated so that the four-axis deviation and five-axis deviation between the updated previous tool position target solution and the candidate alternative solution of the current tool position are both not greater than 180°. Then, it is determined whether the updated previous tool position target solution exceeds the range:

[0021] If the updated previous tool position target solution does not exceed the range, the candidate alternative solution is output as the target solution of the current tool position;

[0022] If the updated previous tool position target solution exceeds the range, the state of the candidate alternative solution is marked as invalid.

[0023] Preferably, the solution of the five-axis machine tool is modified, comprising:

[0024] The preset four-axis travel range and the preset five-axis travel range corresponding to the five-axis machine tool are obtained;

[0025] The four-axis value and the five-axis value in the solution of the five-axis machine tool are modified to the corresponding preset four-axis travel range and preset five-axis travel range by adding or subtracting 360°.

[0026] Preferably, it is determined whether the solution exceeds the range, comprising:

[0027] If the four-axis value exceeds the preset four-axis travel range of the five-axis machine tool, the solution exceeds the range;

[0028] If the five-axis value exceeds the preset five-axis travel range of the five-axis machine tool, the solution exceeds the range;

[0029] If the four-axis value and the five-axis value do not exceed the preset four-axis travel range and the preset five-axis travel range corresponding to the five-axis machine tool, the solution does not exceed the range.

[0030] Preferably, the singular point in the solution is eliminated, comprising:

[0031] The coordinates of the tool axis and the fifth axis in the five-axis machine tool at the current tool position are obtained, and it is determined whether the tool axis and the fifth axis of the five-axis machine tool at the current tool position are parallel:

[0032] If they are not parallel, there is no singular point;

[0033] If the two solutions are parallel, the five-axis values in each group of solutions of the current tool position are updated to the five-axis values in the target solution of the five-axis machine tool at the previous tool position, and each group of solutions after the singularity is removed is obtained.

[0034] Preferably, the four-axis value and the five-axis value in a solution are updated and transformed by adding or subtracting 360°, so that the four-axis deviation and the five-axis deviation between the updated solution and another solution are both not greater than 180°.

[0035] Preferably, based on the four-five-axis total deviation and the five-axis deviation between the updated each group of solutions and the target solution after the previous tool position is corrected, the initial preferred solution and the initial alternative solution are determined, including:

[0036] If the four-five-axis total deviations of the two solutions are different, the solution corresponding to the smaller four-five-axis total deviation is obtained as the preferred solution, and the other solution is the alternative solution;

[0037] If the four-five-axis total deviations of the two solutions are the same, the five-axis deviations corresponding to the two solutions are compared:

[0038] If the five-axis deviations corresponding to the two solutions are different, the solution corresponding to the smaller five-axis deviation is obtained as the preferred solution, and the other solution is the alternative solution;

[0039] If the five-axis deviations corresponding to the two solutions are the same, the solution with the five-axis value greater than 0 is obtained as the preferred solution, and the other solution is the alternative solution.

[0040] Preferably, if the target solution of the current tool position is a valid but discontinuous preferred solution or an alternative solution, an over-travel back-off operation is performed on the tool of the five-axis machine tool, and after the tool is in the target range, cutting is performed.

[0041] Preferably, the over-travel back-off operation on the tool of the five-axis machine tool includes:

[0042] The tool is retreated along the normal direction to leave the machining area;

[0043] The fourth axis and the fifth axis of the five-axis machine tool are positioned to the point in the target solution of the current tool position;

[0044] The tool is moved to the previous tool position and then fed to the cutting point for cutting work.

[0045] Preferably, if the target solution of the current tool position is a valid but discontinuous preferred solution, and the fifth axis of the five-axis machine tool is a modulus axis, the over-travel back-off operation is not required.

[0046] The embodiment provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the steps in the five-axis machine tool post-processing rotation axis angle solution selection method.

[0047] The above technical solutions of the present application have the following beneficial effects compared with the prior art:

[0048] The five-axis machine tool post-processing rotary shaft angle solution selection method provided by the present application considers the angle difference of the rotary shaft between the current tool point and the previous tool point, obtains the far solution and the near solution, and preferentially selects the near solution as the target solution, so as to optimize the five-axis machine tool motion path, reduce the error of the five-axis machine tool in the motion process, shorten the processing cycle, avoid the risk of part overcutting and collision caused by angle mutation, and thus improve the processing precision; at the same time, when the near solution does not meet the conditions, the solution is changed to the far solution, and the far solution is judged, so as to select an effective solution, reduce the machine tool wear and tool wear, reduce the production cost, and the solution selection method of the present application can be used for five-axis linkage numerical control machine tools of any structure and any stroke;

[0049] After the solution selection is discontinuous and the solution is changed to the alternative solution, the present application performs an overtravel back-off operation to ensure that the machine tool can always move within a safe range during the entire processing process, avoiding angle mutation and spindle mutation, and thus avoiding the risk of overtravel and collision, and also ensuring the continuity and efficiency of processing. BRIEF DESCRIPTION OF DRAWINGS

[0050] In order to make the content of the present application more easily understood, the present application will be further described in detail below according to specific embodiments of the present application and in conjunction with the drawings, in which:

[0051] Figure 1 is a step flowchart of the five-axis machine tool post-processing rotary shaft angle solution selection method provided by the present application;

[0052] Figure 2 is a step flowchart of the present application for approaching one solution to another solution;

[0053] Figure 3 is a step flowchart of the present application for obtaining the first selected solution and the alternative solution. DETAILED DESCRIPTION

[0054] The present application will be further described below in conjunction with the drawings and specific embodiments, so that those skilled in the art can better understand the present application and implement it, but the embodiments are not limiting to the present application.

[0055] Referring to Figure 1 The step flow chart of the five-axis machine tool post-processing rotation axis angle selection method provided by the application, the specific steps include:

[0056] S101: Obtain and correct the target solution of the five-axis machine tool at the previous tool position;

[0057] S102: Obtain the first solution and the second solution of the five-axis machine tool at the current tool position, and eliminate singular points in each group of solutions, each group of solutions containing a four-axis value and a five-axis value;

[0058] S103: Update the four-axis value and the five-axis value in each group of solutions after eliminating the singular points, so that the four-axis deviation and the five-axis deviation between the updated each group of solutions and the corrected target solution at the previous tool position are not greater than 180°;

[0059] S104: Based on the four-five-axis total deviation and the five-axis deviation between the updated each group of solutions and the corrected target solution at the previous tool position, determine the initial preferred solution and the initial alternative solution;

[0060] S105: Determine whether the initial preferred solution is out of range:

[0061] S106: If the initial preferred solution is not out of range, mark the state of the initial preferred solution as valid and the solution is continuous, and output the initial preferred solution as the target solution of the current tool position;

[0062] S107: If the initial preferred solution is out of range, correct the initial preferred solution, and then determine whether the corrected initial preferred solution is out of range:

[0063] S108: If the corrected initial preferred solution is not out of range, mark the state of the initial preferred solution as valid but the solution is not continuous, and perform modulo and correction on the four-axis value and the five-axis value in the initial preferred solution to obtain the candidate preferred solution of the current tool position; update the corrected target solution at the previous tool position, so that the four-axis deviation and the five-axis deviation between the updated previous tool position target solution and the candidate preferred solution of the current tool position are not greater than 180°, and then determine whether the updated previous tool position target solution is out of range:

[0064] S108-1: If the updated previous tool position target solution is not out of range, output the candidate preferred solution as the target solution of the current tool position;

[0065] S108-2: If the updated previous tool position target solution is out of range, mark the state of the candidate preferred solution as a solution change, and change to the initial alternative solution;

[0066] S109: If the corrected initial preferred solution is still out of range, mark the state of the initial preferred solution as a solution change, and change to the initial alternative solution;

[0067] S110: modifying the initial alternative solution to obtain a candidate alternative solution of the current tool position; updating the target solution of the previous tool position after the four-axis and five-axis deviations between the updated target solution of the previous tool position and the candidate alternative solution of the current tool position are both not greater than 180°, and determining whether the updated target solution of the previous tool position is out of range:

[0068] S110-1: if the updated target solution of the previous tool position is not out of range, outputting the candidate alternative solution as the target solution of the current tool position;

[0069] S110-2: if the updated target solution of the previous tool position is out of range, marking the state of the candidate alternative solution as invalid.

[0070] In the embodiment, the solution is modified multiple times, including modifying the target solution of the previous tool position of the five-axis machine tool, modifying the initial preferred solution, and modifying the initial alternative solution. The foregoing modification of the solution of the five-axis machine tool includes: obtaining a preset four-axis travel range and a preset five-axis travel range corresponding to the five-axis machine tool; and modifying the four-axis value and the five-axis value in the solution of the five-axis machine tool to the preset four-axis travel range and the preset five-axis travel range by using the method of adding or subtracting 360°.

[0071] Specifically, the solution of the five-axis machine tool is represented as [ang4, ang5], the preset four-axis travel range is represented as rng4(min4, max4), and the preset five-axis travel range is represented as rng5(min5, max5). If ang4>max4, then ang4=ang4-360°; if ang4<min4, then ang4=ang4+360°; until min4<ang4<max4, and similarly, the fifth axis is constrained within the travel range min5<ang5<max5.

[0072] For each solution, it is determined whether it is out of range, including: if the four-axis value exceeds the preset four-axis travel range of the five-axis machine tool, the solution is out of range; if the five-axis value exceeds the preset five-axis travel range of the five-axis machine tool, the solution is out of range; and if the four-axis value and the five-axis value do not exceed the preset four-axis travel range and the preset five-axis travel range corresponding to the five-axis machine tool, the solution is not out of range.

[0073] The preset four-axis travel range rng4(min4, max4) and the preset five-axis travel range rng5(min5, max5) are determined according to the specific machine tool. Each machine tool has a specified fourth axis and fifth axis range when it is manufactured. The common value is in the range of [-360, 360]. However, the fourth axis is mostly in the range of [-180, 180], and the two sides do not necessarily reach 180, and can be smaller. The fifth axis is mostly in the range of [-360, 360], but similarly, it does not necessarily reach 360.

[0074] In the embodiments of the present application, singular points in the solution are eliminated, comprising:

[0075] The coordinates of the tool axis and the fifth axis in the five-axis machine tool at the current tool position are obtained, and it is determined whether the tool axis and the fifth axis in the five-axis machine tool at the current tool position are parallel:

[0076] If not parallel, there is no singular point;

[0077] If parallel, the fifth axis value in each group of solutions of the current tool position is updated to the fifth axis value in the target solution of the previous tool position of the five-axis machine tool, and each group of solutions after the singular point is eliminated is obtained.

[0078] Specifically, when the tool axis tov(i,j,k) and the fifth axis dir(i,j,k) of the machine tool are parallel, representing singular, the fifth axis angle of the first solution and the second solution (cur1[ang4,ang5],cur2[ang4,ang5]) is assigned to the fifth axis angle of the previous tool position (pre_dp1[ang4,ang5]), which is represented as: cur1.ang5=pre_dp1.ang5,cur2.ang5=pre_dp1.ang5.

[0079] In the embodiments of the present application, one solution is updated so that the four-axis deviation and the five-axis deviation of the other solution are both within a preset range, i.e., one solution is close to the other solution, specifically comprising: using the method of adding or subtracting 360°, the four-axis value and the five-axis value in a certain solution are updated and transformed, so that the four-axis deviation and the five-axis deviation of the updated solution and the other solution are both not greater than 180°.

[0080] Specifically, taking the four-axis value ang4 of the first solution cur1 and the four-axis value pre_dp1.ang4 of the previous tool position as an example:

[0081] If cur1.ang4-pre_dp1.ang4>180°, cur1.ang4=cur1.ang4-360°;

[0082] If pre_dp1.ang4-cur1.ang4>180°, cur1.ang4=cur1.ang4+360°;

[0083] Until |cur1.ang4-pre_dp1.ang4|<180°, and the remaining three angles are processed in the same way.

[0084] Referring to Figure 2As shown in the figure, the step of approaching one solution to another solution specifically comprises: obtaining the current angle and the previous angle corresponding to the two solutions, comparing the difference between the two angles, and determining which angle is larger if the absolute value of the difference is greater than 180°; if the value of the current angle minus the previous angle is greater than 180°, the current angle is subtracted by 360° to approach the previous angle until the difference between the two angles is not greater than 180°; if the value of the previous angle minus the current angle is greater than 180°, the current angle is added by 360° to approach the previous angle until the difference between the two angles is not greater than 180°.

[0085] Referring to Figure 3 As shown in the figure, the step of obtaining the preferred solution and the alternative solution provided by the application; specifically, in step S104, the initial preferred solution and the initial alternative solution are obtained, comprising:

[0086] S104-1: if the total deviation of the four-five axes of the two solutions is not the same, the solution corresponding to the smaller total deviation of the four-five axes is obtained as the preferred solution, and the other solution is the alternative solution;

[0087] S104-2: if the total deviation of the four-five axes of the two solutions is the same, the five-axis deviation corresponding to the two solutions is compared:

[0088] S104-3: if the five-axis deviation corresponding to the two solutions is not the same, the solution corresponding to the smaller five-axis deviation is obtained as the preferred solution, and the other solution is the alternative solution;

[0089] S104-4: if the five-axis deviation corresponding to the two solutions is the same, the solution with the five-axis value greater than 0 is obtained as the preferred solution, and the other solution is the alternative solution.

[0090] Wherein, the total deviation of the four-five axes of the two solutions is the sum of the difference between the four-axis values of the two solutions and the difference between the five-axis values of the two solutions, for example, the total deviation of the four-five axes between the first solution of the current tool position and the target solution of the previous tool position is represented as: dat1=|cur1.ang4-pre_dp1.ang4|+|cur1.ang5-pre_dp1.ang5|; the five-axis deviation of the two solutions is the difference between the five-axis values of the two solutions, for example, the five-axis deviation between the first solution of the current tool position and the target solution of the previous tool position is represented as: dat51=|cur1.ang5-pre_dp1.ang5|; similarly, the total deviation of the four-five axes and the five-axis deviation between the second solution of the current tool position and the target solution of the previous tool position can be calculated.

[0091] The five-axis machine tool post-processing rotary shaft angle selection method provided by the application selects the near solution as the initial first selected solution and the far solution as the initial alternative solution by calculating the difference between the double solutions of the current tool point and the target solution of the previous tool point; whether the initial first selected solution meets the requirements is judged preferentially; if the initial first selected solution is valid and the selected solution is continuous, the initial first selected solution is output as the target solution of the current tool point; if the initial first selected solution is valid but the selected solution is not continuous, the initial first selected solution is modified and approached, and the target solution is output or the solution is changed to the initial alternative solution, and whether the initial alternative solution meets the requirements is judged; the initial alternative solution is modified and approached, and whether the initial alternative solution is valid is judged, and then the target solution is output or the initial alternative solution is marked as no solution. The five-axis machine tool post-processing rotary shaft angle selection method provided by the application considers the angle difference of the rotary shaft between the current tool point and the previous tool point, obtains the far solution and the near solution, and preferentially selects the near solution as the target solution, so as to optimize the movement path of the five-axis machine tool, reduce the error of the five-axis machine tool in the movement process, shorten the processing cycle, avoid the risk of overcutting and collision caused by angle mutation, and improve the processing precision; at the same time, when the near solution does not meet the conditions, the solution is changed to the far solution, and the far solution is judged, so as to select the valid solution, reduce the wear of the machine tool and the loss of the tool, and reduce the production cost, and the solution selection method provided by the application can be used for the five-axis linkage numerical control machine tool of any structure and any stroke.

[0092] In the embodiment of the application, if the target solution of the current tool point is the first selected solution which is valid but not continuous or the alternative solution, an overtravel return operation is performed on the tool of the five-axis machine tool, and the tool is moved to the target range, and then cutting is performed.

[0093] The overtravel return operation performed on the tool of the five-axis machine tool includes:

[0094] The tool is moved to the target range along the normal direction to leave the machining area;

[0095] The fourth axis and the fifth axis of the five-axis machine tool are positioned to the point in the target solution of the current tool point;

[0096] The tool is moved to the previous tool point, and then the tool is moved to the cutting point to perform cutting work.

[0097] The modulus axis has no angle limit and can be turned to any angle; if the target solution of the current tool point is the first selected solution which is valid but not continuous, and the fifth axis of the five-axis machine tool is a modulus axis, the overtravel return operation is not needed.

[0098] The overtravel return operation is performed after the selected solution is not continuous and the solution is changed to the alternative solution, so that the machine tool can always move in a safe range during the whole machining process, the risk of overtravel and collision is avoided, and the continuity and efficiency of machining are ensured.

[0099] Specifically, based on the above embodiment, in the embodiment of the application, the five-axis machine tool post-processing rotary shaft angle selection method provided by the application is used for actual solution selection, and specifically includes:

[0100] S201: The value of the target solution of the previous tool position (pre_dp1[40, 359]) is normalized, and the control is within the four-axis stroke range rng4(-105, 105) and the five-axis stroke range rng5(0, 360); at the beginning of the program, it may not be within the stroke range, if both the four-axis and the five-axis are within the range, no transformation is needed;

[0101] S202: Singular value processing;

[0102] If the tool axis tov(0, 0.12, 0.89) is parallel to the machine fifth axis dir(0, 0, 1), it represents a singularity, and the fifth axis angle of the current tool position (cur1[40, 2], cur2[-40, 182]) is assigned to the fifth axis angle in the previous tool position (pre_dp1[40, 359]);

[0103] If the tool axis tov and the machine fifth axis dir are not parallel within a tolerance of tol=1e -5 , no transformation is needed;

[0104] S203: The double solution (cur1[40, 2], cur2[-40, 182]) is close to the target solution of the previous tool position, and the basis is that the difference between the two is not more than 180°, and the stroke range is not considered. After approaching, the double solution is: cur1[40, 362], cur2[-40, 182];

[0105] S204: Calculate the total deviation of the four and five axes (dat1, dat2) of the two sets of solutions of the current tool position and the previous tool position, and the deviation of the five axes (dat51, dat52). Preferably, the total deviation of the four and five axes (dat) is selected as the first choice (dp1). If the two sets of solutions dat are the same, the solution with the smaller five-axis deviation dat5 is selected as the first choice. If they are still the same, the solution with ang5>0 is selected as the first choice;

[0106] After calculation, dat1=0+3=3, dat2=80+177=257, dat51=3, dat52=177, select the smallest dat dat1, mark cur1 as the first choice solution dp1[40, 362], and cur2 as the second choice solution dp2[-40, 182];

[0107] S205: Determine whether the first choice solution exceeds the stroke range:

[0108] If it exceeds, try adding and subtracting 360°, and then determine the overtravel situation again and re-mark whether it is continuous (near solution);

[0109] dp1[40,362] fourth axis not overtravel, fifth axis overtravel, fifth axis -360° later, dp1=[40,2] not overtravel, mark preferred solution discontinuous;

[0110] S206: judge whether the alternative solution (dp2) is out of range, if overtravel, try + -360, judge again whether overtravel, and re-mark whether continuous (far solution);

[0111] dp2[-40,182], four five-axis are not overtravel, mark alternative solution continuous;

[0112] S207: modulo axis (i.e. rotating axis, can rotate infinitely), no need to consider whether continuous;

[0113] S208: preferred solution (dp1) as reference, judge whether to change solution, so as to mark discontinuous again, recalculate previous position (pre):

[0114] S208-1: preferred solution is discontinuous, modulo current angle, limit it within the range by adding or subtracting 360°;

[0115] Specifically, the preferred solution is discontinuous, dp1 after modulo is [40,2], within the range of travel;

[0116] S208-2: previous position preferred solution (pre_dp1) is close to the current optimal solution (dp1);

[0117] pre_dp1[40,359] is close to dp1[40,2], pre_dp1=[40,-1];

[0118] S208-3: previous position alternative solution (pre_dp2) is close to the current optimal solution (dp1);

[0119] pre_dp2[-40,179] is close to dp1[40,2], pre_dp2[-40,179];

[0120] S208-4: detect whether the current optimal solution (dp1) and the previous position preferred solution (pre_dp1) are valid,

[0121] If valid, take dp1 as the target solution, end the process;

[0122] If invalid, change the solution to the current alternative solution dp2, mark discontinuous, limit it within the range by adding or subtracting 360°;

[0123] pre_dp1[40,-1] overtravel, dp1 invalid, execute S208-5;

[0124] dp2[-40,182] is within the range of travel;

[0125] S208-5: The pre-position preferred solution (pre_dp1) is close to the current alternative solution (dp2);

[0126] After pre_dp1[40, 359] is close to dp2[-40, 182], pre_dp1=[40, 359];

[0127] S208-6: The pre-position alternative solution (pre_dp2) is close to the current alternative solution (dp2);

[0128] After pre_dp2[-40, 179] is close to dp2[-40, 182], pre_dp2=[-40, 179];

[0129] S208-7: Whether the current alternative solution (dp2) and the pre-position alternative solution (pre_dp2) are valid is detected, and if valid, dp2 is selected as the solution;

[0130] dp2 and pre_dp2 are valid, and dp2 is selected;

[0131] S208-8: If invalid, mark no solution;

[0132] S209: The angle is discontinuous, and an overtravel backoff operation needs to be performed, and the specific steps are as follows:

[0133] The tool is retracted along the normal direction, the rotation axis is positioned to the point position calculated by the above algorithm and not overtraveling, the tool is quickly moved to the retraction point, the tool is fed to the cutting point, and the cutting work is continued.

[0134] The embodiment utilizes the nearest processing algorithm to make the current tool position close to the previous tool position, and always uses the near solution; when the near solution switches to the far solution, the algorithm enters the overtravel backoff node to process discontinuity, and the generation of angle mutation and spindle mutation is avoided; at the same time, in any spindle and any inclined plane, the five-axis machine tool of any structure can always ensure that the angle is close, and the angle is always within the machine tool stroke range, which fundamentally solves the problem of five-axis solution selection, so as to adapt to various machining scenes.

[0135] The embodiment of the application also provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to realize the steps in the five-axis machine tool post-processing rotation axis angle solution selection method.

[0136] The five-axis machine tool post-processing rotary shaft angle selection method and readable storage medium, by calculating the difference between the double solution of the current tool point and the target solution of the previous tool point, the near solution is selected as the initial first selected solution, and the far solution is selected as the initial alternative solution; whether the initial first selected solution meets the requirements is judged preferentially, if the initial first selected solution is effective and the solution is continuous, the target solution of the current tool point is output; if the solution is not continuous, the initial first selected solution is modified and approached, and the target solution is output or the solution is changed to the initial alternative solution, whether the initial alternative solution meets the requirements is judged; the initial alternative solution is modified and approached, whether the initial alternative solution is effective is judged, and then the target solution is output or marked as no solution. The present application considers the angle difference of the rotary shaft under the current tool point and the previous tool point, obtains the far solution and the near solution, and preferentially selects the near solution as the target solution, so as to optimize the five-axis machine tool motion path, reduce the error of the five-axis machine tool in the motion process, shorten the processing cycle, avoid the risk of part overcutting and collision caused by angle mutation, and improve the processing precision; at the same time, when the near solution does not meet the conditions, the solution is changed to the far solution, and the far solution is judged, so as to select the effective solution, reduce the machine tool wear and tool loss, reduce the production cost, and the solution selection method has the characteristics of high efficiency, high stability and strong universality, and can be used for five-axis linkage numerical control machine tools of any structure and any stroke; after the solution selection is discontinuous and the solution is changed to the alternative solution, the overtravel back operation is performed, so as to ensure that the machine tool can always move within a safe range during the whole processing process, the risk of overtravel and collision is avoided, and the continuity and efficiency of processing are also guaranteed.

[0137] Those skilled in the art will appreciate that embodiments of the application can be provided as methods, systems, or computer program products. Accordingly, the application can be embodied in the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the application can be embodied in the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk memory, CD-ROM, optical memory, etc.) having computer usable program code embodied therein.

[0138] The application is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, as well as combinations of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing apparatus to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing apparatus produce a device that implements the functions specified in the flowcharts and / or block diagrams. Figure 1 The device that implements the functions specified in one flow or multiple flows and / or blocks. Figure 1 The device that implements the functions specified in one flow or multiple flows and / or blocks.

[0139] These computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture including instructions which implement the Figure 1 function specified in the flow or flows and / or blocks Figure 1 of the block or blocks.

[0140] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions that are executed on the computer or other programmable apparatus provide steps for implementing the Figure 1 function specified in the flow or flows and / or blocks Figure 1 of the block or blocks.

[0141] Obviously, the above-described embodiments are only examples and are not intended to limit the present application. Other variations and modifications can be made based on the above description by those skilled in the art. Here, it is not necessary or possible to exhaust all the embodiments. The obvious variations and modifications derived therefrom are still within the scope of the present application.

Claims

1. A method for selecting a post-processing rotation axis angle for a five-axis machine tool, characterized in that, Comprising obtaining and correcting a target solution of a five-axis machine tool at a previous tool position; obtaining a first solution and a second solution of the five-axis machine tool at a current tool position, and eliminating singular points in each group of solutions, each group of solutions containing a four-axis value and a five-axis value; updating the four-axis value and the five-axis value in each group of solutions after the singular points are eliminated, so that the four-axis deviation and the five-axis deviation between each group of updated solutions and the corrected target solution at the previous tool position are not greater than 180°; determining an initial preferred solution and an initial alternative solution based on the four-five-axis total deviation and the five-axis deviation between each group of updated solutions and the corrected target solution at the previous tool position, including: if the four-five-axis total deviations of the two solutions are different, obtaining the solution corresponding to the smaller four-five-axis total deviation as the preferred solution, and the other solution as the alternative solution; if the four-five-axis total deviations of the two solutions are the same, comparing the five-axis deviations corresponding to the two solutions: if the five-axis deviations corresponding to the two solutions are different, obtaining the solution corresponding to the smaller five-axis deviation as the preferred solution, and the other solution as the alternative solution; if the five-axis deviations corresponding to the two solutions are the same, obtaining the solution with the five-axis value greater than 0 as the preferred solution, and the other solution as the alternative solution; judging whether the initial preferred solution is out of range: if the initial preferred solution is not out of range, marking the state of the initial preferred solution as valid and the solution selection as continuous, and outputting the initial preferred solution as the target solution at the current tool position; if the initial preferred solution is out of range, correcting the initial preferred solution, and then judging whether the corrected initial preferred solution is out of range: if the corrected initial preferred solution is not out of range, marking the state of the initial preferred solution as valid but the solution selection as discontinuous, and obtaining a candidate preferred solution at the current tool position by taking the modulus and correcting the four-axis value and the five-axis value in the initial preferred solution; updating the corrected target solution at the previous tool position so that the four-axis deviation and the five-axis deviation between the updated corrected target solution at the previous tool position and the candidate preferred solution at the current tool position are not greater than 180°, and then judging whether the updated corrected target solution at the previous tool position is out of range: if the updated corrected target solution at the previous tool position is not out of range, outputting the candidate preferred solution as the target solution at the current tool position; if the updated corrected target solution at the previous tool position is out of range, marking the state of the candidate preferred solution as solution replacement, and replacing the solution to the initial alternative solution; if the corrected initial preferred solution is still out of range, marking the state of the initial preferred solution as solution replacement, and replacing the solution to the initial alternative solution; correcting the initial alternative solution to obtain a candidate alternative solution at the current tool position; updating the corrected target solution at the previous tool position so that the four-axis deviation and the five-axis deviation between the updated corrected target solution at the previous tool position and the candidate alternative solution at the current tool position are not greater than 180°, and then judging whether the updated corrected target solution at the previous tool position is out of range: if the updated corrected target solution at the previous tool position is not out of range, outputting the candidate alternative solution as the target solution at the current tool position; if the updated corrected target solution at the previous tool position is out of range, marking the state of the candidate alternative solution as invalid.

2. The post-processing rotary axis angle selection method for five-axis machine tools according to claim 1, characterized in that, correcting the solution of the five-axis machine tool, including: obtaining a preset four-axis stroke range and a preset five-axis stroke range corresponding to the five-axis machine tool; correcting the four-axis value and the five-axis value in the solution of the five-axis machine tool to the corresponding preset four-axis stroke range and preset five-axis stroke range by adding or subtracting 360°.

3. The method of claim 2, wherein the angle of the rotation axis of the post-processing of the five-axis machine tool is selected from the group consisting of 0°, 90°, 180°, and 270°. The judgment of whether the solution is out of range includes: If the four-axis value is out of the preset four-axis stroke range of the five-axis machine tool, the solution is out of range; If the five-axis value is out of the preset five-axis stroke range of the five-axis machine tool, the solution is out of range; If the four-axis value and the five-axis value are not out of the preset four-axis stroke range and the preset five-axis stroke range of the five-axis machine tool, the solution is not out of range.

4. The method of claim 1, wherein, The singular point in the solution is eliminated, including: The coordinates of the tool axis and the fifth axis in the five-axis machine tool at the current tool position are obtained, and it is judged whether the tool axis and the fifth axis of the five-axis machine tool at the current tool position are parallel: If not parallel, there is no singular point; If parallel, the five-axis value in each group of solution of the current tool position is updated to the five-axis value in the target solution of the previous tool position of the five-axis machine tool, and each group of solution after eliminating the singular point is obtained.

5. The method of claim 1, wherein, The four-axis value and the five-axis value in a solution are updated and transformed by adding or subtracting 360°, so that the four-axis deviation and the five-axis deviation between the updated solution and another solution are not greater than 180°.

6. The method of claim 1, wherein, If the target solution of the current tool position is the first preferred solution or the alternative solution which is effective but discontinuous, the tool of the five-axis machine tool is executed with the out-of-range rollback operation, and after the tool is in the target range, cutting is performed.

7. The method of claim 6, wherein the angle of the rotational axis of the post-processing of the five-axis machine tool is selected from the group consisting of 0°, 90°, 180°, and 270°. The tool of the five-axis machine tool is executed with the out-of-range rollback operation, including: The tool is retreated along the normal direction to leave the machining area; The fourth axis and the fifth axis of the five-axis machine tool are positioned to the point in the target solution of the current tool position; After the tool is moved to the previous tool position, the tool is fed to the cutting point to perform cutting work.

8. The method of claim 6, wherein the angle of the rotation axis of the post-processing of the five-axis machine tool is selected. If the target solution of the current tool position is the first preferred solution which is effective but discontinuous, and the fifth axis of the five-axis machine tool is the modulus axis, the out-of-range rollback operation is not needed.

9. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to realize the steps in the five-axis machine tool post-processing rotary axis angle solution selection method of any one of claims 1 to 8.

Citation Information

Patent Citations

  • Post-processing methods for five-axis CNC machining

    CN102269984A

  • Calibration method of five-axis machine tool, computer equipment and storage medium

    CN115147484A