A method, device, medium and equipment for obtaining plane contour error in CNC machine tool processing
By setting the window area in the CNC machine tool to calculate the contour error of the actual track point, the problems of low calculation efficiency and large error in the prior art are solved, and more accurate and efficient contour error acquisition are achieved.
Patent Information
- Application Number
- CN202411196058.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-29
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2044-08-29
AI Technical Summary
The prior art has large deviations in calculating the plane profile error of CNC machine tools, especially when the actual trajectory and the theoretical trajectory data point distribution are inconsistent, resulting in low calculation efficiency and error deviation, and cannot effectively solve the abnormal distribution of point positions. The outline error calculation deviation.
By setting the window area to calculate the contour error of the actual trajectory points one by one, and using the current actual trajectory points and theoretical trajectory points in the window area to calculate the error, avoid point abnormal distribution and traversal calculation, and improve calculation efficiency and accuracy.
More accurate contour error calculation is achieved, calculation efficiency is improved, misalignment and relocation are avoided, and the accurate acquisition of contour errors of the entire machining track plane is ensured.
Smart Images

Figure CN118707894B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of numerical control machining, and in particular to a method, device, medium and equipment for obtaining a plane contour error during machining of a numerical control machine tool. Background Art
[0002] One of the common methods to measure whether the quality of parts processed by a CNC machine tool meets the requirements is to check the surface profile error of the parts. At present, the detection of part surface profile is based on the processing of physical parts, and most of them are obtained by sending the processed parts for inspection by a three-coordinate measuring machine. Although this method is the most direct and accurate, the actual processing and inspection in the actual production environment require relatively high manpower costs and time, which is not conducive to improving efficiency and cost control. The surface profile of CNC machined parts is a collection of machining trajectories from the motion of each axis of the CNC machine tool to the tool tip. Therefore, determining the contour error of the CNC machine tool machining trajectory is the most efficient and direct method to obtain the surface profile size of CNC machined parts.
[0003] Using various sensors to detect and obtain the processing trajectory data of CNC machine tools is an ideal means to improve detection efficiency. At present, most CNC machine tools have a considerable number of position sensing devices integrated inside them. These sensing devices can easily obtain the position feedback data of the interpolator and grating ruler in the machine tool processing process, that is, the theoretical and actual discrete point set of time domain position data, so as to calculate the contour error between the two and then evaluate the servo processing performance of the CNC machine tool.
[0004] The contour error is achieved by calculating the shortest distance between the actual trajectory and the corresponding theoretical trajectory. The time domain position data sequence in the CNC machining process is a collection of discrete points. The contour error is to calculate the shortest normal vector distance from the actual point to the theoretical line segment formed by the corresponding two theoretical points. The actual calculation process is based on the time series position point data to calculate the contour error. Therefore, how to determine the theoretical line segment corresponding to the "shortest normal vector distance" of the actual point at the current moment becomes the key to calculating the contour error, that is, it must satisfy both the shortest distance and the corresponding position relationship.
[0005] However, since there will inevitably be inconsistencies between the actual processing trajectory and the theoretical processing trajectory data, that is, there is a deviation between the theoretical point given by the interpolator and the actual point fed back by the grating ruler, the theoretical position data and the actual position data often have different trajectory point density distributions, resulting in "misalignment" of the point distribution of the two, "return" caused by unstable processing trajectory, and "no correspondence" at the beginning and end of the contour. Abnormal point distribution phenomena, resulting in the inability to simply use the simultaneous or linear time series points of the actual points and theoretical points as data for contour error calculation during the calculation process.
[0006] In order to solve these problems existing in the contour error calculation, patent CN107748540A proposes a method of extreme value search to calculate the contour error. This method is to establish a contour error function of the time vector, and use Newton's method to differentiate the function and take the minimum value as the contour error. However, this method requires the actual motion trajectory and the theoretical motion trajectory function to be known in advance. In the actual processing process, the motion trajectory is difficult to express through an accurate function. In addition, the position data obtained by the sensor is a set of discrete points. Therefore, this method is not suitable for discrete contour error estimation.
[0007] Patent CN108646669A proposes an approximate evaluation method for contour error using the minimum distance from the actual point to the theoretical triangular mesh. The theoretical triangular mesh of this method is composed of theoretical points and their adjacent points corresponding to the actual points in units of interpolation period. It cannot solve the contour error calculation deviation caused by the abnormal distribution of points in the data.
[0008] Patent CN109240214B proposes a contour error estimation method based on three-dimensional linear spline interpolation, in which the minimum normal distance of the actual point along the theoretical position after interpolation is used as the contour error of the point. However, a theoretical point traversal operation is required when searching for the corresponding normal vector at each actual point, which consumes a lot of computing time when the interpolation density is high. The method uses a normal vector with an inconsistent or distant position as the basis. If the normal vector distance is shorter at this time, the calculation is wrong, which does not meet the definition of contour error and leads to a calculation error. Summary of the invention
[0009] The main purpose of the present application is to provide a method, device, medium and equipment for obtaining the plane contour error of CNC machine tools, aiming to solve the problem of large deviation in obtaining the plane contour error of CNC machine tools in the prior art.
[0010] To achieve the above objectives, the technical solutions adopted in the embodiments of the present application are as follows:
[0011] In a first aspect, an embodiment of the present application provides a method for obtaining a plane contour error during machining of a CNC machine tool, comprising the following steps:
[0012] Obtain theoretical trajectory points and actual trajectory points during CNC machine tool processing;
[0013] Starting from the initial actual trajectory point, the target actual trajectory point is determined to be the center point of the first window area; wherein the target actual trajectory point is the current actual trajectory point;
[0014] According to all theoretical trajectory points and actual trajectory points of the target in the first window area, a contour error of the target trajectory point is obtained;
[0015] Switch the target actual trajectory point to the next actual trajectory point, and return to the step of determining the target actual trajectory point as the center point of the first window area until all actual trajectory points are acquired to obtain the machining trajectory plane contour error.
[0016] In a possible implementation manner of the first aspect, starting from an initial actual trajectory point, before determining the target actual trajectory point as a center point of the first window area, the method further includes:
[0017] Determine whether the actual trajectory point of the target satisfies the criterion of the first window area;
[0018] When the target actual trajectory point meets the criterion of the first window area, a step of starting from the initial actual trajectory point and determining the target actual trajectory point as the center point of the first window area is performed.
[0019] In a possible implementation of the first aspect, when the actual trajectory point of the target does not satisfy the criterion of the first window area;
[0020] Confirm that the actual trajectory point of the target meets the criteria of the second window area;
[0021] Starting from the initial actual trajectory point, determining the target actual trajectory point as the center point of the first window area includes:
[0022] Starting from the initial actual trajectory point, the target actual trajectory point is determined as the center point of the second window area;
[0023] According to all theoretical trajectory points and actual target trajectory points in the first window area, the contour error of the target trajectory point is obtained, including:
[0024] According to all theoretical trajectory points and actual target trajectory points in the second window area, the contour error of the target trajectory point is obtained.
[0025] In a possible implementation of the first aspect, before obtaining the contour error of the target trajectory point according to all theoretical trajectory points and the target actual trajectory points in the second window area, the method further includes:
[0026] Determine whether the modulus of the target theoretical trajectory point among all the theoretical trajectory points in the second window area meets a preset condition;
[0027] When the modulus of the target theoretical trajectory point among all the theoretical trajectory points in the second window area meets a preset condition, a step of obtaining a contour error of the target trajectory point according to all the theoretical trajectory points and the target actual trajectory point in the second window area is performed.
[0028] In a possible implementation manner of the first aspect, when a modulus of a target theoretical trajectory point among all theoretical trajectory points in the second window area does not satisfy a preset condition;
[0029] The second window area is expanded and the step of returning to determining whether the modulus of the target theoretical trajectory point among all the theoretical trajectory points in the second window area meets the preset condition is returned until the modulus of the target theoretical trajectory point among all the theoretical trajectory points in the second window area meets the preset condition.
[0030] In a possible implementation of the first aspect, before obtaining theoretical trajectory points and actual trajectory points in a CNC machine tool machining process, the method further includes:
[0031] Obtain the interpolator theoretical points and grating ruler actual points of the five axes of the CNC machine tool;
[0032] Obtain theoretical and actual trajectory points during CNC machine tool processing, including:
[0033] According to the interpolator theoretical points of the five axes of the CNC machine tool and the actual points of the grating ruler, the theoretical trajectory points and the actual trajectory points in the machining process of the CNC machine tool are obtained respectively.
[0034] In a possible implementation manner of the first aspect, starting from an initial actual trajectory point, before determining the target actual trajectory point as a center point of the first window area, the method further includes:
[0035] The side length of the first window area is determined according to the dimensional tolerance band width of the part to be processed and the window size coefficient.
[0036] In a second aspect, an embodiment of the present application provides a device for obtaining a plane contour error during machining of a CNC machine tool, comprising:
[0037] An acquisition module, which is used to acquire theoretical trajectory points and actual trajectory points during the machining process of the CNC machine tool;
[0038] A determination module, the determination module is used to determine the target actual trajectory point as the center point of the first window area starting from the initial actual trajectory point; wherein the target actual trajectory point is the current actual trajectory point;
[0039] A first acquisition module, the first acquisition module is used to obtain the contour error of the target trajectory point according to all theoretical trajectory points and the target actual trajectory points in the first window area;
[0040] The target acquisition module is used to switch the target actual trajectory point to the next actual trajectory point, and return to the step of determining the target actual trajectory point as the center point of the first window area until all actual trajectory points are acquired to obtain the machining trajectory plane contour error.
[0041] In a third aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program. When the computer program is loaded and executed by a processor, a method for obtaining a plane contour error in machining a CNC machine tool as provided in any one of the first aspects above is implemented.
[0042] In a fourth aspect, an embodiment of the present application provides an electronic device, including a processor and a memory, wherein:
[0043] The memory is used to store computer programs;
[0044] The processor is used to load and execute a computer program so that the electronic device executes the method for obtaining a plane contour error during machining of a numerically controlled machine tool as provided in any one of the first aspects above.
[0045] Compared with the prior art, the beneficial effects of this application are:
[0046] The embodiment of the present application proposes a method, device, medium and equipment for obtaining the plane contour error of a CNC machine tool. The method includes: obtaining theoretical trajectory points and actual trajectory points in the CNC machine tool processing process; starting from the initial actual trajectory point, determining the target actual trajectory point as the center point of the first window area; wherein the target actual trajectory point is the current actual trajectory point; obtaining the contour error of the target trajectory point according to all theoretical trajectory points and target actual trajectory points in the first window area; switching the target actual trajectory point to the next actual trajectory point, and returning to the step of determining the target actual trajectory point as the center point of the first window area, until all actual trajectory points are acquired, and obtaining the plane contour error of the processing trajectory. The present application sets a window area to calculate the contour error of the actual trajectory point one by one, and obtains the contour error of each actual trajectory point through the current actual trajectory point and other theoretical trajectory points in the window area, thereby obtaining the contour error of the entire processing trajectory plane. Since the window setting limits the calculation of the contour error to the window area, the abnormal distribution of points such as dislocation and return is avoided, and there is no need to perform a full range of traversal calculations for each point, while improving the calculation efficiency, a more accurate calculation of the contour error is achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 A schematic diagram of the structure of an electronic device of a hardware operating environment involved in an embodiment of the present application;
[0048] Figure 2 A schematic diagram of a flow chart of a method for obtaining a plane contour error in CNC machine tool processing provided in an embodiment of the present application;
[0049] Figure 3 A schematic diagram of a theoretical trajectory and an actual trajectory of an S-shaped part to be processed in a method for obtaining a plane contour error in CNC machine tool processing provided in an embodiment of the present application;
[0050] Figure 4 A schematic diagram of the second window area in the method for obtaining a plane contour error in CNC machine tool processing provided in an embodiment of the present application;
[0051] Figure 5 A schematic diagram of a flow chart of a method for obtaining a plane contour error in machining a CNC machine tool provided in an embodiment of the present application in one implementation manner;
[0052] Figure 6 A schematic diagram of a module of a device for obtaining a plane contour error in CNC machine tool processing provided in an embodiment of the present application;
[0053] Markings in the figure: 101 - processor, 102 - communication bus, 103 - network interface, 104 - user interface, 105 - memory. DETAILED DESCRIPTION
[0054] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0055] The main solution of the embodiment of the present application is: obtaining theoretical trajectory points and actual trajectory points in the CNC machine tool processing process; starting from the initial actual trajectory point, determining the target actual trajectory point as the center point of the first window area; wherein the target actual trajectory point is the current actual trajectory point; obtaining the contour error of the target trajectory point based on all theoretical trajectory points and target actual trajectory points in the first window area; switching the target actual trajectory point to the next actual trajectory point, and returning to the step of determining the target actual trajectory point as the center point of the first window area, until all actual trajectory points are acquired, and obtaining the machining trajectory plane contour error.
[0056] The present application provides a solution, which sets a window area to calculate the contour errors of actual trajectory points one by one, and obtains the contour error of each actual trajectory point through the current actual trajectory point and other theoretical trajectory points in the window area, thereby realizing the acquisition of the contour error of the entire processing trajectory plane. Since the window setting limits the calculation of contour errors to the window area, abnormal distribution of points such as misalignment and repositioning is avoided, and there is no need to traverse the entire range for each point. While improving the calculation efficiency, more accurate calculation of contour errors is achieved.
[0057] See attached Figure 1 , attached Figure 1This is a schematic diagram of the structure of an electronic device of the hardware operating environment involved in the embodiment of the present application. The electronic device may include: a processor 101, such as a central processing unit (CPU), a communication bus 102, a user interface 104, a network interface 103, and a memory 105. Among them, the communication bus 102 is used to realize the connection and communication between these components. The user interface 104 may include a display (Display), an input unit such as a keyboard (Keyboard), and the user interface 104 may also include a standard wired interface and a wireless interface. The network interface 103 may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (WIreless-FIdelity, WI-FI) interface). The memory 105 may optionally be a storage device independent of the aforementioned processor 101. The memory 105 may be a high-speed random access memory (RAM) memory, or it may be a stable non-volatile memory (NVM), such as at least one disk storage. The processor 101 may be a general-purpose processor, including a central processing unit, a network processor, etc., or it may be a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component.
[0058] Those skilled in the art will appreciate that Figure 1 The structure shown in the figure does not constitute a limitation on the electronic device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0059] As attached Figure 1 As shown, the memory 105 as a storage medium may include an operating system, a network communication module, a user interface module, and a device for acquiring a plane contour error in a CNC machine tool.
[0060] In the attached Figure 1 In the electronic device shown, the network interface 103 is mainly used for data communication with the network server; the user interface 104 is mainly used for data interaction with the user; the processor 101 and the memory 105 in the present application can be set in the electronic device, and the electronic device calls the CNC machine tool processing plane contour error acquisition device stored in the memory 105 through the processor 101, and executes the CNC machine tool processing plane contour error acquisition method provided in the embodiment of the present application.
[0061] See attached Figure 2 Based on the hardware device of the aforementioned embodiment, the embodiment of the present application provides a method for obtaining a plane contour error in a CNC machine tool, comprising the following steps:
[0062] S10: Obtain theoretical trajectory points and actual trajectory points during the CNC machine tool processing process.
[0063] In the specific implementation process, the theoretical trajectory points and the actual trajectory points are the theoretical trajectory and the actual trajectory of the tool tip point when the CNC machine tool processes a certain part to be processed. The so-called machining plane contour error is the contour error of the surface of the processed part. It is usually obtained by the interpolator and grating ruler of the five-axis of the CNC machine tool, that is, before obtaining the theoretical trajectory points and the actual trajectory points in the CNC machine tool processing process, the method also includes:
[0064] Obtain the interpolator theoretical points and grating ruler actual points of the five axes of the CNC machine tool;
[0065] Obtain theoretical and actual trajectory points during CNC machine tool processing, including:
[0066] According to the interpolator theoretical points of the five axes of the CNC machine tool and the actual points of the grating ruler, the theoretical trajectory points and the actual trajectory points in the machining process of the CNC machine tool are obtained respectively.
[0067] In the specific implementation process, taking a gantry CA swing head five-axis CNC machine tool as an example, the machining motion trajectory is the S specimen machining contour, as shown in the attached Figure 3 As shown, the position coordinate data of the interpolator theoretical point and the grating ruler actual point of the machine tool X, Y, Z, A, and C axes are collected by the CNC machine tool sensor:
[0068]
[0069] in , t is the discrete time series obtained by acquisition, and its sampling frequency is f; and They are the theoretical and actual position coordinates of the X, Y, Z, A, and C axes respectively.
[0070] The multi-body system theory is used to establish the mapping relationship from the axis position to the tool tip position. First, the topological structure of the CNC machine tool is described by a low-order body array:
[0071] K n ( j )= i
[0072] Where K is the low-order body operator, i and j represent the low-order body number and high-order body number in the adjacent motion units in the machine tool kinematic pair, respectively, and n is the order of the high-order body j relative to the low-order body i.
[0073] The coordinate system O can be obtained from the low-order body array i-xiyizi To j-xjyjzjThe coordinate transformation matrix, that is, the motion transfer matrix from the bed to the tool tip:
[0074]
[0075] Where, T ijs (M) is called the translational motion matrix, T ij (x) , T ij (y), T ij (z) is called the basic translation motion matrix; T ijs (R) is called the rotational motion matrix, T ij (α) , T ij (β), T ij (γ) is called the basic rotational motion matrix, and its expression is:
[0076]
[0077] In the formula, Represents coordinate system O j-xjyjzj Around coordinate system O i-xiyizi The angle of rotation of the X, Y, and Z axes.
[0078] Then in this implementation, the coordinates of the tool tip point in the A swing axis coordinate system are: , where L represents the distance from the tool tip to the coordinate system {O 5-x5y5z5 According to the homogeneous coordinate transformation method, considering the topological structure of the gantry CA swing head five-axis CNC machine tool, the motion transfer matrix from the CNC machine tool bed to the tool can be expressed as:
[0079]
[0080] in:
[0081]
[0082]
[0083]
[0084]
[0085]
[0086] are the motion matrices of each feed axis of the machine tool, and x, y, z, C and A are the motion input parameters of each feed axis of the machine tool.
[0087] Then, the position of the tool tip can be expressed as:
[0088]
[0089] Right now:
[0090]
[0091] In the formula, is the tool tip point conversion function, whose parameters include x, y, z, C, and A parameters. Indicates the tool tip position coordinates, Represents the position coordinates of each axis, and L is the distance from the tool tip to the center of the shaft.
[0092] Thus, the theoretical and actual trajectory tool tip position coordinates corresponding to the interpolator and grating ruler during CNC machine tool processing are converted respectively:
[0093]
[0094]
[0095] in, and The interpolator theoretical point and grating ruler actual point position coordinate data of the machine tool X, Y, Z, A, and C axes are collected by the CNC machine tool sensor. and are the X, Y, and Z axis position coordinates of the theoretical and actual trajectory tool tip positions, respectively. and It is used as a subsequent data source for contour error calculation.
[0096] S20: Starting from the initial actual trajectory point, determine the target actual trajectory point as the center point of the first window area; wherein the target actual trajectory point is the current actual trajectory point.
[0097] In the specific implementation process, according to the characteristics of the machine tool running trajectory, the contour error window area is determined, which is set as a square area with the actual trajectory point as the base point. The first window area is defined as a fixed window area, which means that the window size is fixed and the contour error calculation is directly performed without extension. The size of the first window area can be determined according to the dimensional tolerance band width of the part to be processed and the window size coefficient, that is, starting from the initial actual trajectory point, before determining the target actual trajectory point as the center point of the first window area, the method also includes:
[0098] The side length of the first window area is determined according to the dimensional tolerance band width of the part to be processed and the window size coefficient.
[0099] The first window area is recorded as , its side length expression is:
[0100]
[0101] In the formula, It represents the side length of the first window area of the contour error, a and b are the upper and lower tolerance values of the size of the machined part, and λ is the window size coefficient (generally 5.0≤λ≤10.0).
[0102] S30: Obtaining contour errors of target trajectory points according to all theoretical trajectory points and target actual trajectory points in the first window area.
[0103] In the specific implementation process, the contour error is calculated starting from the initial actual trajectory point. The initial trajectory point is generally based on the processing sequence, and the point where the processing starts is the initial actual trajectory point. Since the first window area is set to calculate through the points in the area, it is necessary to determine whether the actual trajectory point meets the criterion of the first window area, that is, starting from the initial actual trajectory point, before determining that the target actual trajectory point is the center point of the first window area, the method also includes:
[0104] Determine whether the actual trajectory point of the target satisfies the criterion of the first window area;
[0105] When the target actual trajectory point meets the criterion of the first window area, a step of starting from the initial actual trajectory point and determining the target actual trajectory point as the center point of the first window area is performed.
[0106] Determine whether the current target actual trajectory point satisfies the first window area Criterion: Set P c The number of elements And the modulus of the first and last theoretical trajectory points in the set . Based on the actual trajectory point Extend the side length along the x and y directions from the base point Square window area , assuming that the theoretical point set in the region is , m is the number of the theoretical point trajectory point, satisfying .
[0107] If satisfied, calculate the current actual trajectory point To the line segment composed of all adjacent theoretical trajectory points in the first window area The normal distance ,Pick As actual trajectory point Contour error The absolute value of .
[0108] Assumed contour error The corresponding theoretical line segment during calculation is , determine the actual trajectory point according to the following formula Contour error The positive or negative value indicates which side of the theoretical line segment the actual point is on:
[0109]
[0110] Finally, the contour error of the actual point is obtained , which is the contour error of the target trajectory point.
[0111] In one embodiment, when the target actual trajectory point does not meet the criterion of the first window area;
[0112] Confirm that the target actual trajectory point meets the criteria of the second window area.
[0113] In the specific implementation process, if the criterion of the first window area is not met in the above steps, that is, the set P c The number of elements , it means that the actual trajectory point meets the criterion of the second window area.
[0114] Based on the above steps, starting from the initial actual trajectory point, determining the target actual trajectory point as the center point of the first window area includes:
[0115] Starting from the initial actual trajectory point, the target actual trajectory point is determined as the center point of the second window area;
[0116] According to all theoretical trajectory points and actual target trajectory points in the first window area, the contour error of the target trajectory point is obtained, including:
[0117] According to all theoretical trajectory points and actual target trajectory points in the second window area, the contour error of the target trajectory point is obtained.
[0118] The second window area is defined as a variable window area to avoid the abnormal distribution of "no corresponding" points at the beginning and end of the contour, which may cause the contour error calculation to be extended and expanded. Determine the second window area (Starting side length ), n is the actual trajectory point number.
[0119] In one embodiment, before obtaining the contour error of the target trajectory point based on all theoretical trajectory points and the target actual trajectory points in the second window area, the method further includes:
[0120] Determine whether the modulus of the target theoretical trajectory point among all the theoretical trajectory points in the second window area meets a preset condition;
[0121] When the modulus of the target theoretical trajectory point among all the theoretical trajectory points in the second window area meets a preset condition, a step of obtaining a contour error of the target trajectory point according to all the theoretical trajectory points and the target actual trajectory point in the second window area is performed.
[0122] In the specific implementation process, when the second window area criterion is met, if the modulus of the target theoretical trajectory point meets the preset condition, it can be directly calculated in the way of the first window area. The target actual trajectory point is the first and last theoretical trajectory points in the set. The criterion is whether the modulus of the line segment connecting the first and last theoretical trajectory points meets the preset condition. The preset condition is similar to the criterion of the first window area. .
[0123] In one embodiment, when the modulus of the target theoretical trajectory point among all the theoretical trajectory points in the second window area does not meet the preset condition;
[0124] The second window area is expanded and the step of returning to determining whether the modulus of the target theoretical trajectory point among all the theoretical trajectory points in the second window area meets the preset condition is returned until the modulus of the target theoretical trajectory point among all the theoretical trajectory points in the second window area meets the preset condition.
[0125] In the specific implementation process, if the preset conditions are not met, it is necessary to expand the second window area, and the window is expanded according to the following formula: area:
[0126]
[0127] Where F represents the feed rate given by the NC machining program, and T is the sampling period for obtaining the original data.
[0128] As attached Figure 4 As shown in the figure, the centermost square is the initial second window area. If the enlarged window still does not meet the preset conditions, it will continue to be enlarged. Figure 4 In the figure, the middle square is the second window area expanded P times, and the outermost square is expanded P+1 times. After the expansion meets the preset conditions, the contour error of the actual trajectory point of the target can be obtained according to the calculation of the first window area. Among them, the contour error of the first actual point is: .
[0129] S40: Switch the target actual trajectory point to the next actual trajectory point, and return to the step of determining the target actual trajectory point as the center point of the first window area, until all actual trajectory points are acquired, and the machining trajectory plane contour error is obtained.
[0130] In the specific implementation process, the embodiment of the present application no longer needs to obtain functions of theoretical trajectory and actual trajectory, and can traverse according to the distribution of points on the trajectory. After obtaining the contour error based on an actual trajectory point, switch to the next actual trajectory point for calculation, and then loop the previous calculation process to obtain the contour error of each actual trajectory point respectively through the first window area or the second area window. After these contour errors are obtained, since the trajectory point actually represents the specified processing trajectory plane, the processing trajectory plane contour error is actually obtained.
[0131] In this embodiment, a window area is set to calculate the contour errors of actual trajectory points one by one, and the contour error of each actual trajectory point is obtained through the current actual trajectory point and other theoretical trajectory points in the window area, thereby obtaining the contour error of the entire processing trajectory plane. Since the window setting limits the calculation of contour errors to the window area, abnormal distribution of points such as misalignment and repositioning is avoided, and there is no need to traverse the entire range for each point. While improving the calculation efficiency, more accurate calculation of contour errors is achieved.
[0132] As attached Figure 5 As shown in the attached Figure 5 The present application is further described below in the following embodiments:
[0133] Firstly, by collecting the position coordinates of each axis, the theoretical points of the interpolator and the actual points of the grating ruler are converted to obtain the theoretical trajectory points and the actual trajectory points, and then according to the actual processing situation, the side length of the first type of window area is calculated. The window area is actually the first window area and the second window area. Therefore, the first type of window area is the first window area, and the second type of window area is the second window area.
[0134] Then start the calculation from the first actual trajectory point, first determine whether it meets the first type of window area criterion, if it does, directly obtain the contour error of the actual trajectory point in the manner provided in the embodiment of the present application, if it does not, it should meet the second type of window area criterion, and then need to expand the second window area, and determine whether it meets the preset conditions, that is, whether the module between the first and last theoretical trajectory points in the set is greater than or equal to half of the side length, if not, then continue to expand the window until the preset conditions are met, and obtain the contour error of the actual trajectory point in the manner provided in the embodiment of the present application.
[0135] Finally, determine whether the number of the actual trajectory point meets the That is, whether all actual trajectory points have completed the calculation of contour error. If not, switch to the next actual trajectory point and continue to calculate the contour error of the actual trajectory point in the previous way. If all calculations have been completed, then end the calculation and obtain the machining trajectory plane contour error.
[0136] See attached Figure 6 Based on the same inventive concept as in the above-mentioned embodiment, the embodiment of the present application further provides a device for obtaining a plane contour error in a CNC machine tool, comprising:
[0137] An acquisition module, which is used to acquire theoretical trajectory points and actual trajectory points during the machining process of the CNC machine tool;
[0138] A determination module, the determination module is used to determine the target actual trajectory point as the center point of the first window area starting from the initial actual trajectory point; wherein the target actual trajectory point is the current actual trajectory point;
[0139] A first acquisition module, the first acquisition module is used to obtain the contour error of the target trajectory point according to all theoretical trajectory points and the target actual trajectory points in the first window area;
[0140] The target acquisition module is used to switch the target actual trajectory point to the next actual trajectory point, and return to the step of determining the target actual trajectory point as the center point of the first window area until all actual trajectory points are acquired to obtain the machining trajectory plane contour error.
[0141] Those skilled in the art should understand that the division of the various modules in the embodiment is only a division of logical functions, and can be fully or partially integrated into one or more actual carriers in actual application, and these modules can be implemented entirely in the form of software called by a processing unit, or entirely in the form of hardware, or in the form of a combination of software and hardware. It should be noted that each module in the device for acquiring the plane contour error of a CNC machine tool in this embodiment corresponds one by one to each step in the method for acquiring the plane contour error of a CNC machine tool in the aforementioned embodiment. Therefore, the specific implementation of this embodiment can refer to the implementation of the method for acquiring the plane contour error of a CNC machine tool in the aforementioned embodiment, and will not be repeated here.
[0142] Based on the same inventive concept as in the aforementioned embodiments, an embodiment of the present application further provides a computer-readable storage medium storing a computer program. When the computer program is loaded and executed by a processor, a method for obtaining a plane contour error in machining a CNC machine tool is implemented as provided in an embodiment of the present application.
[0143] Based on the same inventive concept as in the above-mentioned embodiment, an embodiment of the present application further provides an electronic device, including a processor and a memory, wherein:
[0144] The memory is used to store computer programs;
[0145] The processor is used to load and execute a computer program so that the electronic device executes the method for obtaining a plane contour error during machining of a CNC machine tool as provided in an embodiment of the present application.
[0146] In some embodiments, the computer readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or various devices including one or any combination of the above memories. The computer may be various computing devices including intelligent terminals and servers.
[0147] In some embodiments, executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.
[0148] As an example, executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file storing other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).
[0149] By way of example, executable instructions may be deployed to be executed on one computing device, or on multiple computing devices located at one site, or on multiple computing devices distributed across multiple sites and interconnected by a communication network.
[0150] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0151] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0152] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory / random access memory, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a multimedia terminal device (which can be a mobile phone, a computer, a television receiver, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0153] In summary, the present application provides a method, device, medium and equipment for obtaining the plane contour error of a CNC machine tool, the method comprising: obtaining theoretical trajectory points and actual trajectory points in the CNC machine tool processing process; starting from the initial actual trajectory point, determining the target actual trajectory point as the center point of the first window area; wherein the target actual trajectory point is the current actual trajectory point; obtaining the contour error of the target trajectory point according to all theoretical trajectory points and target actual trajectory points in the first window area; switching the target actual trajectory point to the next actual trajectory point, and returning to the step of determining the target actual trajectory point as the center point of the first window area, until all actual trajectory points are acquired, and obtaining the plane contour error of the processing trajectory. The present application sets a window area to calculate the contour error of the actual trajectory point one by one, and obtains the contour error of each actual trajectory point through the current actual trajectory point and other theoretical trajectory points in the window area, thereby obtaining the contour error of the entire processing trajectory plane. Since the window setting limits the calculation of the contour error to the window area, the abnormal distribution of points such as dislocation and return is avoided, and there is no need to perform a full range of traversal calculations for each point, while improving the calculation efficiency, a more accurate calculation of the contour error is achieved.
[0154] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.
Claims
1. A method for obtaining a plane contour error in a CNC machine tool, characterized in that: The following steps are involved: Obtain theoretical trajectory points and actual trajectory points during CNC machine tool processing; Before obtaining the theoretical trajectory points and the actual trajectory points in the CNC machine tool processing process, the method further includes: Obtaining the interpolator theoretical points and grating ruler actual points of the five axes of the CNC machine tool; The obtaining of theoretical trajectory points and actual trajectory points during the machining process of the CNC machine tool includes: According to the interpolator theoretical points of the five axes of the CNC machine tool and the actual points of the grating ruler, respectively obtaining the theoretical trajectory points and the actual trajectory points in the CNC machine tool processing process; Starting from the initial actual trajectory point, determining the target actual trajectory point as the center point of the first window area; wherein the target actual trajectory point is the current actual trajectory point; before starting from the initial actual trajectory point, determining the target actual trajectory point as the center point of the first window area, the method further includes: Determining whether the actual trajectory point of the target satisfies the criterion of the first window area; In the case where the target actual trajectory point meets the criterion of the first window area, executing the step of starting from the initial actual trajectory point and determining the target actual trajectory point as the center point of the first window area; In the case where the actual trajectory point of the target does not satisfy the criterion of the first window area; Confirm that the actual trajectory point of the target meets the criterion of the second window area; wherein the second window area is defined as a variable window area, which is to avoid the abnormal distribution phenomenon of "no corresponding" points at the beginning and end of the contour that may be generated by the contour, resulting in the contour error calculation must be extended to calculate the area; Starting from the initial actual track point, determining the target actual track point as the center point of the first window area includes: Starting from the initial actual track point, determining the target actual track point as the center point of the second window area; The step of obtaining the contour error of the target trajectory point according to all the theoretical trajectory points and the target actual trajectory points in the first window area includes: Obtaining a contour error of a target trajectory point according to all the theoretical trajectory points and the target actual trajectory points in the second window area; Before obtaining the contour error of the target trajectory point according to all the theoretical trajectory points and the target actual trajectory points in the second window area, the method further includes: Determine whether the modulus of the target theoretical trajectory point among all the theoretical trajectory points in the second window area meets a preset condition; When the modulus of the target theoretical trajectory point among all the theoretical trajectory points in the second window area meets a preset condition, performing the step of obtaining the contour error of the target trajectory point according to all the theoretical trajectory points and the target actual trajectory point in the second window area; When the modulus of the target theoretical trajectory point among all the theoretical trajectory points in the second window area does not meet a preset condition; Expanding the second window area and returning to the step of determining whether the modulus of the target theoretical trajectory point among all the theoretical trajectory points within the second window area meets a preset condition, until the modulus of the target theoretical trajectory point among all the theoretical trajectory points within the second window area meets the preset condition; Before determining the target actual track point as the center point of the first window area starting from the initial actual track point, the method further includes: Determine the side length of the first window area according to the dimensional tolerance width of the part to be processed and the window size coefficient; Obtaining a contour error of a target trajectory point according to all the theoretical trajectory points and the target actual trajectory points in the first window area; Switch the target actual trajectory point to the next actual trajectory point, and return to the step of determining the target actual trajectory point as the center point of the first window area until all the actual trajectory points are acquired to obtain the machining trajectory plane contour error.
2. A device for obtaining a plane contour error during machining of a CNC machine tool, characterized in that: include: An acquisition module, which is used to acquire theoretical trajectory points and actual trajectory points during the machining process of the CNC machine tool; Before obtaining the theoretical trajectory points and the actual trajectory points in the CNC machine tool processing process, the method further includes: Obtaining the interpolator theoretical points and grating ruler actual points of the five axes of the CNC machine tool; The obtaining of theoretical trajectory points and actual trajectory points during the machining process of the CNC machine tool includes: According to the interpolator theoretical points of the five axes of the CNC machine tool and the actual points of the grating ruler, respectively obtaining the theoretical trajectory points and the actual trajectory points in the CNC machine tool processing process; A determination module, the determination module is used to determine the target actual trajectory point as the center point of the first window area starting from the initial actual trajectory point; wherein the target actual trajectory point is the current actual trajectory point; before the determination of the target actual trajectory point as the center point of the first window area starting from the initial actual trajectory point, it also includes: Determining whether the actual trajectory point of the target satisfies the criterion of the first window area; In the case where the target actual track point satisfies the criterion of the first window area, executing the step of starting from the initial actual track point to determine the target actual track point as the center point of the first window area; In the case where the actual trajectory point of the target does not satisfy the criterion of the first window area; Confirm that the actual trajectory point of the target meets the criterion of the second window area; wherein the second window area is defined as a variable window area, which is an area that must be extended and expanded to calculate the contour error in order to avoid the abnormal distribution phenomenon of the contour head and tail without corresponding points; Starting from the initial actual track point, determining the target actual track point as the center point of the first window area includes: Starting from the initial actual track point, determining the target actual track point as the center point of the second window area; The step of obtaining the contour error of the target trajectory point according to all the theoretical trajectory points and the target actual trajectory points in the first window area includes: Obtaining a contour error of a target trajectory point according to all the theoretical trajectory points and the target actual trajectory points in the second window area; Before obtaining the contour error of the target trajectory point according to all the theoretical trajectory points and the target actual trajectory points in the second window area, the method further includes: Determine whether the modulus of the target theoretical trajectory point among all the theoretical trajectory points in the second window area meets a preset condition; When the modulus of the target theoretical trajectory point among all the theoretical trajectory points in the second window area meets a preset condition, performing the step of obtaining a contour error of the target trajectory point according to all the theoretical trajectory points and the target actual trajectory point in the second window area; When the modulus of the target theoretical trajectory point among all the theoretical trajectory points in the second window area does not meet a preset condition; Expanding the second window area and returning to determine whether the modulus of the target theoretical trajectory point among all the theoretical trajectory points within the second window area meets a preset condition, until the modulus of the target theoretical trajectory point among all the theoretical trajectory points within the second window area meets the preset condition; Before the method starts from the initial actual track point and determines the target actual track point as the center point of the first window area, it also includes: Determine the side length of the first window area according to the dimensional tolerance width of the part to be processed and the window size coefficient; A first obtaining module, the first obtaining module is used to obtain a contour error of a target trajectory point according to all the theoretical trajectory points and the target actual trajectory points in the first window area; A target acquisition module is used to switch the target actual trajectory point to the next actual trajectory point, and return to the step of determining the target actual trajectory point as the center point of the first window area until all the actual trajectory points are acquired to obtain the machining trajectory plane contour error.
3. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is loaded and executed by the processor, the method for obtaining the plane contour error in CNC machine tool processing as claimed in claim 1 is implemented.
4. An electronic device, characterized in that: comprising a processor and a memory, wherein: The memory is used to store computer programs; The processor is used to load and execute the computer program so that the electronic device executes the method for obtaining the plane contour error of CNC machine tools as claimed in claim 1.
Citation Information
Patent Citations
Multi-axis system contour error estimation and iterative control method based on Newton method
CN107748540A
Curved surface machining component surface contour error approximate evaluation method
CN108646669A
A Contour Error Estimation and Visualization Method for Multi-Axis CNC Machining
CN109240214B
Servo system contour control method based on task polar coordinate system
CN103760816A
Contour error evaluation method for triaxial numerical control machine tool
CN107544430A
