Quick Guide to the G49 CNC G Code [Tips and Tricks]

a graphic of a cnc machine with text that says learn g code today G49 tool length compensation cancel

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.

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

Code

Name

G40

Cancel Cutter Compensation

G49

Cancel Tool Length Compensation

G50

Cancel Scaling

G67

Cancel Custom Macro Call

G69

Cancel Rotation

G80

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 M30, the reset command or an H0 offset will cause the CNC machine to cancel tool length compensation.

Want to learn more about G Code for your CNC?

Leave a Comment