Machine tool positioning method, device, equipment, medium and program product

By determining the rotation position based on the preset angle and the workpiece origin position in a CNC machine tool and calculating the offset value, efficient positioning of the machine tool is achieved, solving the pause problem caused by the long positioning path in the prior art, and improving machining efficiency.

CN120044873APending Publication Date: 2025-05-27BEIJING FANUC MECHATRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510169177.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-17
Publication Date
2025-05-27

AI Technical Summary

Technical Problem

When the existing CNC machine tools are positioned in inclined planes, the program path is long, resulting in multiple pauses, which increases processing time and reduces processing efficiency.

Method used

By determining the rotational position of the workpiece based on the preset angle and the origin position of the workpiece, calculating the offset value, and using the coordinated position of the rotation axis and the linear axis to shorten the machining path and reduce program pauses.

Benefits of technology

It realizes efficient positioning of the machine tool, shortens the processing path, reduces the number of program pauses, and thus improves the machining efficiency of the machine tool.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120044873A_ABST
    Figure CN120044873A_ABST
Patent Text Reader

Abstract

The invention provides a machine tool positioning method and device, equipment, a medium and a program product, and aims to solve the problem of low machining efficiency of a machine tool in the related technology. The method comprises the steps that the rotating position of a workpiece is determined based on a preset angle and the original point position of the workpiece installed in a machining platform, and the preset angle is used for indicating the angle at which the machining platform needs to drive the workpiece to rotate around a rotating shaft in the machine tool positioning process; the original point position of the workpiece is used for indicating the position of the workpiece relative to the mechanical original point before the machining platform rotates around the rotating shaft according to the preset angle, and the rotating position is used for indicating the position of the workpiece relative to the mechanical original point after the machining platform rotates around the rotating shaft according to the preset angle; determining an offset value based on the rotation position and the origin position of the workpiece; and controlling the machining platform to move to the target position based on the preset angle and the offset value so as to position the machine tool. The machining efficiency of the machine tool can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of machine tool processing, and particularly relates to a machine tool positioning method, device, equipment, medium and program product. Background Art

[0002] In the prior art, when a numerically controlled machine tool performs inclined plane positioning, a separate positioning scheme of first rotating axis positioning and then linear axis movement is adopted. The program path of this positioning scheme is long, resulting in multiple pauses, increasing the overall processing time, and thus leading to low processing efficiency. Summary of the Invention

[0003] Embodiments of the present application provide a machine tool positioning method, device, equipment, medium and program product to solve the problem of low processing efficiency of machine tools in related technologies.

[0004] To solve the above technical problems, the present application is implemented as follows:

[0005] In a first aspect, an embodiment of the present application provides a machine tool positioning method applied to a machine tool, where the machine tool includes a processing platform, two rotating axes and three linear axes, and the method includes:

[0006] Determine the rotation position of the workpiece based on a preset angle and the origin position of the workpiece installed on the processing platform, where the preset angle is used to indicate the angle by which the processing platform needs to drive the workpiece to rotate around the rotating axis during the positioning of the machine tool, the origin position of the workpiece is used to indicate the position of the workpiece relative to the mechanical origin before the processing platform rotates around the rotating axis according to the preset angle, and the rotation position is used to indicate the position of the workpiece relative to the mechanical origin after the processing platform rotates around the rotating axis according to the preset angle;

[0007] Determine an offset value based on the rotation position and the origin position of the workpiece, where the offset value is used to indicate the distance that the processing platform needs to move along the linear axis during the positioning of the machine tool;

[0008] Control the processing platform to move to a target position based on the preset angle and the offset value to position the machine tool.

[0009] Optionally, the two rotating axes include an A axis and a B axis, and the three linear axes include an X axis, a Y axis and a Z axis. The determining the rotation position of the workpiece based on a preset angle and the origin position of the workpiece installed on the processing platform includes:

[0010] Obtain a preset angle, the origin position of the workpiece, the position coordinates of the mechanical origin, and the position coordinates of the five-axis center point, where the five-axis center point is the center point of the A-axis, the B-axis, the X-axis, the Y-axis, and the Z-axis;

[0011] Based on the preset angle, the origin position of the workpiece, the position coordinates of the mechanical origin, and the position coordinates of the five-axis center point, determine the rotation position of the workpiece.

[0012] Optionally, the preset angle includes a first angle and a second angle. The first angle is used to indicate the angle by which the processing platform rotates around the A-axis, and the second angle is used to indicate the angle by which the processing platform rotates around the B-axis.

[0013] Optionally, the first angle is A, the second angle is B, the position coordinates of the mechanical origin are (X0, Y0, Z0), the origin position of the workpiece is (X1, Y1, Z1), the rotation position is (X2, Y2, Z2), and the position coordinates of the five-axis center point are (D, E, F);

[0014] The determining the rotation position of the workpiece based on the preset angle, the origin position of the workpiece, the position coordinates of the mechanical origin, and the position coordinates of the five-axis center point includes:

[0015] Based on the preset angle, the origin position of the workpiece, the position coordinates of the mechanical origin, and the position coordinates of the five-axis center point, use a first formula to determine the rotation position of the workpiece. The first formula is:

[0016] X2 = [X0 + X1 - D] * COS[B] - [Z0 + Z1 - F] * SIN[B] + D;

[0017] Y2 = [Z0 + Z1 - F] * COS[B] * SIN[A] + [X0 + X1 - D] * SIN[B] * SIN[A] + [Y0 + Y1 - E] * COS[A] + E;

[0018] Z2 = [Z0 + Z1 - F] * COS[B] * COS[A] + [X0 + X1 - D] * SIN[B] * COS[A] - [Y0 + Y1 - E] * SIN[A] + F.

[0019] Optionally, the offset value includes a first value, a second value, and a third value. The first value is the difference between the origin position of the workpiece and the rotation position in the X-axis direction, the second value is the difference between the origin position of the workpiece and the rotation position in the Y-axis direction, and the third value is the difference between the origin position of the workpiece and the rotation position in the Z-axis direction.

[0020] In a second aspect, an embodiment of the present application provides a machine tool positioning device applied to a machine tool, where the machine tool includes a processing platform, two rotating shafts, and three linear shafts, and the device includes:

[0021] A first determination module, configured to determine the rotation position of the workpiece based on a preset angle and the origin position of the workpiece installed on the processing platform, where the preset angle is used to indicate the angle by which the processing platform needs to drive the workpiece to rotate around the rotating shaft during the positioning of the machine tool, the origin position is used to indicate the position of the workpiece relative to the mechanical origin before the processing platform rotates around the rotating shaft according to the preset angle, and the rotation position is used to indicate the position of the workpiece relative to the mechanical origin after the processing platform rotates around the rotating shaft according to the preset angle;

[0022] A second determination module, configured to determine an offset value based on the rotation position and the origin position of the workpiece, where the offset value is used to indicate the distance that the processing platform needs to move along the linear axis during the positioning of the machine tool;

[0023] A positioning module, configured to control the processing platform to move to a target position based on the preset angle and the offset value to position the machine tool.

[0024] In a third aspect, the present application provides an electronic device, including: a memory, a processor, and a program stored on the memory and executable on the processor; the processor is configured to read the program in the memory to implement the steps in the method described in the first aspect.

[0025] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the machine tool positioning method described in the first aspect are implemented.

[0026] In a fifth aspect, an embodiment of the present application provides a computer program product, including computer instructions, and when the computer instructions are executed by a processor, the steps of the machine tool positioning method described in the first aspect are implemented.

[0027] In the embodiments of the present application, the above-mentioned machine tool positioning method can determine the rotation position of the workpiece based on a preset angle and the origin position of the workpiece installed on the processing platform, determine the offset value based on the rotation position and the origin position of the workpiece, and control the processing platform to move to the target position based on the preset angle and the offset value to position the machine tool, so that the rotating shaft and the linear axis of the machine tool can be used to simultaneously position to the target position, thereby shortening the processing path and reducing the number of program pauses, and thus improving the machining efficiency of the machine tool. Brief Description of the Drawings

[0028] To more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments of the present application. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0029] Figure 1 is a flowchart of a machine tool positioning method provided by an embodiment of the present application;

[0030] Figure 2 is a schematic structural diagram of a machine tool provided by an embodiment of the present application;

[0031] Figure 3 is an application flowchart of a machine tool positioning method provided by an embodiment of the present application;

[0032] Figure 4 is a schematic structural diagram of a machine tool positioning device provided by an embodiment of the present application;

[0033] Figure 5 is a schematic structural diagram of an electronic device provided by an embodiment of the present application. Detailed Description of the Embodiments

[0034] The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some, but not all, of the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts fall within the scope of protection of the present application.

[0035] In the embodiments of the present application, a machine tool positioning method, device, equipment, medium, and program product are proposed to solve the problem of low machining efficiency of machine tools in related technologies.

[0036] See Figure 1 , Figure 1 is a flowchart of a machine tool positioning method provided by an embodiment of the present application, which is applied to a machine tool. The machine tool includes a machining platform, two rotating axes, and three linear axes. As Figure 1 shown, the method includes the following steps:

[0037] Step 101: Determine the rotation position of the workpiece based on a preset angle and the origin position of the workpiece installed on the processing platform. Herein, the preset angle is used to indicate the angle by which the processing platform needs to drive the workpiece to rotate around the rotation axis during the positioning of the machine tool. The origin position of the workpiece is used to indicate the position of the workpiece relative to the mechanical origin before the processing platform rotates around the rotation axis by the preset angle. The rotation position is used to indicate the position of the workpiece relative to the mechanical origin after the processing platform rotates around the rotation axis by the preset angle.

[0038] In this step, the above-mentioned processing platform, as a basic component of the machine tool, can be used to provide stable support for the clamping of the workpiece. The above two rotation axes can be used to drive the workpiece to perform rotational motion in the circumferential direction, endowing the machine tool with machining capabilities in the angular dimension and enabling the machining of complex shapes such as inclined surfaces and curved surfaces. The three linear axes follow the rules of the Cartesian coordinate system and move in three mutually perpendicular linear directions respectively, responsible for controlling the positioning accuracy of the machining position and ensuring the dimensional accuracy of the workpiece in different directions.

[0039] The above-mentioned preset angle is used to indicate the angle by which the processing platform will rotate during machining. This is an input value based on the workpiece characteristics and position during programming, and each machining feature will have a different rotation angle. The above-mentioned origin position of the workpiece can be used to indicate the zero point of the machining program, and its value is relative to the mechanical zero point. The workpiece origin is the position set by the programmer himself and can be any position of the workpiece relative to the machine tool zero point, not a fixed value. The above-mentioned mechanical origin is a fixed point on the machine tool.

[0040] Step 102: Determine the offset value based on the rotation position and the origin position of the workpiece. The offset value is used to indicate the distance that the processing platform needs to move along the linear axis during the positioning of the machine tool.

[0041] In this step, the above-mentioned offset value can be the position difference between the rotation position and the origin position of the workpiece and can be used to indicate the distance that the processing platform needs to move along the linear axis during the positioning of the machine tool.

[0042] Step 103: Control the processing platform to move to the target position based on the preset angle and the offset value to position the machine tool.

[0043] In this step, controlling the processing platform to move to the target position based on the preset angle and the offset value can be understood as achieving the coordinated positioning of the rotation axis and the linear axis and positioning the processing platform to the target position. When the processing platform moves to the target position, the workpiece installed on the processing platform is in an ideal machining posture.

[0044] In the embodiment of the present application, the above-mentioned machine tool positioning method can determine the rotation position of the workpiece based on a preset angle and the origin position of the workpiece installed on the processing platform, determine the offset value based on the rotation position and the origin position of the workpiece, and control the processing platform to move to the target position based on the preset angle and the offset value, so as to position the machine tool, so that the rotation axis and the linear axis of the machine tool can be used to simultaneously position to the target position, thereby shortening the processing path and reducing the number of program pauses, and thus improving the machining efficiency of the machine tool.

[0045] Optionally, the two rotation axes include the A axis and the B axis, and the three linear axes include the X axis, the Y axis, and the Z axis. The determining the rotation position of the workpiece based on a preset angle and the origin position of the workpiece installed on the processing platform includes:

[0046] Obtain the preset angle, the origin position of the workpiece, the position coordinates of the mechanical origin, and the position coordinates of the five-axis center point, where the five-axis center point is the center point of the A axis, the B axis, the X axis, the Y axis, and the Z axis;

[0047] Determine the rotation position of the workpiece based on the preset angle, the origin position of the workpiece, the position coordinates of the mechanical origin, and the position coordinates of the five-axis center point.

[0048] It should be noted that as Figure 2 shown, Figure 2 the cylinder in is the workpiece, the cuboid below the cylinder is the processing platform, the machine tool has two rotation axes, namely the A axis and the B axis. When performing combined positioning, the coordinates of any point based on the workpiece origin change with the rotation of the rotation axes (the following A and B values). Since it is a spatial rotation with an angle, the point after rotation is different from the previous workpiece origin. Specifically, how much the change is needs to be determined based on the position coordinates of the five-axis center point. Among them, the position coordinates of the five-axis center point are a fixed value. As long as the machine tool remains unchanged, the five-axis center point does not change, and the coordinate position can be measured by certain instruments and methods.

[0049] In this embodiment, the above-mentioned machine tool positioning method can determine the rotation position of the workpiece by obtaining the preset angle, the origin position of the workpiece, the position coordinates of the mechanical origin, and the position coordinates of the five-axis center point, and based on the preset angle, the origin position of the workpiece, the position coordinates of the mechanical origin, and the position coordinates of the five-axis center point, so as to accurately determine the rotation position of the workpiece, thereby further improving the accuracy of machine tool positioning.

[0050] Optionally, the preset angle includes a first angle and a second angle. The first angle is used to indicate the angle of rotation of the processing platform around the A axis, and the second angle is used to indicate the angle of rotation of the processing platform around the B axis.

[0051] In this embodiment, the preset angle includes a first angle and a second angle. The first angle is used to indicate the angle of rotation of the processing platform around the A axis, and the second angle is used to indicate the angle of rotation of the processing platform around the B axis, so that the preset angle can be determined according to the processing requirements of the workpiece, thereby achieving precise positioning of the machine tool and improving the accuracy of machining the workpiece by the machine tool.

[0052] Optionally, the first angle is A, the second angle is B, the position coordinates of the mechanical origin are (X0, Y0, Z0), the origin position of the workpiece is (X1, Y1, Z1), the rotation position is (X2, Y2, Z2), and the position coordinates of the five-axis center point are (D, E, F);

[0053] Determining the rotation position of the workpiece based on the preset angle, the origin position of the workpiece, the position coordinates of the mechanical origin, and the position coordinates of the five-axis center point includes:

[0054] Based on the preset angle, the origin position of the workpiece, the position coordinates of the mechanical origin, and the position coordinates of the five-axis center point, use the first formula to determine the rotation position of the workpiece. The first formula is:

[0055] X2 = [X0 + X1 - D] * COS[B] - [Z0 + Z1 - F] * SIN[B] + D;

[0056] Y2 = [Z0 + Z1 - F] * COS[B] * SIN[A] + [X0 + X1 - D] * SIN[B] * SIN[A] + [Y0 + Y1 - E] * COS[A] + E;

[0057] Z2 = [Z0 + Z1 - F] * COS[B] * COS[A] + [X0 + X1 - D] * SIN[B] * COS[A] - [Y0 + Y1 - E] * SIN[A] + F.

[0058] Furthermore, an executable file can be generated based on the preset angle and the offset value. During the positioning process, this executable file can be directly run. Among them, the generation process of the executable file can be to substitute the preset angle and the offset value into a preset code template to obtain the executable file.

[0059] Exemplarily, Figure 3 is an application flowchart of a machine tool positioning method provided by an embodiment of the present application, asFigure 3 As shown, from the machine origin, workpiece origin, five-axis center point and preset angle of the machine tool, the coordinates after spatial coordinate transformation are finally deduced, and combined with the relevant functions of the inclined plane of the FANUC system, the 5-axis 4-linkage positioning based on Euler angles is realized. Taking the FANUC system as an example, the specific code corresponding to the above machine tool positioning method is as follows:

[0060] O4425 is the core macro program developed and is called through the G65 instruction. The description of the program code is as follows:

[0061] G168X_Y_Z_I_J_K_A_B_

[0062] G0 X_Y_A_B_

[0063] G43H_

[0064] G0 Z_

[0065] ……

[0066] G49

[0067] G169

[0068] G168_Enables the four-linkage positioning function

[0069] X_Y_Z_Origin of the feature coordinate system

[0070] I_J_K_Euler angles determining the orientation of the feature coordinate system

[0071] G0 X_Y_A_B_Realizes 4-linkage positioning

[0072] G169 Cancels the linkage positioning

[0073] The following is part of the source code, and the explanations are as follows:

[0074] #27 Offset value from the zero point of the X-axis of the machine tool to the rotation center of the turntable

[0075] #28 Offset value from the zero point of the Y-axis of the machine tool to the rotation center of the turntable

[0076] #29 Offset value from the zero point of the Z-axis of the machine tool to the rotation center of the turntable

[0077] #8 Coordinate value of the X-axis before conversion

[0078] #9 Coordinate value of the Y-axis before conversion

[0079] #10 Coordinate value of the Z-axis before conversion

[0080] #20 Corresponds to Figure 3 X2, which is the coordinate offset value of the X-axis relative to the original after calculation and conversion

[0081] #21 corresponds to Figure 3 Y2, which is the offset value of the converted coordinate relative to the original Y-axis

[0082] #22 corresponds to Figure 3 Z2, which is the offset value of the converted coordinate relative to the original Z-axis

[0083] #5221, #5222, and #5223 respectively correspond to Figure 3 X1, Y1, and Z1 in it, which are the workpiece zero points, and their values are recorded in the register variables in the CNC, and the subsequent system calls through variables

[0084] G68.2X[#20 - #[5221 + 20 * [#4014 - 54]]]Y[#21 - #[5222 + 20 * [#4014 - 54]]]Z[#22 - #[5223 + 20 * [#4014 - 54]]]I0J0K0 performs three-dimensional coordinate space conversion after adopting the new offsets of X2, Y2, and Z2, and the subsequent programs including simultaneous positioning are programmed with the new converted coordinates

[0085] #11 = -#1

[0086] #12 = -#2

[0087] G68.4P1Q123I#11J0K0

[0088] G68.4P1Q123I0J#12K0

[0089] G68.4I#4J#5K#6

[0090] The programming method of Euler angles is output through the inclined plane increment function

[0091] %

[0092] O9012

[0093] G90

[0094] #27 = PRM

[19700]

[0095] #28 = PRM

[19701]

[0096] #29 = PRM

[19702]

[0097] #8 = #[5201 + [#4014 - 53] * 20] + #5201 + #24

[0098] #9 = #[5202 + [#4014 - 53] * 20] + #5202 + #25

[0099] #10 = #[5203 + [#4014 - 53] * 20] + #5203 + #26

[0100] #20 = [#8 - #27] * COS[#2] - [#10 - #29] * SIN[#2] + #27(X2)

[0101] #21 = [#10 - #29] * COS[#2] * SIN[#1] + [#8 - #27] * SIN[#2] * SIN[#1] + [#9 - #28] * COS[#1] + #28(Y2)

[0102] #22 = [#10 - #29] * COS[#2] * COS[#1] + [#8 - #27] * SIN[#2] * COS[#1] - [#9 - #28] * SIN[#1] + #29(Z2)

[0103] G68.2X[#20 - #[5221 + 20 * [#4014 - 54]]]Y[#21 - #[5222 + 20 * [#4014 - 54]]]Z[#22 - #[5223 + 20 * [#4014 - 54]]]I0J0K0

[0104] G68.4P1Q123I#11J0K0

[0105] G68.4P1Q123I0J#12K0

[0106] G68.4I#4J#5K#6

[0107] M99

[0108] %

[0109] Among them, G68.2 is a function instruction of the FANUC system, representing the inclined plane indexing instruction; G68.2X_Y_Z_I_J_K_ is the inclined plane indexing instruction based on Euler angles of the FANUC system; the X_Y_Z_ values are the linear offsets relative to the original coordinates, and the values of the linear offsets are calculated from the previous four input values; Euler angles can be used to describe the rotation angles of a rigid body in three-dimensional space; G68.4 is the multiple increment instruction of the inclined plane instruction, representing an additional offset on the basis of the original inclined plane offset.

[0110] G68.4P1Q123I#11J0K0

[0111] G68.4P1Q123I0J#12K0

[0112] G68.4I#4J#5K#6

[0113] The default rotation sequence of the Euler angle-based inclined plane function in the FANUC system is to first rotate I degrees around the Z axis, then rotate J degrees around the X axis, and finally rotate K degrees around the Y axis on the basis of the original coordinate system. The meaning of G68.4Q123I_J_K_ is to rotate around X, Y, and Z in sequence. Therefore, three G68.4 can be used to achieve the conversion of the ZXZ rotation sequence and realize the four-axis linkage positioning based on Euler angles.

[0114] In this embodiment, the above-mentioned machine tool positioning method is calculated based on four input values: the mechanical origin, the workpiece origin, the five-axis center point, and the preset rotation angle. The rotated coordinate values, namely X2, Y2, and Z2, are calculated, and the inclined plane indexing instruction (G68.2) and the inclined axis multiple increment instruction (G68.4) of the FANUC system are used for rotation and offset to form a new coordinate system, and correct 4-axis linkage actions are realized on the new coordinate system. That is, through the relevant algorithms integrated with the FANUC system functions in the linkage positioning macro program, the processing efficiency is improved.

[0115] Optionally, the offset values include a first value, a second value, and a third value. The first value is the difference between the origin position of the workpiece and the rotated position in the X-axis direction, the second value is the difference between the origin position of the workpiece and the rotated position in the Y-axis direction, and the third value is the difference between the origin position of the workpiece and the rotated position in the Z-axis direction.

[0116] Specifically, the first value can be used to indicate the distance that the processing platform moves along the X axis, the second value can be used to indicate the distance that the processing platform moves along the Y axis, and the third value can be used to indicate the distance that the processing platform moves along the Z axis.

[0117] Figure 4 is a schematic structural diagram of a machine tool positioning device provided by an embodiment of the present application. As Figure 4 shown, the machine tool positioning device 400 is applied to a machine tool. The machine tool includes a processing platform, two rotating axes, and three linear axes. The device 400 includes:

[0118] A first determination module 401, configured to determine the rotated position of the workpiece based on a preset angle and the origin position of the workpiece installed on the processing platform. The preset angle is used to indicate the angle by which the processing platform needs to drive the workpiece to rotate around the rotating axis during the positioning of the machine tool. The origin position is used to indicate the position of the workpiece relative to the mechanical origin before the processing platform rotates around the rotating axis according to the preset angle. The rotated position is used to indicate the position of the workpiece relative to the mechanical origin after the processing platform rotates around the rotating axis according to the preset angle;

[0119] The second determination module 402 is configured to determine a bias value based on the rotation position and the origin position of the workpiece, where the bias value is used to indicate the distance that the processing platform needs to move along the linear axis during the positioning of the machine tool;

[0120] The positioning module 403 is configured to control the movement of the processing platform to a target position based on the preset angle and the bias value to position the machine tool.

[0121] Optionally, the two rotation axes include the A axis and the B axis, and the three linear axes include the X axis, the Y axis, and the Z axis. The first determination module includes:

[0122] An acquisition unit configured to acquire a preset angle, the origin position of the workpiece, the position coordinates of the mechanical origin, and the position coordinates of the five-axis center point, where the five-axis center point is the center point of the A axis, the B axis, the X axis, the Y axis, and the Z axis;

[0123] A determination unit configured to determine the rotation position of the workpiece based on the preset angle, the origin position of the workpiece, the position coordinates of the mechanical origin, and the position coordinates of the five-axis center point.

[0124] Optionally, the preset angle includes a first angle and a second angle. The first angle is used to indicate the angle by which the processing platform rotates around the A axis, and the second angle is used to indicate the angle by which the processing platform rotates around the B axis.

[0125] Optionally, the first angle is A, the second angle is B, the position coordinates of the mechanical origin are (X0, Y0, Z0), the origin position of the workpiece is (X1, Y1, Z1), the rotation position is (X2, Y2, Z2), and the position coordinates of the five-axis center point are (D, E, F);

[0126] The determination unit is specifically configured to:

[0127] Based on the preset angle, the origin position of the workpiece, the position coordinates of the mechanical origin, and the position coordinates of the five-axis center point, use a first formula to determine the rotation position of the workpiece. The first formula is:

[0128] X2 = [X0 + X1 - D] * COS[B] - [Z0 + Z1 - F] * SIN[B] + D;

[0129] Y2 = [Z0 + Z1 - F] * COS[B] * SIN[A] + [X0 + X1 - D] * SIN[B] * SIN[A] + [Y0 + Y1 - E] * COS[A] + E;

[0130] Z2 = [Z0 + Z1 - F] * COS[B] * COS[A] + [X0 + X1 - D] * SIN[B] * COS[A] - [Y0 + Y1 - E] * SIN[A] + F。

[0131] Optionally, the offset value includes a first value, a second value, and a third value. The first value is the difference between the origin position of the workpiece and the rotational position in the X-axis direction. The second value is the difference between the origin position of the workpiece and the rotational position in the Y-axis direction. The third value is the difference between the origin position of the workpiece and the rotational position in the Z-axis direction.

[0132] It should be noted that the machine tool positioning device provided in the embodiments of the present application is a device capable of executing the above-mentioned machine tool positioning method. All implementation manners in the above-mentioned machine tool positioning method embodiments are applicable to this device, and all can achieve the same or similar beneficial effects. To avoid repeated description, this embodiment will not be elaborated herein.

[0133] The embodiments of the present application also provide an electronic device. Please refer to Figure 5 , the electronic device may include a processor 501, a memory 502, and a program 5021 stored in the memory 502 and executable on the processor 501.

[0134] When the program 5021 is executed by the processor 501, it can implement Figure 1 any step in the corresponding method embodiment. Specifically, when the program 5021 is executed by the processor 501, the following steps can be implemented:

[0135] Determine the rotational position of the workpiece based on a preset angle and the origin position of the workpiece installed on the processing platform, where the preset angle is used to indicate the angle by which the processing platform needs to drive the workpiece to rotate around the rotation axis during the positioning of the machine tool, the origin position of the workpiece is used to indicate the position of the workpiece relative to the mechanical origin before the processing platform rotates around the rotation axis according to the preset angle, and the rotational position is used to indicate the position of the workpiece relative to the mechanical origin after the processing platform rotates around the rotation axis according to the preset angle;

[0136] Determine an offset value based on the rotational position and the origin position of the workpiece, where the offset value is used to indicate the distance that the processing platform needs to move along the linear axis during the positioning of the machine tool;

[0137] Control the processing platform to move to a target position based on the preset angle and the offset value to position the machine tool.

[0138] Optionally, the two rotational axes include the A-axis and the B-axis, and the three linear axes include the X-axis, the Y-axis, and the Z-axis. Determining the rotational position of the workpiece based on the preset angle and the origin position of the workpiece mounted on the machining platform includes:

[0139] Obtain the preset angle, the origin position of the workpiece, the position coordinates of the mechanical origin, and the position coordinates of the five-axis center point, where the five-axis center point is the center point of the A-axis, the B-axis, the X-axis, the Y-axis, and the Z-axis;

[0140] Based on the preset angle, the origin position of the workpiece, the position coordinates of the mechanical origin, and the position coordinates of the five-axis center point, determine the rotational position of the workpiece.

[0141] Optionally, the preset angle includes a first angle and a second angle. The first angle is used to indicate the angle by which the machining platform rotates around the A-axis, and the second angle is used to indicate the angle by which the machining platform rotates around the B-axis.

[0142] Optionally, the first angle is A, the second angle is B, the position coordinates of the mechanical origin are (X0, Y0, Z0), the origin position of the workpiece is (X1, Y1, Z1), the rotational position is (X2, Y2, Z2), and the position coordinates of the five-axis center point are (D, E, F);

[0143] The determining the rotational position of the workpiece based on the preset angle, the origin position of the workpiece, the position coordinates of the mechanical origin, and the position coordinates of the five-axis center point includes:

[0144] Based on the preset angle, the origin position of the workpiece, the position coordinates of the mechanical origin, and the position coordinates of the five-axis center point, use the first formula to determine the rotational position of the workpiece. The first formula is:

[0145] X2 = [X0 + X1 - D] * COS[B] - [Z0 + Z1 - F] * SIN[B] + D;

[0146] Y2 = [Z0 + Z1 - F] * COS[B] * SIN[A] + [X0 + X1 - D] * SIN[B] * SIN[A] + [Y0 + Y1 - E] * COS[A] + E;

[0147] Z2 = [Z0 + Z1 - F] * COS[B] * COS[A] + [X0 + X1 - D] * SIN[B] * COS[A] - [Y0 + Y1 - E] * SIN[A] + F.

[0148] Optionally, the offset value includes a first value, a second value, and a third value. The first value is the difference between the origin position of the workpiece and the rotational position in the X-axis direction. The second value is the difference between the origin position of the workpiece and the rotational position in the Y-axis direction. The third value is the difference between the origin position of the workpiece and the rotational position in the Z-axis direction.

[0149] It should be noted that the electronic device provided in the embodiments of the present application is a device capable of executing the above-mentioned machine tool positioning method. Therefore, all implementation manners in the embodiments of the above-mentioned machine tool positioning method are applicable to this electronic device, and all can achieve the same or similar beneficial effects. To avoid repetition, this embodiment will not be elaborated herein.

[0150] The embodiments of the present application further provide a computer-readable storage medium. A computer program is stored on the computer-readable storage medium. When the computer program is executed by a processor, it implements each process of the above-mentioned embodiment of the unmanned aerial vehicle anomaly recognition method and can achieve the same technical effects. To avoid repetition, it will not be elaborated herein. Among them, the computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disc, etc.

[0151] The embodiments of the present application further provide a computer program product, including computer instructions. When the computer instructions are executed by a processor, they implement each process of the above-mentioned embodiment of the unmanned aerial vehicle anomaly recognition method and can achieve the same technical effects. To avoid repetition, it will not be elaborated herein.

[0152] It should be noted that in this article, the term "including", "comprising" or any other variant thereof is intended to cover a non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article or device including the element.

[0153] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-described embodiment methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation. Based on such an understanding, the technical solution of the present application, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions for causing a terminal (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in various embodiments of the present application.

[0154] The embodiments of the present application have been described above in conjunction with the accompanying drawings. However, the present application is not limited to the above specific embodiments. The above specific embodiments are merely illustrative and not restrictive. Under the inspiration of the present application, those of ordinary skill in the art can also make many forms without departing from the purpose of the present application and the scope protected by the claims, and all of them belong to the protection scope of the present application.

Claims

1. A machine tool positioning method, characterized in that: Applied to a machine tool, the machine tool comprises a machining platform, two rotary axes and three linear axes, the method comprising: The rotation position of the workpiece is determined based on a preset angle and the origin position of the workpiece installed in the machining platform, wherein the preset angle is used to indicate the angle at which the machining platform needs to drive the workpiece to rotate around the rotation axis during positioning of the machine tool, the origin position of the workpiece is used to indicate the position of the workpiece relative to the mechanical origin before the machining platform rotates around the rotation axis according to the preset angle, and the rotation position is used to indicate the position of the workpiece relative to the mechanical origin after the machining platform rotates around the rotation axis according to the preset angle; Determining an offset value based on the rotation position and the origin position of the workpiece, the offset value being used to indicate a distance that the machining platform needs to move along the linear axis during positioning of the machine tool; The processing platform is controlled to move to a target position based on the preset angle and the offset value to position the machine tool.

2. The method according to claim 1, characterized in that The two rotation axes include an A axis and a B axis, the three linear axes include an X axis, a Y axis, and a Z axis, and the rotation position of the workpiece is determined based on a preset angle and an origin position of the workpiece installed in the processing platform, including: Obtaining a preset angle, the origin position of the workpiece, the position coordinates of the mechanical origin, and the position coordinates of the five-axis center point, wherein the five-axis center point is the center point of the A axis, the B axis, the X axis, the Y axis, and the Z axis; The rotation position of the workpiece is determined based on the preset angle, the origin position of the workpiece, the position coordinates of the mechanical origin and the position coordinates of the five-axis center point.

3. The method according to claim 2, characterized in that The preset angle includes a first angle and a second angle, the first angle is used to indicate the angle of rotation of the processing platform around the A-axis, and the second angle is used to indicate the angle of rotation of the processing platform around the B-axis.

4. The method according to claim 3, characterized in that The first angle is A, the second angle is B, the position coordinates of the mechanical origin are (X0, Y0, Z0), the origin position of the workpiece is (X1, Y1, Z1), the rotation position is (X2, Y2, Z2), and the position coordinates of the five-axis center point are (D, E, F); The step of determining the rotation position of the workpiece based on the preset angle, the origin position of the workpiece, the position coordinates of the mechanical origin, and the position coordinates of the five-axis center point includes: Based on the preset angle, the origin position of the workpiece, the position coordinates of the mechanical origin and the position coordinates of the five-axis center point, the rotation position of the workpiece is determined using a first formula, and the first formula is: X2=[X0+X1-D]*COS[B]-[Z0+Z1-F]*SIN[B]+D; Y2=[Z0+Z1-F]*COS[B]*SIN[A]+[X0+X1-D]*SIN[B]*SIN[A]+[Y0+Y1-E]*COS[A]+E; Z2=[Z0+Z1-F]*COS[B]*COS[A]+[X0+X1-D]*SIN[B]*COS[A]-[Y0+Y1-E]*SIN[A]+F.

5. The method according to claim 2, characterized in that: The offset value includes a first value, a second value and a third value, the first value is the difference between the origin position of the workpiece and the rotation position in the X-axis direction, the second value is the difference between the origin position of the workpiece and the rotation position in the Y-axis direction, and the third value is the difference between the origin position of the workpiece and the rotation position in the Z-axis direction.

6. A machine tool positioning device, characterized in that: Applied to a machine tool, the machine tool comprises a machining platform, two rotary axes and three linear axes, the device comprises: A first determination module is used to determine the rotation position of the workpiece based on a preset angle and the origin position of the workpiece installed in the processing platform, wherein the preset angle is used to indicate the angle at which the processing platform needs to drive the workpiece to rotate around the rotation axis during positioning of the machine tool, the origin position is used to indicate the position of the workpiece relative to the mechanical origin before the processing platform rotates around the rotation axis according to the preset angle, and the rotation position is used to indicate the position of the workpiece relative to the mechanical origin after the processing platform rotates around the rotation axis according to the preset angle; a second determination module, configured to determine an offset value based on the rotation position and the origin position of the workpiece, wherein the offset value is used to indicate a distance that the machining platform needs to move along the linear axis during positioning of the machine tool; A positioning module is used to control the machining platform to move to a target position based on the preset angle and the offset value, so as to position the machine tool.

7. An electronic device comprising: A memory, a processor, and a program stored in the memory and executable on the processor; wherein the processor is used to read the program in the memory to implement the steps in the method as described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.

9. A computer program product, characterized in that The method comprises computer instructions, which, when executed by a processor, implement the steps of the method according to any one of claims 1 to 5.