Numerical control equipment on-machine detection method, numerical control equipment and medium

CN121386605BActive Publication Date: 2026-09-25深圳模德宝科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411958448.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2026-09-25
Estimated Expiration
2044-12-30

AI Technical Summary

Technical Problem

[0003]本发明针对现有技术中数控设备在机检测误差较大等技术问题,提供了一种数控设备在机检测方法、数控设备及介质

Benefits of technology

[0008]本发明提供的数控设备在机检测方法,首先根据检测对象的第一几何形状信息确定预设探测点在检测对象上的预设法向矢量,其次根据预设法向矢量以及探测球的第二几何形状信息确定与预设探测点对应的预设接近点,之后根据探测球的探测方向以及预设法向矢量对预设接近点和预设探测点进行校正,从而校正了预设探测点和预设接近点的误差,进而获得了目标接近点和目标探测点,最后控制探测球根据目标接近点和目标探测点对检测对象进行检测,从而提高了探测球的检测精度,提高了数控设备在机检测的检测精度,进而提高了数控设备的产品质量和生产效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121386605B_ABST
    Figure CN121386605B_ABST
Patent Text Reader

Abstract

The application provides a numerical control equipment on-machine detection method, numerical control equipment and medium. The numerical control equipment on-machine detection method comprises the following steps: acquiring a preset detection point on a detection object; determining a preset normal vector of the preset detection point on the detection object according to first geometric shape information of the detection object and the preset detection point; determining a preset approaching point corresponding to the preset detection point according to the preset normal vector and second geometric shape information of a detection ball; correcting the preset approaching point and the preset detection point according to a detection direction of the detection ball and the preset normal vector, so as to obtain a target approaching point and a target detection point; and controlling the detection ball to detect the detection object according to the target approaching point and the target detection point. The application improves the detection precision of the detection ball and the detection precision of the numerical control equipment on-machine detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of CNC equipment technology, and in particular relates to an in-machine testing method for CNC equipment, CNC equipment, and a medium. Background Technology

[0002] In modern manufacturing, in-machine inspection of CNC equipment is a crucial step in ensuring product quality and production efficiency. Currently, the inspection accuracy of most CNC equipment relies on three-axis linkage, which enables precise spatial positioning and motion control, effectively reducing inspection errors. However, for some CNC equipment lacking three-axis linkage, in-machine inspection errors increase significantly. This not only affects product yield but may also lead to a decrease in production efficiency. Summary of the Invention

[0003] This invention addresses the technical problem of large in-machine detection errors in existing CNC equipment by providing an in-machine detection method, CNC equipment, and medium.

[0004] In view of the above technical problems, embodiments of the present invention provide an in-machine inspection method for CNC equipment, comprising: Acquire preset detection points on the object to be detected; Based on the first geometric shape information of the object being detected and the preset detection point, a preset normal vector of the preset detection point on the object being detected is determined; Determine the preset proximity point corresponding to the preset detection point based on the preset normal vector and the second geometric shape information of the detection sphere; The preset approach point and the preset detection point are corrected according to the detection direction of the detection ball and the preset normal vector to obtain the target approach point and the target detection point; The probe ball is controlled to detect the target based on the target approach point and the target detection point.

[0005] A numerical control (CNC) device includes a controller for performing an in-machine inspection method for the CNC device.

[0006] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the in-machine inspection method for CNC equipment.

[0007] The in-machine inspection method for CNC equipment provided by the present invention includes: acquiring a preset detection point on the object to be inspected; determining a preset normal vector of the preset detection point on the object to be inspected based on the first geometric shape information of the object to be inspected and the preset detection point; determining a preset approach point corresponding to the preset detection point based on the preset normal vector and the second geometric shape information of the probe ball; correcting the preset approach point and the preset detection point based on the detection direction of the probe ball and the preset normal vector to obtain a target approach point and a target detection point; and controlling the probe ball to inspect the object to be inspected based on the target approach point and the target detection point.

[0008] The in-machine inspection method for CNC equipment provided by this invention first determines a preset normal vector of a preset detection point on the object to be inspected based on the first geometric shape information of the object. Then, based on the preset normal vector and the second geometric shape information of the detection ball, a preset proximity point corresponding to the preset detection point is determined. Next, the preset proximity point and the preset detection point are corrected according to the detection direction of the detection ball and the preset normal vector, thereby correcting the errors of the preset detection point and the preset proximity point, and thus obtaining the target proximity point and the target detection point. Finally, the detection ball is controlled to inspect the object based on the target proximity point and the target detection point, thereby improving the detection accuracy of the detection ball, improving the detection accuracy of the CNC equipment in-machine inspection, and ultimately improving the product quality and production efficiency of the CNC equipment. Attached Figure Description

[0009] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0010] Figure 1 This is a flowchart of the in-machine inspection method for CNC equipment provided in the first embodiment of the present invention.

[0011] Figure 2 This is a flowchart of the in-machine inspection method for CNC equipment provided in the second embodiment of the present invention.

[0012] Figure 3 This is a flowchart of the in-machine inspection method for CNC equipment provided in the third embodiment of the present invention.

[0013] Figure 4 This is a flowchart of the in-machine inspection method for CNC equipment provided in the fourth embodiment of the present invention.

[0014] Figure 5 This is a flowchart of the in-machine inspection method for CNC equipment provided in the fifth embodiment of the present invention.

[0015] Figure 6 This is a flowchart of the in-machine inspection method for CNC equipment provided in the sixth embodiment of the present invention.

[0016] Figure 7 This is a flowchart of the in-machine inspection method for CNC equipment provided in the seventh embodiment of the present invention.

[0017] Figure 8 This is a flowchart of the in-machine inspection method for CNC equipment provided in the eighth embodiment of the present invention. Detailed Implementation

[0018] To make the technical problems solved, the technical solutions, and the beneficial effects of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only for explaining the invention and are not intended to limit the invention.

[0019] It should be understood that the terms "upper", "lower", "left", "right", "front", "rear", "middle", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations of the present invention.

[0020] like Figure 1 As shown, an embodiment of the present invention provides an in-machine inspection method for CNC equipment, including steps S100-S500: S100: Obtain the preset detection points on the detection object.

[0021] The in-machine inspection method for CNC equipment provided in this embodiment can be applied to a CNC machine. In one embodiment, the CNC machine includes a probe ball and a controller; the controller is used to execute the in-machine inspection method; the probe ball is used to inspect the object to be inspected. The object to be inspected includes, but is not limited to, workpieces, electrodes, or cutting tools.

[0022] Understandably, the preset detection points are located on the surface of the object being inspected. The number of preset detection points can be set according to actual conditions. The preset detection points can be pre-set on the object being inspected according to actual conditions. The determination of the preset detection points can be done manually or using software such as UnigraphicsNX. The first coordinate of the preset detection point is a three-dimensional coordinate, that is, it includes coordinate values ​​in the X, Y, and Z directions. The origin of the coordinate system of the first coordinate of the preset detection point can be set according to actual conditions, as long as it can be mutually referenced with the CNC equipment being inspected on-machine, thereby determining the relative positional relationship between the CNC equipment and the preset detection point. Specifically, the first coordinate of the preset detection point can be set as (Xb, Yb, Zb); where Xb is the first X coordinate, Yb is the first Y coordinate, and Zb is the first Z coordinate.

[0023] S200. Determine the preset normal vector of the preset detection point on the detection object based on the first geometric shape information of the detection object and the preset detection point.

[0024] Understandably, the direction of the preset normal vector is also the direction of the normal vector corresponding to the preset detection point on the object being detected. The first geometric shape information includes, but is not limited to, the surface equation of the object being detected, which can reflect the geometric information such as the shape and structure of the object. The preset normal vector of the preset detection point on the object being detected can be determined using the surface equation and the first coordinates of the preset detection point.

[0025] S300. Determine the preset proximity point corresponding to the preset detection point based on the preset normal vector and the second geometric shape information of the detection ball.

[0026] Understandably, the second geometric information includes, but is not limited to, the coordinates of the center of the detection sphere and the radius of the detection sphere. The second coordinates of the preset approach point are three-dimensional coordinates, that is, coordinate values ​​in the X, Y, and Z directions. The origin of the coordinate system of the second coordinates of the preset approach point can coincide with the origin of the coordinate system of the first coordinates of the preset detection point. The position of the origin of the coordinate system of the second coordinates of the preset approach point can also be set according to the actual situation, as long as it can be mutually referenced with the coordinate system of the first coordinates of the preset detection point, so as to determine the relative positional relationship between the preset approach point and the preset detection point. Specifically, the second coordinates of the preset approach point can be set as (Xa, Ya, Za); where Xa is the second X coordinate, Ya is the second Y coordinate, and Za is the second Z coordinate. In some embodiments, the preset approach point is located between the detection sphere and the preset detection point, and the preset approach point is used to control the minimum safe distance maintained between the detection sphere and the detection object before the detection sphere detects the detection object. The preset approach point is located on the extension line of the preset normal vector, and the straight-line distance between it and the preset detection point is greater than the radius of the detection ball, thereby ensuring that the detection ball will not come into contact with the detection object when it moves to the preset approach point.

[0027] S400. Correct the preset approach point and the preset detection point according to the detection direction of the detection ball and the preset normal vector to obtain the target approach point and the target detection point.

[0028] Understandably, the target approach point is obtained after correcting the preset approach point. The target detection point is obtained after correcting the preset detection point. The detection direction of the detection ball includes the X, Y, and Z directions. The preset normal vector includes X-axis component vector, Y-axis component vector, and Z-axis component vector. By comparing the absolute values ​​of the two component vectors of the preset normal vector that are different from the detection direction when the detection direction of the detection ball is different (e.g., X, Y, or Z direction), the coordinate direction that needs to be corrected can be determined. Then, the preset approach point and the preset detection point can be corrected by the component vectors of the preset normal vector in the coordinate direction that needs to be corrected, thereby obtaining the target approach point and the target detection point.

[0029] S500: Control the detection ball to detect the target based on the target approach point and the target detection point.

[0030] Understandably, the target approach point is the calibrated preset approach point, and the target detection point is the calibrated preset detection point. The target approach point and the target detection point can improve the detection accuracy of the detection ball. After determining the target approach point and the target detection point, the detection ball can detect the object based on the coordinates of the target approach point and the target detection point, thereby improving the detection accuracy of the detection ball.

[0031] The in-machine inspection method for CNC equipment provided by this invention first determines a preset normal vector of a preset detection point on the object to be inspected based on the first geometric shape information of the object. Then, based on the preset normal vector and the second geometric shape information of the detection ball, a preset proximity point corresponding to the preset detection point is determined. Next, the preset proximity point and the preset detection point are corrected according to the detection direction of the detection ball and the preset normal vector, thereby correcting the errors of the preset detection point and the preset proximity point, and thus obtaining the target proximity point and the target detection point. Finally, the detection ball is controlled to inspect the object based on the target proximity point and the target detection point, thereby improving the detection accuracy of the detection ball, improving the detection accuracy of the CNC equipment in-machine inspection, and ultimately improving the product quality and production efficiency of the CNC equipment.

[0032] like Figure 2 As shown, in one embodiment, step S300, determining the preset proximity point corresponding to the preset detection point based on the preset normal vector and the second geometric shape information of the detection sphere, includes: S310. Obtain the radius of the probe sphere from the second geometric shape information.

[0033] S320. Obtain the preset approximation distance corresponding to the preset detection point, and determine the preset approach point corresponding to the preset detection point based on the sphere radius, the preset approximation distance, and the preset normal vector.

[0034] Understandably, the second geometric information includes, but is not limited to, the coordinates of the center point of the probe sphere and the dimensional information such as the radius of the probe sphere.

[0035] The preset approach distance is the minimum safe distance between the surface of the probe sphere and the surface of the object being detected. The preset approach distance can be set according to actual conditions, for example, 2mm. In one embodiment, the preset approach point is located on the extension line of the preset normal vector, and the distance between the preset approach point and the preset detection point is the sum of the radius of the probe sphere and the preset approach distance. In this invention, the distance between the preset approach point and the preset detection point can also be set to be slightly larger than the sum of the radius of the probe sphere and the preset approach distance, as required, and is not limited here.

[0036] like Figure 3 As shown, in one embodiment, step S400, correcting the preset approach point and the preset detection point according to the detection direction of the detection ball and the preset normal vector to obtain the target approach point and the target detection point, includes: S410. When the detection direction of the probe ball is the X direction, compare the absolute value of the Y-direction component vector of the preset normal vector with the absolute value of the Z-direction component vector.

[0037] S420. When the absolute value of the Y-axis component vector is greater than the absolute value of the Z-axis component vector, the first Y coordinate of the preset detection point is corrected according to the Y-axis component vector to obtain the target detection point, and the second Y coordinate of the preset approach point is adjusted to be consistent with the corrected first Y coordinate to obtain the target approach point.

[0038] In this embodiment, the first Y-coordinate is the coordinate of the preset detection point on the Y-axis, and the coordinate of the target detection point on the Y-axis is obtained after correcting the first Y-coordinate based on the Y-direction component vector. The second Y-coordinate is the coordinate of the preset approach point on the Y-axis, and the coordinate of the target approach point on the Y-axis is adjusted to be consistent with the corrected first Y-coordinate. It can be understood that when the absolute value of the Y-direction component vector is greater than the absolute value of the Z-direction component vector, correcting the coordinates of the preset detection point and the preset approach point in the Y-direction using the above method in this embodiment can keep the coordinates of the target detection point and the target approach point consistent on the Y-axis, while avoiding detection errors of the detection ball, thus enabling the detection ball to simultaneously perform detection in both the X and Z directions.

[0039] In one embodiment, the coordinates of the target approach point and the target detection point can be obtained through a first correction model, the first correction model comprising: Xa1=Xa; Ya1 = Yb + R*J; Za1 = Za; Xb1=Xb; Yb1 = Yb + R*J; Zb1=Zb; in: R refers to the radius of the probe sphere. The radius of the sphere is a fixed value and can be directly obtained from the database.

[0040] J refers to the Y-axis component of the preset normal vector. The preset normal vector can be calculated in step S200 above.

[0041] The first coordinates of the preset detection point are (Xb, Yb, Zb); where Xb is the first X coordinate, Yb is the first Y coordinate, and Zb is the first Z coordinate.

[0042] The target detection point is the coordinate after correcting the first coordinate, specifically (Xb1, Yb1, Zb1); where Xb1 is the corrected first X coordinate, Yb1 is the corrected first Y coordinate, and Zb1 is the corrected first Z coordinate; in the first correction model of this embodiment, the correction amount corresponding to Xb1 and Zb1 is 0, and the correction amount of Yb1 is R*J.

[0043] The second coordinates of the preset proximity point are (Xa, Ya, Za); where Xa is the second X coordinate, Ya is the second Y coordinate, and Za is the second Z coordinate.

[0044] The target approach point is the coordinate after correcting the second coordinate, specifically (Xa1, Ya1, Za1); where Xa1 is the corrected second X coordinate, Ya1 is the corrected second Y coordinate, and Za1 is the corrected second Z coordinate; in the first correction model of this embodiment, the correction amount corresponding to Xa1 and Za1 is 0, while Ya1 is directly corrected to be consistent with the corrected first Y coordinate Yb1.

[0045] like Figure 4 As shown, in one embodiment, step S400, correcting the preset approach point and the preset detection point according to the detection direction of the detection ball and the preset normal vector to obtain the target approach point and the target detection point, includes: S410. When the detection direction of the probe ball is the X direction, compare the absolute value of the Y-direction component vector of the preset normal vector with the absolute value of the Z-direction component vector.

[0046] S430. When the absolute value of the Y-axis component vector is less than or equal to the absolute value of the Z-axis component vector, the first Z-coordinate of the preset detection point is corrected according to the Z-axis component vector to obtain the target detection point, and the second Z-coordinate of the preset approach point is adjusted to be consistent with the corrected first Z-coordinate to obtain the target approach point.

[0047] In this embodiment, the first Z-coordinate is the coordinate of the preset detection point on the Z-axis, and the coordinate of the target detection point on the Z-axis is obtained after correcting the first Y-coordinate based on the Z-direction component vector. The second Z-coordinate is the coordinate of the preset approach point on the Z-axis, and the coordinate of the target approach point on the Z-axis is adjusted to be consistent with the corrected first Z-coordinate. It can be understood that when the absolute value of the Y-direction component vector is less than or equal to the absolute value of the Z-direction component vector, correcting the coordinates of the preset detection point and the preset approach point in the Z-direction using the above-described method in this embodiment can keep the coordinates of the target detection point and the target approach point consistent on the Z-axis, while avoiding detection errors of the detection ball, thus enabling the detection ball to simultaneously perform detection in both the X and Y directions.

[0048] In one embodiment, the coordinates of the target approach point and the target detection point can be obtained through a second correction model, the second correction model comprising: Xa1=Xa; Ya1=Yb; Za1 = Zb + R * K; Xb1=Xb; Yb1=Yb; Zb1 = Zb + R * K; in: R refers to the radius of the probe sphere. The radius of the sphere is a fixed value and can be directly obtained from the database.

[0049] K refers to the Z-axis component of the preset normal vector. The preset normal vector can be calculated in step S200 above.

[0050] The first coordinates of the preset detection point are (Xb, Yb, Zb); where Xb is the first X coordinate, Yb is the first Y coordinate, and Zb is the first Z coordinate.

[0051] The target detection point is the coordinate after correcting the first coordinate, specifically (Xb1, Yb1, Zb1); where Xb1 is the corrected first X coordinate, Yb1 is the corrected first Y coordinate, and Zb1 is the corrected first Z coordinate; in the first correction model of this embodiment, the correction amount corresponding to Xb1 and Yb1 is 0, and the correction amount of Zb1 is R*K.

[0052] The second coordinates of the preset proximity point are (Xa, Ya, Za); where Xa is the second X coordinate, Ya is the second Y coordinate, and Za is the second Z coordinate.

[0053] The target approach point is the coordinate after correcting the second coordinate, specifically (Xa1, Ya1, Za1); where Xa1 is the corrected second X coordinate, Ya1 is the corrected second Y coordinate, and Za1 is the corrected second Z coordinate; in the first correction model of this embodiment, the correction amount corresponding to Xa1 and Ya1 is 0, while Za1 is directly corrected to be consistent with the corrected first Z coordinate Zb1.

[0054] like Figure 5 As shown, in one embodiment, step S400, correcting the preset approach point and the preset detection point according to the detection direction of the detection ball and the preset normal vector to obtain the target approach point and the target detection point, includes: S440. When the detection direction of the probe ball is the Y direction, compare the absolute value of the X-direction component vector of the preset normal vector with the absolute value of the Z-direction component vector.

[0055] S450. When the absolute value of the X-axis component vector is greater than the absolute value of the Z-axis component vector, the first X-coordinate of the preset detection point is corrected according to the X-axis component vector to obtain the target detection point, and the second X-coordinate of the preset approach point is adjusted to be consistent with the corrected first X-coordinate to obtain the target approach point.

[0056] In this embodiment, the first X-coordinate is the coordinate of the preset detection point on the X-axis, and the coordinate of the target detection point on the X-axis is obtained after correcting the first X-coordinate based on the X-direction component vector. The second X-coordinate is the coordinate of the preset approach point on the X-axis, and the coordinate of the target approach point on the X-axis is adjusted to be consistent with the corrected first X-coordinate. It can be understood that when the absolute value of the X-direction component vector is greater than the absolute value of the Z-direction component vector, correcting the coordinates of the preset detection point and the preset approach point in the X-direction using the above-described method in this embodiment can keep the coordinates of the target detection point and the target approach point consistent on the X-axis, while avoiding detection errors of the detection ball, thus enabling the detection ball to simultaneously perform detection in both the Y and Z directions.

[0057] In one embodiment, the coordinates of the target approach point and the target detection point can be obtained through a third correction model, the third correction model comprising: Xa1 = Xb + R*I; Ya1 = Ya; Za1 = Za; Xb1 = Xb + R*I; Yb1=Yb; Zb1=Zb; in: R refers to the radius of the probe sphere. The radius of the sphere is a fixed value and can be directly obtained from the database.

[0058] I refers to the X-axis component of the preset normal vector. The preset normal vector can be calculated in step S200 above.

[0059] The first coordinates of the preset detection point are (Xb, Yb, Zb); where Xb is the first X coordinate, Yb is the first Y coordinate, and Zb is the first Z coordinate.

[0060] The target detection point is the coordinate after correcting the first coordinate, specifically (Xb1, Yb1, Zb1); where Xb1 is the corrected first X coordinate, Yb1 is the corrected first Y coordinate, and Zb1 is the corrected first Z coordinate; in the first correction model of this embodiment, the correction amount corresponding to Yb1 and Zb1 is 0, and the correction amount of Xb1 is R*I.

[0061] The second coordinates of the preset proximity point are (Xa, Ya, Za); where Xa is the second X coordinate, Ya is the second Y coordinate, and Za is the second Z coordinate.

[0062] The target approach point is the coordinate after correcting the second coordinate, specifically (Xa1, Ya1, Za1); where Xa1 is the corrected second X coordinate, Ya1 is the corrected second Y coordinate, and Za1 is the corrected second Z coordinate; in the first correction model of this embodiment, the correction amount corresponding to Ya1 and Za1 is 0, while Xa1 is directly corrected to be consistent with the corrected first X coordinate Xb1.

[0063] like Figure 6 As shown, in one embodiment, the step of correcting the preset approach point and the preset detection point based on the detection direction of the detection ball and the preset normal vector to obtain the target approach point and the target detection point includes: S440. When the detection direction of the probe ball is the Y direction, compare the absolute value of the X-direction component vector of the preset normal vector with the absolute value of the Z-direction component vector.

[0064] S460. When the absolute value of the X-axis component vector is less than or equal to the absolute value of the Z-axis component vector, the first Z-coordinate of the preset detection point is corrected according to the Z-axis component vector to obtain the target detection point, and the second Z-coordinate of the preset approach point is adjusted to be consistent with the corrected first Z-coordinate to obtain the target approach point.

[0065] In this embodiment, the first Z-coordinate is the coordinate of the preset detection point on the Z-axis, and the coordinate of the target detection point on the Z-axis is obtained after correcting the first Y-coordinate based on the Z-direction component vector. The second Z-coordinate is the coordinate of the preset approach point on the Z-axis, and the coordinate of the target approach point on the Z-axis is adjusted to be consistent with the corrected first Z-coordinate. It can be understood that when the absolute value of the X-direction component vector is less than or equal to the absolute value of the Z-direction component vector, correcting the coordinates of the preset detection point and the preset approach point in the Z-direction using the above method in this embodiment can keep the coordinates of the target detection point and the target approach point consistent on the Z-axis, while avoiding detection errors of the detection ball, thus enabling the detection ball to simultaneously perform detection in both the X and Y directions.

[0066] In one embodiment, the coordinates of the target approach point and the target detection point can be obtained through a fourth correction model, the fourth correction model comprising: Xa1=Xa; Ya1 = Ya; Za1 = Zb + R * K; Xb1=Xb; Yb1=Yb; Zb1 = Zb + R * K; in: R refers to the radius of the probe sphere. The radius of the sphere is a fixed value and can be directly obtained from the database.

[0067] K refers to the Z-axis component of the preset normal vector. The preset normal vector can be calculated in step S200 above.

[0068] The first coordinates of the preset detection point are (Xb, Yb, Zb); where Xb is the first X coordinate, Yb is the first Y coordinate, and Zb is the first Z coordinate.

[0069] The target detection point is the coordinate after correcting the first coordinate, specifically (Xb1, Yb1, Zb1); where Xb1 is the corrected first X coordinate, Yb1 is the corrected first Y coordinate, and Zb1 is the corrected first Z coordinate; in the first correction model of this embodiment, the correction amount corresponding to Xb1 and Yb1 is 0, and the correction amount of Zb1 is R*K.

[0070] The second coordinates of the preset proximity point are (Xa, Ya, Za); where Xa is the second X coordinate, Ya is the second Y coordinate, and Za is the second Z coordinate.

[0071] The target approach point is the coordinate after correcting the second coordinate, specifically (Xa1, Ya1, Za1); where Xa1 is the corrected second X coordinate, Ya1 is the corrected second Y coordinate, and Za1 is the corrected second Z coordinate; in the first correction model of this embodiment, the correction values ​​corresponding to Xa1 and Ya1 are 0, while Za1 is directly corrected to be consistent with the corrected first Z coordinate Zb1. Figure 7 As shown, in one embodiment, the step of correcting the preset approach point and the preset detection point based on the detection direction of the detection ball and the preset normal vector to obtain the target approach point and the target detection point includes: S470. When the detection direction of the probe ball is the Z direction, compare the absolute value of the X-direction component vector of the preset normal vector with the absolute value of the Y-direction component vector.

[0072] S480. When the absolute value of the X-axis component vector is greater than the absolute value of the Y-axis component vector, the first X-coordinate of the preset detection point is corrected according to the X-axis component vector to obtain the target detection point, and the second X-coordinate of the preset approach point is adjusted to be consistent with the corrected first X-coordinate to obtain the target approach point.

[0073] In this embodiment, the first X-coordinate is the coordinate of the preset detection point on the X-axis, and the coordinate of the target detection point on the X-axis is obtained after correcting the first X-coordinate based on the X-direction component vector. The second X-coordinate is the coordinate of the preset approach point on the X-axis, and the coordinate of the target approach point on the X-axis is adjusted to be consistent with the corrected first X-coordinate. It can be understood that when the absolute value of the X-direction component vector is greater than the absolute value of the Y-direction component vector, correcting the coordinates of the preset detection point and the preset approach point in the X-direction using the above-described method in this embodiment can keep the coordinates of the target detection point and the target approach point consistent on the X-axis, while avoiding detection errors of the detection ball, thus enabling the detection ball to simultaneously perform detection in both the Y and Z directions.

[0074] In one embodiment, the coordinates of the target approach point and the target detection point can be obtained using a fifth correction model, which includes: Xa1 = Xb + R*I; Ya1 = Ya; Za1 = Za; Xb1 = Xb + R*I; Yb1=Yb; Zb1=Zb; in: R refers to the radius of the probe sphere. The radius of the sphere is a fixed value and can be directly obtained from the database.

[0075] I refers to the X-axis component of the preset normal vector. The preset normal vector can be calculated in step S200 above.

[0076] The first coordinates of the preset detection point are (Xb, Yb, Zb); where Xb is the first X coordinate, Yb is the first Y coordinate, and Zb is the first Z coordinate.

[0077] The target detection point is the coordinate after correcting the first coordinate, specifically (Xb1, Yb1, Zb1); where Xb1 is the corrected first X coordinate, Yb1 is the corrected first Y coordinate, and Zb1 is the corrected first Z coordinate; in the first correction model of this embodiment, the correction amount corresponding to Yb1 and Zb1 is 0, and the correction amount of Xb1 is R*I.

[0078] The second coordinates of the preset proximity point are (Xa, Ya, Za); where Xa is the second X coordinate, Ya is the second Y coordinate, and Za is the second Z coordinate.

[0079] The target approach point is the coordinate after correcting the second coordinate, specifically (Xa1, Ya1, Za1); where Xa1 is the corrected second X coordinate, Ya1 is the corrected second Y coordinate, and Za1 is the corrected second Z coordinate; in the first correction model of this embodiment, the correction amount corresponding to Ya1 and Za1 is 0, while Xa1 is directly corrected to be consistent with the corrected first X coordinate Xb1.

[0080] like Figure 8 As shown, in one embodiment, the step of correcting the preset approach point and the preset detection point based on the detection direction of the detection ball and the preset normal vector to obtain the target approach point and the target detection point includes: S470. When the detection direction of the probe ball is the Z direction, compare the absolute value of the X-direction component vector of the preset normal vector with the absolute value of the Y-direction component vector.

[0081] S490. When the absolute value of the X-axis component vector is less than or equal to the absolute value of the Y-axis component vector, the first Y coordinate of the preset detection point is corrected according to the Y-axis component vector to obtain the target detection point, and the second Y coordinate of the preset approach point is adjusted to be consistent with the corrected first Y coordinate to obtain the target approach point.

[0082] In this embodiment, the first Y-coordinate is the coordinate of the preset detection point on the Y-axis, and the coordinate of the target detection point on the Y-axis is obtained after correcting the first Y-coordinate based on the Y-direction component vector. The second Y-coordinate is the coordinate of the preset approach point on the Y-axis, and the coordinate of the target approach point on the Y-axis is adjusted to be consistent with the corrected first Y-coordinate. It can be understood that when the absolute value of the X-direction component vector is less than or equal to the absolute value of the Y-direction component vector, correcting the coordinates of the preset detection point and the preset approach point in the Y-direction using the above method in this embodiment can keep the coordinates of the target detection point and the target approach point consistent on the Y-axis, while avoiding detection errors of the detection ball, thus enabling the detection ball to simultaneously perform detection in both the X and Z directions.

[0083] In one embodiment, the coordinates of the target approach point and the target detection point can be obtained using a sixth correction model, which includes: Xa1=Xa; Ya1 = Yb + R*J; Za1 = Za; Xb1=Xb; Yb1 = Yb + R*J; Zb1=Zb; in: R refers to the radius of the probe sphere. The radius of the sphere is a fixed value and can be directly obtained from the database.

[0084] J refers to the Y-axis component of the preset normal vector. The preset normal vector can be calculated in step S200 above.

[0085] The first coordinates of the preset detection point are (Xb, Yb, Zb); where Xb is the first X coordinate, Yb is the first Y coordinate, and Zb is the first Z coordinate.

[0086] The target detection point is the coordinate after correcting the first coordinate, specifically (Xb1, Yb1, Zb1); where Xb1 is the corrected first X coordinate, Yb1 is the corrected first Y coordinate, and Zb1 is the corrected first Z coordinate; in the first correction model of this embodiment, the correction amount corresponding to Xb1 and Zb1 is 0, and the correction amount of Yb1 is R*J.

[0087] The present invention also provides a CNC device, including a controller, the controller being used to execute the steps of the in-machine inspection method of the CNC device.

[0088] The execution functions of this controller correspond one-to-one with the on-machine detection methods for CNC equipment in the above embodiments. Specific limitations of the controller can be found in the limitations of the on-machine detection methods for CNC equipment described above, and will not be repeated here. Each submodule in the controller can be implemented entirely or partially through software, hardware, or a combination thereof. Each submodule can be embedded in or independent of the processor in the computer device in hardware form, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each submodule.

[0089] The CNC equipment provided by this invention first determines a preset normal vector of a preset detection point on the detection object based on the first geometric shape information of the object being detected. Then, it determines a preset approach point corresponding to the preset detection point based on the preset normal vector and the second geometric shape information of the detection ball. Next, it corrects the preset approach point and the preset detection point based on the detection direction of the detection ball and the preset normal vector, thereby correcting the errors of the preset detection point and the preset approach point, and thus obtaining the target approach point and the target detection point. Finally, it controls the detection ball to detect the object based on the target approach point and the target detection point, thereby improving the detection accuracy of the detection ball, improving the detection accuracy of the CNC equipment during in-machine inspection, and ultimately improving the product quality and production efficiency of the CNC equipment.

[0090] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the on-machine inspection method for CNC equipment.

[0091] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing related hardware with computer-readable instructions. These computer-readable instructions can be stored in a non-volatile readable storage medium or a volatile readable storage medium. When executed, these computer-readable instructions can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0092] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the system can be divided into different functional units or modules to complete all or part of the functions described above.

[0093] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.

Claims

1. A method for in-machine inspection of CNC equipment, characterized in that, include: Acquire preset detection points on the object to be detected; Based on the first geometric shape information of the object being detected and the preset detection point, a preset normal vector of the preset detection point on the object being detected is determined; Determine the preset proximity point corresponding to the preset detection point based on the preset normal vector and the second geometric shape information of the detection sphere; The preset approach point and the preset detection point are corrected according to the detection direction of the detection ball and the preset normal vector to obtain the target approach point and the target detection point; The detection ball is controlled to detect the target based on the target approach point and the target detection point; The step of correcting the preset approach point and the preset detection point based on the detection direction of the detection ball and the preset normal vector to obtain the target approach point and the target detection point includes: When the detection direction of the probe ball is the X direction, compare the absolute value of the Y-direction component vector of the preset normal vector with the absolute value of the Z-direction component vector; When the absolute value of the Y-axis component vector is greater than the absolute value of the Z-axis component vector, the first Y coordinate of the preset detection point is corrected according to the Y-axis component vector to obtain the target detection point, and the second Y coordinate of the preset approach point is adjusted to be consistent with the corrected first Y coordinate to obtain the target approach point.

2. The in-machine inspection method for CNC equipment according to claim 1, characterized in that, The step of determining the preset proximity point corresponding to the preset detection point based on the preset normal vector and the second geometric shape information of the detection sphere includes: The radius of the probe sphere is obtained from the second geometric shape information; Obtain the preset approximation distance corresponding to the preset detection point, and determine the preset approach point corresponding to the preset detection point based on the sphere radius, the preset approximation distance, and the preset normal vector.

3. The in-machine inspection method for CNC equipment according to claim 1, characterized in that, When the detection direction of the probe ball is the X direction, after comparing the absolute values ​​of the Y-axis component vector and the Z-axis component vector of the preset normal vector, the method further includes: When the absolute value of the Y-axis component vector is less than or equal to the absolute value of the Z-axis component vector, the first Z-coordinate of the preset detection point is corrected according to the Z-axis component vector to obtain the target detection point, and the second Z-coordinate of the preset approach point is adjusted to be consistent with the corrected first Z-coordinate to obtain the target approach point.

4. The in-machine inspection method for CNC equipment according to claim 1, characterized in that, The step of correcting the preset approach point and the preset detection point based on the detection direction of the detection ball and the preset normal vector to obtain the target approach point and the target detection point includes: When the detection direction of the probe ball is the Y direction, compare the absolute value of the X-direction component vector of the preset normal vector with the absolute value of the Z-direction component vector; When the absolute value of the X-axis component vector is greater than the absolute value of the Z-axis component vector, the first X-coordinate of the preset detection point is corrected according to the X-axis component vector to obtain the target detection point, and the second X-coordinate of the preset approach point is adjusted to be consistent with the corrected first X-coordinate to obtain the target approach point.

5. The in-machine inspection method for CNC equipment according to claim 1, characterized in that, The step of correcting the preset approach point and the preset detection point based on the detection direction of the detection ball and the preset normal vector to obtain the target approach point and the target detection point includes: When the detection direction of the probe ball is the Y direction, compare the absolute value of the X-direction component vector of the preset normal vector with the absolute value of the Z-direction component vector; When the absolute value of the X-axis component vector is less than or equal to the absolute value of the Z-axis component vector, the first Z-coordinate of the preset detection point is corrected according to the Z-axis component vector to obtain the target detection point, and the second Z-coordinate of the preset approach point is adjusted to be consistent with the corrected first Z-coordinate to obtain the target approach point.

6. The in-machine inspection method for CNC equipment according to claim 1, characterized in that, The step of correcting the preset approach point and the preset detection point based on the detection direction of the detection ball and the preset normal vector to obtain the target approach point and the target detection point includes: When the detection direction of the probe ball is the Z direction, compare the absolute value of the X-direction component vector of the preset normal vector with the absolute value of the Y-direction component vector. When the absolute value of the X-axis component vector is greater than the absolute value of the Y-axis component vector, the first X-coordinate of the preset detection point is corrected according to the X-axis component vector to obtain the target detection point, and the second X-coordinate of the preset approach point is adjusted to be consistent with the corrected first X-coordinate to obtain the target approach point.

7. The in-machine inspection method for CNC equipment according to claim 1, characterized in that, The step of correcting the preset approach point and the preset detection point based on the detection direction of the detection ball and the preset normal vector to obtain the target approach point and the target detection point includes: When the detection direction of the probe ball is the Z direction, compare the absolute value of the X-direction component vector of the preset normal vector with the absolute value of the Y-direction component vector. When the absolute value of the X-axis component vector is less than or equal to the absolute value of the Y-axis component vector, the first Y coordinate of the preset detection point is corrected according to the Y-axis component vector to obtain the target detection point, and the second Y coordinate of the preset approach point is adjusted to be consistent with the corrected first Y coordinate to obtain the target approach point.

8. A numerical control device, characterized in that, Includes a controller for performing the in-machine inspection method for CNC equipment as described in any one of claims 1 to 7.

9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the in-machine inspection method for CNC equipment as described in any one of claims 1 to 7.