Numerical control machine tool machining path optimization method and system
By obtaining and matching the empty stroke and machining stroke path of CNC machine tool tools online, and optimizing based on the position and direction of the detection camera, the problem of the wear detection and machining path optimization of CNC machine tool tools in the prior art requires shutdown execution, and efficient wear detection and path optimization are achieved, and production efficiency and processing quality are improved.
Patent Information
- Application Number
- CN202411804394.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2044-12-10
AI Technical Summary
In the prior art, tool wear detection and machining path optimization of CNC machine tools require shutdown and cannot take into account both production efficiency and processing quality.
By obtaining the detection position and detection direction of the detection camera, obtaining the empty stroke path and processing stroke path of the same tool, filtering the empty stroke path based on the detection position and detection direction, obtaining the optimized empty stroke path, and matching the timing relationship between the optimized empty stroke path and the processing stroke path, obtaining the target empty stroke path and the target processing stroke path, optimizing the target empty stroke path based on the detection position and detection direction, and optimizing the target processing stroke path based on the wear detection results of the target empty stroke path.
It realizes online tool wear detection and machining path optimization, reduces the occurrence of downtime, and improves production efficiency and processing quality.
Smart Images

Figure CN119644907A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of numerical control machine tool control, and in particular to a method and system for optimizing a machining path of a numerical control machine tool. Background Art
[0002] CNC machine tools are highly automated mechanical processing equipment that use computer systems to control the movement and operation of machine tools to achieve precise processing. This type of machine tool can automatically perform complex processing tasks according to pre-written programs. Its CNC system can interpret the programming code and convert it into machine tool motion instructions, which control the various axial movements of the machine tool, as well as the feed speed and depth of the tool, thereby ensuring that the processed parts can achieve the accuracy and quality required by the design.
[0003] During the machining process, the tool will gradually wear out due to friction and cutting action with the workpiece, which will not only affect the machining efficiency, but also may lead to a decrease in machining accuracy and even produce waste. Therefore, real-time monitoring of the tool wear state and compensation optimization of the machining path according to the tool wear condition are crucial to maintaining the stability of the machining process and improving the product qualification rate.
[0004] However, most current tool wear detection and optimization methods need to be performed when the machine tool is stopped, which cannot take into account both processing quality and efficiency, and cannot fully exert the advantages of CNC machine tool automation. Therefore, people need a CNC machine tool control method that can simultaneously perform tool wear detection and processing path optimization online. Summary of the invention
[0005] Therefore, the present invention provides a method and system for optimizing machining paths of CNC machine tools, so as to solve the problem in the prior art that tool wear detection and machining path optimization of CNC machine tools need to be performed while stopping the machine, and cannot take into account both production efficiency and machining 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 the wear of the tool;
[0008] The idle travel path is screened based on the detection position and detection direction to obtain an optimized idle travel path;
[0009] According to the timing 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;
[0010] Based on the detection position and detection direction, the target idle travel path is optimized, 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;
[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 travel path set and the machining travel path set are divided to obtain the idle travel path and the machining travel 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] Based on the detection position and the detection direction, calculating an adjustment cost value of each empty travel path, 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 an optimizable empty trip path;
[0020] If there is no empty travel path whose adjustment cost value meets the preset cost standard, then an empty travel path with the lowest cost level represented by the adjustment cost is selected as the optimizable empty travel path.
[0021] In a preferred embodiment, based on the detection position and the detection direction, the adjustment cost value of each empty travel path is calculated, including:
[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 empty 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 empty stroke path is analyzed to obtain the commutation cost value, where the direction preference sub-path is the path that causes the tool to shift in the detection direction;
[0025] According to the path length, the minimum distance, the rotation cost value and the commutation cost value, the adjusted cost value is obtained, wherein the adjusted cost value is negatively correlated with the path length, positively correlated with the minimum distance, positively correlated with the cost level represented by the rotation cost value, and positively correlated with the cost level represented by the commutation cost value.
[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, and w1, w2, w3 and w4 are different preset weights.
[0030] In a preferred embodiment: according to the timing 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 the 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: according to the wear detection result of the target idle travel path, optimizing the target machining travel path corresponding to the target idle travel path includes:
[0034] Count all historical wear detection results of all target empty travel paths after multiple walking processes, and obtain a set of historical wear amounts for each processing travel path;
[0035] Acquire the actual wear detection result of the target idle stroke path, and obtain the initial total wear of the target machining stroke path corresponding to the target idle stroke path according to the actual wear detection result;
[0036] According to the historical wear amount set of each machining travel path, the initial wear amount is compensated to obtain the actual wear amount of the target machining travel path;
[0037] According to the actual total amount of wear, the target machining stroke path is optimized.
[0038] In a preferred embodiment, the initial total wear is compensated according to the historical wear amount set of each processing stroke path to obtain the actual total wear amount of the target processing stroke path, including:
[0039] According to the historical wear amount set of each processing travel path, the average wear amount and statistical characteristics of each processing travel path are obtained, wherein the statistical characteristics represent the consistency degree of data in the historical wear amount set corresponding to a target processing 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: 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:
[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 to obtain the idle travel path and processing travel path of the same tool, wherein the detection camera is used to detect the wear of the tool;
[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 stroke path with the processing stroke path according to the timing relationship between the optimizable idle stroke path and the processing stroke path, so as to obtain a target idle stroke path and a corresponding target processing stroke path;
[0049] A first optimization module is used to optimize the target idle travel path based on the detection position and the 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;
[0050] The second optimization module is used to optimize the target processing 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 of numerical control machine tools, which first obtains the detection position and detection direction of a detection camera, obtains the idle stroke path and machining stroke path of the same tool, then screens the idle stroke path based on the detection position and detection direction to obtain an optimizable idle stroke path, then matches the optimizable idle stroke path and the machining stroke path according to the timing relationship between the optimizable idle stroke path and the machining stroke path to obtain a target idle stroke path and a corresponding target machining stroke path, optimizes the target idle stroke path based on the detection position and detection direction, and finally optimizes the target machining stroke path corresponding to the target idle stroke path according to the wear detection result of the target idle stroke path. Compared with the prior art, the present invention uses a detection camera to detect the wear of the tool based on computer vision technology, 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 in the processing process, 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 result 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, thereby 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 machining path optimization system provided by the present invention. DETAILED DESCRIPTION
[0058] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. 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 creative work are within the scope of protection of the present invention.
[0059] Combination 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 a detection direction of a detection camera, and obtaining an idle travel path and a processing travel 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 time sequence 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 the 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 . 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.
[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 mass production and manufacturing occasions, 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 they have different functions in the analysis process. 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 the two tools respectively.
[0067] Optimizing the target idle travel path is essentially to adjust the trajectory shape of the target idle travel path so that it passes through the detection position of the detection camera, so as to complete a wear detection at the actual processing interval, and optimize the subsequent processing path based on the results of the wear detection. Obviously, the present invention can run in real time during the processing process, adjust the path in real time, and improve the processing quality without stopping the machine.
[0068] Compared with the prior art, the present invention uses a detection camera based on computer vision technology to detect the wear of the tool, 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, and uses the gap of the tool idle stroke during processing to detect the wear of the tool, thereby improving the real-time performance of wear detection, and uses the detection results of the idle stroke to optimize the path of the processing stroke 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, solving the problem that the tool wear detection and processing path optimization of CNC machine tools in the prior art need to be stopped for 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 travel path set and the machining travel path set are divided to obtain the idle travel path and the machining travel path of the same tool.
[0074] In the above process, the processing object model is the three-dimensional model data of the processing object, and the processing path data is the data representing the processing path or CNC machine tool operation instructions in the G code or CAD / CAM format described above. The operation space is a virtual three-dimensional space or vector space, and it only needs to be able to represent the shape of the processing object and the processing path in one 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 being adjusted to paths passing through the detection position. Blindly adjusting all idle stroke paths may have a serious impact on production efficiency.
[0076] Therefore, combined with 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 of 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 travel path whose adjusted cost value meets the preset cost standard, the empty travel path whose adjusted cost value meets the preset cost standard is used as an optimizable empty travel path;
[0079] S203: If there is no empty travel path whose adjustment cost 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 related to screening the idle travel paths can be flexibly set according to the specific circumstances, for example, the idle travel paths with a travel length shorter than a certain threshold, or the idle travel paths of non-linear motion are eliminated. In the present embodiment, the adjustment cost value is calculated, and the screening is performed by comparing it with a 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, the present 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, and the processing path of each tool will be optimized at least once, to ensure the minimum quality control.
[0081] It is understandable 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. The present invention provides a more preferred method: In a preferred embodiment, the above step S201, based on the detection position and the 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 empty 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 empty stroke path is analyzed to obtain the commutation cost value, where the direction preference sub-path is the path that causes the tool to shift in the detection direction;
[0085] According to the path length, the minimum distance, the rotation cost value and the commutation cost value, the adjusted cost value is obtained, wherein the adjusted cost value is negatively correlated with the path length, positively correlated with the minimum distance, positively correlated with the cost level represented by the rotation cost value, and positively correlated with the cost level represented by the commutation cost value.
[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 the operable amount of adjustment of the idle stroke path to the detection position of the detection camera, and the higher the cost. Similarly, the smaller the minimum distance, the smaller the cost. 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 impact 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 because of the wear, life reduction, failure and other adverse phenomena 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, so as to further improve the scientific rationality of the adjustment cost value and further improve the practicality of the present invention.
[0087] At the same time, in practice, the shapes of the processed objects vary, and the processing paths may not be regular shapes. Therefore, this embodiment also provides a preferred method to simplify the evaluation process of the rotation cost and the commutation cost of the irregular processing path, thereby improving the operation efficiency. For the rotation cost, the present invention only analyzes the length proportion of the sub-path parallel to the detection direction to achieve a quick estimate. The length proportion 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 the time proportion, the lower the probability that the machine tool will adjust its angle in order 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 preference sub-path to achieve rapid estimation. The direction preference sub-path is the path that causes the tool to displace in the detection direction, and in the embodiment, the direction away from the lens of the detection camera is defined as the detection direction. It can be imagined that the longer the distance the direction preference sub-path moves along the detection direction, the farther it is from the lens of the detection camera. At this time, the cost of adjusting its movement direction to make it approach the detection camera again is higher. It should be noted that in practice, in addition to the irregular processing path, the detection direction of the detection camera itself can also be a range. Therefore, the direction preference sub-path in this embodiment does not refer to a path completely parallel to the detection direction, and it can also be a path close to the detection direction. In practice, the direction of movement can be decomposed, and as long as there is a component parallel to a detection direction, it can be regarded as a direction preference sub-path. For example, there is a circular empty travel path, the detection direction of the camera is a 90° fan-shaped radial area, and is located in the same plane as the empty travel path, then in the empty travel path, the length proportion of the direction preference sub-path is 75%.
[0089] Furthermore, in a preferred embodiment, the above step of obtaining the adjustment cost value according to 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, and w1, w2, w3 and w4 are different preset weights.
[0093] The significance of the above formula is to simplify the calculation method of extreme cases and further increase the calculation speed of the adjustment cost value. For an empty travel path whose path length is less than the preset path length threshold, directly set its adjustment cost value to the maximum, that is, it is not suitable for adjustment. For an empty travel path with a minimum distance of 0, it indicates that it will pass through the detection position during operation, and directly set its adjustment cost value to 0, that is, it is very suitable for adjustment.
[0094] Further, in a preferred embodiment, the above step S103, according to the timing relationship between the optimizable idle travel path and the processing travel path, matches 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 the 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 obtained by means of experiments or experience. It is understandable that the detection result of an empty stroke path represents the wear condition of the current tool, which can be directly used to optimize the detection result of the next processing stroke. In practice, due to the limitations of specific hardware conditions or production conditions, the process of image-based wear analysis may take a long time, which will cause a certain delay. Therefore, this embodiment also performs an additional matching process to prevent errors in subsequent path optimization.
[0098] For example, Figure 3A timing diagram of a machining process, in which the horizontal thin solid lines a and c respectively represent the duration of two idle travel paths, and the two operations end and start processing at time t1 and time t3, respectively. The horizontal dotted lines b and dotted lines d respectively represent the duration of the two processing travel paths. Assuming that the detection camera can capture the image of the tool and start image analysis when each idle travel reaches halfway, the thick solid lines e and f in the figure respectively represent the wear detection and analysis time for the two idle travel paths represented by the thin solid lines a and c, and the results of the two analyses are obtained at time t2 and time t4, respectively.
[0099] Theoretically, the detection result of the idle stroke path represented by the thin solid line a can be used to optimize the path corresponding to the dotted line b. Therefore, the paths represented by the thin solid line a and the dotted line b are a pair of corresponding target idle stroke paths and target processing stroke paths, and the same is true for the thin solid line c and the dotted line d. It can be seen from the figure that the wear detection result corresponding to the idle stroke path represented by the thin solid line a can only be obtained at time t2, while the processing stroke path represented by the dotted line b has already started working at time t1. The wear detection result is not known at time t1, so it cannot be optimized. Therefore, in practice, the paths represented by the thin solid line a and the dotted line d should be made corresponding, and the paths represented by the thin solid line c and the dotted line b should be made corresponding (using the wear detection result of the path corresponding to the thin solid line c in the previous round of parts processing to optimize the path corresponding to the dotted line b in this processing), so as to complete the path optimization.
[0100] After determining the target processing 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, such as re-planning the path according to the detection position and detection direction, or adding a stroke at the position closest to the detection position in the target idle stroke path, or performing more complex optimization based on the rotation cost and commutation cost calculated in the previous text.
[0101] Further, combined with 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 processing travel path corresponding to the target idle travel path, specifically includes:
[0102] S401, counting all historical wear detection results of all target empty travel paths after multiple walking processes, and obtaining a historical wear amount set of each processing travel path;
[0103] S402, obtaining an actual wear detection result of a target idle stroke path, and obtaining an initial total wear amount of a target machining stroke path corresponding to the target idle stroke path according to the actual wear detection result;
[0104] S403, compensating the initial total wear amount according to 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, optimizing the target processing stroke path according to the actual total amount of wear.
[0106] It is understandable that the optimization of the target machining path can be achieved by any existing method such as compensating displacement, adjusting cutting speed, temperature, etc., but no matter which optimization method is used, the optimization effect depends on the accuracy of the wear amount detected by the target idle stroke path. If the wear detection analysis time is long, then if the detection result of the target idle stroke path is directly used to optimize the corresponding target machining stroke path, errors will occur.
[0107] Likewise, please refer to Figure 3 According to the previous description, the target processing stroke path corresponding to the dotted line d should be optimized based on the detection result of the target empty stroke path corresponding to the thin solid line a. However, it can be seen from the figure that there is a dotted line b between the thin solid line a and the dotted line d, which indicates that there may be other processing strokes between the target empty stroke path and the target processing stroke path in practice. This leads to the fact that when the target processing stroke path is running, the actual total wear of the tool is often greater than the detection result of the target empty stroke path corresponding to the target processing stroke path, that is, the actual total wear corresponding to the dotted line d in the figure should be the sum of the detection result corresponding to the thin solid line a and the wear caused by the processing 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 of 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 processing stroke path, compensates the initial wear amount to obtain the actual wear amount of the target processing stroke path, specifically includes:
[0110] According to the historical wear amount set of each processing travel path, the average wear amount and statistical characteristics of each processing travel path are obtained, wherein the statistical characteristics represent the consistency degree of data in the historical wear amount set corresponding to a target processing 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 additional statistical features when compensating by wear amount. The statistical feature refers to the consistency of the average wear amount. In practice, it can be evaluated by variance, standard deviation or any artificially specified indicator. 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 consistency represented by the statistical feature is high, it indicates that the historical wear amount set is more 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 usually used for subtractive manufacturing, and the process of subtractive manufacturing is obviously irreversible. When the consistency of the statistical characteristics is low, it indicates that the error of the historical wear volume set is large. At this time, directly using the average wear volume of the historical wear volume set for correction may result in excessive correction, causing the material to be scrapped. Therefore, when the consistency of the statistical characteristics is low, the correction amplitude 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 formula of 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] Combination 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 the wear of the tool;
[0119] A path analysis module 520, for screening the idle travel path based on the detection position and the detection direction to obtain an optimizable idle travel path;
[0120] A path arrangement module 530 is used to match the optimizable idle stroke path with the processing stroke path according to the time sequence relationship between the optimizable idle stroke path and the processing stroke path, so as to obtain a target idle stroke path and a corresponding target processing stroke path;
[0121] A first optimization module 540 is used to optimize the target idle travel path based on the detection position and the detection direction, wherein the tool will pass through the detection position of the detection camera and perform a wear detection when moving along the optimized target idle travel path;
[0122] The second optimization module 550 is used to optimize the target processing 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 of numerical control machine tools, which first obtains the detection position and detection direction of a detection camera, obtains the idle stroke path and machining stroke path of the same tool, then screens the idle stroke path based on the detection position and detection direction to obtain an optimizable idle stroke path, then matches the optimizable idle stroke path and the machining stroke path according to the timing relationship between the optimizable idle stroke path and the machining stroke path to obtain a target idle stroke path and a corresponding target machining stroke path, optimizes the target idle stroke path based on the detection position and detection direction, and finally optimizes the target machining stroke path corresponding to the target idle stroke path according to the wear detection result of the target idle stroke path. Compared with the prior art, the present invention uses a detection camera to detect the wear of the tool based on computer vision technology, 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 in the processing process, 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 result 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, thereby 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 or similar parts between the various embodiments can be referenced to each other.
[0126] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be 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 will not be limited to the embodiments shown herein, but rather 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 the wear of the tool; The idle travel path is screened based on the detection position and detection direction to obtain an optimized idle travel path; According to the timing 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; Based on the detection position and detection direction, the target idle travel path is optimized, 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; 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 travel path set and the machining travel path set are divided to obtain the idle travel path and the machining travel 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: Based on the detection position and the detection direction, calculating an adjustment cost value of each empty travel path, 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 an optimizable empty trip path; If there is no empty travel path whose adjustment cost value meets the preset cost standard, then an empty travel path with the lowest cost level represented by the adjustment cost is selected as the optimizable empty 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 empty 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 empty stroke path is analyzed to obtain the commutation cost value, where the direction preference sub-path is the path that causes the tool to shift in the detection direction; According to the path length, the minimum distance, the rotation cost value and the commutation cost value, the adjusted cost value is obtained, wherein the adjusted cost value is negatively correlated with the path length, positively correlated with the minimum distance, positively correlated with the cost level represented by the rotation cost value, and positively correlated with the cost level represented by the commutation cost value.
5. The CNC machine tool machining path optimization method according to claim 4, characterized in that: According to the path length, the minimum distance, the rotation cost value and the 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, and 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 processing travel path, the optimizable idle travel path and the processing travel path are matched to obtain the target idle travel path and the corresponding target processing travel path, including: Get the 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 result 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, and obtain a set of historical wear amounts for each processing travel path; Acquire the actual wear detection result of the target idle stroke path, and obtain the initial total wear of the target machining stroke path corresponding to the target idle stroke path according to the actual wear detection result; According to the historical wear amount set of each machining travel path, the initial wear amount is compensated to obtain the actual wear amount of the target machining travel path; According to the actual total amount of wear, the target machining stroke path is optimized.
8. The CNC machine tool machining path optimization method according to claim 7, characterized in that: 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, including: According to the historical wear amount set of each processing travel path, the average wear amount and statistical characteristics of each processing travel path are obtained, wherein the statistical characteristics represent the consistency degree of data in the historical wear amount set corresponding to a target processing 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 to obtain the idle travel path and processing travel path of the same tool, wherein the detection camera is used to detect the wear of the tool; 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 stroke path with the processing stroke path according to the timing relationship between the optimizable idle stroke path and the processing stroke path, so as to obtain a target idle stroke path and a corresponding target processing stroke path; A first optimization module is used to optimize the target idle travel path based on the detection position and the 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; The second optimization module is used to optimize the target processing 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
CAM system for automatically controlling machining center according to drawings
CN117348524A
Numerical control lathe groove turning control method and system
CN118707895A
Numerical control lathe machining auxiliary system based on machine vision
CN118788992A
Cited By
High-precision multi-axis machining composite numerical control machine tool control system
CN119871091A