Printed from Kezuriba (kezuriba.net/en/nc/g49/)
G49
Machining centerModal, group 08Tool length compensation cancel
Format and notes
G49 (or H00)
- Cancel it before returning to the origin in machine coordinates, etc. The Haas example returns Z with G53 G49 Z0
- Some NCs also use G49 to cancel 5-axis tool center point control (G43.4, or G234 on Haas) (measuring instrument maker's comparison table, Haas)
Diagram: Tool length compensation: spindle gauge line and H
Full guide with examples: Machining center programming basics (practise G54, G43 and G41 in a simulator)
- Three ways to enter tool length, and where the tool goes when it is wrong (simulator)
- G43.4: tool center point control (some controls cancel it with G49)
Try it in the simulator (machining center)
After a tool change, apply tool length offset with G43 H_ before lowering Z. Delete the G43 line and run to see the warning.
X—
Y—
Z—
T—
S0
F0
—0:00
Simulator with exercises: Machining center page
Frequently asked questions about G49
- What is G49 (Tool length compensation cancel) used for and how is it formatted in a CNC program?
- G49 commands "Tool length compensation cancel" on Machining center. The standard program format is "G49 (or H00)". Cancel it before returning to the origin in machine coordinates, etc. The Haas example returns Z with G53 G49 Z0
- Is G49 a modal code or a one-shot (non-modal) code?
- G49 is a modal code (Group 08). Once commanded, it remains active across subsequent blocks until another code from the same modal group overrides it or the control is reset. Always state or cancel modal states explicitly in your safety block and at the end of a tool operation so residual modes do not cause unexpected motion when restarting mid-program.
- Does G49 work differently on machining centers (mills) versus CNC lathes?
- G49 is primarily used on Machining center. Depending on the machine type and the lathe G-code system (System A, B, or C), this code may be unavailable or assigned to a different function, so verify against your machine tool manual.
- Are there differences in G49 across FANUC, Mitsubishi, Okuma, Haas, and Siemens controls?
- While the core behavior of G49 is shared across most ISO-compatible CNC controls (FANUC, Mitsubishi Electric, Haas), controls using native conversational or proprietary dialects (such as Okuma OSP, Siemens native mode, or Heidenhain) or machine-specific M-code tables may use different syntax. Always verify with single-block execution and distance-to-go display on a new machine.
Sources
The meaning of this code agrees in two or more sources from different publishers. Explanations are written in our own words.
- Siemens AG — SINUMERIK 802D sl/840D/840D sl/840Di/840Di sl/810D Programming Manual ISO Milling, 04.2007 Edition (6FC5398-7BP10-0BA0) cache.industry.siemens.com
- Haas Automation, Inc. — Mill Operator's Manual – 17 Mill G-Codes (online version) haascnc.com
- National Institute of Standards and Technology (NIST), USA — The NIST RS274NGC Interpreter – Version 3 (NISTIR 6556, 2000) nvlpubs.nist.gov
- Renishaw plc — Application note: ISO 10791-6 using QC20 ballbar (comparison table of tool center point control commands by NC) renishaw.com
- Haas Automation, Inc. — G234 Tool Center Point Control (TCPC) (machining center, per-code explanation page) haascnc.com