In this article, we describe tool radius offset commands which is called G41 and G42 codes CNC machining centers ( Milling ) with all details and examples.
Contour of a part – also known as a profile – is normally programmed for milling applications by establishing the depth in Z-axis first, then moving the cutting tool individually along the X-axis, Y-axis, or both axes simultaneously. For turning applications, either the X-axis or the Z-axis, or both axes can be used to face, turn or bore a contour. For both types of machining, each contour element requires a single block of cutting motion in the program. These motions between contour change points can be programmed in millimeters or inches and they can use absolute value positions or incremental distances. In either case, keep in mind that this type of programming always uses the spindle centerline as the X-Y or X-Z tool movements. Although centerline programming is a very convenient method for program development, it is also a method unacceptable for machining. During contact with material, the cutting tool edge must be in contact with the programmed part contour – not its centerline.
Actual toolpath for all contouring operations is always equivalent to the cutting tool motion. Whether used on a CNC machining center or on a CNC lathe, the cutting tool edge must always be tangent to the contour, which means the tool motion has to create a path where the center point of the cutter is always at the same distance from the contour of the part. This is called the equidistant tool path.
The illustration in Figure 30-1 shows two types of a tool path. One is not compensated, the other is compensated. Both are applied to a particular contour, with the cutter diameter shown as well, including its positions.
In order to program one or the other mode of cutting (based on cutting direction), control systems offer two preparatory commands to select the desired cutter radius offset direction mode:
G41 : Offset (compensation) of the cutter radius is to the LEFT of contouring direction
G42 : Offset (compensation) of the cutter radius is to the RIGHT of contouring direction
When either G41 or G42 mode is no longer required, it must be canceled by the G40 command:
G40 : Cutter radius offset mode CANCEL
Figure 30-10 shows all three radius offset commands:
Keeping in mind that the terms climb and conventional refer to milling only and are relative to spindle rotation and the hand of milling cutter. By this definition, the G41 command is applied for climb milling mode, G42 command is applied for conventional milling mode:
The table shows all relationships between tool type, tool rotation, and cutting direction.
There is no cutter radius offset applied when G40 command is in effect.
Figure 30-11 shows the G41 command as a climb milling mode and the G42 command as a conventional milling mode. Climb milling mode is the most common in CNC milling, particularly in contour milling.
General Rules of G41 and G42 for Machine Type
Reminders and rules are only important until a particular subject is fully understood. Until then, a general overview and some additional points of interest may come handy. Programming cutter radius offset is no different. Most of the following items apply to milling and turning, some are unique to milling only.
- Reach the Z-axis milling depth in G40 mode (cutter radius offset cancel mode)
- Do not forget the offset number D.. to include in the program – it is a small error that can cost a lot
- Retract from the depth (along Z-axis only) after the radius offset has been canceled
- Make sure the cutter radius offset corresponds to the work plane selected
Milling and Turning
- Never start or cancel radius offset in an arc cutting mode (with G02 or G03 in effect). Between the startup block and the cancel block, arc commands are allowed and normal, if the job requires them
- Make sure the cutter radius is always smaller than the smallest inside radius of the part contour
- In the canceled mode G40, move the cutter to a clear area. Always consider the cutter radius, as well as all reasonable clearances
- Apply cutter radius offset with G41 or G42 command, along with a rapid or a linear motion to the first contour element (only with G00 or G01 in effect)
- Use a single axis approach from the startup position
- Make sure to know exactly where the tool command point will be when the radius offset is applied along two axis
- In compensated mode (G41 or G42 in effect), watch for blocks that do not contain an axis motion. Avoid non-motion blocks if possible (missing X, Y and Z)
- Cancel cutter radius offset with G40 command, along with rapid or linear motion (G00/G01) only, preferably as single axis motion only
- G28/G30 machine zero return commands will not cancel cutter radius offset (but either one will cancel tool length offset)
- G40 command can be input through MDI to cancel any cutter radius offset (usually as a temporary or an emergency measure)
There are no unique turning requirements.
G41 and G42 Tool Radius Offset Program Example
Tool Diameter : 16mm
N80 T02 M6;
N85 G94 F800;
N90 S2500 M03;
N95 G43 G0 Z10. H2;
N100 G00 X–10 Y0;
N105 G00 Z–7.5;
N110 G42 G1 G90 X10.Y10. D2;
N115 G01 X110;
N160 G01 X–10 Y0;
N165 G00 Z–15;
N170 G42 G1 G90 X10.Y10. D2;
N175 G01 X110;
N220 G00 X–10 Y0;
N225 G00 Z–7.5;
N230 G42 G1 G90 X25.Y25. D2;
N235 G01 X95;
N280 G00 X15 Y15;
N285 G01 X60;
N290 G41 G1 G90 X75. Y30. D2;
N295 G01 Y100;
N320 M05 M09;