Home> News> How to solve the surface pattern of cnc drilling?
December 06, 2022

How to solve the surface pattern of cnc drilling?

How to solve the surface pattern of cnc drilling?

Machining centers are used to process parts with complex shapes, many processes, and high precision requirements. Therefore, several or more than a dozen tools or even more are required to process a part. Since the diameter and length of each tool are different, after determining the zero point of the workpiece coordinate system for the processed part, it is necessary to introduce the tool compensation function to ensure that each tool is lowered to the correct height and in the correct position during the machining process. cutting tool path.


Tool compensation can be divided into tool length compensation and tool radius compensation. Length compensation refers to the axial compensation of the spindle, that is, the axial compensation of the milling cutter, and the radial compensation of the milling cutter, that is, the diameter of each milling cutter is different, and the compensation in the diameter direction is called radius compensation.

1. Tool radius compensation

1. Significance of tool radius compensation

The CNC machining center regards the tool as a point for trajectory movement when the program is running. For example, when using the tool R3 to mill a square boss with a side length of 100, the program is input according to the size of a square with a side length of 100, and the track of the tool axis is a square with a side length of 106, then the milling on the workpiece is a square of 100 that meets the size of the drawing . If the tool radius compensation function is not used, the trajectory of the tool axis during machining is a square with a side length of 100, and a square boss with a side length of 94 is milled on the workpiece, which does not meet the requirements of the drawing size.

2. Command format

G17/G18/G19 G00/G01 G41/G42 IP_D_

G41: tool radius left compensation

G42: tool radius right compensation

Radius compensation can only be performed in the specified coordinate plane, and the XY, ZX or YZ plane can be selected as the compensation plane by using the plane selection command G17, G18 or G19. The compensation number must be specified for radius compensation, and the compensation number D is stored in the tool radius value, then when the above command is executed, the tool can be automatically deflected to the left (G41) or right (G42) by a tool radius compensation value. Since the establishment of tool compensation must be completed in the block containing motion, G00 (or G01) is also written in the above format. Compensation should be canceled before the end of the procedure.

3. Application of tool radius compensation

Tool radius compensation has two compensation forms, B function and C function. Because the tool radius compensation of the B function only calculates the tool compensation according to this section of the program, it cannot solve the transition problem between the program sections, and requires the workpiece contour to be processed into a round corner transition, so the manufacturability of the sharp corner of the workpiece is not good; the C function tool radius The compensation can automatically handle the transfer of the tool center trajectory of the two program segments, and can be programmed completely according to the contour of the workpiece. Therefore, almost all modern CNC machine tools use the C function tool radius compensation.

How to judge the direction of tool radius compensation? Judgment method: From the perspective of "following the running direction of the tool", when the tool is on the left side of the workpiece, it is left compensation, and when the tool is on the right side of the workpiece, it is right compensation. The compensation can be "negative". When the tool radius compensation is negative, the functions of G41 and G42 are interchanged.

The radius value of the tool is pre-stored in the memory Dxx, where xx is the memory number. When a program needs several tools, it is recommended that the tool number Txx corresponds to the memory Dxx, that is, the tool radius compensation value of T1 uses the memory D01 correspondingly. , so that it is not easy to make mistakes during processing. After the tool radius compensation is executed, the CNC system automatically calculates, and the tool is automatically compensated according to the calculation result. In the process of processing, if there is a difference between the outline size of the part and the size of the drawing, the radius compensation value in the memory Dxx can be corrected, and then the program can be re-run to meet the requirements. G40 can be used to cancel tool radius compensation, and D00 can also be used to cancel tool radius compensation.

Attention should be paid during use: when establishing and canceling tool compensation, the G41, G42, G40 commands must be in the same block as the G00 or G01 commands, that is, the G00 or G01 commands must be used in the block using the G41, G42, and G40 commands at the same time, and cannot be used at the same time. Use G02 or G03, and the length of the running straight line segment when establishing and canceling tool compensation must be greater than the tool radius value to be compensated, otherwise the compensation function will not work; in the compensation mode, writing 2 or more tools will not In the moving block (miscellaneous function, pause, etc.), the tool will produce overcut or undercut.

2. Tool length compensation

1. Significance of tool length compensation

For example, if you want to bore a φ40mm hole, you must use two tools, first use the drill to drill to φ38, and then use the boring tool to bore to φ50mm. Drop to the height of Z3. and start cutting. If the Z origin of the workpiece coordinate system is determined by the drill bit, the drill bit will not collide with the tool during drilling. When replacing the boring tool, if the tool length compensation is not set and the same setting in the program quickly drops to Z3. At this time, when the boring tool is shorter than the drill bit, the phenomenon that the boring hole will not pass, and when the boring tool is shorter than the drill Knife collision will occur when the drill bit is long.

It will be easy to make mistakes by modifying the Z address value in the program to ensure the correctness of the machining zero point without setting the tool length compensation, because it is difficult to check the error if the address code value of each segment is not uniform when the program is long, and it is difficult to detect the error during the processing. If the tool is worn during the process, the program needs to be modified. If the same tool needs to process several different surfaces during the machining of a part, then all programs related to the tool must be modified after the tool is worn. However, after the tool length compensation command is used in programming, when the tool wears out, it is enough to modify the length compensation value in the corresponding tool length compensation number, without modifying the program, which improves the work efficiency and ensures safe operation of the program.

2. Tool length compensation G43, G44, G49

The system stipulates that tool length compensation can be used for other axes except the Z axis, but at the same time it is stipulated that the length compensation can only be added to one axis at the same time. To switch the compensation axis, the compensation for the previous axis must be canceled first.

(1) Instruction format:

G43α___H___; (α refers to any axis of X, Y, Z), tool length compensation "+".

G44α___H___; tool length compensation "-".

G49 or H00: Cancel tool length compensation.

In the command, use G43 and G44 to command the offset direction, and use H to command the offset number of the offset memory; G43 command is called forward compensation, that is, when G43 is used to specify a positive value for the tool length compensation value, the tool will follow the forward direction. move. The G44 command is called negative compensation, that is, when a positive value is specified for the tool length compensation value with G44, the tool moves in the negative direction. G43 and G44 are modal G-codes. They are valid until a G code of the same group is specified. Before executing the program, it is necessary to store the corresponding offset value in the offset memory corresponding to the address H. Taking z-axis compensation as an example, if GOO G43 Z100.0 H01 is commanded; and "-200.0" is stored in H01, when the command is executed, the Z coordinate value 100. and "-200." stored in H01 will be used " " operation, that is, 100.0 (-200.0)=-100, and take the obtained result as the Z-axis movement value. Every time the machining program calls a different tool, the original tool compensation must be canceled first, and then the newly called tool length compensation must be added; and before the end of the program, remember to insert the cancel command G49 or H0.

3. Relationship between tool length compensation function and other commands in CNC system

(1) Relationship between tool length compensation and radius compensation

If there are both tool length compensation and tool radius compensation (compensation in the controller) commands in the NC machining program of the part, the program segment containing length compensation must be written before the program segment containing radius compensation, otherwise the radius compensation invalid

For example: in the following program segment:

N50 GOOG41X20Y20D02

N60 GOOG43Z10

The CNC system does not perform tool radius compensation if it is changed to:

N50 GOOG43Z10

N60 GOOG41X20Y20D02

Then the CNC system executes both the tool radius system and the tool length compensation command.

(2) Relationship between tool length compensation and other commands

a. G43, G44 commands can only be used in linear motion, and will generate an alarm when used in non-linear motion statements;

b. G43 and G44 are modal commands of the same group, they will automatically cancel the last tool length compensation without using a special G49 command, for the sake of safety, the tool should be canceled at the end of a tool processing or program block length compensation;

c. Tool length compensation must be accompanied by independent interpolation motion (GOO, GO1, G81, G83, etc.) to be valid.

4. Determination of tool length compensation value

Different equipment systems have different tool setting methods, and different tool setting methods have different meanings of tool length compensation. For example, if a machining center system is equipped with an automatic measuring instrument, its length compensation is to compensate the real length of the tool, that is, the length from the center of the end face of the spindle taper hole to the bottom end of the tool edge; while in a certain system, the length compensation is It means to compensate the distance that the tool descends from a certain Z-axis reference height to the origin of the workpiece coordinates. What it compensates is not the real length of the tool, but the distance of the tool descending. Different tools have different length compensation values; during manual tool setting in the machine, the same tool also has different length compensation values when machining parts with different workpiece programming origins, and these different compensation values can be stored in different length compensation numbers H Inside, in case the program is called at any time when the machine tool is running.

(1) Manual tool setting measurement method in the machine

Let the Z axis return to the reference point of the machine tool. At this time, the values of X, Y, and Z axes in the machine tool coordinate system are all zero. Select a workpiece coordinate system (G54~G59 can be selected), and then input the Z value is zero, and then load the tool into the spindle to confirm that each tool is in contact with the Zo plane of the workpiece in the machine tool coordinate system, that is, use the distance between the tool tip (or the front end of the tool) and the origin of the workpiece coordinate system in the Z direction as the length The compensation value, that is, the Z coordinate value of the machine tool coordinate system at this time after the spindle descends is directly used as the tool length compensation value of each tool, and the sign of the value must not be missed.

(2) Measurement method of automatic tool presetter outside the machine

It is the distance from the end surface of the spindle to the tool tip measured on the tool presetter, and it is input into the tool length offset register of CNC as the tool length compensation value. The tool length compensation value at this time is the real length of the tool and is a positive value.

(3) Automatic length measuring device and tool setting method inside the machine

Set the length compensation value of the standard tool to zero, and take the difference between the length of each tool measured on the tool presetter and the length of the standard tool as the tool length compensation value of each tool. Among them, the length longer than the standard tool is recorded as Positive value, the compensation value shorter than the standard tool is recorded as a negative value.

First, measure the distance between the reference tool point in the Z-axis direction and the origin of the workpiece coordinate system when the reference tool returns to the machine tool reference point through the in-machine tool setting method, and input it into the workpiece programming coordinate system.

5. Comparison of measuring methods of tool length compensation value

It is cumbersome to measure the tool length compensation value with the manual measurement method on the machine and it takes a lot of machine debugging time, so the efficiency is low, but the investment is low. When using the same tool to process other workpieces, the tool length compensation value must be reset.

When measuring with an off-machine tool presetter or an automatic length measuring device that does not occupy an effective machine, the tool adjustment work is completed on the tool presetter in advance, and when the machine tool is in processing, other tools can also be measured on the tool setter. The length of the machine tool does not need to take up the running time of the machine tool because of the tool setting on the machine tool, so as to improve the efficiency and give full play to the role of the machining center, but it is necessary to add a tool presetter equipment, which is costly. Using the tool length as the tool length compensation can process different workpieces with the same tool without modifying the tool length compensation value.

3. Application of G10 programmable parameter input command in tool compensation

G10 allows the user to set the offset in the program, and use G10 to replace the manual input of tool length offset, radius compensation, workpiece coordinate system offset, etc.; the functions of G10 are as follows:

1) Change the workpiece coordinate system, G10L2P__IP__;

2) Tool life management, G10L3P__;

3) Set the workpiece zero offset in the additional workpiece coordinate system, G10L20P__IP__;

4) Change tool compensation value, G10L10(11/12/13)P__R__;

5) Parameter input, G10L50;

(1) P: The special bias of the choice, since P is an option following L, the meaning of P is different in different L types.

In G10L10/L11 P__R__: P__ is used to specify the tool length compensation H code. Such as: G10 L10 P1 ... P1 means H01

In G10L12/L13 P__R__: P__ is used to specify the D code of tool radius compensation. Such as: G10 L12 P1 ... P1 means D01

In G10L2 P__IP__: P0, P1-P6 are used to represent the basic offset EXT, G54-G59 workpiece coordinate system. (P1=G54, P2=G55, P3=G56, P4=G57, P5=G58, P6=G59)

G10 L2 P0 ... P0 represents the EXT basic coordinate system.

G10 L2 P1 ... P1 represents the G54 workpiece coordinate system.

In G10L20 P__IP__: P__ is used to indicate the additional workpiece coordinate system.

(2) R: Absolute or relative value of length or diameter offset.

In L10: R is used to indicate the absolute value of the length offset.

G10 L10 P1 R100.3 indicates length H01 and enter 100.3

In L11: R is used to indicate the incremental value of the length offset.

G10 L11 P1 R2.1 means adding 2.1 to the original length H01

In L12: R is used to represent the absolute value of the radius offset.

G10 L12 P1 R4.1 means input tool compensation 4.1 in radius compensation D01

In L13: R is used to represent the incremental value of radius offset.

G10 L13 P1 R-0.1 means subtract 0.1 from the original radius D01

(3) The R value can be superimposed, for example:

G10 L10 P1 R100.3

G10 L11 P1 R2.1

After running this program segment, the actual value in the tool length compensation offset is 102.4

G10 L12 P1 R4.1

G10 L13 P1 R-0.1

After running this program segment, the actual value in the tool radius compensation offset is 4.00

Fully understanding and mastering the meaning of tool compensation and proficient use of various compensation functions of machining center tools are of great significance for optimizing programming in work, safe operation of programs and improving production efficiency.
Share to:

LET'S GET IN TOUCH

We will contact you immediately

Fill in more information so that we can get in touch with you faster

Privacy statement: Your privacy is very important to Us. Our company promises not to disclose your personal information to any external company with out your explicit permission.

Send