A numerical control machine tool machining path optimization method and system

By using inspection cameras in CNC machine tools for non-contact wear detection and path optimization, the problem of tool wear detection and machining path optimization requiring machine downtime is solved, achieving real-time optimization and efficient production.

CN119644907BActive Publication Date: 2025-10-21GUANGDONG MECHANICAL TECHNICIAN COLLEGE
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411804394.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-10
Publication Date
2025-10-21
Estimated Expiration
2044-12-10

AI Technical Summary

Technical Problem

Tool wear detection and machining path optimization of existing CNC machine tools require machine shutdown, which makes it impossible to balance production efficiency and machining quality.

Method used

By obtaining the detection position and direction of the detection camera, the idle travel path of the tool is screened and optimized, the detection camera is used for non-contact wear detection, the processing path is optimized in real time, and the path compensation is performed based on the wear detection results.

Benefits of technology

It improves the real-time performance of wear detection and the frequency of path optimization, reduces downtime, improves production efficiency and ensures processing quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119644907B_ABST
    Figure CN119644907B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of numerical control machine tool control, and particularly relates to a numerical control machine tool machining path optimization method and system, which first acquires a detection position and a detection direction of a detection camera, then analyzes an idle stroke path and a machining stroke path based on the detection position and the detection direction, obtains a target idle stroke path and a corresponding target machining stroke path, optimizes the target idle stroke path based on the detection position and the detection direction, and optimizes the target machining stroke path corresponding to the target idle stroke path according to a wear detection result of the target idle stroke path. Compared with the prior art, the non-contact detection feature of the detection camera is used to reduce the occurrence of downtime, and the clearance of the tool idle stroke during machining is used to detect the wear of the tool and to optimize the path of the machining stroke in real time based on the detection result, thereby solving the problem that the tool wear detection and machining path optimization of the numerical control machine tool need to be executed during downtime in the prior art, and the production efficiency and machining quality cannot be considered.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of CNC machine tool control, and in particular to a CNC machine tool machining path optimization method and system. Background Art

[0002] CNC machine tools are highly automated machining equipment that utilize computer systems to control their movement and operation, enabling precise machining. These machines can automatically perform complex machining tasks according to pre-programmed procedures. Their CNC systems interpret programming codes and convert them into motion commands for the machine. These commands control the machine's various axis movements, as well as the tool's feed rate and depth, ensuring that machined parts meet the required precision and quality.

[0003] During machining, cutting tools gradually wear out due to friction and cutting action with the workpiece. This not only affects machining efficiency but can also lead to reduced machining accuracy and even the production of scrapped parts. Therefore, real-time monitoring of tool wear and optimizing machining paths based on tool wear are crucial for maintaining machining stability and improving product quality.

[0004] However, most current tool wear detection and optimization methods require operation while the machine tool is stopped, failing to balance machining quality and efficiency, and failing to fully leverage the advantages of CNC machine tool automation. Therefore, a CNC machine tool control method is needed that can simultaneously perform tool wear detection and machining path optimization online. Summary of the Invention

[0005] Therefore, the present invention provides a CNC machine tool processing path optimization method and system to solve the problem in the prior art that tool wear detection and processing path optimization of CNC machine tools require shutdown execution, which cannot take into account both production efficiency and processing quality.

[0006] The present invention provides a method for optimizing a machining path of a numerically controlled machine tool, comprising:

[0007] Obtain the detection position and detection direction of the detection camera, and obtain the idle travel path and processing travel path of the same tool, wherein the detection camera is used to detect tool wear;

[0008] The idle travel path is screened based on the detection position and detection direction to obtain the optimized idle travel path;

[0009] According to the temporal relationship between the optimizable idle travel path and the machining travel path, the optimizable idle travel path and the machining travel path are matched to obtain a target idle travel path and a corresponding target machining travel path;

[0010] Based on the detection position and detection direction, the target idle travel path is optimized. When the tool moves along the optimized target idle travel path, it passes the detection position of the detection camera and performs a wear detection.

[0011] According to the wear detection result of the target idle stroke path, the target machining stroke path corresponding to the target idle stroke path is optimized.

[0012] In a preferred embodiment, obtaining the idle travel path and the machining travel path of the same tool includes:

[0013] Obtain processing object model and processing path data;

[0014] Mapping the processing object model and the path represented by the processing path data into the same operation space;

[0015] Based on the coincidence of the processing object model and the path represented by the processing path data in the operation space, an empty stroke path set and a processing stroke path set are obtained;

[0016] Based on the tool type represented in the machining path data, the idle stroke path set and the machining stroke path set are divided to obtain the idle stroke path and the machining stroke path of the same tool.

[0017] In a preferred embodiment, the idle travel path is screened based on the detection position and the detection direction to obtain an optimizable idle travel path, including:

[0018] Calculating an adjustment cost value for each empty travel path based on the detection position and the detection direction, wherein the adjustment cost value represents a cost level of adjusting an empty travel path;

[0019] If there is an empty trip path whose adjusted cost value meets the preset cost standard, the empty trip path whose adjusted cost value meets the preset cost standard is taken as the optimizable empty trip path;

[0020] If there is no idle travel path whose adjustment cost value meets the preset cost standard, then an idle travel path with the lowest cost level represented by the adjustment cost is selected as the optimizable idle travel path.

[0021] In a preferred embodiment, calculating the adjustment cost value of each idle travel path based on the detection position and the detection direction includes:

[0022] Count the path length of the empty travel path and the minimum distance between it and the detection position;

[0023] Based on the detection direction, the length ratio of the sub-path parallel to the detection direction in the idle travel path is analyzed to obtain the rotation cost value;

[0024] Based on the detection direction, the length proportion of the direction preference sub-path in the idle travel path is analyzed to obtain the commutation cost value, where the direction preference sub-path is the path that causes the tool to move in the detection direction;

[0025] According to the path length, minimum distance, rotation cost and commutation cost, the adjusted cost is obtained, among which the adjusted cost is negatively correlated with the path length, positively correlated with the minimum distance, positively correlated with the cost level represented by the rotation cost, and positively correlated with the cost level represented by the commutation cost.

[0026] In a preferred embodiment, the adjustment cost value is obtained according to the path length, the minimum distance, the rotation cost value, and the commutation cost value, including:

[0027] The adjusted cost is obtained by the following formula:

[0028]

[0029] Among them, Cost is the adjustment cost value, max is the maximum value of the preset adjustment cost value, l is the path length, l0 is the preset path length threshold, d min is the minimum distance, C r is the rotation cost, C t is the commutation cost, w1, w2, w3 and w4 are different preset weights.

[0030] In a preferred embodiment, according to the temporal relationship between the optimizable idle travel path and the processing travel path, the optimizable idle travel path and the processing travel path are matched to obtain a target idle travel path and a corresponding target processing travel path, including:

[0031] Get wear detection analysis time;

[0032] Combined with the wear detection analysis time, the optimizable idle travel path and the machining travel path are matched to obtain the target idle travel path and the corresponding target machining travel path.

[0033] In a preferred embodiment, optimizing the target machining stroke path corresponding to the target idle stroke path according to the wear detection result of the target idle stroke path includes:

[0034] Count all historical wear detection results of all target empty travel paths after multiple walking processes to obtain the historical wear amount set of each processing travel path;

[0035] Obtaining an actual wear detection result of the target idle travel path, and obtaining an initial total wear amount of the target machining travel path corresponding to the target idle travel path according to the actual wear detection result;

[0036] According to the historical wear amount set of each machining stroke path, the initial wear amount is compensated to obtain the actual wear amount of the target machining stroke path;

[0037] Optimize the target machining stroke path based on the actual total wear.

[0038] In a preferred embodiment, the initial total wear is compensated based on the historical wear amount set of each machining travel path to obtain the actual total wear amount of the target machining travel path, including:

[0039] Based on the historical wear amount set of each machining travel path, the average wear amount and statistical characteristics of each machining travel path are obtained, wherein the statistical characteristics represent the consistency of the data in the historical wear amount set corresponding to a target machining travel path;

[0040] According to the average wear amount and statistical characteristics of the machining travel path between a target machining travel path and its corresponding target idle travel path, the initial total wear amount corresponding to the target machining travel path is compensated to obtain the actual total wear amount corresponding to the target machining travel path, wherein the compensation intensity for the initial total wear amount is positively correlated with the degree of consistency represented by the statistical characteristics.

[0041] In a preferred embodiment, based on the average wear amount and statistical characteristics of the machining travel path between a target machining travel path and its corresponding target idle travel path, compensating the initial wear amount corresponding to the target machining travel path to obtain the actual wear amount corresponding to the target machining travel path includes:

[0042] The actual total wear is calculated using the following formula:

[0043]

[0044] Among them, W1 is the actual total wear of a target machining stroke path, W0 is the initial total wear of the target machining stroke path, and W a is the average wear amount of the machining stroke path between the target machining stroke path and its corresponding target idle stroke path, σ is the statistical characteristic of the machining stroke path between the target machining stroke path and its corresponding target idle stroke path, n is the total number of machining stroke paths between the target machining stroke path and its corresponding target idle stroke path, r is a random number between 0 and 1, and A is the preset modification amplitude value.

[0045] The present invention also provides a CNC machine tool processing path optimization system, comprising:

[0046] A data input module is used to obtain the detection position and detection direction of the detection camera, and obtain the idle travel path and processing travel path of the same tool, wherein the detection camera is used to detect tool wear;

[0047] A path analysis module is used to screen the idle travel path based on the detection position and detection direction to obtain an optimized idle travel path;

[0048] A path arrangement module is used to match the optimizable idle travel path with the processing travel path according to the temporal relationship between the optimizable idle travel path and the processing travel path, so as to obtain a target idle travel path and a corresponding target processing travel path;

[0049] A first optimization module is configured to optimize a target idle travel path based on a detection position and a detection direction, wherein when the tool moves along the optimized target idle travel path, it passes through a detection position of a detection camera and performs a wear detection.

[0050] The second optimization module is used to optimize the target machining stroke path corresponding to the target idle stroke path according to the wear detection result of the target idle stroke path.

[0051] The beneficial effects of adopting the above embodiment are:

[0052] The present invention provides a method and system for optimizing machining paths for numerically controlled machine tools. The method first obtains the detection position and detection direction of a detection camera, obtains the idle travel path and machining travel path of the same tool, then screens the idle travel path based on the detection position and detection direction to obtain an optimizable idle travel path. Then, based on the temporal relationship between the optimizable idle travel path and the machining travel path, the optimizable idle travel path and the machining travel path are matched to obtain a target idle travel path and a corresponding target machining travel path. The target idle travel path is optimized based on the detection position and detection direction, and finally, based on the wear detection result of the target idle travel path, the target machining travel path corresponding to the target idle travel path is optimized. Compared to the prior art, the present invention utilizes a detection camera to detect tool wear based on computer vision technology, and utilizes the non-contact detection characteristics of the detection camera to reduce the occurrence of downtime and improve production efficiency. At the same time, the present invention also divides the processing path into a target idle stroke path and a target processing stroke path, and optimizes the idle stroke during the processing, and uses the gap of the tool idle stroke during processing to detect tool wear, thereby improving the real-time performance of wear detection, and uses the detection results of the idle stroke to optimize the processing stroke path in real time, further amplifying the advantages of non-contact detection, greatly improving the frequency of wear detection and path optimization, while ensuring that the efficiency is within an acceptable range, and solving the problem in the prior art that tool wear detection and processing path optimization of CNC machine tools require shutdown execution, and cannot take into account both production efficiency and processing quality. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Figure 1 A method flow chart of the CNC machine tool machining path optimization method provided by the present invention;

[0054] Figure 2 for Figure 1 Specific step diagram of step S102;

[0055] Figure 3 It is a timing diagram of a machining process;

[0056] Figure 4 for Figure 1 Specific step diagram of step S105;

[0057] Figure 5 This is a system structure diagram of the CNC machine tool processing path optimization system provided by the present invention. DETAILED DESCRIPTION

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

[0059] Combine Figure 1 As shown, a specific embodiment of the present invention discloses a method for optimizing a machining path of a CNC machine tool, comprising:

[0060] S101, obtaining a detection position and detection direction of a detection camera, and obtaining an idle stroke path and a processing stroke path of the same tool, wherein the detection camera is used to detect tool wear;

[0061] S102, screening the idle travel path based on the detection position and the detection direction to obtain an optimizable idle travel path;

[0062] S103, matching the optimizable idle travel path and the processing travel path according to the temporal relationship between the optimizable idle travel path and the processing travel path to obtain a target idle travel path and a corresponding target processing travel path;

[0063] S104, optimizing the target idle travel path based on the detection position and detection direction, wherein when the tool moves along the optimized target idle travel path, it passes through the detection position of the detection camera and performs a wear detection;

[0064] S105 , optimizing the target machining stroke path corresponding to the target idle stroke path according to the wear detection result of the target idle stroke path.

[0065] In the above process, the detection camera is used to detect the wear of the tool. It is usually set inside the CNC machine tool to directly capture the image of the tool. There can be multiple detection cameras. The detection position of the detection camera refers to the position where the tool should be when the detection camera obtains the tool image. Since the current defect detection algorithm generally has preprocessing steps such as image alignment, the detection position can be represented by the same area (such as a part of the fan-shaped area inside the CNC machine tool) in addition to specific coordinates. The detection direction of the detection camera refers to the direction of the lens when the detection camera obtains the tool image. Similarly, the detection direction can be represented by a vector range instead of a clear vector.

[0066] The present invention is suitable for occasions of mass production and manufacturing, and is particularly suitable for some CNC machine tools that can automatically load and unload materials. The idle stroke path in this embodiment refers to the stroke path in which the tool moves but does not contact the material and does not perform processing. The processing stroke path is the stroke path used to cut the material. It can be understood that the idle stroke path, target idle stroke path, target processing stroke path, etc. that can be optimized in the following text are also the above definitions, but their roles in the analysis process are different. In addition, in practice, for equipment with a high degree of automation, it may be necessary to change tools during processing, and the idle stroke path and processing stroke path of this embodiment are both relative to one tool. In practice, for the idle stroke generated by the tool change of the machine tool, the stroke can be divided into idle stroke paths for two tools.

[0067] Optimizing the target idle travel path essentially involves adjusting the trajectory of the target idle travel path so that it passes through the detection camera's detection position, completing a wear detection test between actual machining operations, and optimizing the subsequent machining path based on the wear detection results. Clearly, this invention can operate in real time during the machining process, making real-time adjustments to the path and improving machining quality without stopping the machine.

[0068] Compared with the existing technology, the present invention uses a detection camera based on computer vision technology to detect tool wear, and uses the non-contact detection characteristics of the detection camera to reduce the occurrence of downtime and improve production efficiency. At the same time, the present invention also divides the processing path into a target idle stroke path and a target processing stroke path, and optimizes the idle stroke during the processing process. The gap in the tool idle stroke during processing is used to detect tool wear, thereby improving the real-time performance of wear detection, and the detection results of the idle stroke are used to optimize the processing stroke path in real time, further amplifying the advantages of non-contact detection, greatly improving the frequency of wear detection and path optimization, while ensuring that the efficiency is within an acceptable range. This solves the problem in the existing technology that tool wear detection and processing path optimization of CNC machine tools require shutdown execution, and cannot take into account both production efficiency and processing quality.

[0069] The idle stroke path and the processing stroke path can be set manually or automatically extracted by a computer. In practice, the processing path of a CNC machine tool can be in various formats such as G code or CAD / CAM, and the computer cannot directly understand which instruction is an idle stroke. Therefore, in a preferred embodiment, the above step S101: obtaining the idle stroke path and the processing stroke path of the same tool specifically includes:

[0070] Obtain processing object model and processing path data;

[0071] Mapping the processing object model and the path represented by the processing path data into the same operation space;

[0072] Based on the coincidence of the processing object model and the path represented by the processing path data in the operation space, an empty stroke path set and a processing stroke path set are obtained;

[0073] Based on the tool type represented in the machining path data, the idle stroke path set and the machining stroke path set are divided to obtain the idle stroke path and the machining stroke path of the same tool.

[0074] In the above process, the object model is the 3D model data of the object being processed, and the machining path data is the G-code or CAD / CAM format data representing the machining path or CNC machine tool operation instructions described above. The computation space is a virtual 3D space or vector space; it only needs to be able to represent the shape of the object being processed and the machining path within a single space.

[0075] It is conceivable that during actual processing, some idle strokes may be shorter or their running positions may be far away from the detection camera. Therefore, not all idle stroke paths are suitable for adjustment to paths passing through the detection position. Blindly adjusting all idle stroke paths may have a serious impact on production efficiency.

[0076] Therefore, combined Figure 2 As shown, the present invention also provides a preferred embodiment, in which the above step S102, screening the idle travel path based on the detection position and the detection direction to obtain the optimizable idle travel path, specifically includes:

[0077] S201, calculating an adjustment cost value for each empty travel path based on the detection position and the detection direction, wherein the adjustment cost value represents the cost level of adjusting an empty travel path;

[0078] S202: If there is an empty trip path whose adjusted cost value meets the preset cost standard, the empty trip path whose adjusted cost value meets the preset cost standard is used as an optimizable empty trip path;

[0079] S203: If there is no empty travel path whose adjustment cost value meets the preset cost standard, select an empty travel path with the lowest cost level represented by the adjustment cost as the optimizable empty travel path.

[0080] In practice, the standards for screening the idle travel paths can be flexibly set according to the specific circumstances, for example, the idle travel paths with a stroke length shorter than a certain threshold, or the idle travel paths of non-linear motion are eliminated. In this embodiment, the adjustment cost value is calculated, and the screening is performed by comparing it with the preset cost standard (obtained based on experience or experiments, which can be in the form of a threshold, a relationship, etc.), so that the screened optimizable idle travel paths are the most reasonable and the number is as large as possible, so as to achieve the purpose of taking into account both efficiency and quality. At the same time, in the extreme case where there is no idle travel path with an adjustment cost value that meets the preset cost standard, this embodiment ensures that each tool has at least one optimizable idle travel path for wear detection, so that each tool will be detected at least once during the processing process, and the processing path of each tool will be optimized at least once, to ensure the minimum quality control.

[0081] It is understood that the calculation method of the adjustment cost value can also be flexibly set according to actual needs, for example, the distance between the empty travel path and the detection position is used as the adjustment cost value. However, the present invention provides a more preferred method: In a preferred embodiment, the above step S201, based on the detection position and detection direction, calculates the adjustment cost value of each empty travel path, specifically including:

[0082] Count the path length of the empty travel path and the minimum distance between it and the detection position;

[0083] Based on the detection direction, the length ratio of the sub-path parallel to the detection direction in the idle travel path is analyzed to obtain the rotation cost value;

[0084] Based on the detection direction, the length proportion of the direction preference sub-path in the idle travel path is analyzed to obtain the commutation cost value, where the direction preference sub-path is the path that causes the tool to move in the detection direction;

[0085] According to the path length, minimum distance, rotation cost and commutation cost, the adjusted cost is obtained, among which the adjusted cost is negatively correlated with the path length, positively correlated with the minimum distance, positively correlated with the cost level represented by the rotation cost, and positively correlated with the cost level represented by the commutation cost.

[0086] In the above process, the path length of the idle stroke path and the minimum distance between the detection position and the detection position are well understood. The shorter the path length of an idle stroke path, the less operable the idle stroke path is to adjust the detection position of the detection camera, and the higher the cost is. Similarly, the smaller the minimum distance, the smaller the cost is. In addition, the rotation cost and the reversing cost respectively represent the cost required for the structure of the tool clamping in the machine tool to rotate and reversing in order to move the tool to the detection position. Compared with the effect of the length of the movement distance on efficiency, the rigid connection structure of the machinery in the machine tool and some transmission structures are more valued by people due to the adverse phenomena such as wear, reduced life, and failure caused by the rotation or reversing action. Therefore, in this embodiment, the rotation cost and the reversing cost are additionally calculated as two elements for evaluating the adjustment cost, further improving the scientific rationality of the adjustment cost value, and further improving the practicality of the present invention.

[0087] At the same time, in practice, the shapes of processed objects vary, and the processing paths may not be regular shapes. Therefore, this embodiment also provides an optimal method to simplify the evaluation process of the rotation cost and commutation cost of irregular processing paths, thereby improving operational efficiency. For the rotation cost, the present invention only analyzes the length ratio of the sub-path parallel to the detection direction to achieve a rapid estimation. The length ratio of the sub-path parallel to the detection direction reflects to a certain extent the time that the tool maintains an angle that conforms to the detection direction. Obviously, the higher this time ratio, the less likely the machine tool will adjust its angle to allow the tool to be photographed by the detection camera, and the lower the cost.

[0088] Similarly, for the commutation cost, the present invention only analyzes the length proportion of the direction-biased subpath to achieve a rapid estimation. The direction-biased subpath is the path that causes the tool to displace in the detection direction. In this embodiment, the direction away from the detection camera lens is defined as the detection direction. It can be imagined that the longer the direction-biased subpath moves along the detection direction, the farther it is from the detection camera lens, and the higher the cost of adjusting its movement direction to bring it back close to the detection camera. It should be noted that in practice, in addition to irregular machining paths, the detection direction of the detection camera itself can also be within a range. Therefore, in this embodiment, the direction-biased subpath does not refer to a path that is completely parallel to the detection direction; it can also be a path close to the detection direction. In practice, the motion direction can be decomposed, and any component parallel to a detection direction can be considered a direction-biased subpath. For example, if there is a circular idle travel path, and the camera's detection direction forms a 90° fan-shaped radial area and lies in the same plane as the idle travel path, then the length of the direction-biased subpath in the idle travel path will account for 75%.

[0089] Furthermore, in a preferred embodiment, the above step of obtaining the adjustment cost value based on the path length, the minimum distance, the rotation cost value, and the commutation cost value includes:

[0090] The adjusted cost is obtained by the following formula:

[0091]

[0092] Among them, Cost is the adjustment cost value, max is the maximum value of the preset adjustment cost value, l is the path length, l0 is the preset path length threshold, d min is the minimum distance, C r is the rotation cost, C t is the commutation cost, w1, w2, w3 and w4 are different preset weights.

[0093] The significance of the above formula is that it simplifies the calculation method for extreme cases and further increases the calculation speed of the adjustment cost. For empty travel paths with a path length less than the preset path length threshold, the adjustment cost is directly maximized, indicating that adjustment is not appropriate. For empty travel paths with a minimum distance of 0, indicating that they will pass through the detection position during operation, the adjustment cost is directly set to 0, indicating that adjustment is very suitable.

[0094] Furthermore, in a preferred embodiment, the above step S103, matching the optimizable idle travel path and the processing travel path according to the temporal relationship between the optimizable idle travel path and the processing travel path to obtain the target idle travel path and the corresponding target processing travel path, specifically includes:

[0095] Get wear detection analysis time;

[0096] Combined with the wear detection analysis time, the optimizable idle travel path and the machining travel path are matched to obtain the target idle travel path and the corresponding target machining travel path.

[0097] In the above process, the wear detection and analysis time can be determined through experimentation or experience. It is understood that the detection results of an empty stroke path represent the current tool wear condition and can be directly used to optimize the detection results of the subsequent processing stroke. However, in practice, due to factors such as specific hardware conditions or production conditions, the image-based wear analysis process may take a long time, which will cause certain delays. Therefore, this embodiment also performs an additional matching process to prevent errors in subsequent path optimization.

[0098] For example, Figure 3A timing diagram depicts a machining process. The horizontal thin solid lines a and c represent the durations of two idle travel paths, ending and beginning machining at times t1 and t3, respectively. The horizontal dashed lines b and d represent the durations of the two machining travel paths. Assuming that the inspection camera captures the tool image and begins image analysis halfway through each idle travel, the thick solid lines e and f represent the wear detection analysis time for the two idle travel paths represented by thin solid lines a and c, respectively. The analysis results are obtained at times t2 and t4, respectively.

[0099] Theoretically, the detection results of the idle stroke path represented by thin solid line a can be used to optimize the path corresponding to dotted line b. Therefore, the paths represented by thin solid line a and dotted line b are a pair of corresponding target idle stroke paths and target processing stroke paths. The same applies to thin solid line c and dotted line d. As can be seen from the figure, the wear detection results corresponding to the idle stroke path represented by thin solid line a can only be obtained at time t2, while the processing stroke path represented by dotted line b has already started working at time t1. At time t1, the wear detection results are unknown, so optimization cannot be achieved. Therefore, in practice, the paths represented by thin solid line a and dotted line d should be matched, and the paths represented by thin solid line c and dotted line b should be matched (using the wear detection results of the path corresponding to thin solid line c during the previous round of part processing to optimize the path corresponding to dotted line b during this processing) to complete the path optimization.

[0100] After determining the target machining stroke path corresponding to the target idle stroke path, step S104 can be started to optimize its specific path. The specific optimization method can be flexibly set as needed. For example, the path can be replanned according to the detection position and detection direction, or a stroke can be added to the position closest to the detection position in the target idle stroke path, or a more complex optimization can be performed based on the rotation cost and commutation cost calculated above.

[0101] Further, combined Figure 4 As shown, in a preferred embodiment, the above step S105, based on the wear detection result of the target idle travel path, optimizes the target machining travel path corresponding to the target idle travel path, specifically including:

[0102] S401, counting all historical wear detection results of all target empty travel paths after multiple travel processing, and obtaining a historical wear amount set for each processing travel path;

[0103] S402, obtaining an actual wear detection result of the target idle travel path, and obtaining an initial total wear amount of the target machining travel path corresponding to the target idle travel path according to the actual wear detection result;

[0104] S403, compensating the initial total wear amount based on the historical wear amount set of each processing stroke path to obtain the actual total wear amount of the target processing stroke path;

[0105] S404: Optimize the target machining path according to the actual total wear amount.

[0106] It's understood that optimizing the target machining path can be achieved using any existing method, such as compensating for displacement, adjusting cutting speed, or adjusting temperature. However, regardless of the optimization method used, the effectiveness of the optimization depends on the accuracy of the wear measurement detected during the target idle travel path. If wear detection and analysis takes a long time, then directly using the target idle travel path's detection results to optimize the corresponding target machining path can result in errors.

[0107] Likewise, please refer to Figure 3 According to the previous description, the target machining stroke path corresponding to the dotted line d should be optimized based on the detection results of the target idle stroke path corresponding to the thin solid line a. However, as can be seen from the figure, there is a dotted line b between the thin solid line a and the dotted line d, which indicates that there may be other machining strokes between the target idle stroke path and the target machining stroke path. This results in the actual total wear of the tool often being greater than the detection results of the target idle stroke path corresponding to the target machining stroke path when the target machining stroke path is running. That is, the actual wear corresponding to the dotted line d in the figure should be the sum of the detection results corresponding to the thin solid line a and the wear generated by the machining stroke corresponding to the dotted line b.

[0108] Therefore, in this embodiment, the detection result of the target travel path is used as the initial total wear amount. By statistically analyzing the historical wear amount set of each processing travel path, the possible wear amount generated by each processing travel path is evaluated, and then the initial total wear amount is scientifically and reasonably compensated to further improve the accuracy.

[0109] Specifically, in a preferred embodiment, the above step S403, based on the historical wear amount set of each machining travel path, compensates the initial wear amount to obtain the actual wear amount of the target machining travel path, specifically includes:

[0110] Based on the historical wear amount set of each machining travel path, the average wear amount and statistical characteristics of each machining travel path are obtained, wherein the statistical characteristics represent the consistency of the data in the historical wear amount set corresponding to a target machining travel path;

[0111] According to the average wear amount and statistical characteristics of the machining travel path between a target machining travel path and its corresponding target idle travel path, the initial total wear amount corresponding to the target machining travel path is compensated to obtain the actual total wear amount corresponding to the target machining travel path, wherein the compensation intensity for the initial total wear amount is positively correlated with the degree of consistency represented by the statistical characteristics.

[0112] In the above process, a historical wear amount of the target processing stroke path can be obtained by taking the difference between the detection results of the target empty stroke path before and after the target processing path during the processing. This embodiment also introduces statistical features when compensating by wear amount. Statistical features refer to the consistency of the average wear amount. In practice, it can be evaluated by variance, standard deviation or any artificially specified indicators. Under ideal conditions, the wear and tear caused by the same process to the tool should be consistent. Therefore, in this embodiment, the credibility of a historical wear amount set, or the accuracy of the data, is represented by statistical features to further improve the accuracy of the present invention. When the degree of consistency represented by the statistical features is high, it indicates that the historical wear amount set is relatively accurate. At this time, directly using the average wear amount of the historical wear amount set for correction can also achieve better accuracy.

[0113] In practice, CNC machine tools are often used for subtractive manufacturing, and the subtractive process is obviously irreversible. When the degree of consistency in the statistical characteristics is low, it indicates that the historical wear volume set has a large error. In this case, directly using the average wear volume of the historical wear volume set for correction may result in excessive correction, causing material scrap. Therefore, when the degree of consistency in the statistical characteristics is low, the magnitude of the correction of the average wear volume to the initial wear volume should be reduced to retain the opportunity for secondary processing of the material and reduce material waste.

[0114] In a preferred embodiment, the above process is expressed as follows:

[0115]

[0116] Among them, W1 is the actual total wear of a target machining stroke path, W0 is the initial total wear of the target machining stroke path, and W a is the average wear amount of the machining stroke path between the target machining stroke path and its corresponding target idle stroke path, σ is the statistical characteristic of the machining stroke path between the target machining stroke path and its corresponding target idle stroke path, n is the total number of machining stroke paths between the target machining stroke path and its corresponding target idle stroke path, r is a random number between 0 and 1, and A is the preset modification amplitude value.

[0117] Combine Figure 5 As shown, the present invention also provides a CNC machine tool processing path optimization system, comprising:

[0118] The data input module 510 is used to obtain the detection position and detection direction of the detection camera, and obtain the idle travel path and processing travel path of the same tool, wherein the detection camera is used to detect tool wear;

[0119] A path analysis module 520 is used to screen the idle travel paths based on the detection position and detection direction to obtain an optimizable idle travel path;

[0120] A path arrangement module 530 is configured to match the optimizable idle travel path with the processing travel path according to a temporal relationship between the optimizable idle travel path and the processing travel path, thereby obtaining a target idle travel path and a corresponding target processing travel path;

[0121] A first optimization module 540 is configured to optimize a target idle travel path based on a detection position and a detection direction, wherein when the tool moves along the optimized target idle travel path, it passes through a detection position of a detection camera and performs a wear detection.

[0122] The second optimization module 550 is configured to optimize the target machining stroke path corresponding to the target idle stroke path according to the wear detection result of the target idle stroke path.

[0123] It should be noted here that the corresponding system provided in the above embodiments can implement the technical solutions described in the above method embodiments. The specific implementation principles of the above modules or units can be found in the corresponding contents in the above method embodiments, which will not be repeated here.

[0124] The present invention provides a method and system for optimizing machining paths for numerically controlled machine tools. The method first obtains the detection position and detection direction of a detection camera, obtains the idle travel path and machining travel path of the same tool, then screens the idle travel path based on the detection position and detection direction to obtain an optimizable idle travel path. Then, based on the temporal relationship between the optimizable idle travel path and the machining travel path, the optimizable idle travel path and the machining travel path are matched to obtain a target idle travel path and a corresponding target machining travel path. The target idle travel path is optimized based on the detection position and detection direction, and finally, based on the wear detection result of the target idle travel path, the target machining travel path corresponding to the target idle travel path is optimized. Compared to the prior art, the present invention utilizes a detection camera to detect tool wear based on computer vision technology, and utilizes the non-contact detection characteristics of the detection camera to reduce the occurrence of downtime and improve production efficiency. At the same time, the present invention also divides the processing path into a target idle stroke path and a target processing stroke path, and optimizes the idle stroke during the processing, and uses the gap of the tool idle stroke during processing to detect tool wear, thereby improving the real-time performance of wear detection, and uses the detection results of the idle stroke to optimize the processing stroke path in real time, further amplifying the advantages of non-contact detection, greatly improving the frequency of wear detection and path optimization, while ensuring that the efficiency is within an acceptable range, and solving the problem in the prior art that tool wear detection and processing path optimization of CNC machine tools require shutdown execution, and cannot take into account both production efficiency and processing quality.

[0125] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the various embodiments can be referenced to each other.

[0126] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not limited to the embodiments shown herein but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for optimizing machining paths of CNC machine tools, characterized in that: include: Obtain the detection position and detection direction of the detection camera, and obtain the idle travel path and processing travel path of the same tool, wherein the detection camera is used to detect tool wear; The idle travel path is screened based on the detection position and detection direction to obtain the optimized idle travel path; According to the temporal relationship between the optimizable idle travel path and the machining travel path, the optimizable idle travel path and the machining travel path are matched to obtain a target idle travel path and a corresponding target machining travel path; Based on the detection position and detection direction, the target idle travel path is optimized. When the tool moves along the optimized target idle travel path, it passes the detection position of the detection camera and performs a wear detection. According to the wear detection result of the target idle stroke path, the target machining stroke path corresponding to the target idle stroke path is optimized.

2. The CNC machine tool machining path optimization method according to claim 1, characterized in that: Get the idle travel path and machining travel path of the same tool, including: Obtain processing object model and processing path data; Mapping the processing object model and the path represented by the processing path data into the same operation space; Based on the coincidence of the processing object model and the path represented by the processing path data in the operation space, an empty stroke path set and a processing stroke path set are obtained; Based on the tool type represented in the machining path data, the idle stroke path set and the machining stroke path set are divided to obtain the idle stroke path and the machining stroke path of the same tool.

3. The CNC machine tool machining path optimization method according to claim 1, characterized in that: The idle travel path is screened based on the detection position and detection direction to obtain the optimized idle travel path, including: Calculating an adjustment cost value for each empty travel path based on the detection position and the detection direction, wherein the adjustment cost value represents a cost level of adjusting an empty travel path; If there is an empty trip path whose adjusted cost value meets the preset cost standard, the empty trip path whose adjusted cost value meets the preset cost standard is taken as the optimizable empty trip path; If there is no idle travel path whose adjustment cost value meets the preset cost standard, then an idle travel path with the lowest cost level represented by the adjustment cost is selected as the optimizable idle travel path.

4. The CNC machine tool machining path optimization method according to claim 3, characterized in that: Based on the detection position and detection direction, the adjustment cost value of each empty travel path is calculated, including: Count the path length of the empty travel path and the minimum distance between it and the detection position; Based on the detection direction, the length ratio of the sub-path parallel to the detection direction in the idle travel path is analyzed to obtain the rotation cost value; Based on the detection direction, the length proportion of the direction preference sub-path in the idle travel path is analyzed to obtain the commutation cost value, where the direction preference sub-path is the path that causes the tool to move in the detection direction; According to the path length, minimum distance, rotation cost and commutation cost, the adjusted cost is obtained, among which the adjusted cost is negatively correlated with the path length, positively correlated with the minimum distance, positively correlated with the cost level represented by the rotation cost, and positively correlated with the cost level represented by the commutation cost.

5. The CNC machine tool machining path optimization method according to claim 4, characterized in that: According to the path length, minimum distance, rotation cost value and commutation cost value, the adjustment cost value is obtained, including: The adjusted cost is obtained by the following formula: Among them, Cost is the adjustment cost value, max is the maximum value of the preset adjustment cost value, l is the path length, l0 is the preset path length threshold, d min is the minimum distance, C r is the rotation cost, C t is the commutation cost, w1, w2, w3 and w4 are different preset weights.

6. The CNC machine tool machining path optimization method according to claim 1, characterized in that: According to the timing relationship between the optimizable idle travel path and the machining travel path, the optimizable idle travel path and the machining travel path are matched to obtain the target idle travel path and the corresponding target machining travel path, including: Get wear detection analysis time; Combined with the wear detection analysis time, the optimizable idle travel path and the machining travel path are matched to obtain the target idle travel path and the corresponding target machining travel path.

7. The CNC machine tool machining path optimization method according to claim 1, characterized in that: According to the wear detection results of the target idle stroke path, the target machining stroke path corresponding to the target idle stroke path is optimized, including: Count all historical wear detection results of all target empty travel paths after multiple walking processes to obtain the historical wear amount set of each processing travel path; Obtaining an actual wear detection result of the target idle travel path, and obtaining an initial total wear amount of the target machining travel path corresponding to the target idle travel path according to the actual wear detection result; According to the historical wear amount set of each machining stroke path, the initial wear amount is compensated to obtain the actual wear amount of the target machining stroke path; Optimize the target machining stroke path based on the actual total wear.

8. The CNC machine tool machining path optimization method according to claim 7, characterized in that: Based on the historical wear amount set of each machining stroke path, the initial wear amount is compensated to obtain the actual wear amount of the target machining stroke path, including: Based on the historical wear amount set of each machining travel path, the average wear amount and statistical characteristics of each machining travel path are obtained, wherein the statistical characteristics represent the consistency of the data in the historical wear amount set corresponding to a target machining travel path; According to the average wear amount and statistical characteristics of the machining travel path between a target machining travel path and its corresponding target idle travel path, the initial total wear amount corresponding to the target machining travel path is compensated to obtain the actual total wear amount corresponding to the target machining travel path, wherein the compensation intensity for the initial total wear amount is positively correlated with the degree of consistency represented by the statistical characteristics.

9. The CNC machine tool machining path optimization method according to claim 8, characterized in that: According to the average wear amount and statistical characteristics of the machining travel path between a target machining travel path and its corresponding target idle travel path, the initial total wear amount corresponding to the target machining travel path is compensated to obtain the actual total wear amount corresponding to the target machining travel path, including: The actual total wear is calculated using the following formula: Among them, W1 is the actual total wear of a target machining stroke path, W0 is the initial total wear of the target machining stroke path, and W a is the average wear amount of the machining stroke path between the target machining stroke path and its corresponding target idle stroke path, σ is the statistical characteristic of the machining stroke path between the target machining stroke path and its corresponding target idle stroke path, n is the total number of machining stroke paths between the target machining stroke path and its corresponding target idle stroke path, r is a random number between 0 and 1, and A is the preset modification amplitude value.

10. A CNC machine tool processing path optimization system, characterized in that: include: A data input module is used to obtain the detection position and detection direction of the detection camera, and obtain the idle travel path and processing travel path of the same tool, wherein the detection camera is used to detect tool wear; A path analysis module is used to screen the idle travel path based on the detection position and detection direction to obtain an optimized idle travel path; A path arrangement module is used to match the optimizable idle travel path with the processing travel path according to the temporal relationship between the optimizable idle travel path and the processing travel path, so as to obtain a target idle travel path and a corresponding target processing travel path; A first optimization module is configured to optimize a target idle travel path based on a detection position and a detection direction, wherein when the tool moves along the optimized target idle travel path, it passes through a detection position of a detection camera and performs a wear detection. The second optimization module is used to optimize the target machining stroke path corresponding to the target idle stroke path according to the wear detection result of the target idle stroke path.

Citation Information

Patent Citations

  • Method for optimizing numerical control machining feed path of large complex cabin structural member

    CN112596464A

  • Numerical control lathe machining auxiliary system based on machine vision

    CN118788992A