Tool compensation in CNC machining

First, the proposed tool compensation:

With the end mill machining the workpiece on the CNC machine, it can be clearly seen that the tool center motion gauge does not coincide with the workpiece contour because the workpiece contour is formed by the end mill motion envelope. The center of the end mill is called the tool point of the tool (the 4th and 5th coordinate CNC machine is called the tool position vector), and the motion track of the tool point represents the movement track of the tool. In CNC machining, the program is programmed according to the workpiece contour size, or the program is programmed according to the motion track size of the tool point. This should be handled according to the specific situation.

CNC machine tool end mill processing

In the full-function CNC machine tool, the CNC system has a tool compensation function, which can be programmed according to the workpiece contour size. After the tool compensation is established and executed, the CNC system automatically calculates and the tool position is automatically adjusted to the tool movement track. The machining program is directly prepared by using the workpiece size, the tool is worn, and the replacement machining program is unchanged, so the use is simple and convenient.

The economical CNC machine tool has a simple structure and a low price, and has a certain amount of ownership in the production enterprise. In the economical CNC machine system, if there is no tool compensation function, the machining program can only be programmed according to the movement path size of the tool point. This requires that the tool path size be calculated according to the workpiece contour size and tool diameter. Therefore, the calculation amount is large and complicated, and the tool wear and replacement need to recalculate the track size of the tool point, and the machining program is re-programmed.

Second, the tool compensation in the full-function CNC machine system:

1. CNC lathe tool compensation

CNC lathe tool compensation functions include tool position compensation and tool arc radius compensation. In the machining program, the T function is used. The first two XXs in T***X are the tool number, and the last two XX are the tool compensation numbers, such as T0202. If the tool compensation number is 00, it means that the tool offset is canceled.

(1) Tool position compensation The tool position change caused by tool wear or re-installation of the tool. After the tool position compensation is established and executed, the machining program does not need to be re-programmed. The method is to measure the position of each tool and input it into the specified memory. After the program executes the tool compensation command, the actual position of the tool replaces the original position.

If there is no tool compensation, the tool moves from 0 to 1 point, and the corresponding block is N60 G00 C45 X93 T0200. If the tool compensation is X=+3, Z=+4, and stored in the corresponding compensation memory, after performing the tool compensation The tool will move from 0 to 2 instead of 1 and the corresponding block is N60 G00 X45 Z93 T0202.

(2) Tool arc radius compensation When programming the CNC lathe machining program, the turning tool tip is regarded as a point (imaginary tool tip P point), but in fact, in order to improve the tool life and reduce the surface roughness of the workpiece, the car The tip of the knife is ground into a circular arc with a small radius (cutting edge AB arc), which will inevitably result in a shape error of the machined workpiece. On the other hand, the position of the cutting edge arc, the shape of the turning tool will also affect the machining of the workpiece, and these can be solved by the tool radius compensation. The shape and position parameters of the turning tool are called the tool nose orientation, which are represented by parameters 0 to 9, and the P point is the theoretical tool tip point.

(3) Tool compensation parameters Each tool compensation number corresponds to tool position compensation (X and Z values) and tool arc radius compensation (R and T values). There are 4 parameters, which are input to the corresponding memory before machining, and displayed on the CRT. . During the automatic execution process, the numerical control system automatically corrects the position error of the tool and automatically performs the tool nose radius compensation according to the values ​​of X, Z, R, and T in the memory.

2. Machining center, CNC milling machine tool compensation

The machining center and the numerical control system of the CNC milling machine, the tool compensation function includes tool compensation functions such as tool radius compensation, angle compensation and length compensation.

(1) Tool radius compensation (G41, G42, G40) The radius value of the tool is stored in the memory HXX in advance, and XX is the memory number. After the tool radius compensation is executed, the CNC system automatically calculates and automatically compensates the tool according to the calculation result. The tool radius left compensation (G41) refers to the left side of the tool deflection direction of the programmed machining path, and the tool radius right compensation (G42) refers to the tool to the right of the programmed machining path. Cancel G40 for tool radius compensation and H00 for tool radius compensation.

Pay attention to the use: When setting or canceling the tool compensation, the block using G41, G42, G40 command must use G00 or G01 command, G02 or G03 should not be used, when the tool radius compensation takes negative value, the function of G41 and G42 exchange.

The tool radius compensation has two compensation modes: B function and C function. Since the B function tool radius compensation is only calculated according to the program in this section, the transition between the blocks cannot be solved, and the workpiece contour is required to be processed into a rounded transition. Therefore, the workability of the workpiece corner is not good, and the C function tool radius is not good. The compensation can automatically handle the transfer of the tool center trajectory of the two blocks, which can be programmed according to the workpiece contour. Therefore, most CNC CNC machine tools use the C function tool radius compensation. At this time, the following two blocks of the tool radius compensation block are required to have the displacement command (G00, G01, G02, G03, etc.) of the specified compensation plane. Otherwise, the correct tool compensation cannot be established.

(2) Angle compensation (G39) The intersection of the two planes is an angle, which may cause overtravel overcutting, which may cause machining error and can be solved by angle compensation (G39). Note that when using the angle compensation (G39) command, this command is non-modal and valid only in the block of the command. It can only be used after the G41 and G42 commands.

(3) Tool length offset (G43, G44, G49) The tool length offset (G43, G44) command can be used to compensate for changes in tool length without changing the program. The compensation amount is stored in the memory of the H code command. G43 indicates that the compensation amount in the memory is added to the end point coordinate value of the program command, G44 indicates the subtraction, and canceling the tool length offset can be performed by the G49 command or the H00 command. In the block N80 G43 Z56 H05 and if the value in the 05 memory is 16, it means that the end point coordinate value is 72mm.

The value of the compensation amount in the memory can be pre-stored in the memory by MDI or DPL, or the compensation amount in the memory No. 05 can be 16mm by the block instruction G10 P05 R16.0.

Third, the calculation of the tool path in the economical CNC machine tool:

For economical CNC machine tools, if there is no tool compensation command, only the motion track size of the tool point can be calculated, and then programmed according to this, or local compensation processing.

1. Calculation of tool center (tool point) trajectory

In the numerical control system that needs to calculate the tool center trajectory, the coordinates of the base point and the node on the tool center corresponding to the base point and the node of the part contour are calculated. The tool center motion trajectory when machining a workpiece curve with a φ8 end mill. It can be seen that the tool motion trajectory is an equidistant line of the part contour, which can be obtained from the part contour and the tool radius.

Straight line equation:

When the equidistant line is above the original line, the "+" sign is taken, and the "-" sign is taken.

Round equidistance line equation:

When the equidistant line is an outer equidistant line, the "+" sign is taken, and the "-" sign is taken.

Solving the coordinates of the base points on the equidistant line, you only need to solve the related equidistant line equations in parallel. For example, the coordinates of the 3' point, the coordinates of 2 points (40, 85), and the coordinates of 3 points (70, 105).

A=y2-y3=-20

B=x3-x2=30

C=x3y2-ybx2=1750

Find the coordinates of the center of the circle as (85, 105).

Two equidistant line equations are connected:

-20x+30y=1750+144.222

(x-85)+(y-105)=(15+4)

Solve x=66.134y=107.231

That is, the coordinates of the 3' point are (66.34, 107.231), and the coordinates of other base points or nodes on the tool center trajectory can be obtained by the same method, and then programmed according to this.

2. Offset calculation of imaginary tool tip point of CNC lathe

In the CNC turning process, in order to facilitate the tool, the knives are often pointed at the imaginary tool point P point. If there is no tool nose radius compensation, undercut will occur when turning the cone or arc. When the precision of the part is high and there is a cone or arc, the solution is: calculate the center track size of the tool nose arc, and then perform the local compensation calculation according to this compilation.

The amount of tool position compensation due to the radius r of the tool nose when turning the surface. When the tool position compensation is performed simultaneously in the Z direction and the X direction, the actual blade edge and the workpiece contact point A are moved to the tool nose setting point P during programming, and the compensation amount of r can be calculated as follows:

When programming the workpiece taper surface program, the base point coordinates are the workpiece contour base point coordinates (Z and X) plus the tool nose arc radius r compensation amount (Dz and DX), thus solving the tool nose radius compensation The problem.

In CNC machining, since the tool tip has a circular arc, the workpiece contour is formed by the tool motion envelope, so the motion path of the tool point does not coincide with the contour of the workpiece. In the full-function CNC system, the tool compensation command can be applied, and the machining process can be conveniently performed according to the workpiece contour size. In the economical numerical control system, the movement trajectory of the tool point can be calculated according to the workpiece contour size, the tool, etc. According to this programming, it can also be solved according to the local compensation method.

Global hardware network

Concerned about surprises

Label: Tool compensation in CNC machining

Previous: A brief analysis of the seven processing of mold processing equipment to improve processing performance Next: Common mechanical failures and preventive measures for CNC machine tools

Those rfid stickers in standard size 25mm round, 30mm round, 35mm round etc. In blank, also can do custom logo printing too. 

The 25mm round NXP ntag213 chip NFC Sticker is our regular inventory one, in bulk in stock, about 100k everything month, in roll, 1000pcs in roll, 2000pcs in roll and 2500pcs in roll. 

In matte paper, glassine release paper, 76mm core. 

Once your order confirmed, goods would be double checked and package, and can be shipped to you within 24 hours.


We also can help your nfc tags to laser or print variable number on surface, encoding the datas, matching the datas, and read only. 

Data custom nfc sticker lead time is about 5 working days. 


RFID Sticker can be embedded 13.56MHZ chips like Ntag213, NTAG215, NTAG216, Mifare Classic, Desfire EV2/EV2, Plus X, Plus SE, ICODE, Ultralight, TI 2084, Topaz512, and F08 etc. 
RFID sticker can be embedded 860MHZ-960MHZ chips like Alien H3, Alien H4, U-Code Gen2 and Impinj M4/M5 etc.


Besides, SunwayRFID also provides rfid silicone wristband, Fabric Wristbands, pvc wristbands, RFID Keychain,and rfid cards and so on, one-shop can meet all your need about RFID. 

Price, customer service, and quality always at our first place.




RFID Sticker

RFID Sticker,NFC Sticker,RFID Sticker Tags,Security Seal Tags

Sunway Smartech Co.,LTD , https://www.sunwayrfid.com