A numerical control machine tool tool changing position detection method, system, device and medium

CN120663181BActive Publication Date: 2026-09-11CHENGDU AIRCRAFT INDUSTRY GROUP
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

[0004]本发明的主要目的在于提供一种数控机床换刀位置检测方法、系统、设备及介质,旨在解决现有机床换刀位置检测方法检测精度较低的问题

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120663181B_ABST
    Figure CN120663181B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of numerical control machining, and particularly relates to a numerical control machine tool tool changing position detection method, system, device and medium; the method comprises the following steps: controlling an on-machine probe to be replaced on a spindle; controlling the on-machine probe to approach a tool shank cone surface in positive and negative directions of X and Y axes respectively; acquiring Z direction coordinates of a plurality of detection points in a tool shank end face; returning to the step of controlling the on-machine probe to approach the tool shank cone surface in positive and negative directions of X and Y axes respectively, so as to measure a plurality of point coordinates in an XY plane; acquiring a tool shank center coordinate according to the plurality of point coordinates, so as to acquire a plurality of tool changing coordinates; fitting all tool changing coordinates to obtain a spherical center coordinate; compiling a system variable of the numerical control machine tool, establishing an intermediate storage area, calling the tool changing coordinates, calculating previous tool changing coordinates, and outputting a detection result; and finally forming a three-dimensional tool changing coordinate, so as to solve the problem of position deviation when an on-machine probe detects an actual position of a machining tool in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of CNC machining technology, and in particular to a method, system, equipment and medium for detecting the tool change position of a CNC machine tool. Background Technology

[0002] Currently, all CNC machine tools on the market are equipped with automatic tool changer functions. As the tool changing mechanism and the machine tool's motion mechanism undergo mechanical wear, the tool changing position also changes. Usually, the tool changing position needs to be checked and adjusted every 2 to 3 months to ensure smooth tool changing.

[0003] Currently, the adjustment of the tool change position on CNC machine tools mainly relies on manual operation. This requires manually moving the tool changer arm and the machine tool to the exchange position, then installing a dial indicator for detection, and finally inputting the detected tool change position into the program. This method is not only inefficient, but the quality of the operation also depends heavily on the manual experience of the debugging personnel. Summary of the Invention

[0004] The main objective of this 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 in existing machine tool tool change position detection methods.

[0005] To achieve the above objectives, the present invention provides a method for detecting the tool change position of a CNC machine tool, comprising the following steps: Control the transfer of the machine probe to the spindle; The machine probe is controlled to approach the conical surface of the tool holder along the positive and negative directions of the X and Y axes respectively, so as to measure the coordinates of several points in the XY plane, and obtain the coordinates of the center of the tool holder based on the coordinates of several points; Obtain the Z-coordinates of several detection points within the end face of the tool holder, and obtain the tool change coordinates based on these Z-coordinates; Returning to the control, the probe approaches the tool holder cone surface along the positive and negative directions of the X and Y axes respectively to measure the coordinates of several points in the XY plane. Based on the coordinates of the several points, the coordinates of the tool holder center are obtained to obtain the tool change coordinates of several tools; among them, the several tools are of different types. The coordinates of the sphere's center are obtained by fitting all tool change coordinates. The system variables of the CNC machine tool are compiled, an intermediate storage area is established, the tool change coordinates are called, and the previous tool change coordinates are calculated to output the detection results; 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 holder based on several point coordinates includes the following steps: The least-squares fitted circle calculation is performed on the coordinates of several points, and the calculation expression is as follows: ; in, a for x coefficient of the first term, b for y coefficient of the first term, c The coefficient of the constant term, x , y These are the coordinates of the points.

[0007] Optionally, a , b , c The expressions are as follows: ; ; ; in, N This represents the total number of point coordinates; X i , Y i For the first i Coordinates of each point; D , E , F , G , H , I These are the coefficients of each term in the least squares fitted circle.

[0008] Optionally, obtaining the tool change coordinates based on several Z-axis coordinates includes the following steps: The average of the coordinates of the four detection points is used for calculation, and the expression is as follows: ; Among them, Z a Z represents the Z-axis coordinates, and 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, the process of fitting all tool change coordinates to obtain the sphere center coordinates includes the following steps: By performing a spherical fit on all tool change coordinates, the coordinates of the sphere's center (X, Y, Z) are calculated using the following expression: ; in, The mean of the X-coordinates of the tool change coordinate set; The average Y-coordinate of the tool change coordinate set; The mean of the Z-coordinates of the tool change coordinate set; The mean of the squares of the X coordinates of the tool change coordinate set; Let be the mean of the squared Y-coordinates of the tool change coordinate set. The mean of the squares of the Z-axis coordinates of the tool change coordinate set. The x-axis is the mean of the cube of the coordinates of the tool change coordinate set. The mean of the cube of the Y-axis of the tool change coordinate set. The mean of the cube of the Z-axis of the tool change coordinate set. This is the mean of the product of the squares of the X and Y coordinates of the tool change coordinate set. The mean of the product of the squares of the X and Z coordinates of the tool change coordinate set. This is the mean of the product of the squares of the Y and Z coordinates of the tool change coordinate set. This is the mean of the product of the squared X-axis coordinate and the Y-axis coordinate of the tool change coordinate set. This is the mean of the product of the squared X-coordinate and the Z-coordinate of the tool change coordinate set. This is the mean of the product of the square of the Z-axis and the Y-axis 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 This represents the number of tool change coordinates. X i Y i Z i The first i The coordinates of each tool change coordinate.

[0011] Optionally, the calculation of the previous tool change coordinates includes the following steps: The detected tool change coordinates are square-rooted and the result is denoted as ΔP. ​​The previous tool change coordinates are retrieved and denoted as (X0, Y0, Z0), and then square-rooted again and denoted as ΔM. The expression for the calculation process is as follows: ; .

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

[0013] Optionally, the process of establishing the intermediate storage area and calling the tool change coordinates further includes: The same system variable is programmed in the tool changer program and used to retrieve the center coordinates of the sphere in the intermediate storage area.

[0014] To achieve the above objectives, the present invention also provides a CNC machine tool tool change position detection system, comprising: The first control module is used to control the on-machine probe to be changed onto the spindle; The second control module is used to control the machine probe to approach the tool holder cone surface along the positive and negative directions of the X and Y axes respectively, so as to measure the coordinates of several points in the XY plane and obtain the coordinates of the tool holder center based on the coordinates of several points. The coordinate acquisition module is used to acquire the Z-coordinates of several detection points within the end face of the tool holder, and to acquire the tool change coordinates of the tool based on these Z-coordinates. The data processing module is used to return to the control system to the machine probe to approach the tool holder cone surface along the positive and negative directions of the X and Y axes respectively, so as to measure the coordinates of several points in the XY plane; it is also used to obtain the coordinates of the tool holder center based on the coordinates of the several points, so as to obtain the tool change coordinates of several tools; wherein, the several tools are of different types; The fitting module is used to fit all tool change coordinates to obtain the sphere 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. The intermediate storage area is used to store the sphere center coordinates, and the system variables are the assignments of the sphere center coordinates.

[0015] To achieve the above objectives, the present invention also 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 objectives, the present invention also provides a computer-readable storage medium storing a computer program, wherein a processor executes the computer program.

[0017] This invention proposes a method, system, equipment, and medium for detecting the tool change position of a CNC machine tool. It involves acquiring multi-dimensional coordinates of the tool holder's conical surface and end face using a machine probe; then, by driving the probe to approach the tool holder's conical surface along the positive and negative X / Y axes, at least four sets of point coordinates in the XY plane are obtained. The center coordinates of the tool holder are calculated using a least-squares method to fit a circle. Simultaneously, the Z-axis coordinates of four quadrant points on the tool holder's end face are detected and averaged to form a three-dimensional tool change coordinate system. This design overcomes the limitations of existing technologies that rely on manual dial indicator detection, eliminating human error. Furthermore, the fitting algorithm transforms discrete measurement points into precise geometric center coordinates, significantly improving detection accuracy. More specifically, by repeatedly measuring the tool change coordinates of different types of tools (such as milling cutters and boring tools), and then using a spherical fitting algorithm to calculate the optimal sphere center coordinates, this coordinate system can adaptively compensate for positional deviations caused by differences in length and weight of various tools. This solves the problem of positional deviations in existing technologies when the machine probe detects the actual position of the machining tool. Attached Figure Description

[0018] Figure 1 This is a flowchart illustrating the method in Embodiment 1 of the present invention; Figure 2 This is a schematic diagram of the tool holder structure in Embodiment 1 of the present invention; Figure 3This is a distribution diagram of the measurement points on the conical surface of the tool holder in Embodiment 1 of the present invention; Figure 4 This is a distribution diagram of the measurement points on the end face of the tool holder in Embodiment 1 of the present invention.

[0019] Figure label: 1-Cone surface of the tool holder, 2-End face of the tool holder, 3-Tool changer arm, 4-Tool holder as a whole, 5-Cone surface measurement point I, 6-Cone surface measurement point II, 7-Cone surface measurement point III, 8-Cone surface measurement point IV, 9-End face measurement point I, 10-End face measurement point II, 11-End face measurement point III, 12-End face measurement point IV.

[0020] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0021] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are 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 positional relationship and movement of each component in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indication will also change accordingly.

[0023] In this invention, unless otherwise explicitly specified and limited, the terms "connection," "fixed," etc., should be interpreted broadly. For example, "fixed" can mean a fixed connection, a detachable connection, or an integral part; it can mean a mechanical connection or an electrical connection; it can mean a direct connection or an indirect connection through an intermediate medium; it can mean the internal communication of two components or the interaction between two components, unless otherwise explicitly limited. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.

[0024] Furthermore, if the embodiments of this invention involve descriptions such as "first" or "second," these descriptions are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first" or "second" may explicitly or implicitly include at least one of those features. Additionally, the meaning of "and / or" throughout the text includes three parallel solutions; for example, "A and / or B" includes solution A, solution B, or a solution where both A and B are satisfied simultaneously. Furthermore, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed by this invention.

[0025] Example 1: Please refer to the attached document as well. Figures 1 to 4 This embodiment provides a method for detecting the tool change position of a CNC machine tool, including the following steps: Control the transfer of the machine probe to the spindle; The machine probe is controlled to approach the conical surface of the tool holder along the positive and negative directions of the X and Y axes respectively, so as to measure the coordinates of several points in the XY plane, and obtain the coordinates of the center of the tool holder based on the coordinates of several points; Obtain the Z-coordinates of several detection points within the end face of the tool holder, and obtain the tool change coordinates based on these Z-coordinates; Returning to the control, the probe approaches the tool holder cone surface along the positive and negative directions of the X and Y axes respectively to measure the coordinates of several points in the XY plane. Based on the coordinates of the several points, the coordinates of the tool holder center are obtained to obtain the tool change coordinates of several tools; among them, the several tools are of different types. The coordinates of the sphere's center are obtained by fitting all tool change coordinates. The system variables of the CNC machine tool are compiled, an intermediate storage area is established, the tool change coordinates are called, and the previous tool change coordinates are calculated to output the detection results; 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 appendix Figure 1 As shown, after the machine probe is replaced onto the spindle and before the testing program is executed, the process also includes: the tool changer 3 grabbing the tool holder 4 to the tool change point.

[0027] In some embodiments, the on-board probe is activated, and the following measurements are obtained. Figure 2 The coordinates of the four points on the XY plane are shown, such as cone measurement point I5, cone measurement point II6, cone measurement point III7, and cone measurement point IV8.

[0028] In some embodiments, measurements were obtained as shown in the attached figure. Figure 3The coordinates of the four points on the end face 2 of the tool holder are shown, such as end face measurement point I9, end face measurement point II10, end face measurement point III11, and end face measurement point IV12.

[0029] It should be noted that the tool change position adjustment of CNC machine tools is currently mainly done manually. It requires manually moving the tool changer arm and the machine tool to the exchange position, then installing a dial indicator for detection, and finally inputting the detected tool change position into the program. This method is not only inefficient, but the quality of the operation also depends heavily on the manual experience of the debugging personnel.

[0030] It should also be noted that, based on the above problems, this embodiment provides a CNC machine tool tool change position detection method. By programming a detection program, the on-machine probe automatically detects the XY plane of the tool holder and the Z-axis coordinate of the tool holder end face, thereby calculating the three-dimensional tool change coordinates. At the same time, considering that the tool position may deviate due to the influence of 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 tools, and reamers are measured and data fitting is performed. The calculated three-dimensional sphere center coordinates are the smallest in distance from each tool change point, satisfying all tool change requirements.

[0031] Specifically, this method involves acquiring multi-dimensional coordinates of the tool holder's conical surface and end face using a machine probe. Then, by driving the probe to approach the tool holder's conical surface along the positive and negative X / Y axes, at least four sets of point coordinates in the XY plane are obtained. The center coordinates of the tool holder are calculated using a least-squares method to fit a circle. Simultaneously, the Z-axis coordinates of four quadrant points on the tool holder's end face are detected and averaged to form a three-dimensional tool-changing coordinate system. This design overcomes the limitations of existing technologies that rely on manual dial indicator detection, eliminating human error. Furthermore, the fitting algorithm transforms discrete measurement points into precise geometric center coordinates, significantly improving detection accuracy. More specifically, by repeatedly measuring the tool-changing coordinates of different types of tools (such as milling cutters and boring tools), and then using a spherical fitting algorithm to calculate the optimal sphere center coordinates, this coordinate system can adaptively compensate for positional deviations caused by differences in length and weight of various tools. This solves the problem of positional deviations in existing technologies when using machine probes to detect the actual position of machining tools. Moreover, it can accurately detect the tool change position of the tool magazine without adding extra devices or measuring tools, offering advantages such as high detection quality, high efficiency, and strong applicability.

[0032] In this embodiment, obtaining the center coordinates of the tool holder based on several point coordinates includes the following steps: The least-squares fitted circle calculation is performed on the coordinates of several points, and the calculation expression is as follows: ; in, a for x coefficient of the first term, b for y coefficient of the first term,c The coefficient of the constant term, x , y These are the coordinates of the points.

[0033] Understandably, in this embodiment, by establishing a general equation for a circle, the coordinates of multiple points in the XY plane are transformed into mathematical parameters. The coefficients of the optimally fitted circle are then solved using the least squares method. Specifically, the algorithm constructs a complex system of equations containing the total number of points, coordinate values, and their higher-order terms, and calculates three key parameters: the coefficient of the first-order term in x, the coefficient of the first-order term in y, and the coefficient of the constant term. Finally, the coordinates of the tool holder center are derived. The above data processing method has extremely strong fault tolerance. Even if there are errors in individual measurement points, the accuracy of the center coordinates can still be guaranteed through overall fitting. This overcomes the stringent requirements of simple geometric drawing methods or the three-point circle method on the quality of measurement points. Compared with the existing technology that uses special tooling or manual visual positioning, this algorithm improves the detection accuracy from millimeters to micrometers and is not affected by the operator's subjective judgment.

[0034] In this embodiment, a , b , c The expressions are as follows: ; ; ; in, N This represents the total number of point coordinates; X i , Y i For the first i Coordinates of each point; D , E , F , G , H , I These are the coefficients of each term in the least squares fitted circle.

[0035] It is understandable that this embodiment, based on the least squares fitting circle algorithm, further refines the calculation process of each coefficient, solving the fitting stability problem caused by fluctuations in measurement data under complex working conditions. Specifically, by establishing a system containing six intermediate parameters ( D , E , F , G , H , IThe complete calculation system transforms the original measurement data into intermediate variables with clear physical meaning, and then solves for the three key coefficients of the circle equation through the interaction between these variables. It is particularly suitable for non-ideal measurement environments commonly encountered in the actual operation of CNC machine tools, such as slight scratches on the tool holder cone surface or interference from cutting fluid on the probe. In addition, by introducing the complex combination relationship of 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 method or simple averaging method, it significantly improves the anti-interference ability and repeatability consistency of the fitted circle.

[0036] Optionally, obtaining the tool change coordinates based on several Z-axis coordinates includes the following steps: The average of the coordinates of the four detection points is used for calculation, and the expression is as follows: ; Among them, Z a Z represents the Z-axis coordinates, and 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 the four quadrants of the tool holder end face, collecting the Z-axis coordinate data of each point, and then calculating the final Z-axis coordinate value through arithmetic mean, the multi-point sampling strategy compensates for possible local concavities, assembly misalignment, or measurement system errors on the tool holder end face. Compared with the existing technology that uses a single measuring point or manual visual inspection, this significantly improves the reliability and repeatability of Z-axis positioning and avoids systematic measurement deviations caused by local wear.

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

[0039] In this embodiment, the process of fitting all tool change coordinates to obtain the sphere center coordinates includes the following steps: By performing a spherical fit on all tool change coordinates, the coordinates of the sphere's center (X, Y, Z) are calculated using the following expression: ; in, The average of the X-coordinates of the tool change coordinate set; The average Y-coordinate of the tool change coordinate set; The mean of the Z-coordinates of the tool change coordinate set; The mean of the squares of the X coordinates of the tool change coordinate set; Let be the mean of the squared Y-coordinates of the tool change coordinate set. The mean of the squares of the Z-axis coordinates of the tool change coordinate set. The x-axis is the mean of the cube of the coordinates of the tool change coordinate set. The mean of the cube of the Y-axis of the tool change coordinate set. The mean of the cube of the Z-axis of the tool change coordinate set. This is the mean of the product of the squares of the X and Y coordinates of the tool change coordinate set. The mean of the product of the squares of the X and Z coordinates of the tool change coordinate set. This is the mean of the product of the squares of the Y and Z coordinates of the tool change coordinate set. This is the mean of the product of the squared X-axis coordinate and the Y-axis coordinate of the tool change coordinate set. This is the mean of the product of the squared X-coordinate and the Z-coordinate of the tool change coordinate set. This is the mean of the product of the square of the Z-axis and the Y-axis of the tool change coordinate set.

[0040] Understandably, by treating the three-dimensional tool-changing coordinates of multiple tools as a discrete set of spatial points, a high-order statistical method is used to construct a spherical equation. This allows for the calculation of the optimal sphere center coordinates that minimize the sum of distances from all tool-changing points to the sphere. Utilizing the spatial distribution characteristics of various tool measurement data, a complex matrix equation is established, incorporating coordinate mean, square mean, cubic mean, and cross-term mean, ultimately solving for the optimal spatial point representing the overall tool-changing position. Compared to existing technologies 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. This ensures that the final tool-changing position is neither excessively biased towards any particular type of tool, nor that the tool-changing actions of all tools 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 This represents the number of tool change coordinates. X i Y i Z i The first i The coordinates of each tool change coordinate.

[0042] It should be noted that a multi-dimensional 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 averages, but rather comprehensively capture the distribution characteristics of the tool-changing coordinate set in three-dimensional space through specific mathematical combinations. For example, by calculating the cross-mean of coordinates and square terms, the algorithm can perceive the nonlinear characteristics of the dataset; while the introduction of the cubic mean enables the system to identify the skewness of the data distribution. Compared with traditional methods that only consider first- or second-order statistics, it can more accurately describe the spatial geometric characteristics of the tool-changing coordinate set, providing richer data support for subsequent spherical fitting.

[0043] Understandably, by establishing a standardized statistical calculation process, the system can uniformly process measurement data of different batches and types of cutting tools, ensuring the stable performance of the algorithm under different machine tools and working conditions. Secondly, the modular design of various statistical quantities 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 extend the new statistical calculation module within the existing framework, without having to reconstruct the entire algorithm system.

[0044] In this embodiment, calculating the previous tool change coordinates includes the following steps: The detected tool change coordinates are square-rooted and the result is denoted as ΔP. ​​The previous tool change coordinates are retrieved and denoted as (X0, Y0, Z0), and then square-rooted again and denoted as ΔM. The expression for the calculation process is as follows: ; .

[0045] It should be noted that by performing square root operations on the currently detected three-dimensional coordinates, a scalar value representing the overall change in spatial position is calculated. At the same time, the previously correct tool change coordinates stored in the intermediate storage area are called and processed in the same way. Finally, the offset state of the current tool change position is determined by comparing the difference between the two. Transforming the three-dimensional spatial 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 of the tool change position through the mathematical concept of vector length, overcoming the misjudgment problem caused by single-axis independent alarms in the existing technology.

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

[0047] By setting dual threshold ranges, the tool change position status is divided into three distinct 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 and triggers an alarm; when the deviation is below the negative threshold, it is also determined as an abnormal decrease and triggers an alarm; only when the deviation is within a reasonable range will the system write the new tool change coordinates to the storage area.

[0048] This hierarchical processing mechanism fully considers various operating conditions that machine tools may encounter during actual operation. It avoids frequent false alarms caused by normal fluctuations while promptly detecting genuine mechanical faults or abnormal wear. In particular, by introducing a configurable fixed constant as a threshold parameter, the system can be flexibly adjusted according to the accuracy requirements and operating characteristics of different machine tools, making it more adaptable and practical than the fixed threshold alarm method in existing technologies.

[0049] In some embodiments, the alarm message is: Tool change coordinate abnormal, please contact the machine repair department 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 several tools obtained by repeatedly executing the detection program are of different types.

[0052] Understandably, by collecting spatial position data of various tools under actual tool-changing conditions, the system ensures that the final fitted sphere center coordinates can meet the tool-changing requirements of all tools. This multi-category sampling strategy fully considers the differences in length, weight, and structural characteristics of different tools, enabling the system to sense and compensate for positional deviations caused by changes in tool type. Compared to existing technologies that use dedicated or fixed-type tool detection methods, this significantly improves the comprehensiveness and practicality of tool-changing position detection. Especially in automated machining units, when the tool magazine contains multiple tools and is frequently changed, this technology can still maintain stable detection accuracy, avoiding tool-changing failures caused by changes in tool type.

[0053] In this embodiment, the process of establishing the intermediate storage area and calling the tool change coordinates further includes: The same system variable is programmed in the tool changer program and used to retrieve the center coordinates of the sphere in the intermediate storage area.

[0054] Understandably, after the detection program completes the calculation and verification of the tool change coordinates, it writes the final sphere center coordinates into the intermediate storage area. When the tool change program is executed, it reads the latest data from this storage area by calling the same system variable. The entire process requires no manual intervention in data transfer. This integrated data management method completely eliminates errors that may be caused by manual input, while ensuring a high degree of consistency between detection data and execution data. Compared with the existing technology where the detection and execution systems are independent, this significantly improves the system's reliability and operational efficiency.

[0055] Example 2: A CNC machine tool tool change position detection system includes: The first control module is used to control the on-machine probe to be changed onto the spindle; The second control module is used to control the machine probe to approach the tool holder cone surface along the positive and negative directions of the X and Y axes respectively, so as to measure the coordinates of several points in the XY plane and obtain the coordinates of the tool holder center based on the coordinates of several points. The coordinate acquisition module is used to acquire the Z-coordinates of several detection points within the end face of the tool holder, and to acquire the tool change coordinates of the tool based on these Z-coordinates. The data processing module is used to return to the control system to the machine probe to approach the tool holder cone surface along the positive and negative directions of the X and Y axes respectively, so as to measure the coordinates of several points in the XY plane; it is also used to obtain the coordinates of the tool holder center based on the coordinates of the several points, so as to obtain the tool change coordinates of several tools; wherein, the several tools are of different types; The fitting module is used to fit all tool change coordinates to obtain the sphere 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. The intermediate storage area is used to store the sphere center coordinates, and the system variables are the assignments of the sphere center coordinates.

[0056] It should be noted that each module in the CNC machine tool tool change position detection system in this embodiment corresponds one-to-one with 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 CNC machine tool tool change position detection method, and will not be repeated here.

[0057] The present invention also provides a computer storage medium storing a computer program, wherein the computer program is executed by a processor to implement the steps of the methods in the foregoing embodiments.

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

[0059] In some embodiments, executable instructions may take 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 standalone 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 do not necessarily, correspond to files in a file system. They may be stored as part of a file that holds other programs or data, for example, in one or more scripts in a Hyper Text Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple collaborating files (e.g., a file that stores one or more modules, subroutines, or code sections).

[0061] As an example, executable instructions can be deployed to execute on a single computing device, or on multiple computing devices located in one location, or on multiple computing devices distributed across multiple locations and interconnected via a communication network.

[0062] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.

[0063] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

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

[0065] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A method for detecting a tool change position of a numerical control machine tool, characterized by, Includes the following steps: Control the transfer of the machine probe to the spindle; The machine probe is controlled to approach the conical surface of the tool holder along the positive and negative directions of the X and Y axes respectively, so as to measure the coordinates of several points in the XY plane, and obtain the coordinates of the center of the tool holder based on the coordinates of several points; Obtain the Z-coordinates of several detection points within the end face of the tool holder, and obtain the tool change coordinates based on these Z-coordinates; Returning to the control, the probe approaches the tool holder cone surface along the positive and negative directions of the X and Y axes respectively to measure the coordinates of several points in the XY plane. Based on the coordinates of the several points, the coordinates of the tool holder center are obtained to obtain the tool change coordinates of several tools; among them, the several tools are of different types. Fit all tool change coordinates to obtain the sphere center coordinates (X, Y, Z); The system variables of the CNC machine tool are compiled, an intermediate storage area is established, the tool change coordinates are called, the previous tool change coordinates are calculated, and the detection results are output; the intermediate storage area is used to store the sphere center coordinates, and the system variables are the assignments of the sphere center coordinates; The calculation of the previous tool change coordinates includes the following steps: The detected tool change coordinates are square-rooted and the result is denoted as ΔP. ​​The previous tool change coordinates are retrieved and denoted as (X0, Y0, Z0), and then square-rooted again and denoted as ΔM. The expression for the calculation process is as follows: ; 。 2. A method of detecting a tool change position of a numerical control machine tool according to claim 1, wherein The process of obtaining the center coordinates of the tool holder based on several point coordinates includes the following steps: The least-squares fitted circle calculation is performed on the coordinates of several points, and the calculation expression is as follows: ; in, a for x coefficient of the first term, b for y coefficient of the first term, c The coefficient of the constant term, x , y These are the coordinates of the points.

3. The method for detecting the tool change position of a CNC machine tool as described in claim 2, characterized in that, a , b , c The expressions are as follows: ; ; ; in, N This represents the total number of point coordinates; X i , Y i For the first i Coordinates of each point; D , E , F , G , H , I These are the coefficients of each term in the least squares fitted circle.

4. The method for detecting the tool change position of a CNC machine tool as described in claim 2, characterized in that, The process of obtaining the tool change coordinates based on several Z-axis coordinates includes the following steps: The average of the coordinates of the four detection points is used for calculation, and the expression is as follows: ; wherein Z a is the Z coordinate, Z1, Z2, Z3, Z4 are the coordinates of the four detection points, respectively; Tool change coordinates (X a , Y a , Z a ): in, ; 。 5. The method for detecting the tool change position of a CNC machine tool as described in claim 3, characterized in that, The process of fitting all tool change coordinates to obtain the sphere center coordinates includes the following steps: By performing a spherical fit on all tool change coordinates, the coordinates of the sphere's center (X, Y, Z) are calculated using the following expression: ; in, The mean of the X-coordinates of the tool change coordinate set; The average Y-coordinate of the tool change coordinate set; The mean of the Z-coordinates of the tool change coordinate set; The mean of the squares of the X coordinates of the tool change coordinate set; Let be the mean of the squared Y-coordinates of the tool change coordinate set. The mean of the squares of the Z-axis coordinates of the tool change coordinate set. The x-axis is the mean of the cube of the coordinates of the tool change coordinate set. The mean of the cube of the Y-axis of the tool change coordinate set. The mean of the cube of the Z-axis of the tool change coordinate set. This is the mean of the product of the squares of the X and Y coordinates of the tool change coordinate set. The mean of the product of the squares of the X and Z coordinates of the tool change coordinate set. This is the mean of the product of the squares of the Y and Z coordinates of the tool change coordinate set. This is the mean of the product of the squared X-axis coordinate and the Y-axis coordinate of the tool change coordinate set. This is the mean of the product of the squared X-coordinate and the Z-coordinate of the tool change coordinate set. This is the mean of the product of the square of the Z-axis and the Y-axis of the tool change coordinate set.

6. The method for detecting the tool change position of a CNC machine tool as described in 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 This represents the number of tool change coordinates. X i Y i Z i The first i The coordinates of the tool change coordinates.

7. The method for detecting the tool change position of a CNC machine tool as described in claim 1, characterized in that, The process of establishing the intermediate storage area and calling the tool change coordinates also includes: The same system variable is programmed in the tool changer program and used to retrieve the center coordinates of the sphere in the intermediate storage area.

8. A CNC machine tool tool change position detection system, characterized in that, include: The first control module is used to control the on-machine probe to be changed onto the spindle; The second control module is used to control the machine probe to approach the tool holder cone surface along the positive and negative directions of the X and Y axes respectively, so as to measure the coordinates of several points in the XY plane and obtain the coordinates of the tool holder center based on the coordinates of several points. The coordinate acquisition module is used to acquire the Z-coordinates of several detection points within the end face of the tool holder, and to acquire the tool change coordinates of the tool based on these Z-coordinates. The data processing module is used to return to the control system to the machine probe to approach the tool holder cone surface along the positive and negative directions of the X and Y axes respectively, so as to measure the coordinates of several points in the XY plane; it is also used to obtain the coordinates of the tool holder center based on the coordinates of the several points, so as to obtain the tool change coordinates of several tools; wherein, the several tools are of different types; The fitting module is used to fit all tool change coordinates to obtain the sphere 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. The intermediate storage area is used to store the sphere center coordinates, and the system variables are the assignments of the sphere center coordinates.

9. 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 as described in any one of claims 1-7.

10. 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 as described in any one of claims 1-7.

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