Five-axis machine tool post-processing rotating shaft angle selecting and solving method and readable storage medium

By obtaining and correcting the target solution in the five-axis machine tool, eliminating the singularity points, determining the initial solution based on the deviation, and selecting the near solution as the target solution, the problem of unreasonable selection of the post-processing angle of the five-axis machine tool is solved, and higher machining accuracy and lower production costs are achieved.

CN119644904AActive Publication Date: 2025-03-18SUZHOU QIANJI INTELLIGENT SOFTWARE CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The selection of post-processing angles of existing five-axis machine tools is unreasonable, resulting in overcutting and collision of parts, which in turn affects the machining accuracy.

Method used

By obtaining and correcting the target solution of the five-axis machine tool at the previous drilling point, eliminating the singular points, updating the four-axis value and five-axis value in the solution, so that the deviation from the target solution of the previous drilling point is no more than 180°, and determining the initial preferred solution and alternative solution based on the total deviation of the four- and five-axis axes and the five-axis deviation, the near solution is preferred as the target solution, and if the conditions are not met, the solution will be changed to the far solution.

Benefits of technology

Optimize the movement path of five-axis machine tools, reduce errors, shorten the processing cycle, avoid the risks caused by sudden angle changes, thereby improving machining accuracy, reducing machine tool wear and tool loss, and reducing production costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119644904A_ABST
    Figure CN119644904A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of universal five-axis machine tool angle processing, and discloses a five-axis machine tool post-processing rotating shaft angle selection method and a readable storage medium, and the method comprises the steps: obtaining and correcting a target solution of a five-axis machine tool at a previous cutter location point; a first solution and a second solution of the current cutter location point are obtained, after singular points are eliminated, updating is carried out, and all the updated solutions are made to be close to the corrected target solution of the previous cutter location point; determining an initial preferred solution and an initial alternative solution from each group of updated solutions; firstly, an initial preferred solution is judged, and if the initial preferred solution is effective and the preferred solutions are continuous, a target solution of a current cutter location point is output; if the initial alternative solution is valid but the selected solution is discontinuous, performing rejudgment after correction, and if the initial alternative solution is still overrun, changing the solution to the initial alternative solution, and judging whether the initial alternative solution is valid or not; and if the alternative solution is still invalid, marking the alternative solution as no solution. According to the method, the target solution is selected by considering the deviation of the two adjacent cutter location points, so that the motion path of the five-axis machine tool is optimized, the machining period is shortened, and the machining precision is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of angle processing of universal five-axis machine tools, and in particular to a method for selecting and solving the angle of a rotation axis in post-processing of a five-axis machine tool and a readable storage medium. Background Art

[0002] Five-axis CNC machining, including three linear coordinate axes and two rotary coordinate axes, can control the workpiece in five directions at the same time, and is increasingly used in complex parts processing fields with high-precision processing requirements 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 respectively, so that the tool can be accurately positioned and adjusted along the three-dimensional space of the workpiece to achieve cutting processing; the two rotary coordinate axes A and C (or B, depending on the machine tool configuration) are rotary axes, which allow the tool or workpiece to rotate around a specific axis, providing convenience for processing various complex curved surfaces, allowing the tool to approach the workpiece from multiple angles, and realize multi-faceted processing and complex shape processing.

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

[0004] However, the post-processing conversion of five-axis CNC machine tools is not an easy task. Due to the introduction of two rotation axes, manual CNC machining programs are not only time-consuming and laborious, but also difficult to ensure correctness. In addition, the multi-solution nature of five-axis machine tools makes the machine angle solution selection a key issue. At present, common processing methods mainly focus on selecting feasible solutions within the travel range, and tend to select points closer to the previous tool position as solutions.

[0005] Although the existing method can meet the needs of simple machining operations within the plane, the solution it selects is only an approximate solution rather than the optimal solution, which may lead to sudden angle changes of the tool and sudden tool axis changes caused by singular tool axes during the machining process; sudden angle changes will cause tool wear and even the risk of overcutting and collision of parts; and the singular tool axis will also cause the tool to be unable to continue cutting stably, affecting the machining accuracy.

[0006] Moreover, in the scenarios of variable spindle machining and variable plane machining, it is necessary to frequently change the spindle direction and machining plane of the tool; although the method of selecting adjacent solutions performs well when processing solutions within the travel range of the machine tool, it is incapable of coping with complex machining scenarios such as variable spindle machining and variable plane machining, which will lead to unstable machining accuracy and limit the versatility of the machining method. Summary of the invention

[0007] To this end, the technical problem to be solved by the present invention is to overcome the problem of poor machining accuracy caused by overcutting and collision of parts due to unreasonable post-processing angle selection of the five-axis machine tool in the prior art.

[0008] In order to solve the above technical problems, the present invention provides a method for selecting and solving the angle of a rotation axis of a five-axis machine tool after post-processing, comprising: Obtain and correct the target solution of the five-axis machine tool at the previous tool position; Obtain the first solution and the second solution of the five-axis machine tool at the current tool position, and eliminate the singular points in each set of solutions, each set of solutions contains a four-axis value and a five-axis value; Update the four-axis value and five-axis value in each group of solutions after eliminating the singular point, so that the four-axis deviation and five-axis deviation of each group of solutions after updating and the target solution after the previous tool position point correction are no more than 180°; Based on the total four- and five-axis deviations and five-axis deviations of each group of updated solutions and the target solution after the previous tool position point is corrected, the initial preferred solution and the initial alternative solution are determined; Determine whether the initial preferred solution exceeds the limit: If the initial preferred solution does not exceed the travel distance, the status of the initial preferred solution is marked as valid and the selected solution is continuous, and the initial preferred solution is output as the target solution for the current tool position point; If the initial preferred solution exceeds the travel range, the initial preferred solution is corrected and then it is determined whether the corrected initial preferred solution exceeds the travel range: If the corrected initial preferred solution does not exceed the travel range, the status of the initial preferred solution is marked as valid but the solution selection is discontinuous, and the four-axis value and the five-axis value in the initial preferred solution are modulo and corrected to obtain the candidate preferred solution of the current tool position point; the corrected target solution of the previous tool position point is updated, so that the four-axis deviation and the five-axis deviation of the updated previous tool position point target solution and the candidate preferred solution of the current tool position point are not greater than 180°, and then it is determined whether the updated previous tool position point target solution exceeds the travel range: If the updated target solution of the previous tool position does not exceed the path, the candidate preferred solution is output as the target solution of the current tool position; If the updated target solution of the previous cutter position exceeds the travel distance, the state of the candidate first choice solution is marked as a change solution, and the solution is changed to the initial candidate solution; If the corrected initial preferred solution still exceeds the travel distance, the initial preferred solution is marked as a solution change, and the solution is changed to the initial candidate solution; Correct the initial candidate solution to obtain the candidate solution of the current tool position point; update the corrected target solution of the previous tool position point so that the four-axis deviation and five-axis deviation of the updated previous tool position point target solution and the candidate solution of the current tool position point are not greater than 180°, and then determine whether the updated previous tool position point target solution exceeds the travel range: If the updated target solution of the previous tool position does not exceed the path, the candidate solution is output as the target solution of the current tool position; If the updated previous tool position target solution exceeds the travel distance, the status of the candidate solution is marked as invalid.

[0009] Preferably, the solution of the five-axis machine tool is corrected, including: Obtain the preset four-axis travel range and the preset five-axis travel range corresponding to the five-axis machine tool; The four-axis value and the five-axis value in the solution of the five-axis machine tool are corrected to the corresponding preset four-axis travel range and the preset five-axis travel range by using the method of adding and subtracting 360°.

[0010] Preferably, determining whether the solution exceeds the limit includes: If the four-axis value exceeds the preset four-axis travel range of the five-axis machine tool, the solution is overtravel; If the five-axis value exceeds the preset five-axis travel range of the five-axis machine tool, the solution is overtravel; 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 travel range.

[0011] Preferably, eliminating singular points in the solution includes: Get the coordinates of the tool axis and the fifth axis of the five-axis machine tool at the current tool position, and determine whether the tool axis and the fifth axis of the five-axis machine tool are parallel at the current tool position: If they are not parallel, there are no singularities; If they are parallel, the five-axis values ​​in each group of solutions at the current tool position point are updated to the five-axis values ​​in the target solution of the five-axis machine tool at the previous tool position point, and each group of solutions after eliminating the singular points is obtained.

[0012] Preferably, the four-axis values ​​and the five-axis values ​​in a solution are updated and transformed by using a method of adding or subtracting 360°, so that the four-axis deviation and the five-axis deviation between the updated solution and another solution are both no greater than 180°.

[0013] Preferably, based on the total four- and five-axis deviations and five-axis deviations of each group of updated solutions and the target solution after the previous tool position point is corrected, an initial preferred solution and an initial candidate solution are determined, including: If the total deviations of the four and five axes of the two solutions are different, the solution corresponding to the smaller total deviation of the four and five axes is obtained as the preferred solution, and the other solution is used as the alternative solution; If the total deviations of the four and five axes of the two solutions are the same, compare the five-axis deviations corresponding to the two solutions: 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 taken as the alternative solution; If the five-axis deviations corresponding to the two solutions are the same, the solution with a five-axis value greater than 0 is obtained as the preferred solution, and the other solution is taken as the alternative solution.

[0014] Preferably, if the target solution of the current tool position point is a valid but discontinuous preferred solution or an alternative solution, an overtravel retract operation is performed on the tool of the five-axis machine tool, and cutting is performed after the tool is within the target range.

[0015] Preferably, the step of performing an overtravel retract operation on a tool of a five-axis machine tool comprises: Make the tool withdraw along the normal direction to leave the processing area; Position the fourth and fifth axes of the five-axis machine tool to the points in the target solution of the current tool position point; After the tool moves to the previous cutting position, it then advances to the cutting point to perform cutting work.

[0016] Preferably, if the target solution of the current tool position point is a valid but discontinuous preferred solution, and the fifth axis of the five-axis machine tool is a modulo axis, there is no need to perform an overtravel retract operation.

[0017] This embodiment provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps in the above-mentioned method for selecting and solving the rotation axis angle in post-processing of a five-axis machine tool are implemented.

[0018] The above technical solution of the present invention has the following beneficial effects compared with the prior art: The method for selecting the angle of the rotating axis of a five-axis machine tool after post-processing of the present invention selects a near solution as the initial preferred solution and a far solution as the initial alternative solution by calculating the difference between the dual solution of the current tool position point and the target solution of the previous tool position point; it is first judged whether the initial preferred solution meets the requirements, and if the initial preferred solution is valid and the selected solution is continuous, it is output as the target solution of the current tool position point; if it is valid but the selected solution is not continuous, it is corrected and approached, and then judged again, and the target solution is output or the solution is changed to the initial alternative solution to judge whether the initial alternative solution meets the requirements; the initial alternative solution is corrected and approached to judge whether it is valid, and then the target solution is output or marked as no solution. The present invention takes into account the angle difference between the current tool position point and the rotation axis at the previous tool position point, obtains the far solution and the near solution, and preferentially selects the near solution as the target solution, so as to optimize the motion path of the five-axis machine tool, reduce the error of the five-axis machine tool during the motion process, shorten the processing cycle, avoid the risk of overcutting and collision of parts caused by sudden angle changes, and thus improve the processing accuracy; 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 to select an effective solution, reduce machine tool wear and tool loss, and reduce production costs, and the solution selection method of the present invention can be used for five-axis linkage CNC machine tools with any structure and any stroke; After the solution is discontinuous and the solution is switched to an alternative solution, the present invention performs an overtravel retract operation to ensure that the machine tool can always move within a safe range during the entire processing process, avoiding angle mutations and spindle mutations, thereby avoiding the risks of overtravel and collision, and ensuring the continuity and efficiency of processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to make the content of the present invention more clearly understood, the present invention is further described in detail below according to specific embodiments of the present invention in conjunction with the accompanying drawings, wherein: Figure 1 It is a flowchart of the steps of the method for selecting and solving the angle of the rotation axis of a five-axis machine tool post-processing provided by the present invention; Figure 2 is a flow chart of steps for bringing one solution close to another solution provided by the present invention; Figure 3 It is a flow chart of the steps for obtaining the preferred solution and the alternative solutions provided by the present invention. DETAILED DESCRIPTION

[0020] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments so that those skilled in the art can better understand the present invention and implement it, but the embodiments are not intended to limit the present invention.

[0021] Reference Figure 1 As shown, the flowchart of the method for selecting the angle of the rotation axis of a five-axis machine tool post-processing provided by the present invention comprises the following specific steps: S101: Obtain and correct the target solution of the five-axis machine tool at the previous tool position; S102: Obtain the first solution and the second solution of the five-axis machine tool at the current tool position point, and eliminate the singular points in each group of solutions, each group of solutions includes a four-axis value and a five-axis value; S103: updating the four-axis values ​​and the five-axis values ​​in each group of solutions after eliminating the singular points, respectively, so that the four-axis deviation and the five-axis deviation of each group of solutions after the update and the target solution after the previous tool position point is corrected are not greater than 180°; S104: determining an initial preferred solution and an initial alternative solution based on the total four- and five-axis deviations and the five-axis deviations of each group of updated solutions and the target solution after the previous tool position point is corrected; S105: Determine whether the initial preferred solution exceeds the limit: S106: If the initial preferred solution does not exceed the travel distance, the initial preferred solution is marked as valid and the selected solution is continuous, and the initial preferred solution is output as the target solution for the current tool position point; S107: If the initial preferred solution exceeds the travel range, the initial preferred solution is corrected, and it is determined again whether the corrected initial preferred solution exceeds the travel range: S108: If the corrected initial preferred solution does not exceed the travel range, the status of the initial preferred solution is marked as valid but the solution selection is discontinuous, and the four-axis value and the five-axis value in the initial preferred solution are modulo and corrected to obtain the candidate preferred solution of the current tool position point; the corrected target solution of the previous tool position point is updated, so that the four-axis deviation and the five-axis deviation of the updated previous tool position point target solution and the candidate preferred solution of the current tool position point are not greater than 180°, and then it is determined whether the updated previous tool position point target solution exceeds the travel range: S108-1: If the updated target solution of the previous tool position does not exceed the path, output the candidate preferred solution as the target solution of the current tool position; S108-2: If the updated previous cutter position target solution exceeds the travel distance, the state of the candidate first choice solution is marked as a change solution, and the solution is changed to the initial candidate solution; S109: If the corrected initial preferred solution still exceeds the travel range, the initial preferred solution is marked as a solution change, and the solution is changed to the initial candidate solution; S110: Correct the initial candidate solution to obtain a candidate solution for the current tool position point; update the corrected target solution of the previous tool position point so that the four-axis deviation and the five-axis deviation of the updated previous tool position point target solution and the candidate solution for the current tool position point are not greater than 180°, and then determine whether the updated previous tool position point target solution exceeds the travel range: S110-1: If the updated target solution of the previous tool position point does not exceed the path, output the candidate solution as the target solution of the current tool position point; S110-2: If the updated previous cutter position target solution exceeds the travel distance, the status of the candidate solution is marked as invalid.

[0022] In this embodiment, the solution is corrected multiple times, including correcting the target solution of the five-axis machine tool at the previous tool position point, correcting the initial preferred solution, and correcting the initial alternative solution; the above-mentioned correction of the solution of the five-axis machine tool includes: obtaining the preset four-axis travel range and the preset five-axis travel range corresponding to the five-axis machine tool; using the method of adding or subtracting 360° to correct the four-axis value and the five-axis value in the solution of the five-axis machine tool to the corresponding preset four-axis travel range and preset five-axis travel range.

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

[0024] For each solution, it is judged 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, then this solution is out of range; if the five-axis value exceeds the preset five-axis travel range of the five-axis machine tool, then this solution is out of range; if neither the four-axis value nor the five-axis value exceeds the corresponding preset four-axis travel range and preset five-axis travel range of the five-axis machine tool, then this solution is not out of range.

[0025] Among them, 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 the specified ranges of the fourth axis and the fifth axis when leaving the factory; the common value range is within [-360, 360]; but generally, the four-axis is mostly within [-180, 180], and the two sides may not reach 180 and may be smaller; the five-axis is mostly within [-360, 360], but similarly, it may not reach 360.

[0026] In the embodiment of the present invention, eliminating the singular points in the solution includes: Obtaining the coordinates of the tool axis and the coordinates of the fifth axis in the five-axis machine tool at the current tool position point, and judging whether the tool axis and the fifth axis of the five-axis machine tool are parallel at the current tool position point: If they are not parallel, there are no singular points; If they are parallel, update the five-axis value in each group of solutions at the current tool position point to the five-axis value in the target solution of the five-axis machine tool at the previous tool position point, and obtain each group of solutions after eliminating the singular points.

[0027] Specifically, when the tool axis tov(i,j,k) is parallel to the fifth axis dir(i,j,k) of the machine tool, it represents singularity, and 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 point (pre_dp1[ang4,ang5]), expressed as: cur1.ang5=pre_dp1.ang5, cur2.ang5=pre_dp1.ang5.

[0028] In an embodiment of the present invention, a solution is updated so that its four-axis deviation and five-axis deviation with another solution are both within a preset range, that is, one solution is brought close to another solution, specifically comprising: using a method of adding and subtracting 360° to update and transform the four-axis values ​​and five-axis values ​​in a solution so that the four-axis deviation and five-axis deviation of the updated solution with another solution are both no greater than 180°.

[0029] Specifically, take 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: If cur1.ang4-pre_dp1.ang4>180°, cur1.ang4=cur1.ang4-360°; If pre_dp1.ang4-cur1.ang4>180°, cur1.ang4=cur1.ang4+360°; Until |cur1.ang4-pre_dp1.ang4|<180°, process the remaining three angles in the same way.

[0030] Reference Figure 2 As shown, it is a flow chart of the steps of bringing one solution closer to another solution, specifically including: obtaining the current angle and the previous angle corresponding to the two solutions, comparing the difference between the two angles, and if the absolute value of the difference is greater than 180°, determining which angle is larger; if the value of the current angle minus the previous angle is greater than 180°, making the current angle minus 360° closer to 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°, making the current angle plus 360° closer to the previous angle until the difference between the two angles is not greater than 180°.

[0031] Reference Figure 3 , which is a flow chart of the steps of obtaining the preferred solution and the alternative solutions provided by the present invention; specifically, in step S104, obtaining the initial preferred solution and the initial alternative solutions includes: S104-1: If the total deviations of the four and five axes of the two solutions are different, the solution corresponding to the smaller total deviation of the four and five axes is obtained as the first choice solution, and the other solution is used as the alternative solution; S104-2: If the total deviations of the four and five axes of the two solutions are the same, compare the deviations of the five axes corresponding to the two solutions: S104-3: 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 first choice solution, and the other solution is used as the alternative solution; S104-4: If the five-axis deviations corresponding to the two solutions are the same, the solution with a five-axis value greater than 0 is obtained as the primary solution, and the other solution is used as the alternative solution.

[0032] Among them, the total four-axis and five-axis deviation of the two solutions is the sum of the four-axis value difference and the five-axis value difference of the two solutions. For example, the total four-axis and five-axis deviation between the first solution of the current tool position point and the target solution of the previous tool position point is expressed as: dat1=|cur1.ang4-pre_dp1.ang4|+|cur1.ang5-pre_dp1.ang5|; the five-axis deviation of the two solutions is the five-axis value difference of the two solutions. For example, the five-axis deviation between the first solution of the current tool position point and the target solution of the previous tool position point is expressed as: dat51=|cur1.ang5-pre_dp1.ang5|; similarly, the total four-axis and five-axis deviation and the five-axis deviation between the second solution of the current tool position point and the target solution of the previous tool position point can be calculated.

[0033] The method for selecting the angle of the rotating axis of a five-axis machine tool after post-processing of the present invention selects a near solution as the initial preferred solution and a far solution as the initial alternative solution by calculating the difference between the dual solution of the current tool position point and the target solution of the previous tool position point; it is first judged whether the initial preferred solution meets the requirements, and if the initial preferred solution is valid and the selected solution is continuous, it is output as the target solution of the current tool position point; if it is valid but the selected solution is not continuous, it is corrected and approached, and then judged again, and the target solution is output or the solution is changed to the initial alternative solution to judge whether the initial alternative solution meets the requirements; the initial alternative solution is corrected and approached to judge whether it is valid, and then the target solution is output or marked as no solution. The present invention takes into account the angle difference between the current tool position point and the rotation axis at the previous tool position point, obtains the far solution and the near solution, and preferentially selects the near solution as the target solution, so as to optimize the motion path of the five-axis machine tool, reduce the error of the five-axis machine tool during the motion process, shorten the processing cycle, avoid the risk of overcutting and collision of parts caused by sudden angle changes, and thus improve the processing accuracy; 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 to select an effective solution, reduce machine tool wear and tool loss, and reduce production costs, and the solution selection method of the present invention can be used for five-axis linkage CNC machine tools with any structure and any stroke; In an embodiment of the present invention, if the target solution of the current tool position point is a valid but discontinuous primary solution or an alternative solution, an overtravel retract operation is performed on the tool of the five-axis machine tool to perform cutting after the tool is within the target range.

[0034] Among them, the overtravel retract operation for the tool of the five-axis machine tool includes: Make the tool withdraw along the normal direction to leave the processing area; Position the fourth and fifth axes of the five-axis machine tool to the points in the target solution of the current tool position point; After the tool moves to the previous cutting position, it then advances to the cutting point to perform cutting work.

[0035] The modulo axis has no angle limit and can be rotated to any angle; if the target solution of the current tool position point is a valid but discontinuous preferred solution, and the fifth axis of the five-axis machine tool is a modulo axis, there is no need to perform an overtravel retract operation.

[0036] The present invention performs an overtravel retract operation after the selected solution is discontinuous and the solution is switched to an alternative solution to ensure that the machine tool can always move within a safe range during the entire processing process, avoiding the risks of overtravel and collision, and ensuring the continuity and efficiency of processing.

[0037] Specifically, based on the above embodiment, in the embodiment of the present invention, the five-axis machine tool post-processing rotation axis angle selection method provided by the present invention is used to perform actual selection, which specifically includes: S201: Standardize the target solution value of the previous tool position (pre_dp1[40,359]) and control it within the four-axis travel range rng4(-105,105) and the five-axis travel range rng5(0,360); when the program starts, it may not be within the travel range. If both the four-axis and the five-axis are within the range, no transformation is required; S202: singular value processing; If the tool axis tov (0,0.12,0.89) is parallel to the fifth axis dir (0,0,1) of the machine tool, it indicates singularity, and the fifth axis angle of the dual solution of the current tool position point (cur1[40,2],cur2[-40,182]) is assigned to the fifth axis angle of the previous tool position point (pre_dp1[40,359]); If the tool axis tov and the fifth axis dir of the machine tool are at tol=1e -5 If they are not parallel within the tolerance, no transformation is required; S203: The double solution (cur1[40,2], cur2[-40,182]) is moved closer to the target solution of the previous cutter position. The closeness is based on the fact that the difference between the two is no more than 180°. Without considering the travel range, the double solutions are: cur1[40,362], cur2[-40,182]; S204: respectively calculate the total deviation dat (dat1, dat2) of the four and five axes of the two sets of solutions of the current tool position point and the previous tool position point, and the deviation dat5 (dat51, dat52) of the five axes, and preferentially select the solution with the smaller total deviation dat of the four and five axes as the preferred solution (dp1); if the two sets of solutions dat are the same, select the solution with the smaller five-axis deviation dat5 as the preferred solution; if the two sets of solutions dat are still the same, select the solution with ang5>0 as the preferred solution; After calculation, dat1=0+3=3, dat2=80+177=257, dat51=3, dat52=177. Select dat1 with the smallest dat, mark cur1 as the preferred solution dp1[40,362], and mark cur2 as the alternative solution dp2[-40,182]. S205: Determine whether the preferred solution exceeds the travel range: If it exceeds, try to add or subtract 360°, determine the overtravel situation again, and re-mark whether it is continuous (approximate solution); dp1[40,362] The fourth axis does not overtravel, the fifth axis overtravels, and after the fifth axis -360°, dp1=[40,2] does not overtravel, marking the preferred solution as discontinuous; S206: Determine whether the alternative solution (dp2) exceeds the travel range. If so, try +-360, determine the over-travel situation again, and re-mark whether it is continuous (far solution); dp2[-40,182], the fourth and fifth axes are not overtraveled, marking the alternative solutions as continuous; S207: Modulo axis (i.e., rotary axis, which can rotate infinitely), no need to consider whether it is continuous; S208: The preferred solution (dp1) is used as a reference to determine whether to change the solution, thereby marking the discontinuity again and recalculating the previous position (pre): S208-1: The first solution is discontinuous, modulo the current angle, and limit it to within the range by adding or subtracting 360°; Specifically, the preferred solution is discontinuous, and dp1 is [40, 2] after modulo, which is within the range of travel; S208-2: The previous preferred solution (pre_dp1) is close to the current optimal solution (dp1); After pre_dp1[40,359] approaches dp1[40,2], pre_dp1=[40,-1]; S208-3: The previous position candidate solution (pre_dp2) is close to the current optimal solution (dp1); pre_dp2[-40,179] is close to dp1[40,2] and then pre_dp2[-40,179]; S208-4: Check whether the current optimal solution (dp1) and the previous preferred solution (pre_dp1) are valid. If it is valid, dp1 is taken as the target solution and the process ends; If invalid, switch to the current candidate solution dp2, mark it as discontinuous, and limit it to the range by adding or subtracting 360°; pre_dp1[40,-1] exceeds the limit, dp1 is invalid, and S208-5 is executed; dp2[-40,182] is within the travel range; S208-5: The previous preferred solution (pre_dp1) is close to the current candidate solution (dp2); After pre_dp1[40,359] approaches dp2[-40,182], pre_dp1=[40,359]; S208-6: The previous candidate solution (pre_dp2) is close to the current candidate solution (dp2); After pre_dp2[-40,179] approaches dp2[-40,182], pre_dp2=[-40,179]; S208-7: Check whether the current candidate solution (dp2) and the candidate solution of the previous position (pre_dp2) are valid, and if they are valid, select dp2 as the solution; Both dp2 and pre_dp2 are valid, select dp2; S208-8: If invalid, mark as unsolvable; S209: The angle is discontinuous and an overtravel retraction operation is required. The specific steps are as follows: The tool retracts along the normal direction; the rotation axis is positioned to the point calculated by the above algorithm without overtravel; the tool moves quickly to the retract point; the tool enters the cutting point and continues cutting.

[0038] This embodiment uses a proximity processing algorithm to move the current tool position point closer to the previous tool position point, and always uses the proximity solution; when the proximity solution switches to the distance solution, the algorithm will enter the overtravel backoff node processing discontinuity, avoiding the generation of angle mutations and spindle mutations; at the same time, in any spindle, any inclined plane, and any structure of a five-axis machine tool, it can always ensure that the angle is close, and the angle must be within the machine tool travel range, fundamentally solving the problem of five-axis solution selection to adapt to various processing scenarios.

[0039] An embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps in the above-mentioned method for selecting and solving the rotation axis angle of a five-axis machine tool post-processing are implemented.

[0040] The five-axis machine tool post-processing rotation axis angle solution selection method and readable storage medium described in the present invention calculate the difference between the dual solution of the current tool position point and the target solution of the previous tool position point, select the near solution as the initial preferred solution, and the far solution as the initial alternative solution; prioritize whether the initial preferred solution meets the requirements, if the initial preferred solution is valid and the selected solution is continuous, then it is output as the target solution for the current tool position point; if it is valid but the selected solution is not continuous, then correction and approach are performed, and then judgment is performed again, and the target solution is output or the solution is switched to the initial alternative solution to determine whether the initial alternative solution meets the requirements; the initial alternative solution is corrected and approached to determine whether it is valid, and then the target solution is output or marked as no solution. The present invention takes into account the angular difference between the current tool position point and the rotating axis at the previous tool position point, obtains the far solution and the near solution, and preferentially selects the near solution as the target solution, so as to optimize the motion path of the five-axis machine tool, reduce the error of the five-axis machine tool during the motion process, shorten the processing cycle, avoid the risk of overcutting and collision of parts caused by sudden angle change, thereby improving the processing accuracy; at the same time, when the near solution does not meet the conditions, the solution is switched to the far solution, and the far solution is judged to select an effective solution, reduce machine tool wear and tool loss, and reduce production costs. The solution selection method of the present invention has the characteristics of high efficiency, high stability and strong versatility, and can be used for five-axis linkage CNC machine tools with any structure and any stroke; after the solution selection is discontinuous and the solution is switched to the alternative solution, the present invention performs an overtravel retract operation to ensure that the machine tool can always move within a safe range during the entire processing process, avoid the risk of overtravel and collision, and also ensure the continuity and efficiency of processing.

[0041] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0042] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, 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 device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0043] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0044] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0045] Obviously, the above embodiments are merely examples for the purpose of clear explanation and are not intended to limit the implementation methods. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation methods here. The obvious changes or modifications derived therefrom are still within the scope of protection of the present invention.

Claims

1. A method for selecting and solving the angle of a rotation axis in post-processing of a five-axis machine tool, characterized in that: include Obtain and correct the target solution of the five-axis machine tool at the previous tool position; Obtain the first solution and the second solution of the five-axis machine tool at the current tool position, and eliminate the singular points in each set of solutions, each set of solutions contains a four-axis value and a five-axis value; Update the four-axis value and five-axis value in each group of solutions after eliminating the singular point, so that the four-axis deviation and five-axis deviation of each group of solutions after updating and the target solution after the previous tool position point correction are no more than 180°; Based on the total four- and five-axis deviations and five-axis deviations of each group of updated solutions and the target solution after the previous tool position point is corrected, the initial preferred solution and the initial alternative solution are determined; Determine whether the initial preferred solution exceeds the limit: If the initial preferred solution does not exceed the travel distance, the status of the initial preferred solution is marked as valid and the selected solution is continuous, and the initial preferred solution is output as the target solution for the current tool position point; If the initial preferred solution exceeds the travel range, the initial preferred solution is corrected and then it is determined whether the corrected initial preferred solution exceeds the travel range: If the corrected initial preferred solution does not exceed the travel distance, the initial preferred solution is marked as valid but the selected solution is discontinuous, and the four-axis value and the five-axis value in the initial preferred solution are modulo-corrected and corrected to obtain the candidate preferred solution of the current tool position point; After updating the corrected target solution of the previous tool position, so that the four-axis deviation and five-axis deviation of the updated target solution of the previous tool position and the candidate preferred solution of the current tool position are not greater than 180°, determine whether the updated target solution of the previous tool position exceeds the travel range: If the updated target solution of the previous tool position does not exceed the path, the candidate preferred solution is output as the target solution of the current tool position; If the updated target solution of the previous cutter position exceeds the travel distance, the state of the candidate first choice solution is marked as a change solution, and the solution is changed to the initial candidate solution; If the corrected initial preferred solution still exceeds the travel distance, the initial preferred solution is marked as a solution change, and the solution is changed to the initial alternative solution; Modify the initial candidate solution to obtain the candidate solution of the current tool position point; After updating the corrected target solution of the previous tool position, so that the four-axis deviation and five-axis deviation of the updated target solution of the previous tool position and the candidate solution of the current tool position are not greater than 180°, determine whether the updated target solution of the previous tool position exceeds the travel range: If the updated target solution of the previous tool position does not exceed the path, the candidate solution is output as the target solution of the current tool position; If the updated previous tool position target solution exceeds the travel distance, the status of the candidate solution is marked as invalid.

2. The five-axis machine tool post-processing rotation axis angle selection method according to claim 1 is characterized in that: Corrections to the solution for five-axis machine tools, including: Obtain the preset four-axis travel range and the preset five-axis travel range corresponding to the five-axis machine tool; The four-axis value and the five-axis value in the solution of the five-axis machine tool are corrected to the corresponding preset four-axis travel range and the preset five-axis travel range by using the method of adding and subtracting 360°.

3. The five-axis machine tool post-processing rotation axis angle selection method according to claim 2 is characterized in that: Determine whether the solution exceeds the limit, including: If the four-axis value exceeds the preset four-axis travel range of the five-axis machine tool, the solution is overtravel; If the five-axis value exceeds the preset five-axis travel range of the five-axis machine tool, the solution is overtravel; 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 travel range.

4. The five-axis machine tool post-processing rotation axis angle selection method according to claim 1, characterized in that: Eliminate singularities in the solution, including: Get the coordinates of the tool axis and the fifth axis of the five-axis machine tool at the current tool position, and determine whether the tool axis and the fifth axis of the five-axis machine tool are parallel at the current tool position: If they are not parallel, there are no singularities; If they are parallel, the five-axis values ​​in each group of solutions at the current tool position point are updated to the five-axis values ​​in the target solution of the five-axis machine tool at the previous tool position point, and each group of solutions after eliminating the singular points is obtained.

5. The method for selecting and solving the rotation axis angle of a five-axis machine tool after post-processing according to claim 1, characterized in that: By using the method of adding or subtracting 360°, the four-axis values ​​and the five-axis values ​​in a certain solution are updated and transformed so that the four-axis deviation and the five-axis deviation between the updated solution and another solution are no greater than 180°.

6. The five-axis machine tool post-processing rotation axis angle selection method according to claim 1, characterized in that: The method of determining the initial preferred solution and the initial alternative solution based on the total four- and five-axis deviations and the five-axis deviations of the updated solution groups and the target solution after the previous tool position point correction comprises: If the total deviations of the four and five axes of the two solutions are different, the solution corresponding to the smaller total deviation of the four and five axes is obtained as the preferred solution, and the other solution is used as the alternative solution; If the total deviations of the four and five axes of the two solutions are the same, compare the five-axis deviations corresponding to the two solutions: 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 taken as the alternative solution; If the five-axis deviations corresponding to the two solutions are the same, the solution with a five-axis value greater than 0 is obtained as the preferred solution, and the other solution is taken as the alternative solution.

7. The method for selecting and solving the rotation axis angle of a five-axis machine tool post-processing according to claim 1, characterized in that: If the target solution of the current tool position point is a valid but discontinuous preferred solution or an alternative solution, the tool of the five-axis machine tool is subjected to an overtravel retract operation, and cutting is performed after the tool is within the target range.

8. The method for selecting and solving the post-processing rotation axis angle of a five-axis machine tool according to claim 7, characterized in that: The step of performing an overtravel retract operation on a tool of a five-axis machine tool comprises: Make the tool withdraw along the normal direction to leave the processing area; Position the fourth and fifth axes of the five-axis machine tool to the points in the target solution of the current tool position point; After the tool moves to the previous cutting position, it then advances to the cutting point to perform cutting work.

9. The method for selecting and solving the post-processing rotation axis angle of a five-axis machine tool according to claim 7, characterized in that: If the target solution of the current tool position point is a valid but discontinuous preferred solution, and the fifth axis of the five-axis machine tool is a modulo axis, there is no need to perform an overtravel retract operation.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps in the post-processing rotation axis angle selection method for a five-axis machine tool as claimed in any one of claims 1 to 9 are implemented.

Citation Information

Patent Citations

  • Post-processing methods for five-axis CNC machining

    CN102269984A

  • Five-axis post-processing method based on machine tool entity model

    CN105204430A

  • Post-processing rotation angle selection optimization method for five-axis numerical control machine tool

    CN109839892A

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

    CN115147484A

  • Machine tool and method for operating a machine tool

    WO2021249958A1