Lesson 6: Cutter Radius Compensation G41, G42 and G40

Updated

In short

Cutter radius compensation lets you program the part contour instead of the cutter centre path: G41 offsets the cutter to the left of the direction of travel, G42 to the right, G40 cancels it, and the offset amount comes from the D register. Compensation is switched on and off with a linear move longer than the cutter radius, and the wear offset fine-tunes part dimensions.

In this lesson you will learn:

  • why you program the part contour rather than the cutter centre;
  • the difference between G41, G42 and G40 and how the D register is used;
  • how to switch compensation on and off correctly;
  • how to profile the full outline of the training plate;
  • how the wear offset fine-tunes dimensions.

We use a Fanuc-style milling control (e.g. 0i-MF) in G21. Other controls may behave differently – follow your machine manual.

Why cutter radius compensation

When milling a contour, the side of the cutter does the cutting, but the control steers its centre. Without compensation the programmer would have to offset every point by the cutter radius: 5 mm for a Ø10 mm cutter. With radius compensation the program contains the drawing coordinates and the control calculates the centre path from the radius stored in the D register. This has three advantages: the program stays valid when the cutter diameter changes, coordinates are easy to check against the drawing, and dimensions are corrected by changing one number in the offset table rather than editing the program.

G41, G42, G40 and the D register

CodeMeaningWith M03 and a right-hand cutter
G41 D1Cutter to the left of the direction of travelClimb milling
G42 D1Cutter to the right of the direction of travelConventional milling
G40Compensation cancelledCutter is driven by its centre again

Left and right are judged looking down, along the direction of tool travel. On CNC machines aluminium is almost always climb milled – the finish is cleaner and the tool wears more slowly – so G41 is the usual choice for profiles. With G41 an outside contour is machined clockwise and an inside contour (pocket) counter-clockwise. On Fanuc the D row normally holds the radius (5.000 for T1), but some controls can be set by parameter to use the diameter, so it is worth checking.

Rules for switching on and off

  • Compensation is switched on with a linear move (G00 or G01) in the XY plane, not on a G02/G03 arc. Trying to start it on an arc gives an alarm on a Fanuc control.
  • The lead-in move starts outside the part and must be longer than the cutter radius, so the cutter can reach its offset position without touching the part.
  • The lead-out move with G40 is also linear, directed away from the part and longer than the radius.
  • While compensation is active, avoid several consecutive blocks without X or Y motion (Z-only moves or M-codes): the control then cannot see the direction of the next segment and may overcut.
  • If an inside corner radius or a step is smaller than the cutter radius, the control detects interference and stops with an alarm (often No. 041 on Fanuc) rather than spoil the part. You then need a smaller cutter or a different path.

Example: profiling the plate 5 mm deep

We will profile the full 100 × 60 mm outline of the training plate 5 mm deep with T1. The plate is clamped in the vise with at least 10 mm above the jaws. A sawn blank may have up to 1 mm of stock per side, and G54 zero is set to the corner of the finished part. The contour is programmed directly on the part edge: X0–X100, Y0–Y60.

O1006 (LESSON 6 - PROFILE G41)
N10 G21 G17 G40 G49 G80 G90
N20 T1 M06 (END MILL D10 Z3)
N30 G54 G00 X-15.0 Y-15.0 S6000 M03
N40 G43 H1 Z50.0 M08
N50 Z2.0
N60 G01 Z-5.0 F300
N70 G41 D1 X0 Y-10.0 F1200
N80 Y60.0
N90 X100.0
N100 Y0
N110 X-10.0
N120 G40 X-15.0 Y-15.0
N130 G00 Z50.0 M09
N140 G91 G28 Z0
N150 G90
N160 M05
N170 M30

The cutter plunges at X-15 Y-15, where it (X-20 to -10) is completely clear of the part. Block N70 switches compensation on and the contour is cut clockwise: left edge, top edge, right edge and bottom edge, which is extended to X-10 so the X0 Y0 corner is fully finished. The table shows the programmed points and the actual cutter centre at the end of each block with D1 = 5.000.

BlockProgrammed pointCutter centre
N70X0 Y-10X-5 Y-10
N80X0 Y60X-5 Y65
N90X100 Y60X105 Y65
N100X100 Y0X105 Y-5
N110X-10 Y0X-10 Y-5
N120X-15 Y-15X-15 Y-15

The lead-in from X-15 Y-15 to X-5 Y-10 is about 11.2 mm and the lead-out from X-10 Y-5 to X-15 Y-15 is also about 11.2 mm, both longer than the 5 mm radius. Cutting data are example values; the tool maker's data takes priority (see feed per tooth). Remove larger stock in several passes as described in depth and width of cut.

Wear offset and fine-tuning size

A cutter is rarely exactly Ø10.000 mm, and it also wears and deflects. So after the first part, dimensions are measured and corrected in the wear column: for an outside contour the correction is (measured size − nominal) / 2 with a minus sign. For example, if the part measures 100.06 mm, enter −0.03 mm in the D1 wear. For an inside contour the effect is reversed: increasing D makes a pocket smaller. The same D value acts on all sides of the contour, so it cannot correct just one dimension.

Exercise

Program O1006 is run with D1 = 5.05 instead of 5.00, and the real cutter diameter is exactly 10.00 mm. What will the plate dimensions be? And with D1 = 4.95?

For CAM-generated programs see CAM programming, for the cutters square end mills. Next lesson: Lesson 7: holes – spot drilling, drilling and tapping with cycles.

Frequently asked questions

When is G42 used?

With M03 and a right-hand cutter, G42 means conventional milling. It is sometimes chosen for parts with a hard skin, such as castings, or on less rigid machines. With a left-hand cutter and M04, G42 gives climb milling.

Why can compensation not be started on an arc?

In the start-up block the control gradually moves the cutter from its centre position to the offset position, and on an arc this transition would distort the arc geometry. A Fanuc control therefore only allows compensation to be switched on and off on a linear move.

Do I need G41 when using CAM?

Not necessarily. CAM can output the cutter centre path without compensation, or the part contour with G41 and D. A common compromise is a centre path with G41, where the D register holds only the wear correction; the mode must match what is entered in the offset table.

Exercise answer

With D1 = 5.05 the cutter stays 0.05 mm further from the contour on every side, so the plate will measure 100.10 × 60.10 mm. With D1 = 4.95 it will measure 99.90 × 59.90 mm. Inside contours such as pockets would change in the opposite direction.

Looking for someone to do this job? Find a manufacturer on the marketplace or post a request.

Services offered I need a service