G41 And G42 Cutter Compensation - G-Code Tutor
When programming a CNC machine we have to take into consideration the diameter of the cutter or the part will be undersize by the radius of that tool. Using G41 and G42 cutter compensation will enable the machine to calculate this so we can program to the dimensions of the drawing.
Offsetting the cutter left or right
We can use two different G-Codes to apply cutter compensation depending on the direction of the cut.
G41 is left compensation and G42 is right compensation.
On a CNC machine, it is usually recommended to use climb milling, this needs to be taken into consideration when writing our programs and deciding which direction to apply cutter compensation.
When we wish to cancel the compensation, G40 is used to turn it off. It is a good working practice is to end each section of the program with G40 so if we need to jump back to re-run a tool we won't have G41 or G42 applied unless it is called upon after the tool change.
Different ways to apply cutter comp
There are three different ways that cutter compensation can be applied
G42 P5.0;
By using a 'P' value we can tell the machine that we wish to offset the cutter by a defined amount, in this case, 5mms.
This technique is usually used on desktop routers and small CNC machines without a built-in tool table
G42 X5.0;
Another way we can write this is by using an 'X' value, it means the same thing.G42;
On machines with a built-in tool table within their control system, we normally see cutter compensation just applied using a simple G42 (or G41) command
Larger industrial machinery normally uses this style of defining the radius of the tool as the tooling information is entered into the tool table during the set up of the machine. During the tool call line of our program, the machine pulls all the tooling information into its memory and G42 is used to let the machine know that we wish to use cutter compensation. No other information is needed.
An Example
Let's take a look at the G41 command from this part program
T0101 (10MM ENDMILL); M06; G21 G90; S800 M03; G41 P5.0; G00 X0.0 Y0.0; Z-10; G01 Y60.0 F100.0; X100.0; Y0.0; X0.0; G00 Z50.0; X200.0 Y200.0;
We start by calling the tool, in this case, a 10mm endmill. Then we perform a tool change with the M06 command and set turn the spindle on (M03) at 800RPM. We also set the machine to absolute and metric systems using G21 and G90.
Before we move the cutter we apply the G41 cutter compensation and tell the machine that we are offsetting it my 5mm with the P value. (5mm being the radius of the tool) We are machining this part by starting at the datum position at the lower left-hand corner and travelling up to Y60.0 position. So the endmill will need to be offset to the left of the material, hence using G41 and not G42.
The rest of the program is the dimensional moves to cut the shape of the part.
Tool nose radius compensation (Lathe)
When we talk about cutter compensation on a Lathe or machining centre, we refer to it as tool nose radius compensation.
When turning, the machine has to calculate the small radius on the nose of the tool when applying our tool paths to ensure we cut the same size as we have programmed.
The direction that the tool cuts will determine if we use G41 or G42 for the correct direction to offset with compensation. This graphic shows the correct direction when applying tool nose radius compensation on a lathe.
When setting up the tooling information in the tool table of the machine controls, we add the size of the radius and the orientation of the tool. This enables the machine to select the correct direction to offset the tool when it reads the G41 or G42 in our program.
The graphic above shows what we set the tool quadrants to in relationship to the tool. For example, an external roughing tool would be set to 3 and an internal boring bar would be set to 2. This is assuming the tool turret is above the spindle, if it is below these values would be reversed.
For a left-handed external roughing tool we would select 4 if the turret is above the spindle at its tool change position or 1 if it is a lower turret design.
Share this article
CNC Lathe programming
- G-Codes
- CNC Lathe Cycles
- G71 Roughing Cycle
- G72 Facing Cycle
- G73 Pattern Cycle
- G75 Groove Cycle
- G76 Thread Cycle
- G96 / G97 Spindle speed
- G32 Taper Thread cutting
CNC Mill programming
- Mill Programming
- G84 Tapping Cycle
- G73 & G83 Peck Drilling
- CNC M Codes
- Cutter Compensation
- G90 and G91
- G98 and G99
- Canned Cycles
- G28 Gcode
- M98 and M99 subprogram
Other
- CNC Datums
- Introduction to Variables
- History of G-Code
- Calculating spindle speeds
- CNC Programming Styles
- Fusion 360 Constraints
Courses Currently Available
- Foundation G-Code course
- CNC mill programming with G-Code course
- CNC lathe programming with G-Code course
- Advanced CNC macro programming course
- Fusion 360 CAD/CAM for milling machines
- Fusion 360 CAD/CAM for lathes
- Measuring equipment - (GD&T)
- Machine shop maths
- CNC router course
- 3D printing G-Code
- Machine shop safety
- Mini manual lathe apprenticeship
To learn the basics of G Code programming, check out my Foundation course
The quickest way to learn CNC Programming
Foundation G Code TutorialTừ khóa » G41 E G42 Cnc
-
A Guide To Cutter Compensation: What Is G41 And G42?
-
G40 G41 And G42 Cuttercompensation
-
G41 And G42 Cutter Compensation - CNC Machine G-Code ...
-
WHAT IS CUTTER COMPENSATION - MachMotion
-
DYNAMIC CUTTER COMPENSATION (G41.1 AND G42.1) - Tormach
-
G41 And G42 How Are Works ? - CNC Zone
-
CNC Milling | G41 And G42 Codes | Tool Radius Offset
-
What Is The Difference Between G41 And G42? - Cnc - Stack Overflow
-
Any Suggestions On G41, G42 And G40 Functions In CNC Turning ...
-
G41 Tool Nose Compensation (TNC) Left / G42 TNC Right (Grou...
-
G41 2D Cutter Compensation Left / G42 2D Cutter Comp. Right...
-
CUTTER COMPENSATION (G40, G41, G42) | Engineering360
-
How To Control Left Or Right 3D Cutter Compensation (Fanuc)