Tapping parameter compensation method, device and equipment and storage medium
Through computer vision technology, the workpiece image is analyzed, the offset angle and origin coordinate are calculated, and the position deviation of the automatic tapping machine tool is compensated, which solves the production shutdown and product quality decline caused by position deviation during the processing of traditional machine tools, and improves processing accuracy and production efficiency.
Patent Information
- Application Number
- CN202411948753.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-05-23
AI Technical Summary
During the processing process, traditional automatic tapping machine tools have caused the tapping tap to be inconsistent with the position of the hole due to the deviation of the workpiece position, which causes production shutdown, product quality reduction and maintenance costs to increase.
The image information of the target workpiece is obtained through computer vision technology, the image is analyzed to determine the precise position coordinates of the target hole, the offset angle value and the offset origin coordinates of the workpiece are calculated, and the compensation parameters of the hole to be compensated can be calculated to achieve effective compensation for the position deviation of the workpiece.
The machining accuracy and production efficiency of automatic tapping machine tools are improved, the stability of product quality is ensured, and uncertainty in the production process is reduced.
Smart Images

Figure CN120031903A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of tapping processing, and in particular to a tapping parameter compensation method, device, equipment and storage medium. Background Art
[0002] Traditional automatic tapping machines mainly rely on the coordinate positions preset by the CNC system to perform tap processing. Although this method can achieve efficient automated production, it cannot completely eliminate the impact of workpiece positioning errors.
[0003] In actual applications, there is a significant deviation between the actual hole position of the workpiece and the coordinate position recorded in the CNC system due to bending, transportation, manual placement, etc. This deviation will cause the tapping tap to not match the hole position, leading to a series of serious consequences, such as the tapping tap is easy to break, causing the production line to stop, or the processed thread is damaged, affecting product quality and increasing maintenance costs.
[0004] The existing technology lacks an effective solution to correct the workpiece position deviation, which makes the automated tapping process have great uncertainty, reducing the production efficiency and stability of product quality. Therefore, there is an urgent need for a technology that can accurately compensate for the workpiece position deviation and improve the processing accuracy and production efficiency of automatic tapping machine tools. Summary of the invention
[0005] In order to overcome the shortcomings of the prior art, the present application provides a tapping parameter compensation method, device, equipment and storage medium to correct the workpiece position deviation, thereby reducing the uncertainty of the automated tapping machine in the tapping process, thereby achieving the effect of improving production efficiency and ensuring the stability of product quality.
[0006] The technical solution adopted by this application to solve its technical problem is: In a first aspect, the present application provides a tapping parameter compensation method, the method comprising: Acquire image information of a target workpiece, and determine hole coordinates of two target holes based on the image information; the hole coordinates include a first hole coordinate and a second hole coordinate; Connecting the first hole coordinate and the second hole coordinate to obtain an offset measurement line, and determining a deviation angle value between the offset measurement line and the standard measurement line based on the offset measurement line and a preset standard measurement line; Determining the offset origin coordinates of the target workpiece according to the deviation angle value and the preset standard origin coordinates; Determine the coordinates of the hole to be compensated, and obtain the standard coordinates corresponding to the coordinates of the hole to be compensated; the hole to be compensated is the coordinates of any hole on the target workpiece; The compensation parameters corresponding to the coordinates of the hole to be compensated are determined according to the standard coordinates, the standard origin coordinates, the offset origin coordinates and the deviation angle value.
[0007] Optionally, the step of connecting the first hole coordinate and the second hole coordinate to obtain an offset measurement line, and determining the deviation angle value of the target workpiece based on the offset measurement line and a preset standard measurement line includes: The offset measurement line is obtained by calculating the first hole coordinates and the second hole coordinates value, and based on the A value determines an angle value of the offset measurement line; The deviation angle value of the target workpiece is determined based on the angle value corresponding to the offset measurement line and the angle value of the standard measurement line.
[0008] Optionally, the offset origin coordinates include Axis coordinates and Axis coordinates; the formula used in the step of determining the offset origin coordinates of the target workpiece according to the deviation angle value and the preset standard origin coordinates is: ; in, is the offset of the origin coordinates Axis coordinates, is the offset of the origin coordinates Axis coordinates, is the deviation angle value.
[0009] Optionally, the step of determining the compensation parameters corresponding to the coordinates of the hole to be compensated according to the standard coordinates, the standard origin coordinates, the offset origin coordinates and the deviation angle value includes: Taking a straight line connecting the standard coordinates and the standard origin coordinates as a first straight line, and determining a line distance value and a first slope of the first straight line according to the standard coordinates and the standard origin coordinates; Taking a straight line connecting the offset origin coordinates and the coordinates of the hole to be compensated as a second straight line, and determining a second slope of the second straight line according to the first slope and the deviation angle value; Determine a straight line equation corresponding to the second straight line according to the second slope and the offset origin coordinates, and determine the coordinate values of the coordinates of the hole to be compensated based on the straight line equation and the line distance value; Based on the coordinate values of the coordinates of the hole to be compensated, compensation parameters corresponding to the coordinates of the hole to be compensated are determined.
[0010] Optionally, the step of determining the coordinate value of the coordinate of the hole to be compensated based on the straight line equation and the line distance value includes: Based on the offset origin coordinates, the second slope and the line distance value, determine the coordinates of the hole to be compensated. Axis coordinates; According to the coordinates of the hole to be compensated axis coordinates and the straight line equation to determine the offset origin coordinates Axis coordinates.
[0011] Optionally, the coordinates of the hole to be compensated are determined based on the offset origin coordinates, the second slope and the line distance value. The formula used in the step of axis coordinates is: ; in, is the line distance value, is the second slope, is the offset of the origin coordinates Axis coordinates, is the coordinate of the hole to be compensated Axis coordinates.
[0012] Optionally, the step of determining the compensation parameters corresponding to the coordinates of the hole to be compensated based on the coordinate values of the coordinates of the hole to be compensated includes: Determine the offset information of the hole to be compensated according to the coordinate value of the hole coordinate to be compensated and the standard coordinate; According to the offset information, compensation parameters corresponding to the coordinates of the hole to be compensated are determined, and the compensation parameters are fed back to the target tapping machine tool.
[0013] The beneficial effects of the present application are: obtaining the image information of the target workpiece through computer vision technology, analyzing the image to determine the precise position coordinates of the target hole, and then calculating the offset angle value and the offset origin coordinates of the workpiece based on these coordinates and the preset standard measurement line. Using this offset information, combined with the preset standard origin coordinates and the standard coordinates of the hole to be compensated, the compensation parameters of the hole to be compensated, that is, the hole coordinates that need to be corrected, can be accurately calculated, and ultimately effective compensation for the workpiece position deviation is achieved, thereby improving the processing accuracy and production efficiency of the automatic tapping machine. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 It is a flow chart of a tapping parameter compensation method provided in an embodiment of the present application; Figure 2 is a schematic diagram of step S2 of the tapping parameter compensation method provided in an embodiment of the present application; Figure 3 is a schematic diagram of step S3 of the tapping parameter compensation method provided in an embodiment of the present application; Figure 4It is a virtual structural schematic diagram of the tapping parameter compensation device provided by the present application; Figure 5 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0015] The present application is further described below in conjunction with the accompanying drawings and embodiments.
[0016] The following will clearly and completely describe the concept, specific structure and technical effects of the present application in combination with the embodiments and drawings, so as to fully understand the purpose, characteristics and effects of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of them. Based on the embodiments of the present application, other embodiments obtained by technicians in this field without creative work are all within the scope of protection of the present application. In addition, all the connection / connection relationships involved in the patent do not simply refer to the direct connection of components, but refer to the formation of a better connection structure by adding or reducing connection accessories according to the specific implementation situation. The various technical features created in this application can be combined interactively without conflicting with each other.
[0017] Reference Figure 1 , Figure 1 : is a flow chart of the tapping parameter compensation method provided in the embodiment of the present application, which specifically includes the following steps, which are specifically described below: In step S1 , image information of a target workpiece is acquired, and hole coordinates of two target holes are determined based on the image information.
[0018] The hole coordinates include a first hole coordinate and a second hole coordinate.
[0019] Specifically, a CCD camera or other image sensor is used to photograph a target workpiece that has been processed by an automatic tapping machine to capture the position information of the holes on the workpiece, and then the captured image data is transmitted to an image processing system, such as computer vision software or dedicated image analysis hardware. Among them, the image can be pre-processed such as denoising and contrast enhancement to improve the accuracy of subsequent analysis.
[0020] Furthermore, the target holes to be measured are identified in the image. Once the edges of the holes are accurately identified, the next step is to calculate the center coordinates of each hole. In one embodiment provided in the present application, this can be achieved by finding the maximum inscribed circle or the minimum circumscribed rectangle within the edge, and then taking its geometric center as the hole coordinates. Then, two target holes corresponding to the hole positions at both ends of the preset standard measurement line are selected according to actual needs. For example, the two target holes in the lower left corner and the upper right corner can be selected, and the coordinates of the two target holes are recorded as the first hole coordinates and the second hole coordinates, respectively, because these two positions often represent the maximum span on the workpiece, which is helpful for subsequent positioning and calibration work. The specific hole position selection can be appropriately adjusted by relevant personnel based on the hole position distribution of the actual workpiece and actual needs.
[0021] In step S2, the first hole coordinate and the second hole coordinate are connected to obtain an offset measurement line, and based on the offset measurement line and a preset standard measurement line, a deviation angle value between the offset measurement line and the standard measurement line is determined.
[0022] Specifically, when sheet metal is placed manually, factors such as bending angle error of the sheet metal, placement error of personnel and inclination of the sheet metal may cause errors between the coordinates of the hole positions on the sheet metal and the coordinates in the design drawing. The present application proposes to calculate the offset angle between the actual target workpiece and the standard workpiece through step S2, and then determine the offset of the entire actual workpiece relative to the standard placement position corresponding to the standard workpiece through the offset origin described below in combination with the offset angle.
[0023] Specifically, when determining the offset angle in step S2, the coordinates of the two previously determined target holes (i.e., the first hole coordinate and the second hole coordinate) are connected to form a straight line as an offset measurement line, which is used to represent the relative position relationship between the two hole positions on the target workpiece. Assuming that the first hole coordinate and the second hole coordinate correspond to the coordinates of the lower left hole position and the upper right hole position of the target workpiece, respectively, then in the preset standard measurement line, its two endpoints are also the lower left hole position and the upper right hole position of the standard workpiece, respectively (i.e., the hole positions of the standard workpiece and the actual workpiece need to correspond). Then, the angle difference between the standard measurement line and the offset measurement line is calculated to obtain the deviation angle value.
[0024] More specifically, the step of connecting the first hole coordinate and the second hole coordinate to obtain an offset measurement line, and determining the deviation angle value of the target workpiece based on the offset measurement line and a preset standard measurement line includes: The offset measurement line is obtained by calculating the first hole coordinates and the second hole coordinates value, and based on the The value determines the angle value of the offset measurement line.
[0025] Specifically, the preset standard measurement line The value can be determined at preset time as , assuming that the coordinates of the first hole are (x1, y1) and the coordinates of the second hole are (x2, y2), then the offset measurement line Value (i.e. ) can be calculated by the following formula: ; in, The inverse tangent function (atan or arctan) can be used to It is worth noting that the process should be retained The positive and negative signs of the target workpiece are recorded in order to record the offset direction of the target workpiece.
[0026] Further, refer to Figure 2 , Figure 2 This is a schematic diagram of step S2 of the tapping parameter compensation method provided in the embodiment of the present application. Figure 2 An example is given to illustrate this step. Figure 2 There are two rectangular wireframes, including a wireframe corresponding to a standard workpiece (a first wireframe) and a wireframe of an actual workpiece (a second wireframe).
[0027] In the first wireframe, select two holes A and B, whose coordinates are (X1, Y1) and (X2, Y2) respectively, and then connect holes A and B with a straight line to form a standard measurement line. The slope of the standard measurement line is calculated by the above formula. The value is obtained based on the inverse tangent function to obtain the angle value of the standard measuring line. .
[0028] In the second wireframe, use the CCD camera to capture the coordinates of the two holes A' and B', and connect the two coordinates A' and B' with a straight line to obtain the offset measurement line. Then, the angle value of the offset measurement line is obtained in the same way as the standard measurement line above. .
[0029] Furthermore, based on the angle value corresponding to the offset measurement line and the angle value of the standard measurement line, the deviation angle value of the target workpiece is determined.
[0030] Specifically, the angle value of the standard measurement line obtained above is Angle value from the offset measurement line Subtract and keep the positive and negative signs of the values to record the offset direction, thus obtaining the deviation angle value.
[0031] In step S3, the offset origin coordinates of the target workpiece are determined according to the deviation angle value and the preset standard origin coordinates.
[0032] Among them, the predetermined standard position in the standard workpiece is used as the standard origin coordinate, which is used as the reference point.
[0033] Specifically, in the above step S2, the deviation angle value of the target workpiece compared to the standard workpiece is determined. In order to further determine the offset state of the target workpiece, it is also necessary to calculate the coordinate offset of the reference point (offset origin coordinate) on the target workpiece and the standard workpiece on the standard workpiece. The embodiment of the present application proposes that the offset origin coordinate of the target workpiece can be obtained by calculating the standard origin coordinate and the deviation angle value in combination with the sum and difference formula of trigonometric functions.
[0034] Specifically, the offset origin coordinates include Axis coordinates and Axis coordinates; the formula used in the step of determining the offset origin coordinates of the target workpiece according to the deviation angle value and the preset standard origin coordinates is the axis formula, specifically: ; in, is the offset of the origin coordinates Axis coordinates, is the offset of the origin coordinates Axis coordinates, is the deviation angle value.
[0035] More specifically, for ease of memorization, the above axis formula can be written in matrix form: .
[0036] It is worth noting that the formula characters in each step are only used for formula description and do not correspond to the characters in other steps. For specific correspondence, please refer to the actual description of the corresponding characters.
[0037] Further, refer to Figure 3 , Figure 3 This is a schematic diagram of step S3 of the tapping parameter compensation method provided in an embodiment of the present application, which includes the standard origin coordinates (X0, Y0) on the first wireframe corresponding to the standard workpiece and the offset origin coordinates (X1, Y1) to be calculated on the second wireframe corresponding to the target workpiece. X0 in the standard origin coordinates is used as x, Y0 as y, and the deviation angle value calculated in the above steps is used as Substituting into the above formula, we get As X1, As Y1, the offset origin coordinates (X1, Y1) are obtained.
[0038] In step S4, the coordinates of the hole to be compensated are determined, and the standard coordinates corresponding to the coordinates of the hole to be compensated are obtained.
[0039] Wherein, the hole to be compensated is the coordinate of any hole on the target workpiece.
[0040] Specifically, based on the above steps, the offset of the target workpiece compared to the standard workpiece can be determined, including the origin offset information (offset origin coordinates) and the offset angle information (deviation angle value). Based on these two offsets, all the hole offsets on the sheet metal are compensated to obtain the new coordinates of each hole after calibration of the next workpiece. Specifically, assuming that there are two holes, point A and point B, in the standard workpiece, where point A is the standard origin coordinate, and the offset origin coordinate A' is known, the actual coordinates of point B' corresponding to the target workpiece need to be calculated in the following step S5. Prior to this, it is necessary to first determine the coordinate value of point B, that is, to obtain the standard coordinates corresponding to the coordinates of the hole to be compensated (B').
[0041] More specifically, a unique identifier (such as a serial number, etc.) can be assigned to each hole position on the standard workpiece through the control equipment of the relevant automatic tapping machine tool, and the coordinate value corresponding to each hole position can be determined when analyzing the standard workpiece. When the technical solution provided by the present application is implemented, in this step, the hole positions to be compensated can be respectively determined as all the hole positions on the workpiece, and the standard coordinates corresponding to each hole position can be matched one by one to facilitate subsequent calls, thereby improving the calling speed.
[0042] In step S5, compensation parameters corresponding to the coordinates of the hole to be compensated are determined according to the standard coordinates, the standard origin coordinates, the offset origin coordinates and the deviation angle value.
[0043] Specifically, based on the two offsets obtained above and the standard coordinates corresponding to each hole position, the correct coordinates of each hole position that should be tapped in the actual workpiece after the offset are determined, and these correct coordinates are fed back to the automatic tapping machine tool, thereby improving the tapping quality and processing efficiency. Specifically, the step of determining the compensation parameters corresponding to the coordinates of the hole to be compensated according to the standard coordinates, the standard origin coordinates, the offset origin coordinates and the deviation angle value includes: A straight line connecting the standard coordinates and the standard origin coordinates is taken as a first straight line, and a line distance value and a first slope of the first straight line are determined according to the standard coordinates and the standard origin coordinates.
[0044] Specifically, the standard coordinates of the hole to be compensated corresponding to the standard workpiece are connected with the standard origin coordinates on the standard workpiece to obtain a first straight line, and the length value of the first straight line is calculated. Since the length value of the distance between A' and B' (the second straight line) in the workpiece after flipping and offset does not change, the line distance value can be used for the subsequent calculation of the specific coordinates of point B'.
[0045] More specifically, assuming that the standard coordinates are (Xs, Ys) and the standard origin coordinates are (X0, Y0), then the first straight line is the straight line passing through these two points. According to the standard coordinates and the standard origin coordinates, the line distance value of the first straight line can be determined and calculated by the following formula: ; Among them, A and B are the standard coordinates and the standard origin coordinates respectively. = , then the line is vertical and the slope is infinite or undefined.
[0046] Furthermore, also based on the standard coordinates and the standard origin coordinates, the slope of the first straight line is determined to obtain a first slope, and the angle value of the first straight line can be determined based on the first slope, which is defined as the first angle value herein.
[0047] Further, a straight line connecting the offset origin coordinates and the coordinates of the hole to be compensated is used as a second straight line, and a second slope of the second straight line is determined according to the first slope and the deviation angle value.
[0048] Specifically, based on the above content, the first angle value is known, and the deviation angle value has been obtained in the above steps, so the first angle value and the deviation angle value can be subtracted to determine the second angle value corresponding to the second straight line, and the second slope of the second straight line can be determined based on the second angle value.
[0049] Further, a straight line equation corresponding to the second straight line is determined according to the second slope and the offset origin coordinates, and the coordinate values of the coordinates of the hole to be compensated are determined based on the straight line equation and the line distance value.
[0050] Specifically, based on the above steps, when the straight line length, offset origin coordinates and straight line inclination angle are known, the chord length formula can be used to calculate the distance between the two vacancies on the target workpiece. Since the distance is known, the coordinates of B' can be inversely calculated.
[0051] More specifically, the step of determining the coordinate value of the coordinate of the hole to be compensated based on the straight line equation and the line distance value includes: Based on the offset origin coordinates, the second slope and the line distance value, determine the coordinates of the hole to be compensated. Axis coordinates; Specifically, the coordinates of the hole to be compensated are determined based on the offset origin coordinates, the second slope and the line distance value. The formula used in the step of axis coordinates is: ; in, is the line distance value, is the second slope, is the offset of the origin coordinates Axis coordinates, is the coordinate of the hole to be compensated Axis coordinates.
[0052] Further, according to the coordinates of the hole to be compensated axis coordinates and the straight line equation to determine the offset origin coordinates Axis coordinates.
[0053] Specifically, when the coordinates of the hole to be compensated are known axis coordinates, the corresponding second slope, can be Substitute the axis coordinates into the corresponding straight line equation to obtain Axis coordinates. In addition, the following formula can be used to calculate Axis coordinates: ; in, is the offset of the origin coordinates Axis coordinates, is the coordinate of the hole to be compensated Axis coordinates.
[0054] Furthermore, after the correct coordinates of the hole to be supplemented are confirmed through the above steps, corresponding compensation parameters can be generated based on the coordinate values of the coordinates of the hole to be compensated, and fed back to the target tapping machine, wherein the target tapping machine is an automatic tapping machine used for tapping processing and processing workpieces. Specifically, the step of determining the compensation parameters corresponding to the coordinates of the hole to be compensated based on the coordinate values of the coordinates of the hole to be compensated includes: Determine the offset information of the hole to be compensated according to the coordinate value of the hole coordinate to be compensated and the standard coordinate; According to the offset information, compensation parameters corresponding to the coordinates of the hole to be compensated are determined, and the compensation parameters are fed back to the target tapping machine tool.
[0055] Specifically, first, it is necessary to determine the offset information of the hole position according to the coordinate value of the hole coordinate to be compensated and the standard coordinate. The offset information refers to the offset information of the hole position determined by the coordinate value of the hole coordinate to be compensated and the standard coordinate, which reflects the change in the hole position caused by the processing error. Specifically, the offset can be calculated in the following way: ; in,( , ) is the actual coordinate of the hole to be compensated, ( , ) is the correct coordinate of the hole to be compensated, and The compensation parameters are the compensation parameters of the hole coordinates to be compensated. The compensation parameters are fed back to the target tapping machine to adjust the parameters of the machine tool processing path to ensure the accuracy of the processing.
[0056] More specifically, these parameters may include offset, rotation angle, etc. These compensation parameters are fed back to the target tapping machine, which will use these parameters to adjust its machining path to compensate for the hole position offset caused by machining errors.
[0057] Specifically, for the first straight line and the second straight line , where the standard origin is , the hole to be compensated is , the offset origin of the target workpiece is First, calculate the first straight line The line length (line distance value) of the offset is unchanged, so the second straight line is also obtained. The line distance value, and the deviation angle value obtained based on the above steps can determine the second straight line Then, by substituting the known information into the chord length formula, the correct coordinate value of the hole to be compensated can be obtained, thereby generating the corresponding compensation parameters to facilitate the accuracy of the target tapping machine tool in processing other workpieces.
[0058] Reference Figure 4 , Figure 4 : is a virtual structural diagram of a tapping parameter compensation device provided by the present application. A second aspect of the present application provides a tapping parameter compensation device, comprising: The target hole position capture module 100 acquires image information of the target workpiece and determines the hole coordinates of two target holes based on the image information; the hole coordinates include a first hole coordinate and a second hole coordinate; The deviation angle measurement module 200 is used to connect the first hole coordinate and the second hole coordinate to obtain an offset measurement line, and determine the deviation angle value between the offset measurement line and the standard measurement line based on the offset measurement line and a preset standard measurement line; An offset origin calculation module 300 is used to determine the offset origin coordinates of the target workpiece according to the deviation angle value and the preset standard origin coordinates; The hole-to-be-compensated selection module 400 is used to determine the coordinates of the hole to be compensated and obtain the standard coordinates corresponding to the coordinates of the hole to be compensated; the hole to be compensated is the coordinates of any hole on the target workpiece; The compensation parameter determination module 500 is used to determine the compensation parameters corresponding to the coordinates of the hole to be compensated according to the standard coordinates, the standard origin coordinates, the offset origin coordinates and the deviation angle value.
[0059] The tapping parameter compensation device described in the embodiment of the present application can execute the tapping parameter compensation method provided in the above embodiment. The tapping parameter compensation device has the corresponding functional steps and beneficial effects of the tapping parameter compensation method described in the above embodiment. Please refer to the embodiment of the above tapping parameter compensation method for details. The embodiment of the present application will not be repeated here.
[0060] The present application also provides an electronic device. Figure 5 , Figure 5 : is a structural diagram of an electronic device provided in an embodiment of the present application, and the electronic device may include a processor and a memory, wherein the processor and the memory may be connected via a bus or other means. The processor may be a central processing unit (CPU). The processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components and other chips, or a combination of the above-mentioned various types of chips. The memory, as a non-transient computer-readable storage medium, may be used to store non-transient software programs, non-transient computer executable programs and modules, such as program instructions / modules corresponding to the tapping parameter compensation method in the embodiment of the present application. The processor executes various functional applications and data processing of the processor by running the non-transient software programs, instructions and modules stored in the memory, that is, the tapping parameter compensation method in the above-mentioned method embodiment is realized.
[0061] The memory may include a program storage area and a storage interval, wherein the program storage area may store an operating system, an application required by at least one function; the storage interval may store data created by the processor, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. The one or more modules are stored in the memory, and when executed by the processor, the tapping parameter compensation method in the above method embodiment is executed. The specific details of the above electronic device can be understood by corresponding to the corresponding descriptions and effects in the above method embodiment, and will not be repeated here. Those skilled in the art can understand that all or part of the processes in the above embodiment method can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and the program, when executed, may include the processes of the embodiments of the above methods. Among them, the storage medium can be an embedded multimedia storage card (EmbeddedMultiMediaCard, e.MMC), universal flash storage (Universal Flash Storage, UFS), universal serial bus (UniversalSerialBus, USB), micro flash card (TransFlash Card, TF Card) or solid-state drive (Solid-State Drive, SSD) and other storage media using NAND FLASH; the storage medium can also include a combination of the above types of memory.
[0062] In the description provided herein, a large number of specific details are described. However, it is understood that the embodiments of the present application can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.
[0063] Similarly, it should be understood that in order to streamline the present disclosure and aid in understanding one or more of the various inventive aspects, in the above description of the exemplary embodiments of the present application, the various features of the present application are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting the following intention: the claimed application requires more features than the features explicitly recited in each claim. More specifically, as reflected in the claims, the inventive aspects lie in less than all the features of the individual embodiments disclosed above. Therefore, the claims that follow the specific embodiment are hereby expressly incorporated into the specific embodiment, with each claim itself serving as a separate embodiment of the present application.
[0064] It should be noted that the above-mentioned embodiments illustrate rather than limit the invention and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims.
Claims
1. A tapping parameter compensation method, characterized in that: The method comprises: Acquire image information of a target workpiece, and determine hole coordinates of two target holes based on the image information; the hole coordinates include a first hole coordinate and a second hole coordinate; Connecting the first hole coordinate and the second hole coordinate to obtain an offset measurement line, and determining a deviation angle value between the offset measurement line and the standard measurement line based on the offset measurement line and a preset standard measurement line; Determining the offset origin coordinates of the target workpiece according to the deviation angle value and the preset standard origin coordinates; Determine the coordinates of the hole to be compensated, and obtain the standard coordinates corresponding to the coordinates of the hole to be compensated; the hole to be compensated is the coordinates of any hole on the target workpiece; The compensation parameters corresponding to the coordinates of the hole to be compensated are determined according to the standard coordinates, the standard origin coordinates, the offset origin coordinates and the deviation angle value.
2. The tapping parameter compensation method according to claim 1, characterized in that: The step of connecting the first hole coordinate and the second hole coordinate to obtain an offset measurement line, and determining the deviation angle value of the target workpiece based on the offset measurement line and a preset standard measurement line comprises: The offset measurement line is obtained by calculating the first hole coordinates and the second hole coordinates value, and based on the A value determines an angle value of the offset measurement line; The deviation angle value of the target workpiece is determined based on the angle value corresponding to the offset measurement line and the angle value of the standard measurement line.
3. The tapping parameter compensation method according to claim 1, characterized in that: The offset origin coordinates include Axis coordinates and Axis coordinates; the formula used in the step of determining the offset origin coordinates of the target workpiece according to the deviation angle value and the preset standard origin coordinates is: ; in, is the offset of the origin coordinates Axis coordinates, is the offset of the origin coordinates Axis coordinates, is the deviation angle value.
4. The tapping parameter compensation method according to claim 1, characterized in that: The step of determining the compensation parameters corresponding to the coordinates of the hole to be compensated according to the standard coordinates, the standard origin coordinates, the offset origin coordinates and the deviation angle value comprises: Taking a straight line connecting the standard coordinates and the standard origin coordinates as a first straight line, and determining a line distance value and a first slope of the first straight line according to the standard coordinates and the standard origin coordinates; Taking a straight line connecting the offset origin coordinates and the coordinates of the hole to be compensated as a second straight line, and determining a second slope of the second straight line according to the first slope and the deviation angle value; Determine a straight line equation corresponding to the second straight line according to the second slope and the offset origin coordinates, and determine the coordinate values of the coordinates of the hole to be compensated based on the straight line equation and the line distance value; Based on the coordinate values of the coordinates of the hole to be compensated, compensation parameters corresponding to the coordinates of the hole to be compensated are determined.
5. The tapping parameter compensation method according to claim 4, characterized in that: The step of determining the coordinate value of the coordinate of the hole to be compensated based on the straight line equation and the line distance value comprises: Based on the offset origin coordinates, the second slope and the line distance value, determine the coordinates of the hole to be compensated. Axis coordinates; According to the coordinates of the hole to be compensated axis coordinates and the straight line equation to determine the offset origin coordinates Axis coordinates.
6. The tapping parameter compensation method according to claim 4, characterized in that: The coordinates of the hole to be compensated are determined based on the offset origin coordinates, the second slope and the line distance value. The formula used in the step of axis coordinates is: ; in, is the line distance value, is the second slope, is the offset of the origin coordinates Axis coordinates, is the coordinate of the hole to be compensated Axis coordinates.
7. The tapping parameter compensation method according to claim 3, characterized in that: The step of determining the compensation parameters corresponding to the coordinates of the hole to be compensated based on the coordinate values of the coordinates of the hole to be compensated comprises: Determine the offset information of the hole to be compensated according to the coordinate value of the hole coordinate to be compensated and the standard coordinate; According to the offset information, compensation parameters corresponding to the coordinates of the hole to be compensated are determined, and the compensation parameters are fed back to the target tapping machine tool.
8. A tapping parameter compensation device, characterized in that: include: A target hole position capture module is used to obtain image information of a target workpiece and determine hole coordinates of two target holes based on the image information; the hole coordinates include a first hole coordinate and a second hole coordinate; a deviation angle measurement module, configured to connect the first hole coordinate and the second hole coordinate to obtain an offset measurement line, and determine a deviation angle value between the offset measurement line and the standard measurement line based on the offset measurement line and a preset standard measurement line; An offset origin calculation module, used to determine the offset origin coordinates of the target workpiece according to the deviation angle value and the preset standard origin coordinates; A module for selecting holes to be supplemented, used to determine the coordinates of holes to be compensated and obtain standard coordinates corresponding to the coordinates of holes to be compensated; the holes to be compensated are coordinates of any hole on the target workpiece; The compensation parameter determination module is used to determine the compensation parameters corresponding to the coordinates of the hole to be compensated according to the standard coordinates, the standard origin coordinates, the offset origin coordinates and the deviation angle value.
9. An electronic device, characterized in that: include: one or more processors; one or more memories; and one or more computer programs, wherein the one or more computer programs are stored in the one or more memories, and the one or more computer programs include instructions, which, when executed by the one or more processors, cause the electronic device to perform the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The storage medium stores a program or an instruction, and when the program or the instruction is executed, the method according to any one of claims 1 to 7 is implemented.
