Method for achieving tool nose following function of four-axis machining center machine tool

By establishing a subprogram for calculating the distance and angle between the initial machining coordinates and the machine control points on the four-axis machining center machine tool, and performing coordinate bias, the tool tip follow function is realized, and the frequent replacement of programs in multi-axis machine tool processing is solved. and the problem of inconvenience in operation have significantly improved the processing quality and efficiency.

CN119024761APending Publication Date: 2024-11-26HEFEI ZHONGCHEN LIGHT IND MACHINERY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411144478.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-20
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

In multi-axis machine processing, the lack of tool tip following function leads to frequent replacement of processing programs, which is inconvenient to operate. Especially for special-shaped parts and multihedral processing, debugging time and difficulty are high, affecting product quality and efficiency.

Method used

By establishing a subroutine 1 to calculate the straight line distance and angle between the initial machining coordinates and the machine tool control point, subroutine 2 biases the coordinates to realize a new machining coordinate system, ensuring that the tool and the workpiece are consistent and adapting to changes in rotation angles.

Benefits of technology

It greatly reduces the processing and commissioning time and difficulty, improves the processing quality and efficiency, and is especially suitable for the processing of complex parts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119024761A_ABST
    Figure CN119024761A_ABST
Patent Text Reader

Abstract

The invention discloses a method for achieving a tool nose following function of a four-axis machining center machine tool, and relates to the technical field of numerical control machining. The method comprises the following steps: establishing a subprogram 1 for reading and calculating a linear distance R and an initial included angle A between an initial machining coordinate and a control point of a machine tool; and establishing a subprogram 2 which is used for carrying out coordinate offset on the initial processing coordinate system to obtain a new processing coordinate system, establishing a processing program, calling the subprogram 1 once at the beginning of processing, and calling the subprogram 2 once when the angle of the rotating shaft is changed every time. According to the method, the subprogram 1 is established for reading and calculating the linear distance R and the initial included angle A between the initial machining coordinate and the control point of the machine tool, and the subprogram 2 is established for performing coordinate offset on the initial machining coordinate system to obtain a new machining coordinate system, so that the problems that the existing debugging time is prolonged, the debugging difficulty is increased, and the debugging efficiency is high are solved. And the processing quality and efficiency are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of numerical control machining, and in particular relates to a method for realizing a tool tip following function of a four-axis machining center machine tool. Background Art

[0002] Tool tip following, as the name suggests, means that in multi-axis machine tool processing, under different tool lengths and different clamping positions, the relative position between the tool tip and the processing contour can always be guaranteed to coincide.

[0003] When machining on a multi-axis machine tool without a tool tip following function, an important task is to deal with the relationship between the machine tool's rotation center point and the machining coordinate system. Depending on the structure of the machine tool, this rotation center can be the rotation center of the machine tool table or the rotation center of the tool swing arm (hereinafter referred to as the rotation center as the control point). When programming and clamping parts, it is necessary to accurately find the machine tool's control point and the relative distance between the control point and the workpiece coordinate system (the control point swing length). Then, the data of the actual control point and the relative distance between the control point and the workpiece coordinate system (the control point swing length) must be processed in the CAM software before a qualified interpolation program for this working condition can be generated.

[0004] However, there are many disadvantages in doing so, such as:

[0005] 1: Because the relative distance between the control point and the workpiece coordinate system (the control point pendulum length) is a specific real number, once the working conditions change (such as the length of the machining tool, the position and shape of the tooling), the machining program must be re-compiled to adapt to the new working conditions.

[0006] 2: Because interpolation operations are performed in the CAM software, the coordinate system for programming and operation must be selected on the control point of the machine tool. This is not friendly to the operation of special-shaped parts and box parts, and special alignment fixtures are required for accurate clamping.

[0007] 3: For the processing of polyhedrons, if the relative distance between the control point and the workpiece coordinate system (control point pendulum length) cannot be accurately found, multiple processing coordinate systems can only be used to process each face.

[0008] In this way, because the processing of each surface does not belong to the same coordinate frame, the relative position size of each surface is determined only by the accuracy of manual centering of each processing coordinate system. The processing result is not ideal, and the processing debugging time and difficulty are greatly increased. The actual processing seriously reduces the processing quality and efficiency of the product. Summary of the invention

[0009] The purpose of the present invention is to provide a method for realizing the tool tip following function of a four-axis machining center machine tool, by establishing a subroutine 1 for reading and calculating the straight-line distance R and the initial angle A between the initial machining coordinate and the control point of the machine tool, and establishing a subroutine 2 for offsetting the coordinates of the initial machining coordinate system to obtain a new machining coordinate system, thereby solving the problems of increased debugging time and difficulty, and reduced machining quality and efficiency.

[0010] In order to solve the above technical problems, the present invention is achieved through the following technical solutions:

[0011] The present invention is a method for realizing a tool tip following function of a four-axis machining center machine tool, comprising the following steps: 1.

[0012] Step 1: Establish a subroutine 1 for reading and calculating the straight-line distance R and the initial angle A between the initial processing coordinate and the control point of the machine tool; wherein the calculation of the straight-line distance R and the initial angle A includes: calculating the difference between the origin of the initial processing coordinate system and the control point of the machine tool, and using the Pythagorean theorem to obtain the straight-line distance R between the initial processing coordinate and the control point of the machine tool, and using the inverse tangent function to calculate the initial angle A between the initial processing coordinate and the starting zero axis;

[0013] Step 2: Establish subroutine 2 to offset the coordinates of the initial processing coordinate system to obtain a new processing coordinate system, including:

[0014] S1: According to the rotation angle B required for processing, the straight-line distance R and the initial angle A, the coordinate formula of any point in the arc is used to calculate the origin coordinates of the new processing coordinate system;

[0015] S2: Calculate the coordinate difference between the origin of the new machining coordinate system and the origin of the initial machining coordinate system;

[0016] S3: Based on the obtained difference, the initial processing coordinate system is offset using the coordinate offset instruction to obtain a new processing coordinate system;

[0017] Step 3: Create a machining program, call subroutine 1 once at the beginning of machining, and call subroutine 2 once each time the angle of the rotating axis changes.

[0018] As a preferred technical solution of the present invention, the post-processing of the CAM software is also modified accordingly, including the following steps:

[0019] a: Create a new post-processing, fill in the machine tool parameters, and create a new command in the program initialization interface so that the program initialization interface calls subroutine 1 once;

[0020] b: Create a new command at the initial stage of each method processing, so that each method will be forced to output the machining coordinate G54 once at the beginning of post-processing, and set the method type to the preset axis method;

[0021] c: Create a new command in the Initial Move column and use it in the First Move column to classify and assign values ​​to the method types. When the method type is the fixed-axis method, extract the initial rotation angle of the rotation axis and assign the rotation angle B parameter. Then call subroutine 2 for calculation.

[0022] d: Create a command under the Linear Mover module to assign the rotation angle B parameter once for each step during the interpolation machining of the linkage method, and call subroutine 2 for calculation once;

[0023] e: Create a command under the Rapid Mover module to optimize the multi-axis rapid cross-motion for the milling, chamfering, spot hole, and drilling methods in the linkage method and hole_making module; when the processing angle needs to be changed during processing, the post-processing will block the output of the redundant angle and return to the safe point for angle conversion and assign a new value to the rotation angle B parameter and call subroutine 2 for calculation;

[0024] f: Create an instruction after the PB_CMD_reset_all_motion_variables_to_zero command in the process end column, which is used to reset the coordinates offset by the coordinate offset instruction after each process is completed, and push the tool to a safe position.

[0025] As a preferred technical solution of the present invention, the four-axis machining center machine tool is a horizontal four-axis machining center machine tool, wherein the difference between the origin of the initial machining coordinate system and the control point of the machine tool is calculated in step 1 by: calculating the difference between the X value of the origin of the initial machining coordinate system and the X value of the machine tool control point, and the difference between the Z value of the origin of the initial machining coordinate system and the Z value of the machine tool control point.

[0026] As a preferred technical solution of the present invention, the coordinate difference between the coordinates of the new machining coordinate system origin and the initial machining coordinate system origin calculated in the step 2 is: the X-direction value of the new machining coordinate system origin after the rotation angle minus the X-direction value of the initial machining coordinate system origin, and the Z-direction value of the new machining coordinate system origin after the rotation angle minus the Z-direction value of the initial machining coordinate system origin.

[0027] As a preferred technical solution of the present invention, the four-axis machining center machine tool is a vertical four-axis machining center machine tool, wherein the difference between the origin of the initial machining coordinate system and the control point of the machine tool is calculated in step one by: calculating the difference between the Y value of the origin of the initial machining coordinate system and the Y value of the machine tool control point, and the difference between the Z value of the origin of the initial machining coordinate system and the Z value of the machine tool control point.

[0028] As a preferred technical solution of the present invention, the coordinate difference between the coordinates of the new processing coordinate system origin and the initial processing coordinate system origin calculated in the step 2 is: the Y-axis value of the new processing coordinate system origin after the rotation angle minus the Y-axis value of the initial processing coordinate system origin, and the Z-axis value of the new processing coordinate system origin after the rotation angle minus the Z-axis value of the initial processing coordinate system origin.

[0029] The present invention has the following beneficial effects:

[0030] The present invention establishes a subroutine 1 for reading and calculating the straight-line distance R and the initial angle A between the initial processing coordinate and the control point of the machine tool, and establishes a subroutine 2 to calculate the position of the new processing coordinate system after rotation, and then calculates the difference between the new processing coordinate system position and the initial processing coordinate system position, and then uses this difference as a basis for coordinate shifting, offsets the coordinates of the initial processing coordinate system to obtain a new processing coordinate system, so that the processing trajectory can ensure that the relative position between the tool and the workpiece remains unchanged, thereby realizing tool tip following, greatly reducing the overall processing debugging time and debugging difficulty, and effectively improving the overall processing quality and production efficiency.

[0031] Of course, any product implementing the present invention does not necessarily need to achieve all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for describing the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0033] Figure 1 It is a structural schematic diagram of a method for realizing a tool tip following function in a four-axis machining center machine tool of the present invention. DETAILED DESCRIPTION

[0034] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0035] In the description of the present invention, it should be understood that the terms "opening", "upper", "lower", "thickness", "top", "middle", "length", "inside", "all around" and the like indicating orientation or positional relationship are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the components or elements referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as limiting the present invention.

[0036] Embodiment 1

[0037] See also Figure 1 As shown, the present invention is a method for realizing the tool tip following function of a four-axis machining center machine tool. Taking a horizontal four-axis machining center machine tool, the system is a Mazak system as an example. The control point of the horizontal four-axis machining center machine tool is the rotation center of the worktable. This point is a fixed point. The machining coordinate system follows the workpiece and varies due to different clamping positions. The pendulum length of the control point also changes with the change of the machining coordinate system. The machining coordinate system always makes a circular motion around the control point of the machine tool, wherein the pendulum length of the control point is the radius of the circle, that is, the straight-line distance R between the initial machining coordinate and the control point of the machine tool.

[0038] The specific steps include:

[0039] Step 1: Establish a subroutine 1 for reading and calculating the straight-line distance R and the initial angle A between the initial processing coordinate and the control point of the machine tool; wherein the calculation of the straight-line distance R and the initial angle A includes:

[0040] Calculate the difference between the origin of the initial processing coordinate system and the control point of the machine tool, and use the Pythagorean theorem to obtain the straight-line distance R between the initial processing coordinate and the control point of the machine tool, and use the inverse tangent function to calculate the initial angle A between the initial processing coordinate and the starting zero axis.

[0041] Specifically, create a macro program with subroutine 1 and program number 99 as follows:

[0042] #1=(Note: real number, the X-axis value of the machine tool control point located at the machine tool coordinate);

[0043] #2=(Note: real number, the Z value of the machine tool control point in the machine tool coordinates);

[0044] #3=#5221 (Note: Read the X-axis coordinate value of the initial processing coordinate system G54);

[0045] #4=#5223 (Note: Read the Z coordinate value of the initial processing coordinate system G54);

[0046] #5 = #3-#1 (Note: Calculate the difference between the X value of the origin of the initial machining coordinate system and the X value of the machine tool control point);

[0047] #6 = #4-#2 (Note: Calculate the difference between the Z value of the origin of the initial machining coordinate system and the Z value of the machine tool control point);

[0048] #7=SQRT[#5*#5+#6*#6](Note: Use the Pythagorean theorem to square the moving radius, i.e. the straight-line distance R);

[0049] IF[#5GT 0]AND[#6LT 0]THEN#8=-1*ATAN[#6 / #5];

[0050] IF[#5GT 0]AND[#6GT 0]THEN#8=360-ATAN[#6 / #5];

[0051] IF[#5LT 0]THEN#8=180-ATAN[#6 / #5];

[0052] IF[#5GT 0]AND[#6EQ 0]THEN#8=0;

[0053] IF[#5LT 0]AND[#6EQ 0]THEN#8=180;

[0054] IF[#5EQ 0]AND[#6GT 0]THEN#8=270;

[0055] IF[#5EQ 0]AND[#6LT 0]THEN#8=90;

[0056] IF[#5EQ 0]AND[#6EQ 0]THEN#8=0;

[0057] (Note: The above eight lines calculate the initial angle A based on the quadrant where the initial coordinate system is located);

[0058] M99;

[0059] Step 2: Establish subroutine 2 to offset the coordinates of the initial processing coordinate system to obtain a new processing coordinate system, including:

[0060] S1: According to the rotation angle B required for processing, the straight-line distance R and the initial angle A, the coordinate formula of any point in the arc is used to calculate the origin coordinates of the new processing coordinate system;

[0061] S2: Calculate the coordinate difference between the origin of the new machining coordinate system and the origin of the initial machining coordinate system;

[0062] S3: Based on the obtained difference, the initial processing coordinate system is offset using the coordinate offset instruction to obtain a new processing coordinate system;

[0063] Specifically, create a macro program with subroutine 2 and program number 100 as follows:

[0064] #10=#7*COS[#8-#9]+#1-#3 (Note: The X-axis value of the origin of the new machining coordinate system after the rotation angle is subtracted from the X-axis value of the origin of the initial machining coordinate system. The relationship between the initial angle #8 and the rotation angle #9 is determined by the machine tool steering. The rotation angle B is assigned to #9 in the program);

[0065] #11=-1*[#7*SIN[#8-#9]]+#2-#4 (Note: the Z-direction value of the origin of the new machining coordinate system after the rotation angle minus the Z-direction value of the origin of the initial machining coordinate system);

[0066] G52 X#10Z#11;

[0067] M99;

[0068] Step 3: Create a machining program, call subroutine 1 once at the beginning of machining, and call subroutine 2 once every time the angle of the rotation axis changes. That is, calling subroutine 1 (program number 99) before machining can obtain the straight-line distance R (rotation radius) between the initial machining coordinate system and the machine tool control point and the initial angle A with the starting zero axis. As long as there is a rotation action in the future, we assign the rotation angle to parameter #9 in the program, and then enable subroutine 100 to offset the coordinates.

[0069] For the machining program, it is sufficient to call subroutine 1 once at the beginning of machining. However, subroutine 2 needs to be called according to the machining method. In the case of ordinary fixed-axis machining, it is sufficient to call it once at the beginning of the method. In the case of multi-axis machining, subroutine 2 must be called once every time the angle of the rotating axis changes.

[0070] For example, in the hole_making module, milling, chamfering, spot hole, drilling and other methods follow the multi-axis linkage positioning rules when fast forwarding, and follow the fixed axis processing rules when processing. This also needs to be handled reasonably, including the corresponding modification of the post-processing of the CAM software. The CAM software is Unigraphics NX, and the post editing language is Tcl language. The specific steps include:

[0071] a: Create a new post-processing, fill in the machine tool parameters, and create a new command in the program initialization interface: MOM_output_literal "M98 P99"; so that the program initialization interface calls subroutine 1 once;

[0072] b: Create a new command at the initial stage of each method processing:

[0073] global 5ax;

[0074] set 5ax 0;

[0075] MOM_output_literal "G54";

[0076] At the beginning of post-processing of each method, the machining coordinate G54 will be forced to be output once, and the method type is set to preset 0 (where 0 is the ordinary fixed-axis method, 1 is the multi-axis linkage method, and 2 is the milling, chamfering, spot hole, drilling and other methods in the hole_making module);

[0077] c: Create a new command in the Initial Move column and borrow it from the First Move column. Specifically:

[0078]

[0079]

[0080] It is used to classify and assign values ​​to the construction method types, and when the construction method type is the fixed-axis construction method, it extracts the initial rotation angle of the rotation axis and assigns the rotation angle B (#9) parameter, and calls subroutine 2 for calculation;

[0081] d: Create a command under the Linear Mover module and write the following statement:

[0082] global 5ax

[0083] global mom_out_angle_pos

[0084] if{$5ax==1}{

[0085] MOM_output_literal"#9=[format"%.4f"$mom_out_angle_pos(0)]"

[0086] MOM_output_literal "M98 P100"

[0087] }else{

[0088] };

[0089] It is used to assign the rotation angle B (#9) parameter once for each step of interpolation machining in linkage method, and call subroutine 2 for calculation once;

[0090] e: Create a command under the Rapid Mover module and write the following statement:

[0091]

[0092]

[0093] It is used to optimize the multi-axis fast traverse motion for the milling, chamfering, spot hole and drilling methods in the linkage method and hole_making module;

[0094] When the machining angle needs to be changed during machining, the post-processing will block the output of redundant angles and return to the safe point to perform angle conversion, assign a new value to the rotation angle B (#9) parameter, and call subroutine 2 for calculation;

[0095] f: Create a command after the PB_CMD_reset_all_motion_variables_to_zero command in the method end column:

[0096] MOM_output_literal "G52 X0 Z0"

[0097] MOM_output_literal"G91 G28 Z0";

[0098] It is used to reset the coordinates offset by the coordinate offset command G52 after each processing method is completed, and push the tool to a safe position.

[0099] After completing the above work, save the post-processing. Using the created post-processing program, we can see that subroutine 1 (program number 99) is called at the beginning of the program, and after the rotation axis changes, it is assigned to the #9 parameter and subroutine 2 (program number 100) is called for calculation.

[0100] In actual use, this function greatly increases the processing flexibility of ordinary CNC machine tools, and has good processing performance for complex box parts, polyhedron parts, and special-shaped parts. It is not only convenient for processing and reduces the difficulty of operation, but also because its processing program always runs under the framework of a processing coordinate system, the shape and position tolerance accuracy of the processed products is greatly improved, effectively improving the overall processing quality and efficiency.

[0101] Embodiment 2

[0102] The difference from Example 1 is that the four-axis machining center is a vertical four-axis machining center, and the difference between the origin of the initial machining coordinate system and the control point of the machine tool is calculated in step 1 by calculating the difference between the Y value of the origin of the initial machining coordinate system and the Y value of the machine tool control point, and the difference between the Z value of the origin of the initial machining coordinate system and the Z value of the machine tool control point.

[0103] In step 2, the coordinate difference between the new machining coordinate system origin and the initial machining coordinate system origin is calculated as follows: the Y-axis value of the new machining coordinate system origin after the rotation angle minus the Y-axis value of the initial machining coordinate system origin, and the Z-axis value of the new machining coordinate system origin after the rotation angle minus the Z-axis value of the initial machining coordinate system origin.

[0104] Specifically, subroutine 1 is:

[0105] #1=(Note: real number, the Y value of the machine tool control point located at the machine tool coordinate);

[0106] #2=(Note: real number, the Z value of the machine tool control point in the machine tool coordinates);

[0107] #3=#5222 (Note: Read the Y coordinate value of the initial processing coordinate system G54);

[0108] #4=#5223 (Note: Read the Z coordinate value of the initial processing coordinate system G54);

[0109] #5 = #3-#1 (Note: the difference between the Y value of the origin of the initial machining coordinate system and the Y value of the machine tool control point);

[0110] #6 = #4-#2 (Note: the difference between the Z value of the origin of the initial machining coordinate system and the Z value of the machine tool control point);

[0111] #7=SQRT[#5*#5+#6*#6](Note: Use the Pythagorean theorem to square the moving radius, i.e. the straight-line distance R);

[0112] IF[#6LT 0]THEN#8=180+ATAN[#5 / #6];

[0113] IF[#5GT 0]AND[#6GT 0]THEN#8=ATAN[#5 / #6];

[0114] IF[#5LT 0]AND[#6GT 0]THEN#8=360+ATAN[#5 / #6];

[0115] IF[#6GT 0]AND[#5EQ 0]THEN#8=0;

[0116] IF[#6LT 0]AND[#5EQ 0]THEN#8=180;

[0117] IF[#6EQ 0]AND[#5GT 0]THEN#8=90;

[0118] IF[#6EQ 0]AND[#5LT 0]THEN#8=270;

[0119] IF[#5EQ 0]AND[#6EQ 0]THEN#8=0;

[0120] M99;

[0121] Subroutine 2 (program number 100) is as follows:

[0122] #10=#7*SIN[#8-#9]+#1-#3 (Note: The Y value of the machining coordinate origin after the rotation angle is subtracted from the initial machining coordinate Y value to obtain the Y difference between the new and old machining coordinates. The relationship between the initial angle #8 and the rotation angle #9 is determined by the machine tool steering, and the rotation angle B is assigned to #9 in the program);

[0123] #11=#7*COS[#8-#9]+#2-#4 (Note: The Z-direction value of the machining coordinate origin after the rotation angle is subtracted from the Z-direction value of the initial machining coordinate to obtain the Z-direction difference between the new and old machining coordinates);

[0124] G52 Y#10Z#11;

[0125] M99;

[0126] At the same time, the post-processing of the CAM software is modified accordingly in the same manner as in the embodiment.

[0127] In the description of this specification, the description with reference to the terms "one embodiment", "example", "specific example", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.

[0128] The preferred embodiments of the present invention disclosed above are only used to help illustrate the present invention. The preferred embodiments do not describe all the details in detail, nor do they limit the invention to the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present invention, so that those skilled in the art can understand and use the present invention well. The present invention is limited only by the claims and their full scope and equivalents.

Claims

1. A method for realizing a tool tip following function of a four-axis machining center machine tool, characterized in that: The following steps are involved: Step 1: Establish a subroutine 1 for reading and calculating the straight-line distance R and the initial angle A between the initial processing coordinate and the control point of the machine tool; wherein the calculation of the straight-line distance R and the initial angle A includes: Calculate the difference between the origin of the initial machining coordinate system and the control point of the machine tool, and use the Pythagorean theorem to square the straight-line distance R between the origin of the initial machining coordinate system and the control point of the machine tool, and use the inverse tangent function to calculate the initial angle A between the origin of the initial machining coordinate system and the starting zero axis; Step 2: Establish subroutine 2 to offset the coordinates of the initial processing coordinate system to obtain a new processing coordinate system, including: S1: According to the rotation angle B required for processing, the straight-line distance R and the initial angle A, the coordinate formula of any point in the arc is used to calculate the origin coordinates of the new processing coordinate system; S2: Calculate the coordinate difference between the origin of the new machining coordinate system and the origin of the initial machining coordinate system; S3: Based on the obtained difference, the initial processing coordinate system is offset using the coordinate offset instruction to obtain a new processing coordinate system; Step 3: Create a machining program, call subroutine 1 once at the beginning of machining, and call subroutine 2 once each time the angle of the rotating axis changes.

2. The method for realizing the tool tip following function of a four-axis machining center according to claim 1, characterized in that: It also includes corresponding modifications to the post-processing of the CAM software. The following steps are involved: a: Create a new post-processing, fill in the machine tool parameters, and create a new command in the program initialization interface so that the program initialization interface calls subroutine 1 once; b: Create a new command at the initial stage of each method processing, so that each method will be forced to output the machining coordinate G54 once at the beginning of post-processing, and set the method type to the preset axis method; c: Create a new command in the Initial Move column and use it in the First Move column to classify and assign values ​​to the method types. When the method type is the fixed-axis method, extract the initial rotation angle of the rotation axis and assign the rotation angle B parameter. Then call subroutine 2 for calculation. d: Create a command under the Linear Mover module to assign the rotation angle B parameter once for each step during the interpolation machining of the linkage method, and call subroutine 2 for calculation once; e: Create a command in the Rapid Mover module to optimize the multi-axis rapid cross-motion for the milling, chamfering, spot hole, and drilling methods in the linkage method and hole_making module; When the machining angle needs to be changed during machining, the post-processing will block the output of redundant angles and return to the safe point for angle conversion and assign new values ​​to the rotation angle B parameter and call subroutine 2 for calculation; f: Create an instruction after the PB_CMD_reset_all_motion_variables_to_zero command in the process end column, which is used to reset the coordinates offset by the coordinate offset instruction after each process is completed, and push the tool to a safe position.

3. A method for realizing a tool tip following function in a four-axis machining center according to claim 1 or 2, characterized in that: The four-axis machining center machine tool is a horizontal four-axis machining center machine tool, wherein the difference between the origin of the initial machining coordinate system and the control point of the machine tool calculated in step 1 is: Calculate the difference between the X value of the origin of the initial machining coordinate system and the X value of the machine tool control point, and the difference between the Z value of the origin of the initial machining coordinate system and the Z value of the machine tool control point.

4. The method for realizing the tool tip following function of a four-axis machining center according to claim 3, characterized in that: The coordinate difference between the origin of the new machining coordinate system and the origin of the initial machining coordinate system calculated in step 2 is: The X-direction value of the origin of the new machining coordinate system after the rotation angle is subtracted from the X-direction value of the origin of the initial machining coordinate system, and the Z-direction value of the origin of the new machining coordinate system after the rotation angle is subtracted from the Z-direction value of the origin of the initial machining coordinate system.

5. The method for realizing the tool tip following function of a four-axis machining center according to claim 1, characterized in that: The four-axis machining center machine tool is a vertical four-axis machining center machine tool, wherein the difference between the origin of the initial machining coordinate system and the control point of the machine tool calculated in step 1 is: Calculate the difference between the Y value of the origin of the initial machining coordinate system and the Y value of the machine tool control point, and the difference between the Z value of the origin of the initial machining coordinate system and the Z value of the machine tool control point.

6. The method for realizing the tool tip following function of a four-axis machining center according to claim 5, characterized in that: The coordinate difference between the origin of the new machining coordinate system and the origin of the initial machining coordinate system calculated in step 2 is: The Y value of the origin of the new machining coordinate system after the rotation angle is subtracted from the Y value of the origin of the initial machining coordinate system, and the Z value of the origin of the new machining coordinate system after the rotation angle is subtracted from the Z value of the origin of the initial machining coordinate system.