Five-axis machine tool processing data adaptive post-processing method and system for multi-CAM platform
By adopting an adaptive five-axis machine tool machining data processing method and system, the problem of poor compatibility of five-axis CNC machine tools in machining complex parts has been solved, and efficient machining through multi-software collaboration has been achieved, improving the universality of machining data and production efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GENERAL TECH GRP MASCH TOOL ENG RES INST CO LTD
- Filing Date
- 2026-03-12
- Publication Date
- 2026-06-02
AI Technical Summary
In the existing technology, the post-processing process of five-axis CNC machine tools in the machining of complex parts is cumbersome and has poor compatibility, making it unsuitable for complex process scenarios involving multiple software collaborations, which seriously restricts the machining capability.
An adaptive post-processing method and system for five-axis machine tool machining data on multi-CAM platforms is proposed. Developed using MATLAB, it achieves adaptive compatibility with multiple CNC systems and multi-CAM platforms. It uses standard format toolpath files for data conversion, identifies and avoids singularities, and realizes automatic identification and parsing of G-code and toolpath files. It also supports normalization processing of machining data under multiple machine tool configurations.
It simplifies the post-processing flow of complex structural parts, improves the universality and reusability of machining data, ensures the safe and continuous machining of complex structural parts under various machine tool configurations, and improves machining preparation efficiency and machine tool machining capabilities.
Smart Images

Figure CN122131689A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of CNC machining data post-processing technology, and in particular to an adaptive post-processing method and system for five-axis machine tool machining data for multi-CAM platforms. Background Technology
[0002] Currently, five-axis CNC machine tools are widely used in various fields such as aerospace and precision machinery for machining complex parts. Among them, for structurally complex parts, the post-processing stage is the core link connecting part design and CNC machining. It converts the non-standardized data output by the Computer Aided Manufacturing (CAM) platform into data that the CNC machine tool can recognize and execute. The quality of post-processing directly determines the final application effect of the CAM software, the operational reliability of the machine tool, and the equipment utilization rate.
[0003] In particular, due to the extremely high difficulty in process planning for structurally complex parts, it is usually necessary to rely on multiple CAM software programs to work together to complete reasonable toolpath planning. Each CAM software program must be equipped with a post-processing module that matches its specific machine tool structure and CNC system. Furthermore, some CAM software programs can only output CNC program code (hereinafter referred to as G code) or processed toolpath data, but cannot provide universal toolpath data.
[0004] Therefore, in this information-closed environment, the post-processing solutions in related technologies have very complicated processes and poor compatibility, making them unsuitable for complex process scenarios involving multiple software collaborations, which severely restricts the processing capabilities of CNC machine tools. Summary of the Invention
[0005] This application aims to at least partially address one of the technical problems in the related art.
[0006] Therefore, the first objective of this application is to propose an adaptive post-processing method for five-axis machine tool machining data for multi-CAM platforms. This method provides effective technical support for simplifying and improving the post-processing process of machining complex structural parts and enhancing machine tool machining capabilities through adaptive five-axis machining post-processing research for multiple NC systems (e.g., compatible with Siemens and I5) and multiple CAM platforms (e.g., compatible with Qianji Intelligent, NX and TS85 software), and the development and application of algorithms based on the MATLAB language.
[0007] The second objective of this application is to propose an adaptive post-processing system for machining data of five-axis machine tools on a multi-CAM platform.
[0008] The third objective of this application is to propose an electronic device.
[0009] The fourth objective of this application is to provide a computer-readable storage medium.
[0010] To achieve the above objectives, the first aspect of this application is to propose an adaptive post-processing method for five-axis machine tool machining data on a multi-CAM platform, comprising the following steps:
[0011] Set a standard format toolpath file and identify the source file type of the machining program for the part to be processed; If the source file type is CNC program code or a non-standard format toolpath file, the source file will be converted into the standard format toolpath file. Based on the data in the standard format toolpath file, singular points in five-axis machine tool machining are identified, and these singular points are avoided through coordinate planning. Determine the required output file type for the current five-axis machine tool. If the output file type is a standard format toolpath file, output a standard format toolpath file after singularity avoidance processing. If the output file type is CNC program code, convert the standard format toolpath file after singularity avoidance processing based on the kinematics calculation of the five-axis machine tool, and then output CNC program code in the specified format.
[0012] Optionally, converting the source file into the standard format toolpath file includes: if the source file type is CNC program code, extracting linear axis coordinates and rotary axis coordinates from the CNC program code based on inverse kinematics calculation of a five-axis machine tool, and converting the linear axis coordinates and rotary axis coordinates into toolpath coordinates and tool axis vector coordinates; if the source file type is a non-standard format toolpath file, extracting the toolpath coordinates and tool axis vector coordinates from the non-standard format toolpath file; converting the toolpath coordinates and tool axis vector coordinates into tool position coordinate lines in the standard format toolpath file; and converting the setting instructions in the source file into corresponding instruction lines in the standard format toolpath file.
[0013] Optionally, converting the linear axis coordinates and the rotation axis coordinates into tool position coordinates and tool axis vector coordinates includes: calculating the three-dimensional tool axis vector coordinates in workpiece coordinates based on the current configuration of the five-axis machine tool and multiple working parameters, wherein the configuration includes a rotary table and a swivel head, and the multiple working parameters include the rotation angle of the rotary table and the swing angle of the swivel head.
[0014] Optionally, the step of identifying singularities in five-axis machine tool machining based on data in the standard format toolpath file and avoiding the singularities through coordinate planning includes: determining the singularities by analyzing the projection of the tool axis vector coordinates onto the S-shaped surface; and, based on the position of the singularities, performing coordinate planning on the basis of the original toolpath coordinates to make the tool axis vectors in the singular region bypass the tapered circle to avoid the singular region.
[0015] Optionally, the step of converting the standard format toolpath file after singularity avoidance processing based on five-axis machine tool kinematics calculation and outputting CNC program code in a specified format includes: extracting toolpath coordinates and tool axis vector coordinates from the standard format toolpath file after singularity avoidance processing based on forward five-axis machine tool kinematics calculation, and converting the toolpath coordinates and tool axis vector coordinates into linear axis coordinates and rotary axis coordinates; converting the linear axis coordinates and rotary axis coordinates into coordinate lines in the CNC program code in the specified format, and performing toolpath planning and coordinate line supplementation; and converting the setting instructions in the standard format toolpath file after singularity avoidance processing into corresponding instruction lines in the CNC program code in the specified format.
[0016] Optionally, converting the tool position coordinates and the tool axis vector coordinates into linear axis coordinates and rotary axis coordinates includes: calculating multiple operating parameters of the current five-axis machine tool configuration based on the tool axis vector coordinates, wherein the multiple operating parameters of the current five-axis machine tool configuration include the forward rotation angles of different rotary tables.
[0017] To achieve the above objectives, a second aspect of this application also proposes an adaptive post-processing system for five-axis machine tool machining data on a multi-CAM platform, comprising the following modules: The source file type identification module is used to set a standard format toolpath file and identify the type of the source file for the current part machining program. The standard toolpath file generation module is used to convert the source file into the standard toolpath file when the source file type is CNC program code or a non-standard format toolpath file. The singularity identification and avoidance module is used to identify singularities in five-axis machine tool machining based on the data in the standard format toolpath file, and to avoid the singularities through coordinate planning. The output file type identification module is used to determine the output file type required by the current five-axis machine tool, and when the output file type is a standard format tool position file, outputs a standard format tool position file after singularity avoidance processing; The CNC program code generation module is used to convert the standard format tool position file after singularity avoidance processing based on the kinematics calculation of the five-axis machine tool when the output file type is CNC program code, and then output CNC program code in a specified format.
[0018] To achieve the above objectives, a third aspect of this application also provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the adaptive post-processing method for five-axis machine tool machining data for a multi-CAM platform as described in any of the first aspects above.
[0019] To achieve the above objectives, the fourth aspect of this application also proposes a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the adaptive post-processing method for five-axis machine tool machining data for a multi-CAM platform as described in any of the first aspects above.
[0020] The technical solutions provided by the embodiments of this application bring at least the following beneficial effects: This application achieves adaptation to multiple CAM platforms and multiple CNC systems, can automatically identify and parse G-code and toolpath files of multiple formats, is suitable for complex machining scenarios with multi-CAM software collaborative operation, and achieves adaptive compatibility across multiple platforms and systems. Furthermore, based on the forward and inverse kinematics calculation algorithms of five-axis machine tools, this application realizes bidirectional intelligent conversion between G-code and toolpath data under multiple machine tool configurations, completes the normalization processing of multi-source machining data, and improves the universality and reusability of machining data. Moreover, this application directly integrates the automatic identification and avoidance of five-axis machining singularities in the post-processing workflow, eliminating the need for additional machining simulation software for simulation verification. It avoids various problems caused by singularities from the data source, ensuring the safe and continuous machining of complex structural parts under various machine tool configurations, and improving the reliability of the post-processing workflow and the efficiency of machining preparation. Furthermore, the modular post-processing system developed in this application based on the MATLAB language integrates cumbersome multi-source data processing, format conversion, singularity avoidance, and other processes into a single tool, simplifying the post-processing flow for machining complex structural parts, lowering the technical threshold, and effectively improving the machining capabilities and production efficiency of CNC machine tools.
[0021] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0022] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein: Figure 1 This is a flowchart of an adaptive post-processing method for five-axis machine tool machining data on a multi-CAM platform, as proposed in an embodiment of this application. Figure 2 This is a schematic diagram illustrating the workflow of a specific adaptive post-processing method for five-axis machine tool machining data on a multi-CAM platform, as proposed in an embodiment of this application. Figure 3 This is a schematic diagram of the projection of the tool axis vector in the identification of singularities in blade machining according to an embodiment of this application; Figure 4 This is a schematic diagram of the projection of the tool axis vector before singularity avoidance during the machining of part S, as proposed in an embodiment of this application. Figure 5 This is a schematic diagram of the projection of the tool axis vector after singularity avoidance during the machining of an S-part according to an embodiment of this application. Figure 6 This is a schematic diagram of the structure of an adaptive post-processing system for five-axis machine tool machining data on a multi-CAM platform, as proposed in an embodiment of this application. Figure 7 This is a schematic diagram illustrating the working principle of an adaptive post-processing system for five-axis machine tool machining data on a multi-CAM platform, as proposed in an embodiment of this application. Detailed Implementation
[0023] Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain the present invention, and should not be construed as limiting the present invention.
[0024] It should be noted that the post-processing methods for five-axis machine tool machining data in the relevant embodiments generally lack compatibility, focusing only on solving the code generation problem for specific part machining. They are difficult to apply to complex process scenarios involving multiple software collaborations, especially for specific machine tool configurations and CNC systems. Furthermore, even if the dedicated methods in the relevant embodiments can generate G-code, simulation calculations are still required in additional machining simulation software to check for and avoid singularity issues.
[0025] To this end, this application proposes an adaptive post-processing method and system for five-axis machine tool machining data on multi-CAM platforms. It provides a post-processing mode that can adapt to multiple CAM platforms, develops a general post-processing tool with unified parsing and processing capabilities, and can achieve deep fusion and intelligent conversion of data between multiple formats of G-code and tool position files.
[0026] The following description, with reference to the accompanying drawings, describes an adaptive post-processing method and system for five-axis machine tool machining data on a multi-CAM platform, as proposed in the embodiments of this application.
[0027] Figure 1 This is a flowchart illustrating an adaptive post-processing method for five-axis machine tool machining data on a multi-CAM platform, as proposed in an embodiment of this application. Figure 2 This is a schematic diagram illustrating the workflow of a specific adaptive post-processing method for five-axis machine tool machining data on a multi-CAM platform, as proposed in an embodiment of this application. Figure 1 As shown, the method includes the following steps: Step S101: Set the standard format toolpath file and identify the source file type of the part machining program to be processed.
[0028] Specifically, this application first sets a certain type of toolpath file as a standard format toolpath file to determine the benchmark for subsequent processing. This standard format toolpath file can be a file generated by a core software platform that is compatible with multiple CAM platforms. For example, the toolpath file generated by Siemens NX software can be set as the standard format toolpath file.
[0029] Then, identify the type of the part machining program source file to be adaptively post-processed, that is, identify whether the current source file is G-code or a non-standard tool file other than the standard tool file mentioned above.
[0030] Step S102: If the source file type is CNC program code or a non-standard format toolpath file, convert the source file into a standard format toolpath file.
[0031] Specifically, such as Figure 2 As shown, if the current source file is identified as a standard format toolpath file, the next step of singularity processing is performed directly. If the current source file is identified as G-code or a non-standard format toolpath file, it is converted into a standard format toolpath file.
[0032] In one embodiment of this application, converting the source file into a standard format tool file includes the following steps: S11, when the source file type is CNC program code, based on the inverse kinematics calculation of a five-axis machine tool, extracts the linear axis coordinates and rotary axis coordinates from the CNC program code, and converts the linear axis coordinates and rotary axis coordinates into tool position coordinates and tool axis vector coordinates.
[0033] Specifically, for G-code, a five-axis machine tool kinematics inverse calculation process is performed, that is, firstly, the linear axis coordinates and rotary axis coordinates are extracted from the G-code, and then, based on the machine tool configuration of the currently applied five-axis machine tool, the linear axis coordinates and rotary axis coordinates are converted into tool position coordinates and tool axis vector coordinates.
[0034] As one example, for a certain configuration of a five-axis machine tool, converting linear axis coordinates and rotary axis coordinates into tool position coordinates and tool axis vector coordinates includes: calculating the three-dimensional tool axis vector coordinates in workpiece coordinates based on the current configuration of the five-axis machine tool and multiple working parameters, wherein the configuration includes a rotary table and a swivel head, and the multiple working parameters include the rotation angle of the rotary table and the swing angle of the swivel head.
[0035] For example, if a machine tool configuration consists of a rotary table and a swivel head, then the three-dimensional tool axis vector coordinates are calculated based on the rotation angle of the rotary table and the swing angle of the swivel head.
[0036] S12, when the source file type is a non-standard format toolpath file, extract the toolpath coordinates and tool axis vector coordinates from the non-standard format toolpath file.
[0037] Specifically, for non-standard format toolpath files, toolpath parsing data processing is performed to extract toolpath coordinate data and tool axis vector coordinate data from the non-standard format toolpath files.
[0038] S13 converts the tool position coordinates and tool axis vector coordinates into tool position coordinate rows in a standard format tool position file.
[0039] Specifically, this step involves converting the toolpath file coordinates into rows, which means writing the toolpath coordinate data and tool axis vector coordinate data obtained above into tool position coordinate rows in a standard format toolpath file.
[0040] S14 converts the setting instructions in the source file into the corresponding instruction lines in the standard format toolpath file.
[0041] Specifically, this step involves converting the toolpath file instruction lines, that is, converting the machine tool and tool settings instructions in G-code or non-standard format toolpath files into the corresponding instruction lines in the standard toolpath file.
[0042] Step S103: Identify singular points in the five-axis machine tool machining based on the data in the standard format toolpath file, and avoid singular points through coordinate planning.
[0043] Specifically, this step utilizes data from the standard format toolpath file obtained in the above embodiments, such as the converted tool axis vector coordinate data, to identify and avoid singularities in five-axis machining.
[0044] In one embodiment of this application, singular points in five-axis machine tool machining are identified based on data in a standard format toolpath file, and the singular points are avoided through coordinate planning. This includes: identifying singular points by analyzing the projection of the tool axis vector coordinates onto an S-shaped surface; and performing coordinate planning based on the location of the singular points, so that the tool axis vectors within the singular area bypass the tapered circle to avoid the singular area.
[0045] Specifically, in this embodiment, singular points are identified on the S-shaped surface (hereinafter referred to as S-surface) in five-axis machining by projecting the tool axis vector. Based on the identified singular points, coordinate planning is performed on the basis of the original tool position data to make the tool axis vector in the singular area bypass the tapered circle, thereby achieving singular point avoidance.
[0046] Step S104: Determine the output file type required by the current five-axis machine tool. If the output file type is a standard format toolpath file, output the standard format toolpath file after singularity avoidance processing. If the output file type is CNC program code, convert the standard format toolpath file after singularity avoidance processing based on the kinematics calculation of the five-axis machine tool, and then output the CNC program code in the specified format.
[0047] Specifically, the type of source file for the part machining program that the currently used five-axis machine tool can directly recognize and process is the type of file to be output after post-processing. Since the source file has been converted to a standard format toolpath file in step S102 above, if the current output file type is a standard format toolpath file, then the standard format toolpath file after singularity avoidance processing (i.e., completing step S103) is directly output. If the current output file type is G-code, then the standard format toolpath file is converted to the specified format of G-code (i.e., G-code in a format that the current five-axis machine tool can recognize) and the file is output.
[0048] In one embodiment of this application, after converting the standard format toolpath file after singularity avoidance processing based on five-axis machine tool kinematics calculation, the CNC program code in a specified format is output, including the following steps: S21, based on the forward kinematics calculation of a five-axis machine tool, extracts the tool position coordinates and tool axis vector coordinates from the standard format tool position file after singularity avoidance processing, and converts the tool position coordinates and tool axis vector coordinates into linear axis coordinates and rotary axis coordinates.
[0049] Specifically, this step involves performing a forward kinematics calculation for a five-axis machine tool, which means extracting the tool position coordinates and tool axis vector coordinates from the standard tool position file and converting them into linear axis coordinates and rotary axis coordinates in G-code.
[0050] As one example, for a certain configuration of a five-axis machine tool, converting the tool position coordinates and tool axis vector coordinates into linear axis coordinates and rotary axis coordinates includes: calculating multiple working parameters of the current five-axis machine tool configuration based on the tool axis vector coordinates, wherein the multiple working parameters of the current five-axis machine tool configuration include the positive rotation angle of different rotary tables.
[0051] S22 converts linear and rotary axis coordinates into coordinate lines in a specified format of CNC program code, and performs toolpath planning and coordinate line supplementation.
[0052] Specifically, this step involves converting the G-code coordinate lines, which means writing the above linear axis coordinate data and rotation axis coordinate data into coordinate lines in a specified format of G-code, and planning and supplementing the coordinate lines for tool feed, tool change, and tool retraction paths.
[0053] S23 converts the setting instructions in the standard format toolpath file after singularity avoidance processing into the corresponding instruction lines in the CNC program code of the specified format.
[0054] Specifically, the process of converting G-code instruction lines involves converting the machine tool and tool settings instructions in the standard format toolpath file into corresponding instruction lines in the specified format G-code.
[0055] Therefore, this application provides automatic identification and parsing of G-code or toolpath files for multiple control systems and multiple CAM platforms, and is compatible with forward and reverse kinematic calculations and intelligent conversion between G-code and toolpath data in multi-machine tool configurations, making it suitable for environments where multiple CAM software work together.
[0056] In summary, the adaptive post-processing method for five-axis machine tool machining data for multi-CAM platforms in this application embodiment achieves adaptation to multiple CAM platforms and multiple CNC systems. It can automatically identify and parse G-code and toolpath files of multiple formats, making it suitable for complex machining scenarios involving collaborative operation of multiple CAM software and achieving adaptive compatibility across multiple platforms and systems. Furthermore, based on the forward and inverse kinematics calculation algorithms of five-axis machine tools, this method achieves bidirectional intelligent conversion between G-code and toolpath data under multiple machine tool configurations, completes the normalization processing of multi-source machining data, and improves the versatility and reusability of machining data. Moreover, this method directly integrates the automatic identification and avoidance of five-axis machining singularities into the post-processing flow, eliminating the need for additional machining simulation software for verification. It avoids various problems caused by singularities from the data source, ensuring the safe and continuous machining of complex structural parts under various machine tool configurations, and improving the reliability of the post-processing flow and machining preparation efficiency.
[0057] Based on the above embodiments, in order to more clearly and intuitively illustrate the specific implementation process of the adaptive post-processing method for five-axis machine tool machining data for multi-CAM platforms of this application, two specific embodiments in practical applications are described below as examples.
[0058] In the first embodiment, taking the machining of a certain type of blade part using a five-axis CNC machine tool as an example, the five-axis machine tool includes three orthogonally arranged linear axes X, Y, and Z, and two rotary axes A and B, specifically configured as a rotary table A and a swivel head B, equipped with a Siemens CNC system. The source file for the blade part machining program is G-code in a specific format generated by TS85 programming software. Therefore, in this embodiment, it is necessary to convert the TS85 format G-code file under the A rotary table B swivel head machine tool configuration into G-code in a format recognizable by the Siemens CNC system.
[0059] The specific post-processing method in this embodiment includes the following steps: The first step is to use the source file type identification module to make a judgment.
[0060] The second step is to convert the source file into a standard format toolpath file using the standard toolpath file generation module, since the source file is in TS85 format G code.
[0061] Specifically, the process of converting TS85 format G-code to a standard format tool file includes: First, the linear and rotary axis coordinates in the G-code are converted to tool position and tool axis vector coordinates using the inverse kinematics coordinate transformation module. Since both sets of coordinates in this embodiment are data in the workpiece coordinate system, only the conversion between rotary axis coordinates and tool axis vector coordinates is performed. In this embodiment, inverse kinematics modeling is performed based on a machine tool configuration with a rotary table A and a swivel head B. The specific calculation formula is shown below:
[0062] in, This represents the direction vector of the tool in the workpiece coordinate system (i.e., the tool axis vector coordinate). This represents the positive rotation angle of the turntable. The positive oscillation angle representing the head's swing, and the determination of the positive or negative direction of rotation both conform to the right-hand rule. Based on the principle of relativity of motion, this uses... The angle of the turntable is used for calculation.
[0063] Then, the tool position coordinate rows in the standard format tool position file are generated using the tool position file coordinate row conversion module, specifically in the form of: GOTO / For example, in this embodiment, one segment of the coordinate behavior is as follows: GOTO / -39.038800, -2.052500, 14.851900, -0.039628, 0.992187, 0.118302 GOTO / -39.038300, -2.007500, 14.830300, -0.039126, 0.993576, 0.106184 GOTO / -39.037800, -1.963000, 14.808200, -0.038616, 0.994815, 0.094088 Finally, the toolpath file instruction conversion module is used to convert the machine tool and tool settings instructions in the TS85 format G code into the corresponding instruction lines in the standard toolpath file.
[0064] The third step is to use the singularity identification and avoidance module to analyze the projection of the tool axis vector on the S-plane and identify singularities.
[0065] Specifically, such as Figure 3 As shown, in this embodiment, all tool axis vectors avoid singular regions, so there are no kinematic singularities.
[0066] The fourth step is to use the output file type recognition module to make a judgment.
[0067] Fifth, since the output file type is Siemens format G code, the tool position file in the above standard format is converted to Siemens format G code and then output.
[0068] Specifically, the process of converting a standard format toolpath file to Siemens format G-code includes: First, the tool position and tool axis vector coordinates in the standard tool position file are converted into linear and rotary axis coordinates in Siemens G-code using the forward kinematics coordinate transformation module. In this embodiment, forward kinematics modeling is performed based on the machine tool configuration with rotary table A and swivel head B. The specific calculation formula is shown below:
[0069] It should be noted that in the formula In the process of solving the problem, we consider avoiding abrupt changes in angles during quadrant transformation.
[0070] Then, the coordinate lines in Siemens format G-code are generated using the G-code coordinate line conversion module, and the tool feed, tool change, and tool retraction paths are planned and the coordinate lines are supplemented. For example, in this embodiment, a certain segment of coordinate line is converted as follows: N340 X-39.03880 Y-2.05250 Z14.85190 B-2.27111 A=DC(276.79948) F1433.0 N350 X-39.03830 Y-2.00750 Z14.83030 B-2.24233 A=DC(276.10008) F1433.0 N360
[0071] The tool path planning before the first tool position point is as follows: N240 G0 B-2.36859 A=DC(279.17180) N250 D1 N260 TRAORI N270 G0 X-40.10760 Y23.61690 Z49.47360 N280 G0 X-39.04040 Y-6.98680 Z44.53230.
[0072] Finally, the G-code instruction conversion module is used to generate instruction lines for machine tool, cutting tool, and other settings in Siemens format G-code.
[0073] In the second embodiment, taking the machining of a certain S-shaped part using a five-axis CNC machine tool as an example, the five-axis machine tool includes three orthogonally arranged linear axes X, Y, and Z, and two rotary axes A and C. Specifically, it has an AC dual rotary table configuration and is equipped with an I5 CNC system. The source file for the S-shaped part machining program is a standard format toolpath file exported from NX software. Therefore, in this embodiment, it is necessary to convert the standard format toolpath file under the AC dual rotary table machine tool configuration into G-code in a format recognizable by the I5 CNC system.
[0074] The specific post-processing method in this embodiment includes the following steps: The first step is to use the source file type identification module to make a judgment.
[0075] The second step is to proceed directly to the next step, since the source file is a standard format tool position file.
[0076] The third step involves using the singularity identification and avoidance module to analyze the projection of the tool axis vector onto the S-plane and identify singularities. For example... Figure 4 As shown, in this embodiment, before singularity avoidance, the tool axis vector passes through the singular region, identifying the existence of kinematic singularities. Then, coordinate planning is performed, and after avoidance processing, all tool axis vectors bypass the tapered circle, as shown... Figure 5 As shown, singular regions can be avoided. For example, in this embodiment, the knife point in one of the singular regions is: GOTO / -4.164244, 24.114256, 21.025519, 0.029824, -0.120300, 0.992290 GOTO / -4.115986, 23.934908, 21.024026, 0.029470, -0.118811, 0.992480 GOTO / -4.068122, 23.756447, 21.022588, 0.029116, -0.117326, 0.992666 GOTO / -4.020650, 23.578882, 21.021206, 0.028763, -0.115848, 0.992850.
[0077] After singularity avoidance, it transforms into: GOTO / -4.164244, 24.114256, 21.025519, 0.029824, -0.120300, 0.992290 GOTO / -4.115986, 23.934908, 21.024026, 0.029045, -0.120489, 0.992290 GOTO / -4.068122, 23.756447, 21.022588, 0.028264, -0.120673, 0.992290 GOTO / -4.020650, 23.578882, 21.021206, 0.027482, -0.120853, 0.992290.
[0078] The fourth step is to use the output file type recognition module to make a judgment.
[0079] The fifth step is to output the file type as I5 format G code. Therefore, the tool position file in the standard format above is converted into I5 format G code and output.
[0080] Specifically, the process of converting a standard format toolpath file to I5 format G-code includes: First, the tool position and tool axis vector coordinates in the standard tool position file are converted into linear and rotary axis coordinates in I5 format G-code using the forward kinematics coordinate transformation module. In this embodiment, forward kinematics modeling is performed based on the AC dual rotary table machine tool configuration. The specific calculation formula is as follows:
[0081] in, This represents the positive rotation angle of turntable A. The positive rotation angle of turntable C is represented by the right-hand rule, and the determination of the positive or negative direction of rotation conforms to the right-hand screw rule. Similarly, in this embodiment... The solution takes into account avoiding abrupt changes in angles during quadrant transformation.
[0082] Then, the coordinate lines in the I5 format G code are generated using the G code coordinate line conversion module, and the tool feed, tool change and tool retraction paths are planned and the coordinate lines are supplemented. Finally, the G-code instruction conversion module is used to generate machine tool, cutting tool, and other setting instruction lines in I5 format G-code.
[0083] To achieve the above embodiments, this application also proposes an adaptive post-processing system for five-axis machine tool machining data on a multi-CAM platform. Figure 6 This is a schematic diagram of the structure of an adaptive post-processing system for five-axis machine tool machining data on a multi-CAM platform, as proposed in an embodiment of this application. Figure 6 As shown, the system includes: The source file type identification module 100 is used to set a standard format tool position file and identify the source file type of the part machining program to be processed.
[0084] The standard toolpath file generation module 200 is used to convert source files into standard toolpath files when the source file type is CNC program code or a non-standard format toolpath file.
[0085] The singularity identification and avoidance module 300 is used to identify singularities in five-axis machine tool machining based on data in a standard format toolpath file, and to avoid singularities through coordinate planning.
[0086] The output file type identification module 400 is used to determine the output file type required by the current five-axis machine tool, and outputs the standard format tool position file after singularity avoidance processing when the output file type is a standard format tool position file.
[0087] The CNC program code generation module 500 is used to convert the standard format tool position file after singularity avoidance processing based on the kinematics calculation of the five-axis machine tool, and output the CNC program code in the specified format when the output file type is CNC program code.
[0088] In one embodiment of this application, such as Figure 7 As shown, the standard toolpath file generation module for multiple CAM platforms and CNC systems includes: a reverse kinematics coordinate transformation module, a toolpath data parsing module, a toolpath file coordinate line transformation module, and a toolpath file instruction transformation module. The CNC program code generation module for multiple CNC systems includes: a forward kinematics coordinate transformation module, a CNC program code coordinate line transformation module, and a CNC program code instruction transformation module. The workflow of each module is as follows: Figure 7 As shown.
[0089] It should be noted that the foregoing explanation of the embodiment of the adaptive post-processing method for five-axis machine tool machining data for multi-CAM platforms also applies to the system of this embodiment, and will not be repeated here.
[0090] In summary, the adaptive post-processing system for five-axis machine tool machining data for multi-CAM platforms in this application embodiment is a modular post-processing system developed based on the MATLAB language. It integrates cumbersome multi-source data processing, format conversion, singularity avoidance and other processes into a single tool, simplifying the post-processing process for machining complex structural parts, lowering the technical threshold, and effectively improving the machining capabilities and production efficiency of CNC machine tools.
[0091] To implement the above embodiments, this application also proposes an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the adaptive post-processing method for five-axis machine tool machining data for a multi-CAM platform as described in any of the first aspect embodiments above.
[0092] To implement the above embodiments, this application also proposes a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the adaptive post-processing method for five-axis machine tool machining data for a multi-CAM platform as described in any one of the first aspect embodiments above.
[0093] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0094] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0095] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.
[0096] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.
[0097] It should be understood that various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0098] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
[0099] Furthermore, the functional units in the various embodiments of this application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0100] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of this application.
Claims
1. An adaptive post-processing method for five-axis machine tool machining data on a multi-CAM platform, characterized in that, Includes the following steps: Set a standard format toolpath file and identify the source file type of the machining program for the part to be processed; If the source file type is CNC program code or a non-standard format toolpath file, the source file will be converted into the standard format toolpath file. Based on the data in the standard format toolpath file, singular points in five-axis machine tool machining are identified, and these singular points are avoided through coordinate planning. Determine the required output file type for the current five-axis machine tool. If the output file type is a standard format toolpath file, output a standard format toolpath file after singularity avoidance processing. If the output file type is CNC program code, convert the standard format toolpath file after singularity avoidance processing based on the kinematics calculation of the five-axis machine tool, and then output CNC program code in the specified format.
2. The method according to claim 1, characterized in that, The process of converting the source file into the standard format tool file includes: When the source file type is CNC program code, based on the inverse kinematics calculation of a five-axis machine tool, the linear axis coordinates and the rotary axis coordinates are extracted from the CNC program code, and the linear axis coordinates and the rotary axis coordinates are converted into tool position coordinates and tool axis vector coordinates. In the case where the source file type is a non-standard format toolpath file, extract the toolpath coordinates and tool axis vector coordinates from the non-standard format toolpath file; Convert the tool position coordinates and tool axis vector coordinates into tool position coordinate rows in a standard format tool position file; The setting instructions in the source file are converted into corresponding instruction lines in the standard format toolpath file.
3. The method according to claim 2, characterized in that, The process of converting the linear axis coordinates and the rotation axis coordinates into tool position coordinates and tool axis vector coordinates includes: Based on the configuration of the current five-axis machine tool and multiple working parameters, the three-dimensional tool axis vector coordinates under the workpiece coordinates are calculated. The configuration includes a rotary table and a swivel head, and the multiple working parameters include the rotation angle of the rotary table and the swing angle of the swivel head.
4. The method according to claim 2, characterized in that, The process of identifying singularities in five-axis machine tool machining based on data from the standard format toolpath file and avoiding these singularities through coordinate planning includes: The singularity point is determined by analyzing the projection of the tool axis vector coordinates onto the S-shaped surface; Based on the location of the singular point, coordinate planning is performed on the basis of the original tool position coordinates, so that the tool axis vector in the singular region bypasses the tapered circle to avoid the singular region.
5. The method according to claim 1, characterized in that, After converting the standard format toolpath file obtained from the singularity avoidance processing based on the five-axis machine tool kinematics calculation, the CNC program code in the specified format is output, including: Based on the forward kinematics calculation of a five-axis machine tool, the tool position coordinates and tool axis vector coordinates are extracted from the standard format tool position file after the singularity avoidance processing, and the tool position coordinates and tool axis vector coordinates are converted into linear axis coordinates and rotation axis coordinates. The linear axis coordinates and the rotation axis coordinates are converted into coordinate lines in the specified format of the CNC program code, and toolpath planning and coordinate line supplementation are performed. The setting instructions in the standard format toolpath file after singularity avoidance processing are converted into corresponding instruction lines in the specified format CNC program code.
6. The method according to claim 5, characterized in that, The step of converting the tool position coordinates and the tool axis vector coordinates into linear axis coordinates and rotation axis coordinates includes: Based on the tool axis vector coordinates, calculate multiple operating parameters of the current five-axis machine tool configuration, wherein the multiple operating parameters of the current five-axis machine tool configuration include the forward rotation angle of different rotary tables.
7. An adaptive post-processing system for machining data of a five-axis machine tool on a multi-CAM platform, characterized in that, Includes the following modules: The source file type identification module is used to set a standard format toolpath file and identify the type of the source file for the current part machining program. The standard toolpath file generation module is used to convert the source file into the standard toolpath file when the source file type is CNC program code or a non-standard format toolpath file. The singularity identification and avoidance module is used to identify singularities in five-axis machine tool machining based on the data in the standard format toolpath file, and to avoid the singularities through coordinate planning. The output file type identification module is used to determine the output file type required by the current five-axis machine tool, and when the output file type is a standard format tool position file, outputs a standard format tool position file after singularity avoidance processing; The CNC program code generation module is used to convert the standard format tool position file after singularity avoidance processing based on the kinematics calculation of the five-axis machine tool when the output file type is CNC program code, and then output CNC program code in a specified format.
8. The system according to claim 7, characterized in that, The standard toolpath file generation module includes: an inverse kinematics coordinate transformation module, a toolpath data parsing module, a toolpath file coordinate line transformation module, and a toolpath file instruction transformation module; The CNC program code generation module includes: a forward kinematic coordinate transformation module, a CNC program code coordinate line transformation module, and a CNC program code instruction transformation module.
9. An electronic device, comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the adaptive post-processing method for five-axis machine tool machining data for a multi-CAM platform as described in any one of claims 1-6.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the adaptive post-processing method for five-axis machine tool machining data for a multi-CAM platform as described in any one of claims 1-6.