A workpiece separation method, system and storage medium

By obtaining the angle value and position coordinates between the workpiece and the machine tool coordinate system, different methods are used to determine the center point position, which solves the problem of inaccurate correspondence between the workpiece and the machine tool coordinate system and improves the accuracy of centering and machining precision.

CN117206974BActive Publication Date: 2025-09-09ZHONG SHU FU XIN ZHI NENG KE JI (SHANG HAI) YOU XIAN GONG SI
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311150570.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-07
Publication Date
2025-09-09
Estimated Expiration
2043-09-07

AI Technical Summary

Technical Problem

In the prior art, it is difficult to accurately determine the correspondence between the workpiece and the machine tool coordinate system, resulting in inaccurate centering results and affecting machining accuracy.

Method used

By obtaining the angle value between the workpiece and the horizontal coordinate axis in the machine tool coordinate system, determine whether it is the preset angle value. If so, obtain the reference position coordinates of the corresponding side and calculate the average value to determine the midpoint position; if not, obtain the first position coordinates in the machine tool coordinate system and obtain the second position coordinates through the initial workpiece coordinate system, and calculate the average value to determine the midpoint position.

Benefits of technology

The accuracy of workpiece centering is improved, ensuring a more precise correspondence between the workpiece and the machine tool coordinate system, thereby improving machining accuracy and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117206974B_ABST
    Figure CN117206974B_ABST
Patent Text Reader

Abstract

The present invention provides a method, system and storage medium for centering a workpiece. The method includes: obtaining the angle value between the workpiece and the horizontal coordinate axis in the machine tool coordinate system, determining whether the angle value is a preset angle value, and if so, obtaining the reference position coordinates of the corresponding side through the workpiece, and determining the workpiece midpoint position by taking an average value based on the reference position coordinates; if not, obtaining the first position coordinates of the corresponding side in the machine tool coordinate system through the workpiece, and determining the reference position coordinates by taking an average value based on the first position coordinates; using the position corresponding to the reference position coordinates as the intermediate reference point, obtaining an initial workpiece coordinate system based on the intermediate reference point and the angle value, obtaining the second position coordinates of the corresponding side of the workpiece through the initial workpiece coordinate system, and determining the workpiece midpoint position by taking an average value based on the second position coordinates. The present application can improve the accuracy of the centering results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of machine tool processing technology, and in particular to a workpiece centering method, system and storage medium. Background Art

[0002] As the requirements for machine tool workpiece machining accuracy increase, achieving efficient and high-precision machining has always been a goal. During machine tool machining, a series of operations are required, including workpiece centering, rough machining, and repeated adjustments to achieve fine machining. Centering aligns the machine tool's coordinate system with the workpiece's coordinate system, locating the workpiece within the machine tool's coordinate system to facilitate subsequent machining operations and ultimately produce a qualified part.

[0003] In the actual machining process, the workpiece to be machined is usually manually fixed on the machine tool through a pallet, so that it is assumed that the workpiece to be machined is fixed in parallel with the pallet in the machine tool, that is, the machine tool coordinate system is parallel to the workpiece coordinate system. Then, the corresponding centering rod or probe is used to perform centering according to the parallel state, and subsequent machining operations are performed after the centering operation is completed. However, the pallet is fixed in a fixed position by a baffle fixed in the machine tool, so the pallet can be accurately fixed on the machine tool. The pallet is a flat plate without protrusions that can allow at least one workpiece to be machined to be placed at the same time. The workpiece to be machined needs to be manually fixed based on the work experience of the staff. This may result in the workpiece to be machined and the pallet not being fixed in parallel in the machine tool, that is, the machine tool coordinate system is not parallel to the workpiece coordinate system. If the centering is continued based on the parallel relationship, the accuracy of the centering result will be reduced, affecting the subsequent processing of the workpiece. Summary of the Invention

[0004] In order to improve the accuracy of the classification results, embodiments of the present application provide a method, system, and storage medium for classifying workpieces.

[0005] In a first aspect, this embodiment provides a method for centering a workpiece, the method comprising:

[0006] Obtaining an angle between the workpiece and a horizontal coordinate axis in a machine tool coordinate system, determining whether the angle is a preset angle, and if so, obtaining reference position coordinates of a corresponding side of the workpiece, and determining a sub-midpoint position of the workpiece by averaging the reference position coordinates;

[0007] If not, obtaining first position coordinates of the corresponding side surface in the machine tool coordinate system through the workpiece, and determining a reference position coordinate by taking an average value based on the first position coordinates;

[0008] The position corresponding to the reference position coordinate is taken as the intermediate reference point, and an initial workpiece coordinate system is obtained based on the intermediate reference point and the angle value. The second position coordinate of the corresponding side of the workpiece is obtained through the initial workpiece coordinate system, and the midpoint position of the workpiece is determined by taking the average value based on the second position coordinate.

[0009] In some embodiments, obtaining the angle between the workpiece and the horizontal coordinate axis in the machine tool coordinate system includes:

[0010] Obtaining angular position coordinates corresponding to two positions on any side surface of the workpiece, wherein a line connecting the two positions is not parallel to a vertical coordinate axis in a machine tool coordinate system;

[0011] Acquire a horizontal coordinate value of each angular position coordinate in a horizontal coordinate axis from the angular position coordinates, and generate a corresponding two-dimensional angular position coordinate based on the horizontal coordinate value;

[0012] The angle value between the workpiece and the horizontal coordinate axis in the machine tool coordinate system is determined according to the two-dimensional angular position coordinates.

[0013] In some embodiments, before obtaining the angle value between the workpiece and the horizontal coordinate axis in the machine tool coordinate system, the method further includes:

[0014] Obtaining the position coordinates of the pallet point corresponding to each first preset area on the upper surface of the pallet, and the position coordinates of the workpiece point corresponding to each second preset area on the upper surface of the workpiece;

[0015] A pallet flatness value is obtained according to the pallet point position coordinates, and a workpiece flatness value is obtained according to the workpiece point position coordinates.

[0016] In some embodiments, the method further comprises:

[0017] Determine whether the flatness value of the pallet and the flatness value of the workpiece both fall within a preset range, and if so, obtain the angle between the workpiece and the horizontal coordinate axis in the machine tool coordinate system;

[0018] If at least one does not fall into the category, a warning signal indicating that the preparation work does not meet the standards is generated, and a compliance signal indicating that the preparation work meets the standards is received. If the compliance signal is received, the position coordinates of the pallet point and the workpiece point are obtained.

[0019] In some embodiments, obtaining the pallet flatness value according to the pallet point position coordinates includes:

[0020] The Z coordinate value of each pallet point position coordinate is acquired based on the pallet point position coordinate, and the minimum Z coordinate value is subtracted from the maximum Z coordinate value of all the Z coordinate values ​​to obtain the pallet flatness value.

[0021] In some embodiments, obtaining the second position coordinates of the corresponding side surface of the workpiece through the initial workpiece coordinate system includes:

[0022] Obtain the lateral flatness of the four sides of the workpiece, determine whether all lateral flatnesses meet the preset tolerance, and if so, select a detection point on each side of the workpiece, and obtain the second position coordinates corresponding to each detection point in the initial workpiece coordinate system, wherein the line connecting the detection points on the mutually parallel sides is parallel or perpendicular to the horizontal plane coordinate axis of the initial workpiece coordinate system;

[0023] If at least one is not satisfied, two adjacent target sides with the smallest difference from the preset tolerance are selected from the four sides, and two detection points symmetrical about the center point of the target side are selected in each target side, and the second position coordinates corresponding to each detection point are obtained in the initial workpiece coordinate system.

[0024] In some embodiments, determining the midpoint position of the workpiece by averaging the second position coordinates includes:

[0025] determining whether the number of the second position coordinates is four, and if so, dividing the second position coordinates into two groups, wherein the two position coordinates in each group are symmetrical about a coordinate axis of the initial workpiece coordinate system;

[0026] The corresponding second position coordinates are added together to obtain an average value to obtain a coordinate value on a corresponding coordinate axis, and the midpoint position of the workpiece is obtained based on all the coordinate values;

[0027] If there are not four, obtain the coordinate axis corresponding to each second position coordinate, obtain the coordinate value of the corresponding second position coordinate about the coordinate axis according to the coordinate axis, and obtain the midpoint position of the workpiece based on all the coordinate values.

[0028] In a second aspect, this embodiment provides a workpiece centering system, the system comprising: an angle acquisition module, an angle judgment module, a non-bias centering module and a bias centering module; wherein,

[0029] The angle acquisition module is used to obtain the angle value between the workpiece and the horizontal coordinate axis in the machine tool coordinate system;

[0030] The angle determination module is used to determine whether the angle value is a preset angle value;

[0031] The non-biased centering module is used to obtain the reference position coordinates of the corresponding side surface through the workpiece if the angle value is a preset angle value, and to determine the center point position of the workpiece by calculating an average value based on the reference position coordinates;

[0032] The deviation centering module is used to obtain the first position coordinates of the corresponding side surface in the machine tool coordinate system through the workpiece if the angle value is not a preset angle value, and determine the reference position coordinates based on the average value of the first position coordinates; use the position corresponding to the reference position coordinates as the intermediate reference point, obtain the initial workpiece coordinate system based on the intermediate reference point and the angle value, obtain the second position coordinates of the corresponding side surface of the workpiece through the initial workpiece coordinate system, and determine the midpoint position of the workpiece by taking the average value based on the second position coordinates.

[0033] In some embodiments, the system further comprises a flatness module; wherein,

[0034] The flatness module is used to obtain the pallet point position coordinates corresponding to each first preset area on the upper surface of the pallet, and the workpiece point position coordinates corresponding to each second preset area on the upper surface of the workpiece; obtain the pallet flatness value based on the pallet point position coordinates, and obtain the workpiece flatness value based on the workpiece point position coordinates.

[0035] In a third aspect, this embodiment provides a computer-readable storage medium storing a computer program that can be run on a processor. When the computer program is executed by the processor, the method for dividing a workpiece as described in the first aspect is implemented.

[0036] By adopting the above method, the present application first obtains the angle value between the workpiece and the horizontal coordinate axis in the machine tool coordinate system, and determines whether the workpiece is in a parallel state with the machine tool coordinate system by comparing the angle value with the preset angle value. If it is in a parallel state, the reference position coordinates of the corresponding side of the workpiece are directly obtained, and the reference position coordinates are averaged to determine the midpoint position of the workpiece. If it is not in a parallel state, a plurality of first position coordinates in the machine tool coordinate system are first obtained, and the first position coordinates are averaged to preliminarily obtain the reference position coordinates representing the approximate midpoint position; then, based on the intermediate reference point and the angle value, the initial workpiece coordinate system is obtained, and the second position coordinates are obtained in the initial workpiece coordinate system, and the second position coordinates are averaged to obtain the accurate midpoint position, so that corresponding centering methods are adopted for different states to improve the accuracy of the centering results. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 This is a schematic diagram of the direction of the machine tool coordinate system in the three-axis vertical CNC machine tool provided in the embodiment of the present application.

[0038] Figure 2 This is a block diagram of a method for dividing workpieces provided in an embodiment of the present application.

[0039] Figure 3 This is a block diagram for obtaining the angle value between the workpiece and the horizontal coordinate axis in the machine tool coordinate system provided by an embodiment of the present application.

[0040] Figure 4 This is a schematic diagram of obtaining reference position coordinates provided in an embodiment of the present application.

[0041] Figure 5 This is a block diagram of obtaining the second position coordinates of the corresponding side of the workpiece through the initial workpiece coordinate system provided by an embodiment of the present application.

[0042] Figure 6 This is a block diagram of determining the midpoint position of a workpiece based on the average value of the second position coordinates provided in an embodiment of the present application.

[0043] Figure 7 This is a system framework diagram for dividing a workpiece provided in an embodiment of the present application. DETAILED DESCRIPTION

[0044] In order to more clearly understand the purpose, technical solutions and advantages of the present application, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments. However, it should be understood by those skilled in the art that the present application can be implemented without these details. It is obvious to those skilled in the art that various changes can be made to the embodiments disclosed in the present application, and the general principles defined in the present application can be applied to other embodiments and application scenarios without departing from the principles and scope of the present application. Therefore, the present application is not limited to the embodiments shown, but conforms to the broadest scope consistent with the scope claimed in the present application.

[0045] The embodiments of the present application are described in further detail below with reference to the accompanying drawings.

[0046] The workpiece in the embodiments of this application refers to a rough workpiece to be machined, typically in the form of a rectangular parallelepiped. The workpiece is automatically centered and processed by a machine tool to obtain the final finished product. Specifically, the machine tool can be any of a three-axis horizontal CNC machine tool, a three-axis vertical CNC machine tool, a five-axis horizontal CNC machine tool, and a five-axis vertical CNC machine tool. In the embodiments of this application, a three-axis vertical CNC machine tool is preferred. Figure 1 This is a schematic diagram of the coordinate system direction of the three-axis vertical CNC machine tool provided in the embodiment of the present application. Figure 1 As shown, in a three-axis vertical CNC machine tool, the Z-axis is the direction from the chuck's rotation center to the tool, parallel to the spindle, with the direction of the tool moving away from the workpiece being positive. The Z-axis is perpendicular to the chuck's direction toward the tool, and the tool rotates. Therefore, when looking toward the tool spindle and toward the column, the direction to the right is positive. The Y-axis is perpendicular to the XZ plane. Once the Z and X coordinates are determined, the Y-axis can be determined using a right-handed rectangular coordinate system.

[0047] Figure 2 This is a block diagram of a method for dividing a workpiece provided in an embodiment of the present application. Figure 2As shown, a method for centering a workpiece includes the following steps:

[0048] Step S100, obtain the angle value between the workpiece and the horizontal coordinate axis in the machine tool coordinate system, and determine whether the angle value is a preset angle value. If so, obtain the reference position coordinates of the corresponding side through the workpiece, and calculate the average value based on the reference position coordinates to determine the midpoint position of the workpiece.

[0049] Before centering and machining a workpiece, a machine tool requires a pallet to secure the workpiece to the machine, ultimately positioning the pallet between the workpiece and the machine. The pallet's shape matches the machine's worktable, ensuring it remains precisely fixed to a fixed position on the machine, parallel to the machine's coordinate system. The pallet, a relatively large, thin, flat plate relative to the workpiece, includes several placement areas, each capable of holding a single workpiece. All workpieces placed on the pallet require only the same tool, and each is spaced a certain distance apart to prevent the tool or probe from contacting surrounding workpieces during measurement or machining. Since workpiece blank dimensions may vary from one workpiece to another, the pallet lacks specific markings to determine the placement of each workpiece. Workers must carefully position and secure the workpiece to the pallet based on the specific situation. Once the workpiece is secured to the pallet, it's impossible to guarantee its parallelism with the machine's coordinate system, necessitating the determination of the angle between the workpiece and the horizontal axis of the machine's coordinate system. The machine tool coordinate system is fixed by the machine tool manufacturer before the machine tool leaves the factory.

[0050] Since the flatness of the pallet and workpiece can affect subsequent operations such as workpiece centering and processing, errors may occur during the centering and processing process, affecting the finished product. Therefore, after the pallet and workpiece are fixed to the machine tool and before the angle between the workpiece and the horizontal coordinate axis in the machine tool coordinate system is obtained, it is necessary to check whether the flatness of the pallet and workpiece meets the standard. Checking whether the flatness of the pallet and workpiece meets the standard includes the following steps:

[0051] Step S0-1: acquiring the position coordinates of the pallet point corresponding to each first preset area on the upper surface of the pallet, and the position coordinates of the workpiece point corresponding to each second preset area on the upper surface of the workpiece.

[0052] Step S0-2, obtaining a pallet flatness value according to the pallet point position coordinates, and obtaining a workpiece flatness value according to the workpiece point position coordinates.

[0053] Step S0-3: determine whether the flatness value of the pallet and the flatness value of the workpiece are both within a preset range. If both are within a preset range, obtain the angle value between the workpiece and the horizontal coordinate axis in the machine tool coordinate system.

[0054] Step S0-4: if at least one of the conditions does not fall into the category, a warning signal indicating that the preparation work does not meet the criteria is generated, and a compliance signal indicating that the preparation work meets the criteria is received. If the compliance signal is received, the coordinates of the pallet point position and the workpiece point position are obtained.

[0055] The tool rest in a machine tool is equipped with multiple mounting sections, each of which can be used to mount a different tool or a probe for centering operations. With the positive Y-axis in the machine tool coordinate system as the reference perspective, a number of first preset areas are defined on the upper surface of the pallet, with no overlap between the first preset areas. In this embodiment, four first preset areas are preferably defined on the upper surface of the pallet, located at the four corners of the pallet's upper surface. This allows the probe installed in the machine tool's tool rest to select a location within each first preset area for measurement, thereby obtaining the corresponding pallet point coordinates for the four different locations in the machine tool coordinate system. Similarly, placing a workpiece within a certain area of ​​the pallet allows the machine tool to determine the approximate location of the workpiece. Four second preset areas are defined on the upper surface of the workpiece, located at the four corners of the workpiece's upper surface. The probe selects a location within each second preset area for measurement, thereby obtaining the corresponding workpiece point coordinates for the four different locations in the machine tool coordinate system. Each pallet point coordinate and each workpiece point coordinate are three-dimensional coordinates.

[0056] Among them, obtaining the pallet flatness value based on the pallet point position coordinates includes: obtaining the Z coordinate value in each pallet point position coordinate based on the pallet point position coordinates, and subtracting the minimum Z coordinate value from the maximum Z coordinate value of all Z coordinate values ​​to obtain the pallet flatness value. In this way, the maximum and minimum values ​​of the upper surface of the pallet in the Z-axis direction, that is, the vertical direction, can be obtained, and a difference value can be obtained by subtracting the maximum value from the minimum value. This difference value is the pallet flatness value of the pallet in the vertical direction. Similarly, the Z coordinate value in each workpiece point position coordinate based on the workpiece point position coordinates, and the maximum Z coordinate value from the minimum Z coordinate value of all Z coordinate values ​​can be subtracted to obtain a difference value. This difference value is the workpiece flatness value of the workpiece in the vertical direction.

[0057] Both the pallet and the workpiece have corresponding preset ranges for flatness. The pallet flatness value obtained above is compared with the minimum and maximum values ​​of the corresponding preset ranges in turn to determine whether the pallet flatness value falls within the preset range. If the pallet flatness value is not less than the minimum value of the corresponding preset range and not greater than the maximum value of the corresponding preset range, it indicates that the pallet flatness value falls within the preset range; otherwise, the pallet flatness value does not fall within the preset range. Similarly, if the workpiece flatness value is not less than the minimum value of the corresponding preset range and not greater than the maximum value of the corresponding preset range, it indicates that the workpiece flatness value falls within the preset range; otherwise, the workpiece flatness value does not fall within the preset range. If both the pallet flatness value and the workpiece flatness value fall within the preset range, it indicates that the flatness of the pallet and the workpiece meet the standards, and the angle between the workpiece and the horizontal coordinate axis in the machine tool coordinate system can be directly obtained.

[0058] If at least one of the pallet flatness value and the workpiece flatness value does not fall within the preset range, it indicates a problem with either the pallet or the workpiece, and a warning signal is generated. These warning signals include three types: a first warning signal indicating that only the pallet flatness value does not fall within the preset range; a second warning signal indicating that only the workpiece flatness value does not fall within the preset range; and a third warning signal indicating that neither the pallet flatness value nor the workpiece flatness value falls within the preset range. This facilitates adjustments based on the warning signal. For example, for the second warning signal, the staff only needs to adjust the workpiece. After the staff has made the corresponding adjustments based on the warning signal, a compliance signal is sent to the machine tool. Upon receiving the compliance signal, the machine tool proceeds to step S0-1 to reacquire the pallet point position coordinates and the workpiece point position coordinates to recheck whether the pallet and workpiece flatness meet the standards. Only after the pallet and workpiece flatness meet the standards is the angle between the workpiece and the horizontal coordinate axis of the machine tool coordinate system determined. This improves the accuracy of subsequent angle measurements.

[0059] Figure 3 This is a block diagram of obtaining the angle value between the workpiece and the horizontal coordinate axis in the machine tool coordinate system provided by the embodiment of the present application. Figure 3 As shown, obtaining the angle value between the workpiece and the horizontal coordinate axis in the machine tool coordinate system includes the following steps:

[0060] Step S101 : obtaining angular position coordinates corresponding to two positions on any side surface of a workpiece, wherein a line connecting the two positions is not parallel to a vertical coordinate axis in a machine tool coordinate system.

[0061] Step S102 : acquiring the horizontal coordinate value of each angular position coordinate in the horizontal coordinate axis from the angular position coordinates, and generating the corresponding two-dimensional angular position coordinates based on the horizontal coordinate value.

[0062] Step S103 , determining the angle between the workpiece and the horizontal coordinate axis in the machine tool coordinate system according to the two-dimensional angular position coordinates.

[0063] The above-mentioned horizontal coordinate axes are the X-axis and Y-axis of the machine tool coordinate system. The workpiece has four sides. Two positions that are not parallel to the Z-axis direction of the machine tool coordinate system are selected from any of the four sides, and the angular position coordinates corresponding to the two positions are obtained with a stylus. From each angular position coordinate, the coordinate value on the X-axis and the coordinate value on the Y-axis are selected, and the coordinate value on the X-axis and the coordinate value on the Y-axis are combined to obtain the two-dimensional angular position coordinates, that is, the two-dimensional coordinates. These two-dimensional coordinates are equivalent to the projection coordinates of the two positions in the horizontal direction, specifically (x1, y1) and (x2, y2), which can be obtained by using the formula To get the angle between the workpiece and the X-axis in the machine tool coordinate system, or by using the formula To obtain the angle between the workpiece and the Y coordinate axis in the machine tool coordinate system.

[0064] If the angle value is the angle value between the workpiece and the X-axis in the machine coordinate system, the above-mentioned preset angle value is 0. If the angle value is the angle value between the workpiece and the Y-axis in the machine coordinate system, the above-mentioned preset angle value is 90. Therefore, the angle difference is obtained by subtracting the corresponding preset angle value from the angle value. If the angle difference is zero, it indicates that the angle value is the preset angle value and the workpiece is parallel to the machine coordinate system. At this time, the probe is used to measure the flatness values ​​of the four sides of the workpiece using the above method. If the flatness values ​​of the four sides all meet the corresponding preset tolerances, it indicates that the four sides of the workpiece are relatively smooth. At this time, the four-side point method is selected, that is, the probe selects a position on each side for measurement, and a total of four corresponding reference position coordinates are obtained. The two reference position coordinates from the plane perpendicular to the X-axis in these four reference position coordinates are divided into a group, and the X coordinate values ​​of the two reference position coordinates in this group are averaged to obtain the X coordinate value corresponding to the midpoint position in the machine coordinate system. The other two reference positions are automatically grouped together. The Y coordinate values ​​of the two reference positions in this group are averaged to obtain the Y coordinate value of the sub-midpoint in the machine coordinate system. The Z coordinate value of any of these four reference positions is the Z coordinate value of the sub-midpoint in the machine coordinate system. This allows the coordinate value of the sub-midpoint in the machine coordinate system to be determined, thereby establishing a connection between the workpiece coordinate system and the machine coordinate system and determining the sub-midpoint position of the workpiece.

[0065] If at least one of the four side surface flatness values ​​does not meet the corresponding preset tolerance, the side surface that does not meet the corresponding preset tolerance is relatively rough. In this case, the single-side point selection method is selected, that is, two adjacent target side surfaces with the smallest difference from the preset tolerance are selected from the four side surfaces. The midpoint position point of each target side surface is selected, and the X coordinate value of the midpoint position point of the side surface parallel to the X axis is used as the X coordinate value of the sub-midpoint position in the machine tool coordinate system. Similarly, the Y coordinate value of the center position point of the side surface parallel to the Y axis is used as the Y coordinate value of the sub-midpoint position in the machine tool coordinate system. The Z coordinate value of any midpoint position point of these two midpoint positions is the Z coordinate value of the sub-midpoint position in the machine tool coordinate system. In this way, the coordinate value of the sub-midpoint in the machine tool coordinate system can be obtained, thereby establishing an association between the workpiece and the machine tool coordinate system and determining the sub-midpoint position of the workpiece.

[0066] Step S200: If not, obtain the first position coordinates of the corresponding side surface in the machine tool coordinate system through the workpiece, and determine the reference position coordinates by taking an average value based on the first position coordinates.

[0067] If the angle difference is not zero, it means that the angle value is not the preset angle value, and the workpiece is not parallel to the machine coordinate system. At this time, the midpoint position cannot be determined according to the method mentioned above when the workpiece is parallel to the machine coordinate system. It is necessary to first obtain the first position coordinates of the corresponding side of the workpiece in the machine coordinate system. Obtaining the first position coordinates includes: obtaining the side flatness of the four sides of the workpiece, judging whether all side flatnesses meet the preset tolerance, if they all meet, selecting a detection point on each side of the workpiece, and obtaining the first position coordinates corresponding to each detection point in the machine coordinate system, wherein the line between the detection points in the mutually parallel sides is parallel or perpendicular to the side of the workpiece. If at least one is not satisfied, select two relative target sides with the smallest difference from the preset tolerance from the four sides, select two detection points symmetrical about the center point of the target side in each target side, and obtain the first position coordinates corresponding to each detection point in the machine coordinate system.

[0068] If the lateral flatness of all four sides of the workpiece meets the preset tolerance, a probe is used to obtain four first position coordinate values ​​in the machine tool coordinate system by selecting a detection point on each side. These four first position coordinate values ​​can be divided into two groups of coordinate values. Each group of coordinate values ​​includes two first position coordinate values ​​belonging to opposite sides. The line connecting the positions corresponding to the first group of coordinate values ​​is parallel to the side of the workpiece close to the X-axis in the machine tool coordinate system, and the line connecting the positions corresponding to the second group of coordinate values ​​is parallel to the side of the workpiece close to the Y-axis in the machine tool coordinate system. The two first position coordinate values ​​in the first group of coordinate values ​​are averaged to obtain a first average coordinate value. The X coordinate value in this first average coordinate value is the X coordinate value of the reference position coordinate. Similarly, the two first position coordinate values ​​in the second group of coordinate values ​​are averaged to obtain a second average coordinate value. The Y coordinate value in this second average coordinate value is the Y coordinate value of the reference position coordinate. Any Z coordinate value in the four first position coordinate values ​​is the Z coordinate value of the reference position coordinate. Thus, the reference position coordinate is obtained. Since the approximate position of the workpiece is already known to the machine tool when the workpiece is fixed on it, and there will only be slight deviations when the workpiece is installed by the staff, and there will be no deviations that are obviously visible to the naked eye.

[0069] Because the workpiece and the machine tool coordinate system are not parallel but angularly offset, the midpoint cannot be directly determined in step S200. Instead, the probe mounted on the machine tool tool holder must be moved roughly to the vicinity of the four sides of the workpiece in the machine tool coordinate system. Then, the probe is gradually moved closer to the workpiece to determine the corresponding detection point for each side. The approximate midpoint position is then determined by averaging the obtained detection points. Figure 4 Schematic diagram of obtaining reference position coordinates provided by the embodiment of the present application. Figure 4 As shown, a vertex of the workpiece is located at the origin of the machine coordinate system, O is the midpoint of the workpiece, the angle is w, the coordinates of point A on the workpiece are (a, b), and the coordinates of point B are (c, d), so the coordinates of point C are (ac, b + d). The X coordinate of the reference position calculated from points B and C is (a - c + c) / 2, or a / 2. Obviously, a / 2 is not the X coordinate value of O in the X-axis direction.

[0070] To further accurately determine the sub-midpoint position, adjustments must be made based on the reference position coordinates. Specifically, step S300 is executed, using the position corresponding to the reference position coordinates as the intermediate reference point. An initial workpiece coordinate system is obtained based on the intermediate reference point and the included angle. The second position coordinates of the corresponding side of the workpiece are obtained using the initial workpiece coordinate system. The average of the second position coordinates is then used to determine the sub-midpoint position of the workpiece.

[0071] The point corresponding to the reference position coordinates obtained in step S200 is used as the intermediate reference point, and the angle between the workpiece and the X-axis in the machine tool coordinate system in the counterclockwise direction is obtained through the angle value. The center reference point is used as the coordinate origin, and the direction of the X-axis in the machine tool coordinate system after rotating counterclockwise by the above angle is the X-axis direction. The direction of the X-axis in the machine tool coordinate system after rotating counterclockwise by the above angle plus 90 degrees is the Y-axis direction. The Z-axis direction in the machine tool coordinate system is the Z-axis direction, thereby obtaining an initial workpiece coordinate system.

[0072] Figure 5 This is a diagram of obtaining the second position coordinates of the corresponding side of the workpiece through the initial workpiece coordinate system provided by the embodiment of the present application. Figure 5 As shown, obtaining the second position coordinates of the corresponding side surface of the workpiece through the initial workpiece coordinate system includes the following steps:

[0073] Step S301, obtain the side flatness of the four sides of the workpiece, and determine whether all side flatnesses meet the preset tolerances. If all side flatnesses meet the preset tolerances, select a detection point on each side of the workpiece, and obtain the second position coordinates corresponding to each detection point in the initial workpiece coordinate system, wherein the connecting line between the detection points in the parallel sides is parallel or perpendicular to the horizontal plane coordinate axis of the initial workpiece coordinate system.

[0074] In step S302, if at least one condition is not satisfied, two adjacent target side surfaces with the smallest difference from the preset tolerance are selected from the four side surfaces, two detection points symmetrical about the center point of the target side surface are selected in each target side surface, and the second position coordinates corresponding to each detection point are obtained in the initial workpiece coordinate system.

[0075] In the obtained initial workpiece coordinate system, the second position coordinate is obtained by continuing to use the above method of obtaining the reference position coordinate and the first position coordinate. That is, the point selection method needs to be determined based on the lateral flatness of the four sides, which will not be described here. However, the difference is that the second position coordinate is the coordinate in the initial workpiece coordinate system, while the reference position coordinate and the first position coordinate are both in the machine tool coordinate system. In addition, the corresponding relationship between the machine tool coordinate system and the initial workpiece coordinate system can be obtained through the reference position coordinate and the angle value.

[0076] Figure 6 This is a block diagram of determining the midpoint position of a workpiece based on the average value of the second position coordinates provided by the embodiment of the present application. Figure 6 As shown, determining the midpoint position of the workpiece based on the average value of the second position coordinates includes the following steps: Step S303, judging whether the number of the second position coordinates is four, and if so, dividing the second position coordinates into two groups, wherein the two position coordinates in each group are symmetrical about a certain coordinate axis of the initial workpiece coordinate system.

[0077] In step S304 , two corresponding position coordinates are added together to obtain an average value to obtain a coordinate value on a corresponding coordinate axis, and the midpoint position of the workpiece is obtained based on all the coordinate values.

[0078] Step S305: if there are not four, obtain the coordinate axis corresponding to each second position coordinate, obtain the coordinate value of the corresponding second position coordinate about the coordinate axis according to the coordinate axis, and obtain the midpoint position of the workpiece based on all the coordinate values.

[0079] If there are four second position coordinates, the position coordinates between two opposite side surfaces can be averaged according to the principle of symmetry to obtain two new coordinate values. The X coordinate value of the new coordinate value obtained on the side surface parallel to the Y axis in the initial workpiece coordinate system is used as the X coordinate value of the sub-midpoint position, the Y coordinate value of the new coordinate value obtained on the side surface parallel to the X axis in the initial workpiece coordinate system is used as the Y coordinate value of the sub-midpoint position, and the Z coordinate value of any new coordinate value is used as the Z coordinate value of the sub-midpoint position.

[0080] If the number of the second position coordinates is two, the X coordinate value of the second position coordinate on the side parallel to the X axis in the initial workpiece coordinate system is used as the X coordinate value of the sub-midpoint position, the Y coordinate value of the second position coordinate on the side parallel to the Y axis in the initial workpiece coordinate system is used as the Y coordinate value of the sub-midpoint position, and the Z coordinate value of any second position coordinate is used as the Z coordinate value of the sub-midpoint position.

[0081] After accurately determining the midpoint position in the initial workpiece coordinate system, the midpoint position in the machine coordinate system can be determined by using the correspondence between the machine coordinate system and the initial workpiece coordinate system. Specifically, this embodiment compares the included angle value with a preset included angle value to determine whether the workpiece is parallel to the machine coordinate system. Corresponding centering methods are then employed for different states to improve the accuracy of the centering results.

[0082] Multiple workpieces can be placed on the pallet at the same time. In this way, after the workpieces are fixed on the machine tool, only the flatness of the pallet and the workpiece needs to be checked when centering the first workpiece. For the centering of subsequent workpieces, only the flatness of the workpiece needs to be checked, and the flatness of the pallet is omitted, which reduces repeated operations, reduces labor intensity and error rate, and improves work efficiency.

[0083] In addition, the machine tool's tool holder can be equipped with a probe and multiple tools simultaneously. This allows the probe to measure the workpiece's machining accuracy online as needed, without removing the workpiece or pallet. If machining accuracy falls short of the target, adjustments can be made based on the measured error, allowing for online re-machining and continuous machining. This reduces the need for workpiece assembly and disassembly, improving machining accuracy and maximizing the efficiency of work time.

[0084] Figure 7 This is a workpiece classification system framework diagram provided by the embodiment of this application. Figure 7 As shown, a workpiece centering system includes: an angle acquisition module, an angle judgment module, a non-deviation centering module, a deviation centering module and a flatness module.

[0085] The angle acquisition module is used to obtain the angle between the workpiece and the horizontal coordinate axis in the machine coordinate system. The angle judgment module is used to determine whether the angle value is a preset angle value. The non-deviation centering module is used to obtain the reference position coordinates of the corresponding side surface from the workpiece if the angle value is the preset angle value, and to determine the workpiece midpoint position by averaging the reference position coordinates. The deviation centering module is used to obtain the first position coordinates of the corresponding side surface in the machine coordinate system from the workpiece if the angle value is not the preset angle value, and to determine the reference position coordinates by averaging the first position coordinates. The position corresponding to the reference position coordinates is used as the intermediate reference point, and an initial workpiece coordinate system is obtained based on the intermediate reference point and the angle value. The second position coordinates of the corresponding side surface of the workpiece are obtained from the initial workpiece coordinate system, and the workpiece midpoint position is determined by averaging the second position coordinates. The flatness module is used to obtain the pallet point position coordinates corresponding to each first preset area on the upper surface of the pallet, and the workpiece point position coordinates corresponding to each second preset area on the upper surface of the workpiece; obtain the pallet flatness value based on the pallet point position coordinates, and obtain the workpiece flatness value based on the workpiece point position coordinates.

[0086] The other functions performed by the above-mentioned angle acquisition module, angle judgment module, deviation centering module, deviation centering module and flatness module, as well as the technical details of each function are the same or similar to the corresponding features in the workpiece centering method described above, so they will not be repeated here.

[0087] An embodiment of the present application further provides a computer storage medium having a computer program stored thereon. When the computer storage medium is run on a computer, the computer can execute the steps of the workpiece division method described above.

[0088] It should be understood that although the steps in the flowcharts of the accompanying drawings are shown in sequence as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps and they may be executed in other orders.

[0089] The above description is only part of the implementation methods of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A method for centering a workpiece, characterized in that: The method comprises: Obtaining an angle between the workpiece and a horizontal coordinate axis in a machine tool coordinate system, determining whether the angle is a preset angle, and if so, obtaining reference position coordinates of a corresponding side of the workpiece, and determining a sub-midpoint position of the workpiece by averaging the reference position coordinates; If not, obtaining first position coordinates of the corresponding side surface in the machine tool coordinate system through the workpiece, and determining a reference position coordinate by taking an average value based on the first position coordinates; Taking the position corresponding to the reference position coordinate as an intermediate reference point, obtaining an initial workpiece coordinate system based on the intermediate reference point and the angle value, obtaining the second position coordinates of the corresponding side surface of the workpiece through the initial workpiece coordinate system, and determining the sub-midpoint position of the workpiece by averaging the second position coordinates; Before obtaining the angle value between the workpiece and the horizontal coordinate axis in the machine tool coordinate system, the method further includes: Obtaining the position coordinates of the pallet point corresponding to each first preset area on the upper surface of the pallet, and the position coordinates of the workpiece point corresponding to each second preset area on the upper surface of the workpiece; Obtaining a pallet flatness value according to the pallet point position coordinates, and obtaining a workpiece flatness value according to the workpiece point position coordinates; Acquiring the second position coordinates of the corresponding side surface of the workpiece through the initial workpiece coordinate system includes: Obtain the lateral flatness of the four sides of the workpiece, determine whether all lateral flatnesses meet the preset tolerance, and if so, select a detection point on each side of the workpiece, and obtain the second position coordinates corresponding to each detection point in the initial workpiece coordinate system, wherein the line connecting the detection points on the mutually parallel sides is parallel or perpendicular to the horizontal plane coordinate axis of the initial workpiece coordinate system; If at least one of the conditions is not satisfied, two adjacent target side surfaces with the smallest difference from the preset tolerance are selected from the four side surfaces, two detection points symmetrical about the center point of the target side surface are selected on each target side surface, and the second position coordinates corresponding to each detection point are obtained in the initial workpiece coordinate system; Determining the midpoint position of the workpiece by averaging the second position coordinates includes: determining whether the number of the second position coordinates is four, and if so, dividing the second position coordinates into two groups, wherein the two position coordinates in each group are symmetrical about a coordinate axis of the initial workpiece coordinate system; The corresponding second position coordinates are added together to obtain an average value to obtain a coordinate value on a corresponding coordinate axis, and the midpoint position of the workpiece is obtained based on all the coordinate values; If there are not four, obtain the coordinate axis corresponding to each second position coordinate, obtain the coordinate value of the corresponding second position coordinate about the coordinate axis according to the coordinate axis, and obtain the midpoint position of the workpiece based on all the coordinate values.

2. The method according to claim 1, characterized in that The method of obtaining the angle between the workpiece and the horizontal coordinate axis in the machine tool coordinate system includes: Obtaining angular position coordinates corresponding to two positions on any side surface of the workpiece, wherein a line connecting the two positions is not parallel to a vertical coordinate axis in a machine tool coordinate system; Acquire a horizontal coordinate value of each angular position coordinate in a horizontal coordinate axis from the angular position coordinates, and generate a corresponding two-dimensional angular position coordinate based on the horizontal coordinate value; The angle value between the workpiece and the horizontal coordinate axis in the machine tool coordinate system is determined according to the two-dimensional angular position coordinates.

3. The method according to claim 1, characterized in that The method further comprises: Determine whether the flatness value of the pallet and the flatness value of the workpiece both fall within a preset range, and if so, obtain the angle between the workpiece and the horizontal coordinate axis in the machine tool coordinate system; If at least one does not fall into the category, a warning signal indicating that the preparation work does not meet the standards is generated, and a compliance signal indicating that the preparation work meets the standards is received. If the compliance signal is received, the position coordinates of the pallet point and the workpiece point are obtained.

4. The method according to claim 1, wherein Obtaining the flatness value of the pallet according to the pallet point position coordinates includes: The Z coordinate value of each pallet point position coordinate is acquired based on the pallet point position coordinate, and the minimum Z coordinate value is subtracted from the maximum Z coordinate value of all the Z coordinate values ​​to obtain the pallet flatness value.

5. A workpiece centering system, characterized in that: The system includes: an angle acquisition module, an angle judgment module, a non-bias centering module and a bias centering module; wherein, The angle acquisition module is used to obtain the angle value between the workpiece and the horizontal coordinate axis in the machine tool coordinate system; The angle determination module is used to determine whether the angle value is a preset angle value; The non-biased centering module is used to obtain the reference position coordinates of the corresponding side surface through the workpiece if the angle value is a preset angle value, and to determine the center point position of the workpiece by averaging the reference position coordinates; The deviation centering module is used to obtain the first position coordinates of the corresponding side surface in the machine tool coordinate system through the workpiece if the angle value is not a preset angle value, and determine the reference position coordinates by taking an average value based on the first position coordinates; use the position corresponding to the reference position coordinates as an intermediate reference point, obtain an initial workpiece coordinate system based on the intermediate reference point and the angle value, obtain the second position coordinates of the corresponding side surface of the workpiece through the initial workpiece coordinate system, and determine the midpoint position of the workpiece by taking an average value based on the second position coordinates; Before obtaining the angle value between the workpiece and the horizontal coordinate axis in the machine tool coordinate system, the method further includes: Obtaining the position coordinates of the pallet point corresponding to each first preset area on the upper surface of the pallet, and the position coordinates of the workpiece point corresponding to each second preset area on the upper surface of the workpiece; Obtaining a pallet flatness value according to the pallet point position coordinates, and obtaining a workpiece flatness value according to the workpiece point position coordinates; Acquiring the second position coordinates of the corresponding side surface of the workpiece through the initial workpiece coordinate system includes: Obtain the lateral flatness of the four sides of the workpiece, determine whether all lateral flatnesses meet the preset tolerance, and if so, select a detection point on each side of the workpiece, and obtain the second position coordinates corresponding to each detection point in the initial workpiece coordinate system, wherein the line connecting the detection points on the mutually parallel sides is parallel or perpendicular to the horizontal plane coordinate axis of the initial workpiece coordinate system; If at least one of the conditions is not satisfied, two adjacent target side surfaces with the smallest difference from the preset tolerance are selected from the four side surfaces, two detection points symmetrical about the center point of the target side surface are selected on each target side surface, and the second position coordinates corresponding to each detection point are obtained in the initial workpiece coordinate system; Determining the midpoint position of the workpiece by averaging the second position coordinates includes: determining whether the number of the second position coordinates is four, and if so, dividing the second position coordinates into two groups, wherein the two position coordinates in each group are symmetrical about a coordinate axis of the initial workpiece coordinate system; The corresponding second position coordinates are added together to obtain an average value to obtain a coordinate value on a corresponding coordinate axis, and the midpoint position of the workpiece is obtained based on all the coordinate values; If there are not four, obtain the coordinate axis corresponding to each second position coordinate, obtain the coordinate value of the corresponding second position coordinate about the coordinate axis according to the coordinate axis, and obtain the midpoint position of the workpiece based on all the coordinate values.

6. A computer-readable storage medium having stored thereon a computer program capable of running on a processor, characterized in that: When the computer program is executed by the processor, the method for dividing a workpiece according to any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Automatic deviation rectifying method for workpiece machining coordinate system and related device

    CN116423290A

  • Three-dimensional measuring machine measurement method and three-dimensional measuring machine

    JP2018084488A