Parameter compensation method for numerical control machining and related device
By acquiring the actual and standard parameters of the machined parts, calculating the compensation value and performing iterative analysis, the problems of low efficiency and insufficient accuracy of parameter compensation in CNC machining are solved, achieving efficient and accurate parameter compensation and improving the yield of machined parts.
Patent Information
- Application Number
- CN202311865999.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-29
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2043-12-29
AI Technical Summary
In existing CNC machining, parameter compensation is inefficient and has low accuracy, and the yield improvement after optimization is not significant.
By acquiring the actual and standard parameters of the processed parts, calculating the compensation value and performing iterative analysis, the parameters are gradually adjusted to achieve the target value, and parameter compensation is performed using a computing device.
This improved the efficiency and accuracy of parameter compensation, thereby increasing the yield rate of machined parts.
Smart Images

Figure CN117826702B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of numerical control machining, and in particular to a parameter compensation method for numerical control machining and related devices. BACKGROUND
[0002] In order to ensure the accuracy of part machining, the existing parts need to be measured by the operator after machining through the measuring device, and the machining parameters of the machining equipment are compensated according to the measurement results, so that the machining parameters of the machining equipment can meet the requirements of the parts. However, this method has the problems of low compensation efficiency, low compensation accuracy, and insignificant yield improvement after tuning. SUMMARY
[0003] The present application provides a parameter compensation method for numerical control machining and related devices to solve the technical problems of low compensation efficiency, low compensation accuracy, and insignificant yield improvement after tuning in the existing parameter compensation technology for numerical control machining.
[0004] In a first aspect, a parameter compensation method for numerical control machining is provided, which comprises:
[0005] Obtaining n groups of actual parameters of a machined part and standard parameters of the machined part, wherein the n groups of actual parameters are arranged in a predetermined order; and n≥1;
[0006] According to the standard parameters, a first compensation value corresponding to the nth group of actual parameters is obtained, and the nth group of actual parameters is compensated by the first compensation value;
[0007] According to the n groups of actual parameters, the first difference value between each actual parameter in the nth+1 group of actual parameters and the first compensation value is calculated.
[0008] According to the n groups of actual parameters, the first difference value between each actual parameter in the nth+1 group of actual parameters and the first compensation value is calculated.
[0009] According to the n groups of actual parameters, the first difference value between each actual parameter in the nth+1 group of actual parameters and the first compensation value is calculated.
[0010] In combination with the first aspect, in a possible implementation manner, the method further comprises: determining whether the actual parameters of the machined part after parameter compensation with the second compensation value are qualified; if not, obtaining the nth+2 group of actual parameters of the machined part, updating the nth+2 group of actual parameters to the nth+1 group of actual parameters, updating the second compensation value to the first compensation value, and re-executing the step of calculating the first difference value between each actual parameter in the nth+1 group of actual parameters and the first compensation value with the updated nth+1 group of actual parameters and the first compensation value.
[0011] With reference to the first aspect, in a possible implementation manner, a quantity of actual parameters in the (n+1)th group of actual parameters is not less than a quantity of actual parameters in the nth group of actual parameters; and a quantity of actual parameters in the (n+2)th group of actual parameters is not less than a quantity of actual parameters in the (n+1)th group of actual parameters.
[0012] With reference to the first aspect, in a possible implementation manner, when n=1, the step of obtaining a first compensation value corresponding to the nth group of actual parameters according to the standard parameter, and performing parameter compensation on the nth group of actual parameters by using the first compensation value, comprises: obtaining a first group of actual parameters of the machining part; calculating a first average value of a plurality of actual parameters in the first group of actual parameters; calculating a second difference value between the first average value and the standard parameter, and taking the second difference value as the first compensation value corresponding to the first group of actual parameters, and performing parameter compensation on the first group of actual parameters by using the first compensation value; determining whether the actual parameters of the machining part after the parameter compensation by using the first compensation value are qualified; and if not, performing the step of obtaining the (n+1)th group of actual parameters of the machining part.
[0013] With reference to the first aspect, in a possible implementation manner, the step of obtaining a second compensation value corresponding to the (n+1)th group of actual parameters according to the nth group of actual parameters and the first difference value, comprises: obtaining a third compensation value corresponding to each group of actual parameters in the nth group of actual parameters; calculating a third difference value between each actual parameter in any one group of actual parameters in the nth group of actual parameters and a third compensation value corresponding to a previous group of actual parameters of the any one group of actual parameters; calculating a second average value of the first group of actual parameters in the nth group of actual parameters, the first difference value and the third difference value; calculating a fourth difference value between the second average value and the standard parameter, and taking the fourth difference value as the second compensation value corresponding to the (n+1)th group of actual parameters.
[0014] With reference to the first aspect, in a possible implementation manner, the step of obtaining the nth group of actual parameters of the machining part, comprises: obtaining an nth group of actual sizes of the machining part; converting the nth group of actual sizes into an nth group of xy coordinate data; and obtaining the nth group of actual parameters of the machining part from the nth group of xy coordinate data.
[0015] With reference to the first aspect, in a possible implementation manner, the step of judging whether the actual parameters of the machining part after parameter compensation by the second compensation value are qualified comprises: calculating a compensation threshold according to the standard parameters and a process corresponding to the machining part; if the second compensation value is not greater than the compensation threshold, determining that the actual parameters of the machining part after parameter compensation by the second compensation value are qualified; and if the second compensation value is greater than the compensation threshold, determining that the actual parameters of the machining part after parameter compensation by the second compensation value are unqualified.
[0016] The second aspect provides a numerical control machining parameter compensation device, and the device comprises:
[0017] A first parameter acquisition module is configured to acquire n groups of actual parameters of a machining part and standard parameters of the machining part, wherein the n groups of actual parameters are arranged in a preset order; and n is greater than or equal to 1.
[0018] A first parameter compensation module is configured to obtain a first compensation value corresponding to an nth group of actual parameters according to the standard parameters, and perform parameter compensation on the nth group of actual parameters by using the first compensation value.
[0019] A second parameter acquisition module is configured to acquire an (n+1) th group of actual parameters of the machining part according to the nth group of actual parameters after parameter compensation.
[0020] A difference calculation module is configured to calculate a first difference value between each actual parameter in the (n+1) th group of actual parameters and the first compensation value.
[0021] A second parameter compensation module is configured to obtain a second compensation value corresponding to the (n+1) th group of actual parameters according to the n groups of actual parameters and the first difference value, and perform parameter compensation on the (n+1) th group of actual parameters by using the second compensation value.
[0022] With reference to the second aspect, in a possible implementation manner, the device further comprises a third parameter compensation module configured to judge whether the actual parameters of the machining part after parameter compensation by the second compensation value are qualified; if not, acquire an (n+2) th group of actual parameters of the machining part, and update the (n+2) th group of actual parameters to the (n+1) th group of actual parameters, update the second compensation value to the first compensation value, and re-perform the step of calculating the first difference value between each actual parameter in the (n+1) th group of actual parameters and the first compensation value by using the updated (n+1) th group of actual parameters and the first compensation value.
[0023] With reference to the second aspect, in a possible implementation manner, a quantity of actual parameters in the (n+1)th group of actual parameters is not less than a quantity of actual parameters in the nth group of actual parameters; and a quantity of actual parameters in the (n+2)th group of actual parameters is not less than a quantity of actual parameters in the (n+1)th group of actual parameters.
[0024] With reference to the second aspect, in a possible implementation manner, the first iteration module is specifically configured to: when n=1, acquire the first group of actual parameters of the machined part; calculate a first average value of a plurality of actual parameters in the first group of actual parameters; calculate a second difference value between the first average value and the standard parameter, and take the second difference value as a first compensation value corresponding to the first group of actual parameters; determine whether the actual parameters of the machined part after parameter compensation by using the first compensation value are qualified; and if not, perform the step of acquiring the (n+1)th group of actual parameters of the machined part.
[0025] With reference to the second aspect, in a possible implementation manner, the second iteration module is specifically configured to: acquire a third compensation value corresponding to each group of actual parameters in the n groups of actual parameters; calculate a third difference value between each actual parameter in any one group of actual parameters in the n groups of actual parameters and a third compensation value corresponding to a previous group of actual parameters of the any one group of actual parameters; calculate a second average value of the first group of actual parameters in the n groups of actual parameters, the first difference value and the third difference value; calculate a fourth difference value between the second average value and the standard parameter, and take the fourth difference value as a second compensation value corresponding to the (n+1)th group of actual parameters.
[0026] With reference to the second aspect, in a possible implementation manner, the first parameter module is specifically configured to: acquire n groups of actual sizes of the machined part; convert the n groups of actual sizes into n groups of xy coordinate data; and acquire n groups of actual parameters of the machined part from the n groups of xy coordinate data.
[0027] With reference to the second aspect, in a possible implementation manner, the third parameter compensation module is specifically further configured to: calculate a compensation threshold value according to the standard parameter and a process corresponding to the machined part; if the second compensation value is not greater than the compensation threshold value, determine that the actual parameters of the machined part after parameter compensation by using the second compensation value are qualified, and if the second compensation value is greater than the compensation threshold value, determine that the actual parameters of the machined part after parameter compensation by using the second compensation value are not qualified.
[0028] A third aspect provides a computer device, including a memory and a processor, the memory stores a computer program, and the computer program is executed by the processor to make the processor execute the parameter compensation method for numerical control machining according to the first aspect.
[0029] In a fourth aspect, a computer readable storage medium is provided, which stores a computer program. The computer program, when executed by a processor, causes the processor to perform the parameter compensation method for numerical control machining according to the first aspect.
[0030] The present application can achieve the following beneficial effects: the present application provides a parameter compensation method for numerical control machining, which comprises the following steps: obtaining n groups of actual parameters of a machining part and standard parameters of the machining part; wherein the n groups of actual parameters are arranged in a preset order; wherein n is greater than or equal to 1; obtaining a first compensation value corresponding to the nth group of actual parameters according to the standard parameters, and performing parameter compensation on the nth group of actual parameters by using the first compensation value; obtaining an (n+1)th group of actual parameters of the machining part according to the nth group of actual parameters after parameter compensation; calculating a first difference value between each actual parameter in the (n+1)th group of actual parameters and the first compensation value; obtaining a second compensation value corresponding to the (n+1)th group of actual parameters according to the n groups of actual parameters and the first difference value, and performing parameter compensation on the (n+1)th group of actual parameters by using the second compensation value. The present application can make iterative analysis of the difference between the actual parameters as data samples and the target value, so that the data used in each iteration is at the same level, which can not only ensure rapid parameter compensation and effectively improve the compensation efficiency, but also effectively improve the compensation accuracy and the yield. BRIEF DESCRIPTION OF DRAWINGS
[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained from the structures shown in the drawings without creative labor.
[0032] Figure 1 The structure of a parameter compensation system for numerical control machining provided for the embodiments of the present application is intended to be;
[0033] Figure 2 The flowchart of a parameter compensation method for numerical control machining provided for the embodiments of the present application is intended to be;
[0034] Figure 3 The flowchart of a parameter compensation method for numerical control machining provided for the embodiments of the present application is intended to be;
[0035] Figure 4 The flowchart of a parameter compensation method for numerical control machining provided for the embodiments of the present application is intended to be;
[0036] Figure 5 A flowchart illustrating a parameter compensation method for CNC machining provided in an embodiment of this application;
[0037] Figure 6 This is a schematic diagram of the structure of a parameter compensation device for CNC machining provided in an embodiment of this application;
[0038] Figure 7 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application.
[0039] Figure label:
[0040] Processing equipment-10, operating device-101, control device-102, detection device-103, equipment display device-104;
[0041] Host computer-20, host computer display device-201. Detailed Implementation
[0042] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.
[0043] The technical solution of this application is applicable to various CNC machining scenarios. Specifically, the technical solution of this application can be used to compensate machining parameters in CNC machining scenarios. In some implementations of CNC machining scenarios, parameter compensation is performed on the machining parameters of the scenario using a computing device with parameter iteration capabilities.
[0044] Specifically, the computing device can be a host computer, tablet, or other similar device.
[0045] In one embodiment, such as Figure 1 As shown, Figure 1 This is a schematic diagram of the structure of a parameter compensation system for CNC machining provided in an embodiment of this application. In a CNC machining scenario, it can be achieved through... Figure 1The parameter compensation system for numerical control machining shown realizes machining and parameter compensation of a machined part. The parameter compensation system for numerical control machining comprises a machining device 10 and a host computer 20 connected with the machining device 10. The machining device 10 comprises an operating device 101, a control device 102, a detection device 103 and a device display device 104, and the host computer 20 is connected with a host computer display device 201. The operating device 101 is used to complete machining of a machined part under the control of the control device 102; the control device 102 is used to adjust machining parameters of the machined part and control the operating device 101 to complete machining of the machined part, so as to realize adjustment of actual parameters of the machined part by adjusting the machining parameters; the detection device 103 is used to detect the machined part machined by the operating device 101 to obtain actual dimensions of the machined part; the detection device 103 is also used to send the actual dimensions of the machined part to the host computer 20; the device display device 104 is used to display machining conditions of the machining device, such as machining parameters, machining time length, name of the machined part and the like; the host computer 20 is used to receive the actual dimensions of the machined part sent by the detection device 103 and convert the actual dimensions of the machined part into xy coordinate data; the host computer 20 is also used to perform parameter compensation of machining parameters (i.e. parameter compensation of actual parameters of the machined part) according to the converted xy coordinate data and send the machining parameters after parameter compensation to the control device 102 and the host computer display device 201; and the host computer display device 201 is used to display details of parameter compensation of the host computer.
[0046] In actual application, the device display device 104 can also perform data input, and a user can input instructions through the device display device 104 to control the machining device or modify data. Similarly, the host computer display device 201 can also perform data input, and a user can input instructions through the host computer display device 201 to control the host computer or modify data.
[0047] Specifically, the device display device 104 and the host computer display device can be a touch screen or a display screen with an input device; the operating device 101 can be a mechanical arm, an industrial robot or the like; the control device 102 can be a PLC, a single-chip microcomputer or the like; the detection device 103 can be a CCD (Charge-coupled Device) detection device, an image detection device or the like; and the host computer 20 can be a computer, a mobile phone, a tablet computer or the like.
[0048] Specifically, the parameter compensation method for numerical control machining proposed in the present application can be realized through the parameter compensation system for numerical control machining.
[0049] In one embodiment, as shown in Figure 2 , the parameter compensation method for numerical control machining comprises the following steps. Figure 2A flowchart of a parameter compensation method for numerical control machining provided by an embodiment of the present application is shown in the figure. The parameter compensation method for numerical control machining comprises a first compensation operation:
[0050] In step S201, n sets of actual parameters of the machining part and standard parameters of the machining part are obtained; wherein the n sets of actual parameters are arranged in a preset order.
[0051] Wherein, n≥1.
[0052] Wherein, the actual parameters are used to reflect the actual machining size of the machining part. The actual parameters can be obtained by detecting and analyzing the machining part after the machining part is machined. The standard parameters are pre-set parameters for the machining part, which can be the median of the parameter range corresponding to the optimal product of the machining part. For example, if the parameter range corresponding to the optimal product of the machining part is 2±0.5mm, the standard parameter can be 2. It can be understood that the corresponding standard size parameters are different for different types and models of machining parts, which can be set according to the actual production situation.
[0053] Specifically, after detecting and analyzing a machining part, the parameters of each position of the machining part can be obtained, and the parameters of the target position are taken as the actual parameters of the machining part; a set of actual parameters of the machining part is obtained by taking the actual parameters of a plurality of machining parts to form an actual parameter group; and n sets of actual parameters of the machining part are obtained by taking a plurality of sets of actual parameters of the machining part. It should be noted that the actual parameters in the n sets of actual parameters are parameters of the same position of a plurality of machining parts; the n sets of actual parameters are arranged in the order of the time when the actual parameter groups are formed, and the number of parameters in each set of actual parameters can be pre-set.
[0054] In an implementation manner, taking the machining device producing machining part 1, machining part 2, machining part 3, machining part 4, machining part 5, machining part 6, …, machining part 13 in sequence as an example, after detecting and analyzing the machining part 1, the parameters of position 1 of the machining part 1 are taken as the actual parameters 1-1 of the machining part 1, …, after detecting and analyzing the machining part 4, the parameters of position 1 of the machining part 4 are taken as the actual parameters 4-1 of the machining part 4, and the actual parameters 1-1, actual parameters 2-1, actual parameters 3-1, actual parameters 4-1 are taken as the first set of actual parameters; after detecting and analyzing the machining part 5, the parameters of position 1 of the machining part 5 are taken as the actual parameters 5-1 of the machining part 5, …, after detecting and analyzing the machining part 13, the parameters of position 1 of the machining part 13 are taken as the actual parameters 13-1 of the machining part 13, and the actual parameters 5-1, actual parameters 6-1, …, actual parameters 13-1 are taken as the second set of actual parameters.
[0055] During the production of parts using machining equipment, a parameter compensation trigger threshold is set. It's important to note that this threshold determines whether parameter compensation should be performed. If the actual parameters of the machined part reach the threshold, parameter compensation is performed; otherwise, it is not. It's crucial to understand that the part reaching the threshold does not necessarily mean it's defective. The part produced at this point is considered acceptable, but not optimal. Therefore, parameter compensation is necessary when the actual parameters reach the threshold to ensure the quality of the machined parts.
[0056] Specifically, when the actual parameters of any processed part reach the parameter compensation trigger threshold, the processed part is taken as the first processed part, and the step of obtaining n sets of actual parameters of the processed part is started.
[0057] In one embodiment, such as Figure 3 As shown, Figure 3 This is a flowchart illustrating a parameter compensation method for CNC machining provided in an embodiment of this application. The step of obtaining n sets of actual parameters of the machined part includes:
[0058] Step S2011: Obtain n sets of actual dimensions of the machined part.
[0059] The actual dimension is the actual dimension measured after the part has been machined. The actual dimension can be obtained through... Figure 1 The detection device 103 in the parameter compensation system of the CNC machining system detects the result.
[0060] Specifically, if the detection device 103 is a CCD detection device, the CCD detection device can directly detect the actual size of the processed part; if the detection device 103 is an image detection device, the image detection device will take a picture of the processed part, convert the image obtained by the picture, and then analyze it to obtain the actual size of the processed part.
[0061] Specifically, the actual dimensions of multiple machined parts are obtained to form a set of actual dimensions, thus obtaining a set of actual dimensions of the machined parts; multiple sets of actual dimensions of the machined parts are obtained to obtain n sets of actual dimensions of the machined parts.
[0062] Step S2012: Convert the n sets of actual dimensions into n sets of xy coordinate data.
[0063] Wherein, each time a set of actual size is obtained, the actual size of the machining part can be converted into specific xy coordinate data according to the pre-established xy coordinate system. Specifically, since the measurement of the actual size of the machining part usually measures the length between two points, the actual size obtained by measurement can include the positional relationship with the two points. Therefore, if one of the positions is taken as the origin to establish a coordinate system, the actual size can be converted into xy coordinate data based on the positional relationship and distance of the two points. It can be understood that n sets of actual parameters are obtained in the present scheme, and each set of actual parameters includes multiple actual parameters, so that the conversion of the actual size into xy coordinate data can be realized by establishing a coordinate system with any point as the origin.
[0064] Specifically, the conversion of the n sets of actual sizes into n sets of xy coordinate data can be realized by Figure 1 The host computer 20 in the parameter compensation system for numerical control machining.
[0065] Step S2013: obtaining n sets of actual parameters of the machining part from the n sets of xy coordinate data.
[0066] Wherein, the n sets of actual sizes are converted into n sets of xy coordinate data by step S2012, and each data is an (x, y) coordinate. In the present scheme, the x coordinate data and the y coordinate data are compensated for parameters respectively during parameter iteration, so that after the n sets of actual sizes are converted into n sets of xy coordinate data, the x coordinate data in each coordinate data is obtained to obtain n sets of actual parameters, or the y coordinate data in each coordinate data is obtained to obtain n sets of actual parameters. It should be noted that whether to compensate only for the x coordinate data, or to compensate only for the y coordinate data, or to compensate for both the x coordinate data and the y coordinate data can be determined according to the actual production situation; when both the x coordinate data and the y coordinate data are compensated for parameters, the compensation order of the x coordinate data and the y coordinate data can be set according to the actual situation.
[0067] In the present embodiment, by converting the actual size into xy coordinate data, the x coordinate data and the y coordinate data can be compensated for parameters respectively, which not only effectively improves the accuracy and effectiveness of parameter compensation, but also effectively reduces the difficulty of calculation and improves the calculation rate.
[0068] Step S202: obtaining a first compensation value corresponding to the nth set of actual parameters according to the standard parameters, and performing parameter compensation on the nth set of actual parameters with the first compensation value.
[0069] Specifically, in the present scheme, each time a group of actual parameters is obtained, an iterative calculation is performed to compensate the actual parameters of the machined part. If the compensation of the current group of actual parameters does not achieve the compensation purpose, the next group of actual parameters is obtained to continue the compensation.
[0070] Specifically, after n groups of actual parameters are obtained, it is indicated that the compensation before the nth group of actual parameters is obtained does not achieve the compensation purpose. Therefore, the nth group of actual parameters in the n groups of actual parameters is compensated.
[0071] In one embodiment, as shown in Figure 4 Figure 4 A flowchart of a parameter compensation method for numerical control machining provided by an embodiment of the present application. When n = 1, that is, after the first iterative calculation, the step of obtaining a first compensation value corresponding to the nth group of actual parameters according to the standard parameter and compensating the nth group of actual parameters by the first compensation value includes:
[0072] Step S2021: obtaining the first group of actual parameters of the machined part.
[0073] Wherein, when the actual parameters of any machined part reach the parameter compensation trigger threshold, the first group of actual dimensions of the machined part is obtained from the machined part, and the first group of actual dimensions is converted into the first group of xy coordinate data, and then the x coordinate data or the y coordinate data is taken from the first group of xy coordinate data as the first group of actual parameters of the machined part.
[0074] Step S2022: calculating a first average value of a plurality of actual parameters in the first group of actual parameters.
[0075] Wherein, the first average value of the plurality of actual parameters in the first group of actual parameters is calculated to reflect the overall average of the first group of actual parameters.
[0076] Step S2023: calculating a second difference value between the first average value and the standard parameter, and taking the second difference value as a first compensation value corresponding to the first group of actual parameters.
[0077] Wherein, the second difference value between the first average value and the standard parameter is calculated to reflect the difference between the average value of the first group of actual parameters and the standard parameter. By taking the second difference value as the first compensation value corresponding to the first group of actual parameters, the difference between the average value of the first group of actual parameters and the standard parameter can be compensated into the actual parameters.
[0078] Step S2024: judging whether the actual parameters of the machined part after the compensation by the first compensation value are qualified.
[0079] Wherein, after parameter compensation with the first compensation value, it is judged whether the actual parameter of the machining part obtained at this time is qualified, if yes, the parameter after compensation with the first compensation value is used for machining. It should be noted that the actual parameter of the machining part at this time is not used for judging whether the machining part is a defective product, but is used for judging whether it is an optimal product.
[0080] Step S2025, if not, the step of obtaining the n+1 group of actual parameters of the machining part is executed.
[0081] Wherein, if the actual parameter of the machining part machined after parameter compensation with the first compensation value is not qualified, the next group of actual parameters is obtained.
[0082] In this embodiment, for the first group of actual parameters, the first average value of the plurality of actual parameters in the first group of actual parameters is calculated, the second difference value between the first average value and the standard parameter is calculated, and then the second difference value is used as the first compensation value for parameter compensation, so that the first iteration can be quickly performed, and the iteration rate is improved.
[0083] Step S203, the n+1 group of actual parameters of the machining part is obtained according to the n group of actual parameters after parameter compensation.
[0084] Wherein, after obtaining the first compensation value corresponding to the n group of actual parameters and performing parameter compensation on the n group of actual parameters with the first compensation value, if the actual parameter of the machining part machined after parameter compensation with the first compensation value is not qualified, the n+1 group of actual parameters of the machining part is obtained.
[0085] Step S204, the first difference value between each actual parameter in the n+1 group of actual parameters and the first compensation value is calculated.
[0086] Wherein, since the second group of actual data to the n+1 group of actual data are all data obtained after the previous iteration, in order to ensure that the data used in each iteration is at the same level, after obtaining the n+1 group of actual parameters of the machining part, each actual parameter in the n+1 group needs to be subtracted by the compensation value of the last time.
[0087] Step S205, the second compensation value corresponding to the n+1 group of actual parameters is obtained according to the n group of actual parameters and the first difference value, and the n+1 group of actual parameters is compensated with the second compensation value.
[0088] Specifically, the step of obtaining the second compensation value corresponding to the (n+1)th set of actual parameters according to the n sets of actual parameters and the first difference value comprises: obtaining a third compensation value corresponding to each set of actual parameters in the n sets of actual parameters; calculating a third difference value of each actual parameter in any set of actual parameters in the n sets of actual parameters and a third compensation value corresponding to a previous set of actual parameters of the any set of actual parameters; calculating a second average value of the first set of actual parameters, the first difference value and the third difference value; calculating a third difference value of the second average value and the standard parameter, and taking the third difference value as the second compensation value corresponding to the (n+1)th set of actual parameters.
[0089] Specifically, taking the first set of actual parameters comprising four actual parameters, the second set of actual parameters comprising nine actual parameters and n=1 as an example, the second compensation value corresponding to the (n+1)th set of actual parameters (the second set of actual parameters) is as follows:
[0090]
[0091] Wherein, y1 is the first compensation value corresponding to the first set of actual parameters, and offset is the second compensation value corresponding to the second set of actual parameters.
[0092] In one embodiment, as shown in Figure 5 , a flowchart of a parameter compensation method of numerical control machining provided by the embodiment of the application is shown. Figure 5 The method adds a secondary compensation operation on the basis of parameter compensation of the (n+1)th set of actual parameters, and comprises:
[0093] Step S206: determining whether the actual parameters of the machined part after parameter compensation by the second compensation value are qualified.
[0094] Wherein, if the actual parameters of the machined part after parameter compensation by the second compensation value are qualified, step S209 is executed; if the actual parameters of the machined part after parameter compensation by the second compensation value are not qualified, step S207 is executed.
[0095] Step S207: obtaining the (n+2)th set of actual parameters of the machined part.
[0096] Wherein, after obtaining the (n+2)th set of actual parameters of the machined part, step S208 is executed.
[0097] Step S208: updating the (n+2)th set of actual parameters to the (n+1)th set of actual parameters, and updating the second compensation value to the first compensation value.
[0098] After the n+1th set of actual parameters and the first compensation value are updated, the step of calculating the first difference between each actual parameter in the n+1th set of actual parameters and the first compensation value is performed again with the updated n+1th set of actual parameters and the first compensation value, that is, step S204 is performed again.
[0099] In step S209, the iteration compensation is stopped, and the parameter compensation is performed with the second compensation value, and the part is processed.
[0100] If the actual parameters of the processed part are qualified after the parameter compensation is performed with the second compensation value, the iteration compensation is stopped, and the parameter compensation is performed with the second compensation value, and the part is processed.
[0101] In this embodiment, the iteration is restarted by updating the n+1th set of actual parameters and the first compensation value, and the secondary compensation operation is completed.
[0102] In one embodiment, the number of actual parameters in the n+1th set of actual parameters is not less than the number of actual parameters in the n th set of actual parameters; and the number of actual parameters in the n+2th set of actual parameters is not less than the number of actual parameters in the n+1th set of actual parameters.
[0103] In this embodiment, by setting the number of parameters in the latter set of actual parameters to be not less than the number of parameters in the former set of actual parameters, the number of iterations can be effectively reduced, and the parameter compensation efficiency can be improved.
[0104] In one embodiment, the step of judging whether the actual parameters of the processed part are qualified after the parameter compensation is performed with the second compensation value includes: calculating a compensation threshold according to the standard parameters and the process corresponding to the processed part; if the second compensation value is not greater than the compensation threshold, it is determined that the actual parameters of the processed part are qualified after the parameter compensation is performed with the second compensation value; and if the second compensation value is greater than the compensation threshold, it is determined that the actual parameters of the processed part are not qualified after the parameter compensation is performed with the second compensation value.
[0105] The tolerance of the processed part is calculated according to the following formula:
[0106]
[0107] Cp is the industry standard corresponding to the processed part, σ is the process corresponding to the processed part, USL is the upper limit of the specification of the processed part, LSL is the lower limit of the specification of the processed part, and T is the tolerance. Cp and σ are parameters that can be set by the user.
[0108] The tolerance and the USL and LSL can be calculated according to the above formula, and the absolute values of the USL and LSL are usually equal. The parameter range of the processed part when it is compliant is determined according to the standard parameter, the USL and the LSL, and is:
[0109] LSL+standard parameter≤standard parameter≤USL+standard parameter.
[0110] The actual parameter corresponding to the second compensation value is subtracted from the standard parameter range to obtain a compensation threshold. If the second compensation value is not greater than the compensation threshold, it is determined that the actual parameter of the processed part after parameter compensation with the second compensation value is qualified, and if the second compensation value is greater than the compensation threshold, it is determined that the actual parameter of the processed part after parameter compensation with the second compensation value is unqualified.
[0111] The present application provides a parameter compensation method for numerical control machining, which comprises a first compensation operation: obtaining n groups of actual parameters of a processed part and a standard parameter of the processed part, wherein the n groups of actual parameters are arranged in a predetermined order, and n≥1; obtaining a first compensation value corresponding to the nth group of actual parameters according to the standard parameter, and performing parameter compensation on the nth group of actual parameters with the first compensation value; obtaining an n+1th group of actual parameters of the processed part according to the nth group of actual parameters after parameter compensation; calculating a first difference value between each actual parameter in the n+1th group of actual parameters and the first compensation value; obtaining a second compensation value corresponding to the n+1th group of actual parameters according to the n groups of actual parameters and the first difference value, and performing parameter compensation on the n+1th group of actual parameters with the second compensation value. The present application can perform difference value iterative analysis on the actual parameters as data samples and the target value by first determining the first compensation value corresponding to the nth group of actual parameters, then calculating the first difference value between each actual parameter in the n+1th group of actual parameters and the first compensation value, and finally determining the second compensation value corresponding to the n+1th group of actual parameters based on the first difference value, so that the data used in each iteration is at the same level, which not only ensures rapid completion of parameter compensation and effectively improves compensation efficiency, but also effectively improves compensation accuracy and yield.
[0112] The above describes the method of the present application. In order to better implement the method of the present application, the device of the present application is introduced as follows.
[0113] As shown in Figure 6 In one embodiment, the present application provides a parameter compensation device for numerical control machining, which comprises:
[0114] A first parameter acquisition module 601 is configured to obtain n groups of actual parameters of a processed part and a standard parameter of the processed part, wherein the n groups of actual parameters are arranged in a predetermined order, and n≥1;
[0115] The first parameter compensation module 602 is used to obtain a first compensation value corresponding to the nth group of actual parameters according to the standard parameters, and to perform parameter compensation on the nth group of actual parameters using the first compensation value.
[0116] The second parameter acquisition module 603 is used to acquire the (n+1)th set of actual parameters of the processed part based on the nth set of actual parameters after parameter compensation.
[0117] The difference calculation module 604 is used to calculate the first difference between each actual parameter in the (n+1)th group of actual parameters and the first compensation value;
[0118] The second parameter compensation module 605 is used to obtain a second compensation value corresponding to the (n+1)th group of actual parameters based on the n groups of actual parameters and the first difference, and to perform parameter compensation on the (n+1)th group of actual parameters using the second compensation value.
[0119] like Figure 7 As shown, in one embodiment, this is an internal structural diagram of a computer device. This computer device may be a parameter compensation device for CNC machining, or a terminal or server connected to a parameter compensation device for CNC machining. Figure 7 As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and may also store a computer program. When executed by the processor, this computer program enables the processor to implement a parameter compensation method for CNC machining. The internal memory may also store a computer program, which, when executed by the processor, enables the processor to implement a parameter compensation method for CNC machining. The network interface is used for communication with external devices. Those skilled in the art will understand that… Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0120] In one embodiment, the parameter compensation method for CNC machining provided in this application can be implemented as a computer program, which can be implemented in various ways, such as... Figure 7 The computer device shown runs on this computer. The computer device's memory can store various program templates that make up the parameter compensation device for the CNC machining. For example, a first parameter acquisition module 601, a first parameter compensation module 602, a second parameter acquisition module 603, a difference calculation module 604, and a second parameter compensation module 605.
[0121] A computer device comprises a memory and a processor, the memory storing a computer program, the computer program being executed by the processor to cause the processor to perform the following steps: obtaining n sets of actual parameters of a machining part and a standard parameter of the machining part, wherein the n sets of actual parameters are arranged in a preset order, and n is greater than or equal to 1; obtaining a first compensation value corresponding to the n th set of actual parameters according to the standard parameter, and performing parameter compensation on the n th set of actual parameters by using the first compensation value; obtaining an (n+1) th set of actual parameters of the machining part according to the n th set of actual parameters after parameter compensation; calculating a first difference value between each actual parameter in the (n+1) th set of actual parameters and the first compensation value; obtaining a second compensation value corresponding to the (n+1) th set of actual parameters according to the n sets of actual parameters and the first difference value, and performing parameter compensation on the (n+1) th set of actual parameters by using the second compensation value.
[0122] In one embodiment, the computer program is executed by the processor to cause the processor to further perform the following steps: judging whether the actual parameters of the machining part after parameter compensation by using the second compensation value are qualified; if not, obtaining an (n+2) th set of actual parameters of the machining part, updating the (n+2) th set of actual parameters to the (n+1) th set of actual parameters, updating the second compensation value to the first compensation value, and re-executing the step of calculating the first difference value between each actual parameter in the (n+1) th set of actual parameters and the first compensation value by using the updated (n+1) th set of actual parameters and the first compensation value.
[0123] In one embodiment, the number of actual parameters in the (n+1) th set of actual parameters is not less than the number of actual parameters in the n th set of actual parameters; and the number of actual parameters in the (n+2) th set of actual parameters is not less than the number of actual parameters in the (n+1) th set of actual parameters.
[0124] In one embodiment, when n=1, the step of obtaining the first compensation value corresponding to the n th set of actual parameters according to the standard parameter, and performing parameter compensation on the n th set of actual parameters by using the first compensation value comprises: obtaining a first set of actual parameters of the machining part; calculating a first average value of a plurality of actual parameters in the first set of actual parameters; calculating a second difference value between the first average value and the standard parameter, and taking the second difference value as the first compensation value corresponding to the first set of actual parameters, and performing parameter compensation on the n th set of actual parameters by using the first compensation value; judging whether the actual parameters of the machining part after parameter compensation by using the first compensation value are qualified; if not, performing the step of obtaining an (n+1) th set of actual parameters of the machining part.
[0125] In one embodiment, the step of obtaining the second compensation value corresponding to the n+1th set of actual parameters from the n sets of actual parameters and the first difference value comprises: obtaining a third compensation value corresponding to each set of actual parameters in the n sets of actual parameters; calculating a third difference value between each actual parameter in any set of actual parameters in the n sets of actual parameters and a third compensation value corresponding to a previous set of actual parameters of the any set of actual parameters; calculating a second average value of the first set of actual parameters, the first difference value and the third difference value; calculating a fourth difference value between the second average value and the standard parameter, and taking the fourth difference value as the second compensation value corresponding to the n+1th set of actual parameters.
[0126] In one embodiment, the step of obtaining the n sets of actual parameters of the processed part comprises: obtaining n sets of actual dimensions of the processed part; converting the n sets of actual dimensions into n sets of xy coordinate data; and obtaining the n sets of actual parameters of the processed part from the n sets of xy coordinate data.
[0127] In one embodiment, the step of determining whether the actual parameters of the processed part after parameter compensation with the second compensation value are qualified comprises: calculating a compensation threshold value according to the standard parameter and a corresponding process of the processed part; if the second compensation value is not greater than the compensation threshold value, determining that the actual parameters of the processed part after parameter compensation with the second compensation value are qualified, and if the second compensation value is greater than the compensation threshold value, determining that the actual parameters of the processed part after parameter compensation with the second compensation value are not qualified.
[0128] A computer readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the following steps: obtaining n sets of actual parameters of a processed part and a standard parameter of the processed part, wherein the n sets of actual parameters are arranged in a preset order, and n≥1; obtaining a first compensation value corresponding to an nth set of actual parameters from the standard parameter, and performing parameter compensation on the nth set of actual parameters with the first compensation value; obtaining an n+1th set of actual parameters of the processed part from the nth set of actual parameters after parameter compensation; calculating a first difference value between each actual parameter in the n+1th set of actual parameters and the first compensation value; and obtaining a second compensation value corresponding to the n+1th set of actual parameters from the n sets of actual parameters and the first difference value, and performing parameter compensation on the n+1th set of actual parameters with the second compensation value.
[0129] In one embodiment, the computer program, after being executed by the processor, causes the processor to further perform the steps of: judging whether the actual parameters of the processed part after parameter compensation with the second compensation value are qualified; if not, obtaining an (n+2)th set of actual parameters of the processed part, and updating the (n+2)th set of actual parameters to the (n+1)th set of actual parameters, and updating the second compensation value to the first compensation value, and re-executing the step of calculating the first difference between each actual parameter in the (n+1)th set of actual parameters and the first compensation value with the updated (n+1)th set of actual parameters and the first compensation value.
[0130] In one embodiment, the number of actual parameters in the (n+1)th set of actual parameters is not less than the number of actual parameters in the nth set of actual parameters; and the number of actual parameters in the (n+2)th set of actual parameters is not less than the number of actual parameters in the (n+1)th set of actual parameters.
[0131] In one embodiment, when n=1, the step of obtaining the first compensation value corresponding to the nth set of actual parameters according to the standard parameter, and performing parameter compensation on the nth set of actual parameters with the first compensation value, comprises: obtaining a first set of actual parameters of the processed part; calculating a first average value of a plurality of actual parameters in the first set of actual parameters; calculating a second difference between the first average value and the standard parameter, and taking the second difference as the first compensation value corresponding to the first set of actual parameters, and performing parameter compensation on the nth set of actual parameters with the first compensation value; judging whether the actual parameters of the processed part after parameter compensation with the first compensation value are qualified; if not, performing the step of obtaining an (n+1)th set of actual parameters of the processed part.
[0132] In one embodiment, the step of obtaining the second compensation value of the (n+1)th set of actual parameters according to the nth set of actual parameters and the first difference, comprises: obtaining a third compensation value corresponding to each set of actual parameters in the nth set of actual parameters; calculating a third difference between each actual parameter in any one set of actual parameters in the nth set of actual parameters and the third compensation value corresponding to the previous set of actual parameters of the any one set of actual parameters; calculating a second average value of the first set of actual parameters in the nth set of actual parameters, the first difference and the third difference; calculating a fourth difference between the second average value and the standard parameter, and taking the fourth difference as the second compensation value corresponding to the (n+1)th set of actual parameters.
[0133] In one embodiment, the step of obtaining an nth set of actual parameters of the processed part, comprises: obtaining an nth set of actual dimensions of the processed part; converting the nth set of actual dimensions into an nth set of xy coordinate data; and obtaining an nth set of actual parameters of the processed part from the nth set of xy coordinate data.
[0134] In one embodiment, the step of judging whether the actual parameter of the processed part after parameter compensation with the second compensation value is qualified includes: calculating a compensation threshold according to the standard parameter and a process corresponding to the processed part; if the second compensation value is not greater than the compensation threshold, judging that the actual parameter of the processed part after parameter compensation with the second compensation value is qualified; and if the second compensation value is greater than the compensation threshold, judging that the actual parameter of the processed part after parameter compensation with the second compensation value is not qualified.
[0135] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by a computer program instructing related hardware, and the program can be stored in a computer readable storage medium. When the program is executed, the program can include the processes of the above-mentioned embodiments. The storage medium can be a magnetic disc, an optical disc, a read-only memory (ROM), a random access memory (RAM), or the like.
[0136] The above only describes the preferred embodiments of the present application, and cannot limit the scope of the present application. Any equivalent changes made according to the claims of the present application are still within the scope of the present application.
Claims
1. A parameter compensation method for numerical control machining, characterized in that, the method comprises: obtaining n sets of actual parameters of a machining part and a standard parameter of the machining part, wherein the n sets of actual parameters are arranged in a preset order, and n≥1; obtaining a first compensation value corresponding to the nth set of actual parameters according to the standard parameter, and performing parameter compensation on the nth set of actual parameters with the first compensation value; when n=1, obtaining the first set of actual parameters of the machining part; calculating a first average value of a plurality of actual parameters in the first set of actual parameters; calculating a second difference value between the first average value and the standard parameter, taking the second difference value as a first compensation value corresponding to the first set of actual parameters, and performing parameter compensation on the first set of actual parameters with the first compensation value; and judging whether the actual parameters of the machining part after the parameter compensation with the first compensation value are qualified; if not, performing the step of obtaining the n+1th set of actual parameters of the machining part; obtaining the n+1th set of actual parameters of the machining part according to the nth set of actual parameters after the parameter compensation; calculating a first difference value between each actual parameter in the n+1th set of actual parameters and the first compensation value; obtaining a third compensation value corresponding to each set of actual parameters in the n sets of actual parameters; calculating a third difference value between each actual parameter in any set of actual parameters in the n sets of actual parameters except the first set of actual parameters and a third compensation value corresponding to a previous set of actual parameters of the any set of actual parameters; calculating a second average value according to the first set of actual parameters in the n sets of actual parameters, the first difference value and the third difference value; calculating a fourth difference value between the second average value and the standard parameter, and taking the fourth difference value as a second compensation value corresponding to the n+1th set of actual parameters; obtaining a second compensation value corresponding to the n+1th set of actual parameters according to the n sets of actual parameters and the first difference value, and performing parameter compensation on the n+1th set of actual parameters with the second compensation value. 2.The parameter compensation method according to claim 1, characterized in that, the method further comprises: judging whether the actual parameters of the machining part after the parameter compensation on the n+1th set of actual parameters with the second compensation value are qualified; if not, obtaining the n+2th set of actual parameters of the machining part, updating the n+2th set of actual parameters to the n+1th set of actual parameters, updating the second compensation value to the first compensation value, and re-performing the step of calculating the first difference value between each actual parameter in the n+1th set of actual parameters and the first compensation value with the updated n+1th set of actual parameters and the first compensation value. 3.The parameter compensation method according to claim 2, characterized in that, a number of actual parameters in the n+1th set of actual parameters is not less than a number of actual parameters in the nth set of actual parameters; a number of actual parameters in the n+2th set of actual parameters is not less than a number of actual parameters in the n+1th set of actual parameters. 4.The parameter compensation method according to claim 1, characterized in that, The step of acquiring the n sets of actual parameters of the machining part comprises: acquiring n sets of actual dimensions of the machining part; converting the n sets of actual dimensions into n sets of xy coordinate data; acquiring the n sets of actual parameters of the machining part from the n sets of xy coordinate data.
5. The parameter compensation method according to claim 2, wherein the step of judging whether the actual parameters of the machining part after the parameter compensation with the second compensation value are qualified comprises: calculating a compensation threshold according to the standard parameters and the process corresponding to the machining part; if the second compensation value is not greater than the compensation threshold, it is determined that the actual parameters of the machining part after the parameter compensation with the second compensation value are qualified, and if the second compensation value is greater than the compensation threshold, it is determined that the actual parameters of the machining part after the parameter compensation with the second compensation value are unqualified.
6. A parameter compensation device for numerical control machining, comprising: a first parameter acquisition module, configured to acquire n sets of actual parameters of a machining part and standard parameters of the machining part, wherein the n sets of actual parameters are arranged in a preset order; and n≥1; a first parameter compensation module, configured to obtain a first compensation value corresponding to the nth set of actual parameters according to the standard parameters, and perform parameter compensation on the nth set of actual parameters with the first compensation value; when n=1, the first set of actual parameters of the machining part is acquired; a first average value of a plurality of actual parameters in the first set of actual parameters is calculated; a second difference value between the first average value and the standard parameters is calculated, and the second difference value is taken as the first compensation value corresponding to the first set of actual parameters, and parameter compensation is performed on the first set of actual parameters with the first compensation value; whether the actual parameters of the machining part after the parameter compensation with the first compensation value are qualified is judged; if not, the step of acquiring the n+1th set of actual parameters of the machining part is executed; a second parameter acquisition module, configured to acquire the n+1th set of actual parameters of the machining part according to the nth set of actual parameters after the parameter compensation; a difference value calculation module, configured to calculate a first difference value between each actual parameter in the n+1th set of actual parameters and the first compensation value; a second parameter compensation module, configured to acquire a third compensation value corresponding to each set of actual parameters in the n sets of actual parameters; a third difference value between each actual parameter in any one set of actual parameters in the n sets of actual parameters except the first set of actual parameters and a third compensation value corresponding to a previous set of actual parameters of the any one set of actual parameters is calculated; a second average value is calculated according to the first set of actual parameters in the n sets of actual parameters, the first difference value and the third difference value; a fourth difference value between the second average value and the standard parameters is calculated, and the fourth difference value is taken as a second compensation value corresponding to the n+1th set of actual parameters; a second compensation value corresponding to the n+1th set of actual parameters is obtained according to the n sets of actual parameters and the first difference value, and parameter compensation is performed on the n+1th set of actual parameters with the second compensation value.
7. A computer device, comprising: A computer program product comprising a memory storing a computer program, the computer program being executable by a processor to cause the processor to perform the parameter compensation method according to any one of claims 1-5.
8. A computer readable storage medium, characterized in that, a computer program is stored, the computer program being executable by a processor to cause the processor to perform the parameter compensation method according to any one of claims 1-5.
Citation Information
Patent Citations
Intelligent debugging method and system based on optimization compensation
CN113589755A
Part machining parameter compensation method and device, electronic equipment and readable storage medium
CN115494792A