The G49 code cancels tool length compensation.
Once the G49 command is used, the machine will not account for any tool length (H) offsets in its movement.
This means the machine will move the end of the spindle to all new locations.
When tool length compensation is in effect by using either a G43 or G44 code, the machine will move the end of the cutting tool to all new locations.
What is tool length compensation?
Tool length compensation is your CNC machine accounting for the length of the cutting tool when running the program.
It does this by adjusting for the cutter by a value that is entered into the offset library. This offset is called an H offset.
H offsets are assigned by using the H code with a G43 code to turn tool length compensation on.
For example, the line
tells the CNC to turn tool length compensation on using the #2 H offset.
Where will you find G49 in a CNC program?
The G49 code is not a required part of your CNC program.
It is rare that you would want to move the tip of your spindle to an exact location. You will almost always have a cutting tool in the spindle that you will want to account for.
This means the G49 code is not used often. It is more important to make sure you have the correct tool and offset selected.
Some programmers choose to include the G49 code as part of their safety block of code.
Others skip it and just make sure to call out the correct offset for their tool at the start of a new section of code.
As long as you switch to the correct offset for the currently loaded tool then there is no need to cancel tool length compensation with the G49 code.
What to think about when using a G49 code?
Different machines can interpret the G49 code in varying ways.
When the G49 code is used, some machines will immediately move the end of the spindle to the location the end of the cutting tool was previously in.
If you aren’t in a safe location with enough clearance, the machine could crash. That’s never good!
Other CNC cancel commands
Cancel Cutter Compensation
Cancel Tool Length Compensation
Cancel Custom Macro Call
Cancel Canned Cycles
Codes that are similar to G49
There are multiple commands that will cause the machine to act very similar to when a G49 codes is used.
Using the M30 code, the reset command or an H0 offset will cause the CNC machine to cancel tool length compensation.