# G41 and G42 Codes Introduction

All general principles and rules apply to the radius offset for a lathe contouring tool. There are few differences, mainly caused by the shape of the tool.

In milling, the cutting tool is always round. The cutter circumference (periphery) is the cutting edge and its radius is the nominal offset. Turning tools have a different design. The most common is a multi-sided carbide insert. An insert may have one or more cutting edges. For strength and longer insert life, the cutting edge has a relatively small corner radius. Typical radius’s for turning and boring tools are:

0.40 mm (metric) or 1/64 = 0.0156 (imperial)
0.80 mm (metric) or 1/32 = 0.0313 (imperial)
1.20 mm (metric) or 3/64 = 0.0469 (imperial)

Because lathe tool cutting edge is often called a tool nose, the term tool nose radius offset became common.

## Tool Nose Tip

Actual tool nose is usually a corner of the tool,where two cutting edges blend into a nose radius. Figure 30-32 shows typical corners of a turning tool and a boring tool.

Figure 30-32
Tool reference point for typical turning (a) and boring (b) - rear lathe

The tool nose reference point in turning is often called the command point, imaginary point and, lately, even the virtual point. It is this point that is moved along the contour, because it is directly related to X0 Z0 setting of the part.

## G41 and G42 Codes Format

The same preparatory commands relating to cutter radius used in milling operations are also used for contouring on CNC lathes - Figure 30-33:

G41 : Offset of tool nose radius to the LEFT of contouring direction
G42 : Offset of tool nose radius to the RIGHT of contouring direction
G40 : Offset of tool nose radius CANCEL

Figure 30-33
Tool nose radius offset applied to OD (G42) and ID (G41)

There is one major difference - for lathes, G-codes do not use the D-address - all actual offset values are stored in the Geometry/Wear offset. Lathe tools have different cutting edges, otherwise they are similar to milling.

### Tool Tip Orientation

The center of a circle symbolizing an end mill must be equidistant to the contour by its radius. In milling, cutting edges are part of the tool radius, on lathes, they are not. Lathe tools do have a radius but separate cutting edges. The nose radius center is also equidistant from the contour, and the edges change their orientation, even for the same insert. Additional definitions are needed in a form of a vector pointing from the command point towards the radius center. This vector is called the tool tip orientation, arbitrarily numbered. Control system uses this number to establish the nose radius center and its orientation from the command point. Figure 30-34 shows two tools and their tip orientation.

Figure 30-34
Relationship between tool nose reference point and radius center

Tool tip orientation is entered during the setup, according to some arbitrary rules. Fanuc controls require a fixed single digit number for each possible tool tip orientation. This number has to be entered into the offset screen at the control, under the T column heading.Value of the tool radius R must also be entered, as they both work together. If the tool tip is 0 (or 9), the control will compensate to the center. Figures 30-35 and 30-36 show the standard tool tip numbering for rear orientation CNC lathes - those with X+ up and Z+ to the right of origin.

Figure 30-36
Schematic illustration of Fanuc type tool tip numbering

### Effect of Tool Nose Radius Offset

Some programmers do not bother using the tool nose radius offset. That is wrong! Study Figure 30-37 carefully first - explanations follow.

Figure 30-37
Effect of tool nose radius offset - (a) offset NOT used - (b) offset used

Theoretically, there is no need for the offset if only a single axis motion is programmed. However, single axis motions are typically part of a contour that also includes radii, chamfers and tapers. In such cases, tool nose radius offset is needed, otherwise all radii, chamfers and tapers will not be correct and part will be scrap.

The last illustration shows what areas of part would be undercut or overcut, if tool nose radius offset were not used during machining. Note that negative effect applies to a two-axis simultaneous motion only.

## G41 and G42 Code Examples

### G41 and G42 CNCProgram Example - 1

The following program example O3005 shows a simple application of tool nose radius offset on an external and internal contour, based on the drawing in Figure 30-38. Only the finishing cuts are shown - roughing is also necessary, but would most likely use G71 multiple repetitive roughing cycle without radius offset.

Figure 30-38
Simplified sample drawing for program example O3005

``````O3005
N01 (G20)..
N31 T0300 (EXTERNAL FINISHING)
N32 G96 S450 M03
N33 G00 G42 X2.21 Z0.1 T0303 M08
N34 G01 X2.65 Z-0.12 F0.007
N35 Z-0.825 F0.01
N36 X3.25 Z-1.125
N37 Z-1.85
N38 G02 X4.05 Z-2.25 R0.4
N39 G01 X4.51
N40 X4.8 Z-2.395
N41 U0.2
N42 G00 G40 X8.0 Z5.0 T0300
N43 M01
N44 T0400 (INTERNAL FINISHING)
N45 G96 S400 M03
N46 G00 G41 X2.19 Z0.1 T0404 M08
N47 G01 X1.75 Z-0.12 F0.006
N48 Z-1.6 F0.009
N49 G03 X0.95 Z-2.0 R0.4
N50 G01 X0.75 Z-2.1
N51 Z-2.925
N52 U-0.2
N53 G00 Z2.0
N54 G00 G40 X8.0 Z2.0 T0400
N55 M01
``````

Note that both contour start and end positions are in a clear area - away from the part - for the same reason as in milling. Make sure to program sufficient clearance for both lead-in and lead-out motions. Cutter radius compensation interference alarm is always caused by insufficient clearance - cutter radius cannot fit into the space provided.