Method, system and equipment for detecting tool changing position of numerical control machine tool and medium

By automatically detecting the multi-dimensional coordinates of the tool holder with the on-machine probe and calculating the optimal spherical center coordinates using a fitting algorithm, the problem of low efficiency in existing technologies due to reliance on manual operation is solved, and high-precision and high-efficiency tool change position detection is achieved.

CN120663181AActive Publication Date: 2025-09-19CHENGDU AIRCRAFT INDUSTRY GROUP
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202511014544.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-23
Publication Date
2025-09-19
Estimated Expiration
2045-07-23

AI Technical Summary

Technical Problem

The existing CNC machine tool tool change position detection method relies on manual operation, which is inefficient and the accuracy depends on the experience of the debugger.

Method used

By compiling a detection program, the on-machine probe can automatically detect the XY plane and Z coordinates of the tool holder, use the least squares method to fit the circle to calculate the center coordinates of the tool holder, and use the spherical fitting algorithm to calculate the optimal sphere center coordinates to achieve automatic tool change position detection.

Benefits of technology

It significantly improves the accuracy and efficiency of tool change position detection, eliminates human errors, and can adaptively compensate for position deviations of different tools to ensure the accuracy and reliability of tool change actions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120663181A_ABST
    Figure CN120663181A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of numerical control machining, in particular to a numerical control machine tool tool changing position detection method, system and equipment and a medium. The method comprises the following steps: controlling the on-machine measuring head to be replaced on the main shaft; the on-machine measuring head is controlled to approach the conical surface of the cutter handle in the positive and negative directions of the X-axis and the Y-axis respectively; acquiring Z-direction coordinates of a plurality of detection points in the end face of the cutter handle; returning to the step of controlling the on-machine measuring head to approach the conical surface of the cutter handle along the positive and negative directions of the X axis and the Y axis respectively so as to measure a plurality of point position coordinates in the XY plane, and acquiring the center coordinate of the cutter handle according to the plurality of point position coordinates so as to obtain the cutter changing coordinates of the plurality of cutters; fitting all the tool changing coordinates to obtain a sphere center coordinate; compiling system variables of the numerical control machine tool, establishing an intermediate storage area, calling tool changing coordinates, and calculating tool changing coordinates of the previous time to output a detection result; finally, three-dimensional tool changing coordinates are formed, and the problem that in the prior art, when an on-machine measuring head detects the actual position of a machining tool, position deviation exists is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of numerical control machining, and in particular to a method, system, equipment and medium for detecting tool change positions of numerical control machine tools. Background Art

[0002] Currently, all CNC machine tools on the market are equipped with an automatic tool changing function in the tool magazine. As the tool changing mechanism and the machine tool motion mechanism wear out mechanically, the tool changing position also changes. Usually, the tool changing position needs to be inspected and adjusted every 2 to 3 months to ensure smooth tool changing.

[0003] Currently, the tool change position adjustment of common CNC machine tools is mainly done manually. The tool change arm and machine tool need to be manually moved to the exchange position, then a dial indicator is installed for detection, and finally the detected tool change position is input into the program. This method is not only inefficient, but the operation quality is also highly dependent on the manual experience of the debugging personnel. Summary of the Invention

[0004] The main purpose of the present invention is to provide a method, system, device and medium for detecting the tool change position of a CNC machine tool, aiming to solve the problem of low detection accuracy of the existing tool change position detection method for machine tools.

[0005] To achieve the above object, the present invention provides a method for detecting tool change position of a CNC machine tool, comprising the following steps: Control the on-machine probe to be replaced on the spindle; Control the on-machine probe to approach the tool holder conical surface along the positive and negative directions of the X-axis and Y-axis respectively to measure the coordinates of several points in the XY plane, and obtain the center coordinates of the tool holder based on the coordinates of the several points; Obtain the Z coordinates of several detection points on the end face of the tool holder, and obtain the tool change coordinates of the tool based on the several Z coordinates; Returning to the control, the on-machine probe approaches the tool holder conical surface along the positive and negative directions of the X-axis and the Y-axis respectively to measure the coordinates of a plurality of points in the XY plane, and obtains the center coordinates of the tool holder according to the plurality of point coordinates to obtain the tool change coordinates of a plurality of tools; wherein the plurality of tools are of different types; Fit all tool change coordinates to obtain the spherical center coordinates; Compile the system variables of the CNC machine tool, establish an intermediate storage area, call the tool change coordinates, calculate the previous tool change coordinates, and output the detection results; among them, the intermediate storage area is used to store the sphere center coordinates, and the system variables are the assignments of the sphere center coordinates.

[0006] Optionally, obtaining the center coordinates of the tool handle according to the coordinates of a plurality of points includes the following steps: The least squares fitting circle calculation is performed on the coordinates of several points. The calculation expression is: ; in, a for x The coefficient of the first term, b for y The coefficient of the first term, c is the constant term coefficient, x , y are the point coordinates respectively.

[0007] Optionally, a , b , c The expressions are: ; ; ; in, N is the total number of point coordinates; X i , Y i For the i Point coordinates; D 、 E 、 F 、 G 、 H 、 I Solve the coefficients of the least squares fitting circle respectively.

[0008] Optionally, obtaining the tool change coordinates of the tool according to a plurality of Z-axis coordinates comprises the following steps: Take the average value of the coordinates of the four detection points and calculate the expression: ; Among them, Z a is the Z-axis coordinate, Z1, Z2, Z3, and Z4 are the coordinates of the four detection points respectively; Tool change coordinates are (X a , Y a , Z a ): in, ; .

[0009] Optionally, fitting all tool change coordinates to obtain spherical center coordinates includes the following steps: Fit all tool change coordinates to a spherical surface and calculate the sphere center coordinates (X, Y, Z). The calculation expression is: ; in, is the mean X coordinate of the tool change coordinate set; is the mean Y coordinate of the tool change coordinate set; is the mean Z coordinate of the tool change coordinate set; is the mean of the square of the X coordinate of the tool change coordinate set; is the mean of the square of the Y coordinate of the tool change coordinate set, is the mean of the square of the Z coordinate of the tool change coordinate set axis, is the mean of the cube of the X-coordinate of the tool change coordinate set, is the mean of the cubic Y coordinate of the tool change coordinate set, is the mean of the cubic Z coordinate of the tool change coordinate set, is the mean value of the product of the square of the X-coordinate and Y-coordinate of the tool change coordinate set. is the mean value of the product of the square of the X coordinate and the Z coordinate of the tool change coordinate set. is the mean value of the product of the Y coordinate and the square of the Z coordinate of the tool change coordinate set. is the mean value of the product of the square of the X coordinate and the Y coordinate of the tool change coordinate set axis, is the mean value of the product of the square of the X coordinate and the Z coordinate of the tool change coordinate set. It is the mean of the product of the square of the Z coordinate and the Y coordinate of the tool change coordinate set.

[0010] Optionally, The expression is: ; The expression is: ; The expression is: ; The expression is: ; The expression is: ; The expression is: ; The expression is: ; The expression is: ; The expression is: ; The expression is: ; The expression is: ; The expression is: ; The expression is: ; The expression is: ; The expression is: ; in, m is the number of tool change coordinates; X i , Y i , Z i Respectively i The coordinates of the tool change coordinates.

[0011] Optionally, the step of calculating the previous tool change coordinates includes the following steps: Perform square root processing on the detected tool change coordinates, and record the calculation result as △P. Call the previous tool change coordinates and record them as (X0, Y0, Z0). Perform square root processing again and record them as △M. The calculation process expression is: ; .

[0012] Optionally, outputting the detection result includes the following steps: If △P≥△M+λ, output alarm information; If △M-λ>△P<△M+λ, write the center coordinates (X, Y, Z) into the intermediate storage area; If △P≤△M-λ, output alarm information; Here, λ is a fixed constant.

[0013] Optionally, the steps between establishing the intermediate storage area and calling the tool change coordinates further include: The same system variables are compiled in the tool change program and used to call the sphere center coordinates in the intermediate storage area.

[0014] To achieve the above object, the present invention further provides a tool change position detection system for a CNC machine tool, comprising: The first control module is used to control the replacement of the on-machine probe to the main shaft; The second control module is used to control the on-machine probe to approach the tool holder conical surface along the positive and negative directions of the X-axis and the Y-axis respectively, so as to measure the coordinates of several points in the XY plane, and obtain the center coordinates of the tool holder according to the coordinates of the several points; A coordinate acquisition module is used to obtain the Z-axis coordinates of several detection points on the end face of the tool handle, and obtain the tool change coordinates of the tool based on the several Z-axis coordinates; a data processing module for returning to the control on-machine probe to approach the tool holder conical surface along the positive and negative directions of the X-axis and the Y-axis respectively to measure the coordinates of a plurality of points in the XY plane; and for obtaining the coordinates of the center of the tool holder based on the coordinates of the plurality of points to obtain the tool change coordinates of a plurality of tools; wherein the plurality of tools are of different types; The fitting module is used to fit all tool change coordinates to obtain the spherical center coordinates; The detection module is used to compile the system variables of the CNC machine tool, establish an intermediate storage area, call the tool change coordinates, calculate the previous tool change coordinates, and output the detection results; among them, the intermediate storage area is used to store the center coordinates of the ball, and the system variables are the values ​​assigned to the center coordinates of the ball.

[0015] To achieve the above object, the present invention further provides a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program.

[0016] To achieve the above object, the present invention further provides a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and a processor executes the computer program.

[0017] The present invention proposes a method, system, device, and medium for detecting tool change positions on CNC machine tools. The method uses an on-machine probe to perform multi-dimensional coordinate acquisition of the tool holder's conical surface and end face. The probe is then driven to approach the tool holder's conical surface along the positive and negative directions of the X / Y axis to obtain at least four sets of point coordinates in the XY plane, and the tool holder's center coordinates are calculated using a least-squares circle fitting method. Simultaneously, the Z coordinates of the four quadrant points on the tool holder's end face are detected and averaged to ultimately form three-dimensional tool change coordinates. This design overcomes the limitations of the prior art's reliance on manual dial indicator detection, eliminates human error, and converts discrete measurement points into precise geometric center coordinates through a fitting algorithm, significantly improving detection accuracy. More specifically, the method repeatedly measures the tool change coordinates of different types of tools (such as milling cutters, boring tools, etc.) and then uses a spherical fitting algorithm to calculate the optimal spherical center coordinates. This coordinate can adaptively compensate for position deviations caused by length and weight differences among various tools, solving the problem of position deviations in the prior art when the on-machine probe detects the actual position of the machining tool. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 Schematic diagram of the process of the method in Example 1 of the present invention; Figure 2 Schematic diagram of the structure of the knife handle in Example 1 of the present invention; Figure 3This is a distribution diagram of measurement points on the cone surface of the tool handle in Example 1 of the present invention; Figure 4 This is a distribution diagram of measurement points on the end face of the tool handle in Example 1 of the present invention.

[0019] Reference numerals: 1- Tool holder cone, 2- Tool holder end face, 3- Tool changing arm, 4- Tool holder as a whole, 5- Cone surface measuring point I, 6- Cone surface measuring point II, 7- Cone surface measuring point III, 8- Cone surface measuring point IV, 9- End face measuring point I, 10- End face measuring point II, 11- End face measuring point III, 12- End face measuring point IV.

[0020] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings and in conjunction with the embodiments. DETAILED DESCRIPTION

[0021] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0022] It should be noted that all directional indications (such as up, down, left, right, front, back, etc.) in the embodiments of the present invention are only used to explain the relative position relationship, movement status, etc. between the various components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.

[0023] In the present invention, unless otherwise specified or limited, the terms "connection" and "fixation" should be understood in a broad sense. For example, "fixation" can mean fixed connection, detachable connection, or integration; mechanical connection or electrical connection; direct connection or indirect connection through an intermediate medium; internal communication between two elements or interaction between two elements, unless otherwise specified. Those skilled in the art will be able to understand the specific meanings of the above terms in the present invention based on specific circumstances.

[0024] In addition, if there are descriptions involving "first", "second", etc. in the embodiments of the present invention, the descriptions of "first", "second", etc. are only for descriptive purposes and cannot be understood as indicating or suggesting their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of such features. In addition, the meaning of "and / or" appearing throughout the text includes three parallel schemes. Taking "A and / or B" as an example, it includes scheme A, or scheme B, or a scheme in which A and B are satisfied at the same time. In addition, the technical solutions between the various embodiments can be combined with each other, but it must be based on the ability of ordinary technicians in this field to implement. When the combination of technical solutions is mutually contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.

[0025] Example 1: Please refer to the attached Figures 1 to 4 , this embodiment provides a method for detecting the tool change position of a CNC machine tool, comprising the following steps: Control the on-machine probe to be replaced on the spindle; Control the on-machine probe to approach the tool holder conical surface along the positive and negative directions of the X-axis and Y-axis respectively to measure the coordinates of several points in the XY plane, and obtain the center coordinates of the tool holder based on the coordinates of the several points; Obtain the Z coordinates of several detection points on the end face of the tool holder, and obtain the tool change coordinates of the tool based on the several Z coordinates; Returning to the control, the on-machine probe approaches the tool holder conical surface along the positive and negative directions of the X-axis and the Y-axis respectively to measure the coordinates of a plurality of points in the XY plane, and obtains the center coordinates of the tool holder according to the plurality of point coordinates to obtain the tool change coordinates of a plurality of tools; wherein the plurality of tools are of different types; Fit all tool change coordinates to obtain the spherical center coordinates; Compile the system variables of the CNC machine tool, establish an intermediate storage area, call the tool change coordinates, calculate the previous tool change coordinates, and output the detection results; among them, the intermediate storage area is used to store the sphere center coordinates, and the system variables are the assignments of the sphere center coordinates.

[0026] In some embodiments, as shown in the attached Figure 1 As shown, after the machine probe is replaced on the spindle and before the detection program is executed, the process also includes: the tool changing arm 3 grabs the tool handle 4 to the tool changing point.

[0027] In some embodiments, the on-machine probe is activated and the attached Figure 2 The four groups of point coordinates on the XY plane shown are cone measuring point Ⅰ5, cone measuring point Ⅱ6, cone measuring point Ⅲ7, and cone measuring point Ⅳ8.

[0028] In some embodiments, the measured Figure 3The four groups of point coordinates of the tool holder end face 2 are shown, such as end face measuring point I9, end face measuring point II10, end face measuring point III11, and end face measuring point IV12.

[0029] It should be noted that the tool change position adjustment of current common CNC machine tools mainly relies on manual operation. It is necessary to manually move the tool change arm and the machine tool to the exchange position, then install a dial indicator for detection, and finally input the detected tool change position into the program. This method is not only inefficient, but the operation quality is also highly dependent on the manual experience of the debugging personnel.

[0030] It should also be noted that, based on the above-mentioned issues, this embodiment provides a method for detecting tool change positions on CNC machine tools. By programming a detection program, an on-machine probe automatically detects the XY plane coordinates of the tool holder and the Z coordinates of the tool holder end face, thereby calculating the three-dimensional tool change coordinates of the tool. (At the same time, considering that tool position deviations may occur due to multiple factors such as the length, weight, and movement speed of different tools, the coordinates of different types of tools, such as milling cutters, boring cutters, and reamers, are measured and data fitting is performed. The calculated three-dimensional sphere center coordinates have the minimum distance from each tool change point, meeting all tool change requirements.)

[0031] Specifically, the system uses an on-machine probe to acquire multi-dimensional coordinates of the toolholder's conical and end faces. The probe is then driven to approach the toolholder's conical surface along the positive and negative X / Y axes, acquiring at least four sets of point coordinates in the XY plane. The toolholder's center coordinates are then calculated using a least-squares fit method. Simultaneously, the Z coordinates of four quadrants of the toolholder's end face are measured and averaged to form the three-dimensional tool change coordinates. This design overcomes the limitations of existing technologies that rely on manual dial indicator detection, eliminating human error. Furthermore, a fitting algorithm transforms discrete measurement points into precise geometric center coordinates, significantly improving detection accuracy. More specifically, the system repeatedly measures the tool change coordinates of different tool types (such as milling cutters and boring tools) and then uses a spherical fitting algorithm to calculate the optimal sphere center coordinates. These coordinates can adaptively compensate for positional deviations caused by length and weight differences between different tools, resolving the existing problem of positional deviations when on-machine probes detect the actual position of machining tools. Furthermore, the system can accurately detect the tool change position of the tool magazine without the need for additional equipment or measuring tools, offering advantages such as high detection quality, high efficiency, and broad applicability.

[0032] In this embodiment, the method of obtaining the center coordinates of the tool handle according to the coordinates of a plurality of points includes the following steps: The least squares fitting circle calculation is performed on the coordinates of several points. The calculation expression is: ; in, a for x The coefficient of the first term, b for y The coefficient of the first term,c is the constant term coefficient, x , y are the point coordinates respectively.

[0033] It can be understood that in this embodiment, by establishing a general equation of a circle, the coordinates of multiple points in the XY plane collected are converted into mathematical parameters, and the coefficients of the optimal fit circle are solved using the principle of least squares. Specifically, the algorithm constructs a complex set of equations containing the total number of points, coordinate values ​​and their higher-order terms, calculates the three key parameters of the x-linear term coefficient, the y-linear term coefficient and the constant term coefficient, and finally derives the center coordinates of the tool handle; the above data processing method has extremely strong fault tolerance. Even if there are errors in individual measuring points, the accuracy of the center coordinates can still be guaranteed through overall fitting, overcoming the stringent requirements of simple geometric construction methods or three-point circle determination methods on the quality of measuring points. Compared with the existing technology of using special tooling or manual visual positioning, this algorithm improves the detection accuracy from millimeter level to micron level, and is not affected by the operator's subjective judgment.

[0034] In this embodiment, a , b , c The expressions are: ; ; ; in, N is the total number of point coordinates; X i , Y i For the i Point coordinates; D 、 E 、 F 、 G 、 H 、 I Solve the coefficients of the least squares fitting circle respectively.

[0035] It is understandable that this embodiment further refines the calculation process of each coefficient based on the least squares fitting circle algorithm, and solves the fitting stability problem caused by the fluctuation of measurement data under complex working conditions. Specifically, by establishing a method including six intermediate parameters ( D 、 E 、 F 、 G 、 H 、 I) is a complete calculation system that converts the original measurement data into intermediate variables with clear physical meanings, and then finally solves the three key coefficients of the circle equation through the interaction between these variables. It is especially suitable for non-ideal measurement environments commonly seen in actual operation of CNC machine tools, such as slight scratches on the cone surface of the tool holder or interference of the probe with cutting fluid. In addition, by introducing a complex combination relationship between the total number of points, coordinate values ​​and their higher-order terms, the algorithm can automatically balance the weight of each measurement point and effectively suppress the interference of outliers on the final result. Compared with the traditional three-point circle determination method or simple averaging method, the algorithm significantly improves the anti-interference ability of the fitted circle and the consistency of repeated measurements.

[0036] Optionally, the step of obtaining the tool change coordinates of the tool according to a plurality of Z-axis coordinates comprises the following steps: Take the average value of the coordinates of the four detection points and calculate the expression: ; Among them, Z a is the Z-axis coordinate, Z1, Z2, Z3, and Z4 are the coordinates of the four detection points respectively; Tool change coordinates are (X a , Y a , Z a ): in, ; .

[0037] It should be noted that by setting detection points at four quadrants of the toolholder end face, collecting Z-axis coordinate data at each point, and then calculating the final Z-axis coordinate value through arithmetic averaging, this multi-point sampling strategy compensates for possible localized depressions, assembly skew, or measurement system errors on the toolholder end face. Compared to existing methods that use a single measurement point or manual visual inspection, this significantly improves the reliability and repeatability of Z-axis positioning and avoids systematic measurement deviations caused by localized wear.

[0038] It should also be noted that the spatial distribution design of the quadrant detection points makes the measurement results more representative, can truly reflect the overall spatial position of the tool holder end face, and provides a reliable Z-axis reference for the subsequent three-dimensional tool change coordinate calculation; the average value calculation method has a natural filtering characteristic and can smooth out the accidental errors of individual detection points.

[0039] In this embodiment, fitting all tool change coordinates to obtain spherical center coordinates includes the following steps: Fit all tool change coordinates to a spherical surface and calculate the sphere center coordinates (X, Y, Z). The calculation expression is: ; in, is the mean X coordinate of the tool change coordinate set; is the mean Y coordinate of the tool change coordinate set; is the mean Z coordinate of the tool change coordinate set; is the mean of the square of the X coordinate of the tool change coordinate set; is the mean of the square of the Y coordinate of the tool change coordinate set, is the mean of the square of the Z coordinate of the tool change coordinate set axis, is the mean of the cube of the X-coordinate of the tool change coordinate set, is the mean of the cubic Y coordinate of the tool change coordinate set, is the mean of the cubic Z coordinate of the tool change coordinate set, is the mean value of the product of the square of the X-coordinate and Y-coordinate of the tool change coordinate set. is the mean value of the product of the square of the X coordinate and the Z coordinate of the tool change coordinate set. is the mean value of the product of the Y coordinate and the square of the Z coordinate of the tool change coordinate set. is the mean value of the product of the square of the X coordinate and the Y coordinate of the tool change coordinate set axis, is the mean value of the product of the square of the X coordinate and the Z coordinate of the tool change coordinate set. It is the mean of the product of the square of the Z coordinate and the Y coordinate of the tool change coordinate set.

[0040] It can be understood that by treating the three-dimensional tool change coordinates of multiple tools as a set of discrete spatial points, a spherical equation is constructed using high-order statistical methods to calculate the optimal sphere center coordinates that minimize the sum of the distances from all tool change points to the sphere. This method utilizes the spatial distribution characteristics of various tool measurement data and establishes a complex matrix equation containing the coordinate mean, square mean, cubic mean, and cross-term mean to ultimately solve for the optimal spatial point that represents the overall tool change position. Compared to the existing methods that use fixed compensation values ​​or simple arithmetic averages, this fitting method based on spatial geometric constraints can adaptively balance the positional deviations of tools of different lengths and weights, ensuring that the final tool change position is neither excessively biased towards any particular tool type nor ensuring that all tool changes are completed within a safe range.

[0041] In this embodiment, The expression is: ; The expression is: ; The expression is: ; The expression is: ; The expression is: ; The expression is: ; The expression is: ; The expression is: ; The expression is: ; The expression is: ; The expression is: ; The expression is: ; The expression is: ; The expression is: ; The expression is: ; in, m is the number of tool change coordinates; X i , Y i , Z i Respectively i The coordinates of the tool change coordinates.

[0042] It should be noted that a multidimensional data feature space was constructed by defining 13 different types of mean parameters, including coordinate mean, square mean, cubic mean, and various cross-term means. These statistics are not simple arithmetic means, but rather, through specific mathematical combinations, comprehensively capture the distribution characteristics of the tool change coordinate set in three-dimensional space. For example, by calculating the cross-mean of the coordinate and square terms, the algorithm can perceive the nonlinear characteristics of the data set; and the introduction of the cubic mean enables the system to identify the skewed characteristics of the data distribution. Compared with traditional methods that only consider first-order or second-order statistics, it can more accurately describe the spatial geometric characteristics of the tool change coordinate set, providing richer data support for subsequent spherical fitting.

[0043] It is understandable that by establishing a standardized statistical calculation process, the system can uniformly process tool measurement data from different batches and types, ensuring the stable performance of the algorithm on different machine tools and under different working conditions; secondly, the modular design of various statistics facilitates the maintenance and upgrading of the algorithm. When it is necessary to improve the fitting accuracy or add new feature dimensions, it is only necessary to expand the new statistical calculation module under the existing framework without reconstructing the entire algorithm system.

[0044] In this embodiment, the calculation of the previous tool change coordinates includes the following steps: Perform square root processing on the detected tool change coordinates, and record the calculation result as △P. Call the previous tool change coordinates and record them as (X0, Y0, Z0). Perform square root processing again and record them as △M. The calculation process expression is: ; .

[0045] It should be noted that by performing square and square root operations on the three-dimensional coordinates obtained from the current detection, a scalar value representing the overall change in spatial position is calculated; at the same time, the previous correct tool change coordinates stored in the intermediate storage area are called for the same processing, and finally the offset state of the current tool change position is judged by comparing the difference between the two; converting the three-dimensional space problem into a one-dimensional scalar comparison processing method not only greatly simplifies the judgment logic, but also realizes a comprehensive evaluation of the overall offset degree of the tool change position through the mathematical concept of vector length, overcoming the misjudgment problem caused by single-axis independent alarm in the existing technology.

[0046] In this embodiment, outputting the detection results includes the following steps: If △P≥△M+λ, output alarm information; If △M-λ>△P<△M+λ, write the center coordinates (X, Y, Z) into the intermediate storage area; If △P≤△M-λ, output alarm information; Here, λ is a fixed constant.

[0047] By setting a dual threshold interval, the tool change position status is divided into three clear levels: when the deviation between the current detection value and the historical benchmark value exceeds the positive threshold, the system determines it as an abnormal increase state and triggers an alarm; when the deviation is lower than the negative threshold, it is also determined as an abnormal decrease state and an alarm is triggered; only when the deviation is in the middle reasonable range, the system will write the new tool change coordinates into the storage area.

[0048] This hierarchical processing mechanism fully accounts for the various operating conditions that machine tools may encounter during actual operation, avoiding frequent false alarms caused by normal fluctuations while promptly detecting true mechanical failures or abnormal wear. In particular, by introducing configurable fixed constants as threshold parameters, the system can flexibly adjust to the precision requirements and operating conditions of different machine tools. This provides greater adaptability and practicality than existing fixed-threshold alarm methods.

[0049] In some embodiments, the alarm message is: tool change coordinates are abnormal, please contact a mechanic for inspection.

[0050] In some embodiments, λ is a fixed constant and can be set according to the tool changing characteristics of the machine tool.

[0051] In this embodiment, the tool change coordinates of a plurality of tools obtained by repeatedly executing the detection program are of different types.

[0052] It is understandable that by collecting the spatial position data of various tools under actual tool change conditions, the final fitted spherical center coordinates are ensured to meet the tool change requirements of all tools. This multi-category sampling strategy fully considers the differences in length, weight, structural characteristics, etc. between different tools, enabling the system to perceive and compensate for position deviations caused by changes in tool type. Compared with the existing technology that uses dedicated detection tools or fixed tool types, it significantly improves the comprehensiveness and practicality of tool change position detection. Especially in automated machining cells, when the tool magazine contains multiple tools and changes frequently, this technology can still maintain stable detection accuracy, avoiding tool change failures caused by changes in tool type.

[0053] In this embodiment, the steps between establishing the intermediate storage area and calling the tool change coordinates further include: The same system variables are compiled in the tool change program and used to call the sphere center coordinates in the intermediate storage area.

[0054] It's understandable that after the inspection program completes the tool change coordinate calculation and verification, it writes the final sphere center coordinates to an intermediate storage area. When the tool change program is executed, it reads the latest data from this storage area by calling the same system variables, without requiring manual intervention in data transfer. This integrated data management approach completely eliminates errors that can be caused by manual input while ensuring high consistency between inspection and execution data. Compared to existing designs where the inspection and execution systems are independent, this significantly improves system reliability and operational efficiency.

[0055] Example 2: A tool change position detection system for a numerically controlled machine tool, comprising: The first control module is used to control the replacement of the on-machine probe to the main shaft; The second control module is used to control the on-machine probe to approach the tool holder conical surface along the positive and negative directions of the X-axis and the Y-axis respectively, so as to measure the coordinates of several points in the XY plane, and obtain the center coordinates of the tool holder according to the coordinates of the several points; A coordinate acquisition module is used to obtain the Z-axis coordinates of several detection points on the end face of the tool handle, and obtain the tool change coordinates of the tool based on the several Z-axis coordinates; a data processing module for returning to the control on-machine probe to approach the tool holder conical surface along the positive and negative directions of the X-axis and the Y-axis respectively to measure the coordinates of a plurality of points in the XY plane; and for obtaining the coordinates of the center of the tool holder based on the coordinates of the plurality of points to obtain the tool change coordinates of a plurality of tools; wherein the plurality of tools are of different types; The fitting module is used to fit all tool change coordinates to obtain the spherical center coordinates; The detection module is used to compile the system variables of the CNC machine tool, establish an intermediate storage area, call the tool change coordinates, calculate the previous tool change coordinates, and output the detection results; among them, the intermediate storage area is used to store the center coordinates of the ball, and the system variables are the values ​​assigned to the center coordinates of the ball.

[0056] It should be noted that each module in a tool change position detection system for a CNC machine tool in this embodiment corresponds one-to-one to each step in the detection method in the aforementioned embodiment. Therefore, the specific implementation of this embodiment can refer to the implementation of the aforementioned tool change position detection method for a CNC machine tool, and will not be repeated here.

[0057] The present invention also provides a computer storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the method in the above embodiment are implemented.

[0058] In some embodiments, the computer-readable storage medium may be a memory device such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface mount memory, optical disk, or CD-ROM; or various devices including any one or any combination of the above memories. The computer may be various computing devices including smart terminals and servers.

[0059] In some embodiments, executable instructions may be in the form of a program, software, software module, script, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.

[0060] As an example, executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinating files (e.g., files storing one or more modules, subroutines, or code portions).

[0061] By way of example, executable instructions may be deployed to be executed on one computing device, or on multiple computing devices at one site, or on multiple computing devices distributed across multiple sites and interconnected by a communication network.

[0062] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or system comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or system. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or system comprising the element.

[0063] The serial numbers of the above embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0064] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better embodiment. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product is stored in a storage medium (such as a read-only memory / random access memory, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a multimedia terminal device (which can be a mobile phone, a computer, a television receiver, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0065] The above are only preferred embodiments of the present application and do not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A method for detecting tool change position of a CNC machine tool, characterized in that: The following steps are involved: Control the on-machine probe to be replaced on the spindle; Control the on-machine probe to approach the tool holder conical surface along the positive and negative directions of the X-axis and Y-axis respectively to measure the coordinates of several points in the XY plane, and obtain the center coordinates of the tool holder based on the coordinates of the several points; Obtain the Z coordinates of several detection points on the end face of the tool holder, and obtain the tool change coordinates of the tool based on the several Z coordinates; Returning to the control, the on-machine probe approaches the tool holder conical surface along the positive and negative directions of the X-axis and the Y-axis respectively to measure the coordinates of a plurality of points in the XY plane, and obtains the center coordinates of the tool holder according to the plurality of point coordinates to obtain the tool change coordinates of a plurality of tools; wherein the plurality of tools are of different types; Fit all tool change coordinates to obtain the spherical center coordinates; Compile the system variables of the CNC machine tool, establish an intermediate storage area, call the tool change coordinates, calculate the previous tool change coordinates, and output the detection results; among them, the intermediate storage area is used to store the sphere center coordinates, and the system variables are the assignments of the sphere center coordinates.

2. A method for detecting tool change position of a CNC machine tool according to claim 1, characterized in that: The method of obtaining the center coordinates of the tool handle according to the coordinates of a plurality of points includes the following steps: The least squares fitting circle calculation is performed on the coordinates of several points. The calculation expression is: ; in, a for x The coefficient of the first term, b for y The coefficient of the first term, c is the constant term coefficient, x , y are the point coordinates respectively.

3. A method for detecting tool change position of a CNC machine tool according to claim 2, characterized in that: a , b , c The expressions are: ; ; ; in, N is the total number of point coordinates; X i , Y i For the i Point coordinates; D 、 E 、 F 、 G 、 H 、 I Solve the coefficients of the least squares fitting circle respectively.

4. A method for detecting tool change position of a CNC machine tool according to claim 2, characterized in that: The method of obtaining the tool change coordinates of the tool according to a plurality of Z-axis coordinates includes the following steps: Take the average value of the coordinates of the four detection points and calculate the expression: ; Among them, Z a is the Z-axis coordinate, Z1, Z2, Z3, and Z4 are the coordinates of the four detection points respectively; Tool change coordinates are (X a , Y a , Z a ): in, ; 。 5. A method for detecting tool change position of a CNC machine tool according to claim 3, characterized in that: The method of fitting all tool change coordinates to obtain the spherical center coordinates includes the following steps: Fit all tool change coordinates to a spherical surface and calculate the sphere center coordinates (X, Y, Z). The calculation expression is: ; in, is the mean X coordinate of the tool change coordinate set; is the mean Y coordinate of the tool change coordinate set; is the mean Z coordinate of the tool change coordinate set; is the mean of the square of the X coordinate of the tool change coordinate set; is the mean of the square of the Y coordinate of the tool change coordinate set, is the mean of the square of the Z coordinate of the tool change coordinate set axis, is the mean of the cube of the X-coordinate of the tool change coordinate set, is the mean of the cubic Y coordinate of the tool change coordinate set, is the mean of the cubic Z coordinate of the tool change coordinate set, is the mean value of the product of the square of the X-coordinate and Y-coordinate of the tool change coordinate set. is the mean value of the product of the square of the X coordinate and the Z coordinate of the tool change coordinate set. is the mean value of the product of the Y coordinate and the square of the Z coordinate of the tool change coordinate set. is the mean value of the product of the square of the X coordinate and the Y coordinate of the tool change coordinate set axis, is the mean value of the product of the square of the X coordinate and the Z coordinate of the tool change coordinate set. It is the mean of the product of the square of the Z coordinate and the Y coordinate of the tool change coordinate set.

6. A method for detecting tool change position of a CNC machine tool according to claim 5, characterized in that: The expression is: ; The expression is: ; The expression is: ; The expression is: ; The expression is: ; The expression is: ; The expression is: ; The expression is: ; The expression is: ; The expression is: ; The expression is: ; The expression is: ; The expression is: ; The expression is: ; The expression is: ; in, m is the number of tool change coordinates; X i , Y i , Z i Respectively i The coordinates of the tool change coordinates.

7. A method for detecting tool change position of a CNC machine tool according to claim 5, characterized in that: The method of calculating the tool change coordinates of the previous tool change comprises the following steps: Perform square root processing on the detected tool change coordinates, and record the calculation result as △P. Call the previous tool change coordinates and record them as (X0, Y0, Z0). Perform square root processing again and record them as △M. The calculation process expression is: ; 。 8. A method for detecting tool change position of a CNC machine tool according to claim 7, characterized in that: The output of the detection result comprises the following steps: If △P≥△M+λ, output alarm information; If △M-λ>△P<△M+λ, write the center coordinates (X, Y, Z) into the intermediate storage area; If △P≤△M-λ, output alarm information; Here, λ is a fixed constant.

9. A method for detecting tool change position of a CNC machine tool according to claim 1, characterized in that: The steps between establishing the intermediate storage area and calling the tool change coordinates also include: The same system variables are compiled in the tool change program and used to call the sphere center coordinates in the intermediate storage area.

10. A tool change position detection system for a CNC machine tool, characterized in that: include: The first control module is used to control the replacement of the on-machine probe to the main shaft; The second control module is used to control the on-machine probe to approach the tool holder conical surface along the positive and negative directions of the X-axis and the Y-axis respectively, so as to measure the coordinates of several points in the XY plane, and obtain the center coordinates of the tool holder according to the coordinates of the several points; A coordinate acquisition module is used to obtain the Z-axis coordinates of several detection points on the end face of the tool handle, and obtain the tool change coordinates of the tool based on the several Z-axis coordinates; a data processing module for returning to the control on-machine probe to approach the tool holder conical surface along the positive and negative directions of the X-axis and the Y-axis respectively to measure the coordinates of a plurality of points in the XY plane; and for obtaining the coordinates of the center of the tool holder based on the coordinates of the plurality of points to obtain the tool change coordinates of a plurality of tools; wherein the plurality of tools are of different types; The fitting module is used to fit all tool change coordinates to obtain the spherical center coordinates; The detection module is used to compile the system variables of the CNC machine tool, establish an intermediate storage area, call the tool change coordinates, calculate the previous tool change coordinates, and output the detection results; among them, the intermediate storage area is used to store the center coordinates of the ball, and the system variables are the values ​​assigned to the center coordinates of the ball.

11. A computer device, characterized in that: The computer device includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method according to any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and the processor executes the computer program to implement the method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Circle center aligning method for aviation revolution part machining basic circle

    CN106312690A

  • Five-axis linkage machine tool RTCP parameter calibration method

    CN111906594A

  • Five-axis machining center tool changing pose detection device and detection method

    CN118342338A

  • Tool changing method, machining center, computer storage medium and computer program product

    CN119017115A

  • Tool magazine reliability test platform tool changing position self -adaptation centering adjusting device

    CN205228846U