A method and system for programming in-machine online measurement based on NX secondary development
Through the in-machine online measurement program preparation method based on NX secondary development, the problems of cumbersome and insufficient automation of measurement programs in the prior art are solved, and a more efficient and accurate measurement program writing and processing process is achieved.
Patent Information
- Application Number
- CN202510362797.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-26
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2045-03-26
AI Technical Summary
The prior art is not sufficient in terms of automation and simplicity of in-machine online measurement programs, which leads to technicians spending a lot of time manually writing, increasing work difficulty and lag in production.
Using the in-machine online measurement program preparation method based on NX secondary development, a three-dimensional model of the parts is imported, a machining coordinate system matching the machine tool is created, and a measurement program is generated using the measurement programming system, and converted into executable CNC code through customized post-processing.
It improves the automation and simplicity of the measurement program, reduces the writing time, improves the processing accuracy and production efficiency, and reduces the probability of human error.
Smart Images

Figure CN119882611B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of machining, and particularly to a method and system for programming an in-machine online measurement program based on NX secondary development. Background Art
[0002] In the current machining flexible production line, the wide application of in-machine probes has significantly improved the level of machining automation. Through in-machine probes, the machine tool can automatically complete tasks such as finding the machining coordinate system, measuring part features, and automatically compensating for machining errors, greatly simplifying the work content of operators and improving the accuracy and automation of the machining process. However, despite the convenience provided by in-machine probes, there are still many challenges in writing measurement programs.
[0003] Currently, during the preparation of in-machine measurement programs, due to the diversity of machined parts and the complexity of measurement program functions, technicians often need to spend a lot of time writing measurement programs manually. Especially when using UG software to program measurement programs, the operation process is particularly cumbersome. For simple measurement tasks, a large amount of part measurement point data often needs to be input to generate the corresponding measurement program. This not only greatly increases the work difficulty of technicians but also prolongs the process preparation time, directly affecting production efficiency and resulting in delays in the overall production process. Existing technologies are still insufficient in terms of the automation and simplicity of in-machine online measurement program writing. Traditional programming methods require technicians to input a large amount of data and information in a complex operation interface, which is a cumbersome process and prone to human errors. In addition, since part machining and measurement are often carried out separately, the consistency of the data source cannot be guaranteed, making the writing process of measurement programs relatively long and increasing the probability of errors.
[0004] Therefore, there is an urgent need for a method and system for programming an in-machine online measurement program based on NX secondary development. Summary of the Invention
[0005] The present invention provides a method and system for programming in-machine online measurement based on NX secondary development to solve the problems in the prior art that during the preparation of in-machine measurement programs, due to the diversity of machined parts and the complexity of the functions of measurement programs, technicians often need to spend a lot of time writing measurement programs manually. Especially when using UG software to program measurement programs, the operation process is particularly cumbersome. For simple measurement tasks, a large amount of part measurement point data often needs to be input to generate the corresponding measurement program. This not only greatly increases the work difficulty of technicians, but also prolongs the process preparation time, directly affecting production efficiency and resulting in delays in the overall production process. The existing technologies are still insufficient in terms of the automation and simplicity of in-machine online measurement program writing. Traditional programming methods require technicians to input a large amount of data and information in a complex operation interface, which is a cumbersome process and prone to human errors. In addition, since the machining and measurement of parts are often carried out separately, the consistency of the data source cannot be guaranteed, resulting in a relatively long process for writing measurement programs and increasing the probability of errors.
[0006] To achieve the above object, the present invention provides the following technical solutions:
[0007] A method for programming in-machine online measurement based on NX secondary development, comprising:
[0008] S101: Import the 3D model of the part or blank to be programmed into the NX software, and create a machining coordinate system that matches the actual machining state of the machine tool;
[0009] S102: Based on the machining coordinate system, generate a measurement program with the required functions through the measurement programming system developed by NX secondary development;
[0010] S103: Convert the measurement program into executable NC code that matches the machine tool through customized post-processing.
[0011] Among them, step S101 includes:
[0012] S1011: Import the 3D model of the part or blank to be programmed into the NX software, and adjust the features and dimensions of the 3D model to meet the in-machine measurement requirements;
[0013] S1012: In the CAM module of the NX software, create geometries, machining methods, program groups, and probe parameters corresponding to the current machining process.
[0014] Among them, step S102 includes:
[0015] S1021: Invoke the measurement programming system developed by NX secondary development in the integrated interface of the NX software, and the operation interface of this measurement programming system is consistent with the native interface attributes of the NX software;
[0016] S1022: Compile a measurement program covering the entire machining cycle through a measurement programming system, including a pre-process reference alignment program, an in-process error compensation program, and a post-process quality inspection program;
[0017] S1023: Embed extended attribute information including process identification, tool compensation parameters, and post-processing parameters in the measurement program for parameter parsing in subsequent post-processing.
[0018] Among them, step S103 includes:
[0019] S1031: Configure post-processing in the NX software, and the post-processing is matched with the machine tool used for in-machine online measurement;
[0020] S1032: Based on the post-processing, convert the compiled in-machine measurement program into a numerical control code containing machine tool motion instructions;
[0021] S1033: The output numerical control code is directly imported into the used machine tool to execute the measurement process.
[0022] Among them, the measurement programming system is developed and implemented based on C#, and the measurement programming system automatically obtains geometric bodies, machining methods, program groups, and probe parameters in the current CAM module environment through the NX API interface, and provides a parameter selection function through an interactive interface;
[0023] The measurement programming system supports the automatic identification of numerical control machining programs, and the association and matching of machining tool numbers, names, and compensation parameters. Among them, the tool compensation parameters include tool radius compensation values and tool length compensation values.
[0024] Among them, the measurement program for the entire machining cycle in step S1022 includes:
[0025] Pre-process reference alignment program: Automatically measure the workpiece features in the machine tool, and automatically update the machining coordinate system of the machine tool according to the feature measurement results;
[0026] In-process error compensation program: Automatically measure the features of the workpiece in the machine tool, and automatically compensate the tool parameters or the offset of the machining coordinate system according to the dimensional deviation of the features;
[0027] Post-process quality inspection program: Automatically measure the features of the machined parts in the machine tool, trigger an alarm when the detected part feature dimensions exceed the tolerance, and generate a customized measurement report.
[0028] Among them, the measurement programming system supports parametric feature measurement programming, including one-way measurement mode, inner and outer circle measurement mode, stepped surface measurement mode, and two-hole angular measurement mode;
[0029] For the 3+2 fixed-axis measurement requirements of five-axis machine tools, the measurement programming system automatically creates the matrix conversion relationship between the main coordinate system and the local coordinate system, and generates fixed-axis measurement codes;
[0030] The measurement programming system supports the dynamic coordinate system switching function, and calculates the optimal coordinate system offset parameters through the measured feature point cloud data.
[0031] Among them, the measurement programming system includes a measurement path optimization sub-module, which sets the feed rate parameters of the measurement probe and performs collision detection;
[0032] For turning-milling composite machine tools, the measurement programming system generates composite in-machine online measurement codes containing C-axis angle positioning instructions to achieve collaborative measurement of turning features and milling features.
[0033] Among them, an in-machine online measurement program preparation system based on NX secondary development includes:
[0034] A model processing module, which is used to import the 3D model of the part or blank to be programmed into NX software and create a machining coordinate system that matches the actual machining state of the machine tool;
[0035] A measurement programming module, which is used to generate measurement programs with required functions based on the machining coordinate system through the measurement programming system developed by NX secondary development;
[0036] A post-processing module, which is used to convert the measurement program into executable NC codes that match the machine tool through customized post-processing.
[0037] Among them, the model processing module includes:
[0038] The first model processing sub-module is used to import the 3D model of the part or blank to be programmed into NX software, and adjust the features and dimensions of the 3D model to meet the in-machine measurement requirements;
[0039] The second model processing sub-module is used to create geometries, machining methods, program groups, and probe parameters corresponding to the current machining process in the CAM module of NX software.
[0040] Compared with the prior art, the present invention has the following advantages:
[0041] A method for programming an in-machine online measurement program based on NX secondary development includes: importing the 3D model of the part or blank to be programmed into the NX software, and creating a machining coordinate system that matches the actual machining state of the machine tool; based on the machining coordinate system, generating a measurement program with the required functions through the measurement programming system developed by NX secondary development; converting the measurement program into an executable NC code that matches the machine tool through customized post-processing. Through the secondary development and customized post-processing of the NX software, the measurement programming and NC programming can be closely combined, thereby improving the accuracy of the entire machining process. By creating a machining coordinate system that matches the actual machining state of the machine tool, the requirements of different machine tools and machining environments can be more flexibly met. The customized measurement program and post-processing system can be adjusted individually according to specific production requirements.
[0042] Other features and advantages of the present invention will be described in the following specification, and, in part, will be obvious from the specification, or will be understood by implementing the present invention.
[0043] The technical solutions of the present invention will be further described in detail below through the accompanying drawings and embodiments. Description of the Drawings
[0044] The drawings are used to provide a further understanding of the present invention, and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation to the present invention. In the drawings:
[0045] Figure 1 is a flowchart of a method for programming an in-machine online measurement program based on NX secondary development in an embodiment of the present invention;
[0046] Figure 2 is a flowchart of creating a machining coordinate system in an embodiment of the present invention;
[0047] Figure 3 is a structural diagram of a system for programming an in-machine online measurement program based on NX secondary development in an embodiment of the present invention. Detailed Embodiments
[0048] The following describes the preferred embodiments of the present invention with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are only for explaining and illustrating the present invention, and are not used to limit the present invention.
[0049] The embodiment of the present invention provides a method for programming an in-machine online measurement program based on NX secondary development, including:
[0050] S101: Import the 3D model of the part or blank to be programmed into the NX software, and create a machining coordinate system that matches the actual machining state of the machine tool;
[0051] S102: Based on the machining coordinate system, a measurement program with required functions is generated by a measurement programming system developed through secondary development of NX;
[0052] S103: The measurement program is converted into executable NC code matching the machine tool through customized post-processing.
[0053] The working principle of the above technical solution is as follows: First, the 3D model of the part or blank to be machined is imported into the NX software; NX is a powerful computer-aided design (CAD) and computer-aided manufacturing (CAM) software used for part design and machining programming. After importing the model, a machining coordinate system matching the actual machining state of the machine tool needs to be created in the NX software. The function of this coordinate system is to ensure that all operations in the machine tool and the program can be correctly positioned and controlled according to the actual machining environment during the machining process. Creating a suitable machining coordinate system is the basis for subsequent programming and machining accuracy. Next, in the NX software, use the measurement programming system to generate the required measurement program through customized functions developed through secondary development. This step is achieved by writing a program for the measurement tasks required during machining. The measurement program is designed based on the machining coordinate system and the geometric characteristics of the part, and can guide the machine tool to perform precise measurement operations to ensure machining accuracy and part quality. The measurement programming system essentially combines the measurement function of the machine tool with the actual machining operation, and realizes dimensional inspection and machining state evaluation at specific positions through programming.
[0054] After generating the measurement program, it is necessary to convert this program into NC code that the machine tool can understand and execute. This step is achieved through a customized post-processing system; the core task of post-processing is to convert a high-level programming language into NC instructions that can be specifically executed by the machine tool, ensuring that the program can be smoothly transmitted to the machine tool and complete the corresponding machining and measurement tasks. The post-processing system will adapt and optimize the code according to different machine tool models and control systems to ensure that the program can be executed efficiently and accurately.
[0055] The beneficial effects of the above technical solution are as follows: The program for in-machine on-line measurement can be directly compiled with the help of the NX software, making the programming process simple; the machining and measurement of parts are both programmed in the NX software, ensuring the consistency of the input source; the compilation of the measurement program can be achieved by directly selecting the part features, simplifying the programming.
[0056] In another embodiment, the S101 step includes:
[0057] S1011: Import the 3D model of the part or blank to be programmed into the NX software, and adjust the features and dimensions of the 3D model to meet the in-machine measurement requirements;
[0058] S1012: In the CAM module of NX software, create geometric bodies, machining methods, program groups, and probe parameters corresponding to the current machining process.
[0059] The working principle of the above technical solution is as follows: First, import the 3D model of the part or blank to be programmed into NX software. After import, the model needs to be appropriately adjusted to meet the requirements of in-machine measurement. These adjustments include modifying the geometric features, dimensions, etc. of the part to ensure that measurement operations can be effectively carried out during machining. For example, adjust the shape of the surface features of the part or modify the dimensions so that the probe of the machine tool can correctly contact and measure the target area. Ensure that the measurement area of the model can be docked with the measurement probe of the machine tool to avoid unnecessary interference or errors during subsequent machining.
[0060] Next, enter the CAM module of NX software. This module is used to generate machining paths and control the actions of the machine tool. In this module, create geometric bodies and machining strategies related to the current machining process according to the imported part model and machining requirements. This includes setting the correct geometric bodies (such as cutting paths or measurement paths), selecting appropriate machining methods (such as milling, drilling, etc.), and organizing and managing different program groups. A program group is a function that combines multiple machining operations to achieve a more efficient and precise machining process. At the same time, probe parameters need to be set, including the geometric characteristics of the probe (such as the length and diameter of the probe body, the length and diameter of the probe tip, etc.). These probe parameters must be consistent with the actual probe used on the machine tool to ensure the accuracy during the measurement process. For the probe of the machine tool, the length, diameter, etc. of the probe body and the probe tip must be exactly matched with the probe in the actual equipment, otherwise it may affect the measurement accuracy. Finally, it is also necessary to ensure that the created probe is consistent with the tool number on the machine tool so that the machine tool can correctly identify and call the probe to ensure the smooth operation of the program during execution.
[0061] The beneficial effects of the above technical solution are as follows: By adjusting the features and dimensions of the 3D model of the part in NX software, it can ensure that the part meets the measurement requirements of the machine tool, thus ensuring the accuracy during the measurement process. Creating geometric bodies and machining methods in the CAM module of NX enables more efficient operation during the programming process. When setting the probe parameters, ensuring consistency with the actual machine tool equipment can eliminate errors caused by inconsistencies, especially in the cooperation between the machine tool and the program.
[0062] In another embodiment, step S102 includes:
[0063] S1021: Call the measurement programming system based on NX secondary development in the integrated interface of NX software. The operation interface of this measurement programming system is consistent with the native interface attributes of NX software;
[0064] S1022: Compile a measurement program covering the entire machining cycle through a measurement programming system, including the pre-sequence datum alignment program, in-process error compensation program, and post-process quality inspection program;
[0065] S1023: Embed extended attribute information including process identification, tool compensation parameters, and post-processing parameters in the measurement program for subsequent parameter parsing in post-processing.
[0066] The working principle of the above technical solution is as follows: The measurement programming system is a secondary development based on NX software, with the same properties as the NX native interface (default interface) (maintaining the same style, that is, the same style), which means that users can seamlessly call the system in the NX software environment, and the operation interface is consistent with the NX operation interface, thus reducing the learning cost. Through the menu interface, shortcut keys, or toolbars, users can easily start the system.
[0067] The measurement compilation system can generate a measurement program covering the entire machining cycle, including the pre-sequence datum alignment program, in-process error compensation program, and post-process quality inspection program.
[0068] Pre-sequence datum alignment: The measurement system will automatically measure the features of the workpiece in the machine tool through the probe and update the machining coordinate system of the machine tool accordingly to ensure machining accuracy.
[0069] In-process error compensation: During machining, the probe automatically measures the workpiece features and compensates the tool according to the dimensional deviation, adjusting the length, radius of the tool, or the offset of the machining coordinate system.
[0070] Post-process quality inspection: After machining is completed, the system automatically measures the features of the machined part. If dimensional tolerance is exceeded, it will automatically alarm, prompting the operator to take corresponding corrective measures.
[0071] In the measurement program, the system will embed extended attribute information including process identification, tool compensation parameters, post-processing parameters, etc. These information are crucial for subsequent post-processing and can ensure that the program can correctly parse and transmit relevant parameters during execution.
[0072] The system supports 3+2 fixed-axis measurement programs in five-axis machine tools and can automatically create a main coordinate system and a local coordinate system to meet the needs of fixed-axis measurement. This is particularly important for the machining and measurement of complex workpieces.
[0073] The measurement system can switch coordinate systems at different machining stages, support different coordinate systems such as G54, G55, G56, etc., and can flexibly adapt to different workpieces and machining requirements.
[0074] After the measurement program is executed, the system can automatically generate a measurement report and support customized report formats. Deviations and out-of-tolerance alarms for each dimension can be displayed in the report to help operators promptly detect machining problems.
[0075] When the system is performing on-line measurement, the feed value of the measurement can be set, and collision detection is automatically carried out to ensure that there is no collision between the machine tool and the workpiece or the measuring tool during the measurement process, thus guaranteeing the safety of the machining process.
[0076] The measurement programming system also supports the compilation of on-line measurement programs for turning-milling compound machine tools, and can realize the measurement and monitoring of complex processes, improving machining accuracy and efficiency.
[0077] The beneficial effects of the above technical solutions are as follows: The measurement programming system has the same native interface style as the NX software. Users do not need to adapt to a new interface, which reduces the learning curve and improves operation efficiency. Through the functions of pre-alignment before the program, compensation during the program, and measurement after the program of the measurement system, the machining accuracy can be greatly improved, errors can be reduced, and the quality of the workpiece can be ensured. The system automatically obtains information in the machining environment and performs corresponding processing, avoiding manual input errors and improving the efficiency and accuracy of program compilation.
[0078] In another embodiment, step S103 includes:
[0079] S1031: Configure post-processing in the NX software, and the post-processing is matched with the machine tool used for in-machine on-line measurement;
[0080] S1032: Based on the post-processing, convert the compiled in-machine measurement program into a numerical control code containing machine tool motion instructions;
[0081] S1033: The output numerical control code is directly imported into the used machine tool to execute the measurement process.
[0082] Step S1032 includes:
[0083] Parse the measurement parameters and path planning data in the in-machine on-line measurement program through the post-processing program;
[0084] Generate a numerical control code file containing three-dimensional motion control instructions of the machine tool and probe trigger timing instructions based on the parsing results;
[0085] The numerical control code file integrates the synchronous control sequence of the machining path instructions and the measurement motion instructions, and generates the machine tool coordinate compensation data for the probe trigger point.
[0086] The working principle of the above technical solution is as follows: During CNC machining, the NX software can perform program preparation and machining path generation. For in-machine on-line measurement, first, a post-processing program matching the machine tool type needs to be configured in NX. The post-processing program is responsible for converting the NC program generated by NX into machine language recognizable by a specific machine tool. The configuration process includes defining the coordinate system of the machine tool, the motion mode, and the sensor information required for on-line measurement, etc.
[0087] Once the in-machine on-line measurement program is completed in NX, the post-processing program is used to convert this program into NC code that can be executed on the machine tool. The NC code not only contains traditional cutting paths and machining instructions but also includes motion instructions, probe trigger commands, etc. required for on-line measurement of the machine tool. This step ensures that the measurement program can accurately control the motion of the machine tool to complete the measurement task.
[0088] The output NC code is imported into the NC system of the machine tool through an appropriate file format. When the machine tool executes the program, it will perform precise machining and measurement operations according to the instructions in the NC code. The motion instructions of the machine tool can automatically control the movement of the tool or probe of the machine tool on the workpiece surface to obtain information such as workpiece dimensions and geometric tolerances in real time, ensuring machining accuracy.
[0089] The beneficial effects of the above technical solution are as follows: By configuring a post-processing program matching the machine tool in NX, it can ensure that the motion instructions and measurement instructions of the machine tool are accurately transmitted to the machine tool, thereby effectively reducing manual intervention and improving machining accuracy and efficiency. The entire process from preparing the in-machine measurement program to converting it into NC code and then importing it into the machine tool is automated. This reduces the manual operation steps, not only accelerates the production process but also reduces the technical requirements for operators, enabling even those with less operating experience to smoothly perform the measurement task. The implementation of in-machine on-line measurement enables real-time monitoring and detection of workpiece size deviations during the machining process.
[0090] In another embodiment, the measurement programming system is developed and implemented based on C#. The measurement programming system automatically obtains geometric bodies, machining methods, program groups, and probe parameters in the current CAM module environment through the NX API interface and provides a parameter selection function through an interactive interface;
[0091] The measurement programming system supports the automatic recognition of NC machining programs and the associated matching of machining tool numbers, names, and compensation parameters. Among them, the tool compensation parameters include tool radius compensation values and tool length compensation values.
[0092] The working principle of the above technical solution is as follows: The measurement programming system is developed through secondary development in the NX software environment using the C# programming language. C# is an object-oriented programming language with powerful Windows application development capabilities. Developers use the API (Application Programming Interface) provided by NX to deeply integrate with the NX software, enabling the system to automatically access and operate various types of data in the NX environment. Through the programming capabilities of C#, custom functions can be written to enhance the extensibility and automation level of the NX software.
[0093] The CAM module (Computer-Aided Manufacturing module) contains data such as machining paths, geometry information, and program groups. In the measurement programming system, the API interface of NX is used to automatically read the geometry (such as workpiece models, machining paths, etc.), machining methods (such as milling, turning, etc.), program groups (program files that process a set of machining operations), and probe parameters in the current machining environment. This information helps the system understand the current machining environment, thereby enabling automated processing and program generation.
[0094] The measurement programming system provides an interactive interface for users, allowing users to select the required parameters through interface elements such as dropdown boxes, buttons, and text boxes. The interface lists the available geometries, machining methods, program groups, and probe parameters. Users only need to make selections, and the system will automatically complete the subsequent parameter configuration. In this way, operators can quickly and efficiently generate measurement programs.
[0095] The measurement programming system has the function of automatically identifying NC machining programs. This means that the system can read and understand existing NC programs, and automatically identify the tool numbers, tool names, and related compensation parameters therein. The tool compensation parameters include the radius compensation value and the length compensation value of the tool. The system uses these compensation parameters to ensure the accurate position and path of the tool during the machining process.
[0096] The tool compensation parameters are crucial for the accuracy of NC machining. The tool radius compensation value and the tool length compensation value are common compensation methods in NC machining. The measurement programming system can automatically identify the tool parameters in the NC program and associate and match these parameters with specific tool numbers and names. The system can integrate this information into the measurement program to ensure that the tool parameters used during the measurement process are consistent with those during the machining process, thereby avoiding measurement errors caused by inconsistent parameters.
[0097] The beneficial effects of the above technical solution are as follows: By automatically acquiring and identifying the machining information in the current CAM environment, the measurement programming system greatly improves the programming efficiency. The automation function of the system not only improves work efficiency but also reduces human intervention. By correctly identifying and associating the tool compensation parameters, the system ensures the tool compensation accuracy in numerical control machining. The design of the interactive interface conforms to the default style of NX, and the operator can quickly select and configure parameters through simple interface operations without in-depth understanding of complex technical details.
[0098] In another embodiment, the measurement program for the entire machining cycle in step S1022 includes:
[0099] Pre-programming datum alignment program: By automatically measuring the workpiece features in the machine tool and automatically updating the machining coordinate system of the machine tool according to the feature measurement results;
[0100] In-process error compensation program: Automatically measure the features of the workpiece in the machine tool and automatically compensate the tool parameters or the offset of the machining coordinate system according to the dimensional deviation of the features;
[0101] Post-process quality inspection program: Automatically measure the features of the machined parts in the machine tool, trigger an alarm when the measured part feature dimensions exceed the tolerance, and generate a customized measurement report.
[0102] The working principle of the above technical solution is as follows: Pre-programming datum alignment program: Before machining starts, by automatically measuring the features of the workpiece in the machine tool (such as position, dimension, angle, etc.), the probe system will perform a series of measurements to obtain the actual geometric feature data of the workpiece. These measurement data will be used to correct the machining coordinate system of the machine tool, that is, to dock and calibrate the actual position of the workpiece with the coordinate system of the machine tool. Specifically, the system will automatically update the machine tool coordinate system according to the measurement results to ensure that the tool can accurately machine the workpiece along the predetermined path during the subsequent machining process.
[0103] In-process error compensation program: During machining, the machine tool and the tool will accumulate errors due to various factors (such as thermal expansion, mechanical wear, etc.). The function of the in-process error compensation program is to automatically measure the dimensions and shapes of various features of the workpiece during machining. According to the measured feature deviation values, the system will automatically adjust the length, radius of the tool or the offset in the machining coordinate system. This compensation can correct errors in real time during machining, avoid the accumulation of machining deviations, and ensure that the workpiece accuracy always meets the requirements.
[0104] Post - processing quality inspection procedure: After processing is completed, the measurement system automatically detects various features of the part to check if they meet the design specifications. If the measured feature dimensions of the part exceed the preset tolerance range, the system will automatically trigger an alarm and prompt the operator. At the same time, the system can also generate customized measurement reports based on the detection results. The report will detail all dimension measurement results, out - of - tolerance items, and relevant tolerance data, helping the operator quickly identify problems and take measures.
[0105] The beneficial effects of the above - mentioned technical solution are as follows: Through pre - processing datum alignment, in - processing error compensation, and post - processing quality inspection, the system can monitor and adjust the workpiece processing process throughout, eliminating error sources during the processing. Especially during the in - processing error compensation stage, it can correct processing deviations in real - time to ensure that the workpiece dimension accuracy always meets the requirements, greatly improving the processing accuracy. The automated measurement and compensation functions significantly reduce the need for manual intervention. The system can automatically perform measurement, calibration, compensation, and quality inspection before, during, and after processing, reducing the time for measurement and adjustment, thus improving the overall production efficiency. The post - processing quality inspection procedure can promptly detect problems during processing and provide detailed measurement reports to help operators quickly locate problems and take corrective measures. The entire system realizes full - process automation from datum alignment, error compensation to quality inspection, making the production process more intelligent.
[0106] In another embodiment, the measurement programming system supports parametric feature measurement programming, including one - way measurement mode, inner - outer circle measurement mode, step - surface measurement mode, and two - hole angular measurement mode;
[0107] For the 3 + 2 fixed - axis measurement requirements of five - axis machine tools, the measurement programming system automatically creates the matrix transformation relationship between the main coordinate system and the local coordinate system and generates fixed - axis measurement codes;
[0108] The measurement programming system supports the dynamic coordinate system switching function, calculating the optimal coordinate system offset parameters through measuring the feature point cloud data.
[0109] The working principle of the above technical solution is as follows: The measurement programming system supports measurement programming for various workpiece features and is configured in a parameterized manner. Specifically, the user can select different measurement modes, including: Unidirectional measurement mode: used to measure features in a simple single direction, such as length or height. Inner and outer circle measurement mode: used to measure the inner and outer circle dimensions of the workpiece respectively, suitable for the dimensional inspection of circular parts. Step surface measurement mode (boss, concave, step surface): suitable for parts with multiple steps of different heights. By measuring the step surfaces of different heights multiple times, accurate dimensional data can be obtained. Two-hole angular measurement mode: used to measure the angle and dimensions between two holes, especially suitable for complex hole configurations. These measurement modes can all automatically generate measurement programs by the system to simplify the programming process and improve measurement efficiency.
[0110] For the 3 + 2 fixed-axis measurement requirements in a five-axis machine tool, the measurement programming system can automatically create the matrix transformation relationship between the main coordinate system and the local coordinate system; A five-axis machine tool usually has 5 degrees of freedom, but in some cases, the operator may only use 3 of them for measurement (i.e., fixed-axis measurement). The system will automatically calculate the transformation matrix of the coordinate system to ensure the accurate transformation from the main coordinate system to the local coordinate system and generate the corresponding fixed-axis measurement code to ensure that the measurement process can be smoothly executed in the 3 + 2 fixed-axis configuration.
[0111] The measurement programming system supports the dynamic coordinate system switching function, which is especially useful in a multi-coordinate system machining environment. For example, the user can select different machining coordinate systems (such as G54, G55, G56, etc.) for measurement. The switching of these coordinate systems can be flexibly configured according to the actual position and requirements of the workpiece. During the process of coordinate system switching, the system will automatically perform the offset correction of the coordinate system to ensure the accuracy of the measurement results. In addition, the system dynamically determines the optimal coordinate system offset parameters by calculating the measured feature point cloud data to further improve the measurement accuracy.
[0112] When the system compiles the measurement program, it will embed specific attribute information to identify the process information and transfer the necessary parameters during subsequent processing. This means that the measurement program can not only accurately identify different workpiece features but also generate suitable measurement and machining parameters according to the actual needs of the workpiece to facilitate subsequent automated operations.
[0113] The beneficial effects of the above technical solution are as follows: By supporting multiple measurement modes, the system can accurately measure different workpiece features, reducing the complexity of manual programming and ensuring that each measurement link can be precisely executed. The dynamic coordinate system switching and automatic correction of coordinate system offsets further improve the measurement accuracy. Especially in complex five-axis machining, it can effectively reduce errors. The system simplifies the programming process of complex workpieces by automatically generating measurement programs. The user only needs to select the corresponding measurement mode and coordinate system, and the system can automatically create the corresponding measurement code. This greatly saves programming time and is especially suitable for production tasks with frequent changes. For the 3+2 fixed-axis measurement requirements of five-axis machine tools, the system can automatically create a coordinate system transformation matrix and generate fixed-axis measurement codes, solving the complexity of manual calculation and programming. The dynamic coordinate system switching function ensures that the machining and measurement processes in different coordinate systems can proceed smoothly and flexibly adapt to various machining requirements. Since the system supports the switching of multiple coordinate systems and dynamic offset correction, the production line can quickly adapt to different workpiece types and machining requirements.
[0114] In another embodiment, the measurement programming system includes a measurement path optimization sub-module, which sets the feed rate parameter of the measurement probe and performs collision detection.
[0115] For a turning-milling composite machine tool, the measurement programming system generates in-machine online measurement codes for the composite machine tool that include C-axis angle positioning instructions to achieve collaborative measurement of turning features and milling features.
[0116] The working principle of the above technical solution is as follows: In the measurement programming system, it is first necessary to determine the measurement path. The system will generate a suitable path based on the geometric parameters of the machine tool, the shape of the workpiece, and the features to be measured. This path includes the movement trajectory of the measurement probe, and the system will adjust the path sequence according to the path optimization algorithm to ensure the efficiency and accuracy of the measurement process.
[0117] After the measurement path is determined, the system will set the feed rate parameter. The feed rate refers to the moving speed of the measurement probe on the surface of the workpiece. The system can automatically adjust the feed rate according to different measurement requirements (such as measurement accuracy requirements, material properties, etc.) to ensure that the probe is not interfered during the measurement process and can quickly and accurately complete the measurement task.
[0118] When performing the measurement task, the system will monitor the spatial relationship between the probe and other components of the machine tool in real time for collision detection. If the system detects a potential collision risk between the probe and other components of the machine tool or the workpiece, the system will automatically adjust the path or feed rate to avoid collisions. The collision detection function can greatly improve the safety of the measurement process and prevent damage to the machine tool or the measurement probe.
[0119] For a turning-milling compound machine tool (i.e., a machine tool capable of performing turning and milling operations simultaneously), the measurement programming system not only supports the measurement of conventional turning features but also can handle the measurement of milling features. The measurement code generated by the system includes C-axis angle positioning instructions, which can control each axis of the machine tool for precise positioning according to the motion characteristics of the turning-milling machine tool. When performing the collaborative measurement of turning and milling features, the system ensures the accurate docking of the rotation angle generated during the turning process with the plane coordinates of the milling operation, thereby achieving the precise measurement of complex workpieces.
[0120] The beneficial effects of the above technical solution are as follows: The measurement programming system can automatically optimize the measurement path and feed rate according to the actual situation of the machine tool, avoiding manual intervention and errors in traditional measurement methods. Through precise path planning and real-time adjustment, the measurement process becomes more efficient, reducing time waste and measurement errors. The collision detection function of the system can effectively avoid collisions between the probe and the machine tool or workpiece during the measurement process, thereby ensuring the safety of the equipment and tools. This not only avoids unnecessary damage but also reduces the downtime in production and improves the overall production efficiency. The measurement programming system can handle the dual functions of the turning-milling compound machine tool and generate an on-line measurement program containing C-axis positioning instructions, which enables the turning features and milling features to be synchronously measured on the same device, greatly improving the measurement efficiency and accuracy of complex parts and reducing the time for switching tools or devices.
[0121] In another embodiment, an in-machine on-line measurement program preparation system based on NX secondary development includes:
[0122] A model processing module for importing the three-dimensional model of the part or blank to be programmed into the NX software and creating a machining coordinate system that matches the actual machining state of the machine tool;
[0123] A measurement programming module for generating a measurement program with the required functions through the measurement programming system developed by NX secondary development based on the machining coordinate system;
[0124] A post-processing module for converting the measurement program into executable NC code that matches the machine tool through customized post-processing.
[0125] The working principle of the above technical solution is as follows: The model processing module first imports the three-dimensional model of the part or blank to be machined into the NX software; NX is a powerful computer-aided design (CAD) and computer-aided manufacturing (CAM) software used for part design and machining programming.
[0126] After importing the model, the measurement programming module needs to create a machining coordinate system in the NX software that matches the actual machining state of the machine tool. The function of this coordinate system is to ensure that all operations in the machine tool and the program can be correctly positioned and controlled according to the actual machining environment during the machining process. Creating a suitable machining coordinate system is the basis for subsequent programming and machining accuracy. Next, use the measurement programming system in the NX software to generate the required measurement program through the customized functions developed through secondary development. This step is achieved by writing a program for the measurement tasks required during machining. The measurement program is designed based on the machining coordinate system and the geometric characteristics of the part, and can guide the machine tool to perform precise measurement operations to ensure machining accuracy and part quality. The measurement programming system essentially combines the measurement function of the machine tool with the actual machining operation, and realizes the dimensional inspection and machining state evaluation of specific positions through programming.
[0127] Post-processing module: After generating the measurement program, it is necessary to convert this program into CNC code that the machine tool can understand and execute. This step is achieved through a customized post-processing system; the core task of post-processing is to convert the high-level programming language into CNC instructions that can be executed by a specific machine tool, ensuring that the program can be successfully transmitted to the machine tool and complete the corresponding machining and measurement tasks. The post-processing system will adapt and optimize the code according to different machine tool models and control systems to ensure that the program can be executed efficiently and accurately.
[0128] The beneficial effects of the above technical solution are as follows: The program for in-machine online measurement can be directly compiled with the help of the NX software, making the programming process simple; the machining and measurement of parts are both programmed in the NX software, ensuring the consistency of the input source; the compilation of the measurement program can be achieved by directly selecting the part features, simplifying the programming.
[0129] In another embodiment, the model processing module includes:
[0130] The first model processing sub-module is used to import the 3D model of the part or blank to be programmed into the NX software and adjust the features and dimensions of the 3D model to meet the in-machine measurement requirements;
[0131] The second model processing sub-module is used to create geometries, machining methods, program groups, and probe parameters corresponding to the current machining process in the CAM module of the NX software.
[0132] The working principle of the above technical solution is as follows: The first model processing sub-module first imports the 3D model of the part or blank to be programmed into the NX software. After the import, the model needs to be appropriately adjusted to meet the requirements of in-machine measurement. These adjustments include modifying the geometric features, dimensions, etc. of the part to ensure that measurement operations can be effectively carried out during the machining process. For example, adjusting the shape of the surface features of the part or modifying the dimensions so that the touch probe of the machine tool can correctly contact and measure the target area. Ensure that the measurement area of the model can be docked with the measurement probe of the machine tool to avoid unnecessary interference or errors during subsequent machining.
[0133] The second model processing sub-module enters the CAM module of the NX software. This module is used to generate machining paths and control the actions of the machine tool. In this module, geometries and machining strategies related to the current machining process are created based on the imported part model and machining requirements. This includes setting the correct geometries (such as cutting paths or measurement paths), selecting appropriate machining methods (such as milling, drilling, etc.), and organizing and managing different program groups. The program group is a function that combines multiple machining operations to achieve a more efficient and precise machining process. At the same time, the touch probe parameters need to be set, including the geometric characteristics of the touch probe (such as the length and diameter of the touch probe body, the length and diameter of the touch needle, etc.). These touch probe parameters must be consistent with the actual touch probe used on the machine tool to ensure the accuracy during the measurement process. For the touch probe of the machine tool, the length, diameter, etc. of the body and the touch needle must be exactly matched with the touch probe in the actual equipment, otherwise it may affect the measurement accuracy. Finally, it is also necessary to ensure that the created touch probe is consistent with the tool number on the machine tool so that the machine tool can correctly identify and call the touch probe to ensure the smooth operation of the program during execution.
[0134] The beneficial effects of the above technical solution are as follows: By adjusting the features and dimensions of the 3D model of the part in the NX software, it can be ensured that the part meets the measurement requirements of the machine tool, thereby ensuring the accuracy during the measurement process. Creating geometries and machining methods in the CAM module of NX enables more efficient operation during the programming process. When setting the touch probe parameters, ensuring consistency with the actual machine tool equipment can eliminate errors caused by inconsistencies, especially in the coordination between the machine tool and the program.
[0135] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the same technology of the present invention, the present invention also intends to include these changes and modifications.
Claims
1. A method for compiling an in-machine online measurement program based on NX secondary development, characterized in that: include: S101: Import the 3D model of the part or blank to be programmed into NX software and create a machining coordinate system that matches the actual machining state of the machine tool; S102: Based on the machining coordinate system, the measurement programming system of NX secondary development generates the measurement program of the required functions; S103: converting the measurement program into executable NC code matching the machine tool through customized post-processing; Step S102 includes: S1021: The measurement programming system based on NX secondary development is called in the integrated interface of NX software. The operation interface of the measurement programming system is consistent with the native interface attributes of NX software; S1022: Compile measurement programs covering the entire machining cycle through the measurement programming system, including pre-process benchmark alignment program, mid-process error compensation program and post-process quality inspection program; S1023: Embed extended attribute information including process identification, tool compensation parameters and post-processing parameters in the measurement program for subsequent post-processing parameter parsing.
2. The method for compiling an in-machine online measurement program based on NX secondary development according to claim 1, characterized in that: Step S101 includes: S1011: Import the 3D model of the part or blank to be programmed into NX software, and adjust the features and dimensions of the 3D model to meet the measurement requirements in the machine tool; S1012: In the CAM module of NX software, create the geometry, machining method, program group and probe parameters corresponding to the current machining process.
3. The method for compiling an in-machine online measurement program based on NX secondary development according to claim 1, characterized in that: Step S103 includes: S1031: Configure post-processing in NX software, which matches the machine tool used for in-machine online measurement; S1032: based on post-processing, converting the programmed in-machine measurement program into numerical control codes including machine tool motion instructions; S1033: The output NC code is directly imported into the machine tool used to perform the measurement process.
4. The method for compiling an in-machine online measurement program based on NX secondary development according to claim 1, characterized in that: The measurement programming system is developed based on C#. It automatically obtains the geometry, processing method, program group and probe parameters in the current CAM module environment through the NX API interface, and provides parameter selection function through an interactive interface. The measurement and programming system supports the automatic recognition of CNC machining programs, and the associative matching of machining tool numbers, names and compensation parameters. The tool compensation parameters include tool radius compensation value and tool length compensation value.
5. The method for compiling an in-machine online measurement program based on NX secondary development according to claim 1, characterized in that: The measurement procedure for the entire machining cycle in step S1022 includes: Pre-process benchmark alignment program: automatically measure the workpiece features in the machine tool and automatically update the machine tool's machining coordinate system based on the feature measurement results; In-process error compensation program: automatically measures the features of the workpiece in the machine tool and automatically compensates the tool parameters or machining coordinate system offsets based on the dimensional deviation of the features; Post-process quality inspection program: Automatically measure the features of the parts that have been processed in the machine tool, trigger an alarm when the feature size of the part is out of tolerance, and generate a customized measurement report.
6. The method for compiling an in-machine online measurement program based on NX secondary development according to claim 1, characterized in that: The measurement and programming system supports parametric feature measurement programming, including unidirectional measurement mode, inner and outer circle measurement mode, step surface measurement mode and two-hole angular measurement mode; In response to the 3+2 fixed-axis measurement requirements of five-axis machine tools, the measurement programming system automatically creates the matrix transformation relationship between the main coordinate system and the local coordinate system, and generates fixed-axis measurement codes; The measurement and programming system supports dynamic coordinate system switching function and calculates the optimal coordinate system offset parameters by measuring feature point cloud data.
7. The method for compiling an in-machine online measurement program based on NX secondary development according to claim 1, characterized in that: The measurement programming system includes a measurement path optimization submodule, which sets the feed rate parameters of the measurement probe and performs collision detection; For turning-milling machine tools, the measurement programming system generates online measurement codes inside the compound machine including C-axis angle positioning instructions to achieve coordinated measurement of turning features and milling features.
8. An in-machine online measurement program compilation system based on NX secondary development, characterized in that: include: Model processing module, used to import the 3D model of the part or blank to be programmed into NX software and create a machining coordinate system that matches the actual machining status of the machine tool; The measurement programming module is used to generate the measurement program of the required functions based on the machining coordinate system through the measurement programming system of NX secondary development; include: The integrated interface of NX software calls the measurement programming system based on NX secondary development. The operation interface of the measurement programming system is consistent with the native interface attributes of NX software. The measurement programming system is used to compile measurement programs covering the entire machining cycle, including pre-process benchmark alignment programs, mid-process error compensation programs, and post-process quality inspection programs; Embed extended attribute information including process identification, tool compensation parameters and post-processing parameters in the measurement program for parameter parsing in subsequent post-processing; The post-processing module is used to convert the measurement program into executable NC code matching the machine tool through customized post-processing.
9. The in-machine online measurement program compilation system based on NX secondary development according to claim 8, characterized in that: The model processing modules include: The first model processing submodule is used to import the 3D model of the part or blank to be programmed into the NX software and adjust the features and dimensions of the 3D model to meet the measurement requirements in the machine tool; The second model processing submodule is used to create the geometry, processing method, program group and probe parameters corresponding to the current processing procedure in the CAM module of NX software.
Citation Information
Patent Citations
MBD-based aviation complex structural member inspection method
CN111027134A
Five-axis machine tool on-line measurement and compensation processing method for free-form surface of thin-wall jewelry
CN112757046A