Skip to main content
CNC.wiki

G44 Negative Tool Length Compensation in CNC Milling

Master G44 negative tool length compensation for Fanuc, Siemens, and Mitsubishi. Learn parameters, safety check conflicts, and common alarms to prevent crashes.

Hakan Gündoğdu
Hakan Gündoğdu

CNC CARE Co-founder

Introduction

Failing to program an explicit compensation call after a manual or automatic machine reference return shatters cutting tools and bends spindle assemblies on the shop floor. When a setup operator executes a G28 or G30 reference return on a CNC milling center, the control automatically cancels any active tool length compensation. If the machine then resumes its programmed path and descends towards table-mounted workholding—such as workpiece clamps, vise jaws, or a rotating chuck—without a preceding G44 or G43 code, the coordinate deviation leads to a catastrophic physical crash. Spindles and tool turrets slam directly into fixtures at rapid feedrates, converting raw stock into scrap parts and triggering severe axis overload alarms.

To prevent these severe physical impacts, CNC programmers must implement a mathematically shifted coordinate system to accommodate tool variation. Correct use of G44 tool length compensation negative allows programmers to write coordinate paths relative to a theoretical blueprint plane while shifting the toolpath along the spindle axis in the negative direction. To ensure safe clearance transitions, operators should coordinate their retract sequences using G28 automatic return to reference position or G30 reference position return before calling compensation cancellations.

Technical Summary

SpecificationDetails
Command CodeG44
Modal GroupGroup 08, Modal
Supported BrandsFanuc, Siemens, Mitsubishi
Critical ParametersFanuc No. 5040 (Group 23 and direction toggle), Siemens MD 20380 (ISO Dialect offset processing), Mitsubishi No. 1268 (coordinate shift vs. axis movement)
Main ConstraintG44 must be cancelled using G49 or H0 before switching program formats, modifying coordinate coordinate systems, or performing home returns.

Quick Read

  • Verify Direction Shifts: Confirm whether G44 negative offset shifts coordinates in the desired negative direction to prevent tool plunging errors.
  • Select Plane First: Define the active machining plane (G17, G18, or G19) before executing G44 to ensure length compensation maps to the correct coordinate axis.
  • Re-Command After Home: Always program a fresh G44 or G43 command after returning to machine home via G28 automatic return to reference position or G30 reference position return because the home sequence cancels active vectors.
  • Activate ISO Dialect: Set Siemens controls to G291 mode because the native G290 interpreter completely ignores the G44 command.
  • Avoid Threading Blocks: Never command tool length offsets or H-code changes in the same block as a thread cutting command to prevent preprocessor synchronization alarms.
  • Check Shift Settings: Inspect machine parameters (such as Fanuc TOS or Mitsubishi No. 1268) to verify if the offset executes as an axis movement or background coordinate shift.
  • Cancel Before Formats: Always execute a G49 cancel command prior to switching interpreter formats (G188/G189) or establishing new G92 zero coordinate offsets.

Basic Concepts

Activating G44 negative tool length compensation on CNC milling centers establishes a mathematically shifted program coordinate system to accommodate varying tool lengths without altering the program itself. The programmer writes coordinate paths relative to a theoretical blueprint plane, and the operator inputs measured differences between the standard tool and other tool lengths into the designated H register offset table. When G44 is commanded, the control dynamically subtracts the offset value from the active coordinates. Programmers must ensure the correct machining plane (G17, G18, or G19) is selected at the start of the program to assign length offsets to the correct physical geometry axes.

Under standard positive tool length compensation (G43 tool length compensation), the Z-axis travel calculation is Z + H. In contrast, G44 negative compensation computes Z-travel as Z − H. Because standard touch-off measurements on the machine tool spindle yield negative values in the offset register, programmers typically rely on G43 to shift coordinates downwards, making G44 a rarely utilized command on the shop floor. It is primarily reserved for specialized tooling configurations or legacy programming setups.

Command Structure

The G44 command modifies the active coordinates of the tool path by applying a negative offset value retrieved from a specified register. When executed, it instructs the interpolator to offset the tool in the negative direction along the designated axis. If the axis address is omitted from the G44 block, the control defaults to applying the offset along the Z-axis or the tool axis determined by the active plane selection.

Programmers specify the offset magnitude by writing an H address followed by a register index number. The control searches the internal offset memory for that index and subtracts the stored value. This offset remains modal until it is explicitly canceled by G49, replaced by G43, or cleared via reference returns. To ensure accurate values, operators can use automated tool probes running G37 automatic tool length measurement sequences.

Syntax

Fanuc and Mitsubishi Milling: G17 G00 (or G01) G44 Z__ H__ ;

Siemens ISO Dialect Mode: G291 ; G00 G44 Z__ H__ ;

Siemens Native Mode: Native mode does not support G44; G291 is required to toggle the interpreter.

Address / ModifierDescriptionKey Requirement
G44Tool length compensation negative (−)Modal command that shifts coordinates in the negative direction by the value of H.
ZTarget endpoint coordinate along the Z-axis.Represents the coordinate endpoint; defaults to the tool axis if omitted.
HOffset register numberRefers to the index containing the offset amount (e.g., H01). H0 cancels the offset.
G49Tool length compensation cancelCancels the modal compensation vector. Can be combined with a retract move.

Brand Applications

Fanuc

On Fanuc controls, tool length compensation Group 23 modal states are governed by parameter No. 5040. If parameter No. 5040 Bit 3 (TCT) is changed while an offset is active, or if G44 is commanded during cutter radius compensation with insufficient clearance, the control halts execution to prevent path calculation errors.

The standard syntax to initiate negative tool length compensation on a Fanuc milling machine is: G90 G01 G44 Z5.0 H01 F300 ; which commands absolute movement to Z5.0 while applying the negative offset stored in register H01.

CategoryParameter / Alarm IDDescription and Value Details
ParameterNo. 5040 Bit 3 (TCT)Selects tool change method (Turret vs ATC type). Must be set to 1 (ATC) to enable G44 offsets. Setting of 0 disables G44.
ParameterNo. 5040 Bit 4 (TLG)Reverses the directional meaning of G43 and G44. 0 = Standard; 1 = Reversed (G43 negative, G44 positive).
ParameterNo. 5006 Bit 6 (TOS)Selects tool length compensation shift type. 0 = Axis movement type; 1 = Coordinate shift type (shifts coordinate system).
ParameterNo. 5001 Bit 3 (TAL)Suppresses system alarms when tool length compensation C is executed along multiple axes concurrently. 0 = Alarm on; 1 = Alarm suppressed.
ParameterNo. 5000 Bit 1 (MOF)Controls axis movement when H-code register is modified during active compensation. 0 = Move axis immediately; 1 = Suppress movement until next absolute command.
ParameterNo. 19625Look-ahead buffer size (N) to pre-read blocks in offset mode. Integer defines the pre-read block limit.
AlarmAlarm PS0366Group 23 G-code programmed when No. 5040 Bit 3 (TCT) is set to 0. Set TCT to 1 to enable ATC method.
AlarmAlarm PS0368Swapped directly between G43.7 and G43/G44 without an intermediate G49. Program G49 to cancel active compensation before switching modes.
AlarmAlarm PS0509Tool length compensation programmed in a thread cutting (G32-G36) block. Do not program H codes or G44 in thread blocks.
AlarmAlarm PS0041G44 started/canceled in cutter compensation (G40 compensation cancel) mode with clearance smaller than tool radius. Maintain clearances larger than the cutter radius.
Version DifferenceSeries 30i/31i/32i-B Plus vs. legacy controlsNo-motion G40 block with vector coordinates (I, J, K) when parameter No. 5000 Bit 3 (GNI) is 0. Forces tool perpendicular to the end of the previous block. Set GNI to 1 to emulate legacy behavior.

Warning: Modifying tool length compensation registers or executing G44 while cutter radius compensation is active with coordinate shift enabled (TOS = 1) halts look-ahead pre-reading. The control cannot calculate path intersection vectors, forcing a sudden deceleration stop at block boundaries and causing gouges in the workpiece.

Siemens

On Siemens controls, native program execution is managed via G290 mode, which ignores G44 commands entirely. To activate negative tool length compensation, programmers must switch the interpreter to ISO Dialect mode by commanding G291. Machine parameters MD 18800 and MD 20380 govern how the control processes these external ISO G-codes.

Before executing G44 tool offsets, programmers must switch the active interpreter mode using: G291 ; G00 G44 Z5.0 H02 M03 S1500 ; which toggles the control to ISO Dialect mode and applies a negative tool length offset from register H02.

CategoryParameter / Alarm IDDescription and Value Details
ParameterMD 18800 $MN_MM_EXTERN_LANGUAGEActivates the external language compiler. Must be set to 1 to compile and process G291/G44 ISO G-codes.
ParameterMD 20380 $MC_TOOL_CORR_MODE_G43_G44Controls how G43/G44 offsets are processed in external language mode. BYTE value set to 1 or 2.
ParameterMD 10760 $MN_G53_TOOLCORRSuppresses or retains tool length/radius corrections during G53/G153/SUPA commands. BYTE value: Default is 2; 1 = suppress corrections, 0 = retain.
AlarmAlarm 61800ISO Dialect commands (G291/G44) executed while MD 18800 is not enabled. Set MD 18800 to 1.
AlarmAlarm 14800Path feedrate F is zero during G44-compensated motion (G01) with fixed feedrates disabled. Program a non-zero feedrate.
AlarmAlarm 61000Standard pocket cycles (POCKET3/POCKET4) called without active tool compensation in the channel. Activate tool compensation (T and D edge offsets) before cycle calls.
Version DifferenceSINUMERIK 840D sl vs. 802D slGroup 20 multi-edge turning functions (G51.2/G50.2) are exclusive to 840D sl and omitted on 802D sl. 840D sl also features a collision avoidance options.

Warning: If MD 10760 is configured to 0, tool offsets remain active during G53 retracts. This can cause the axis to overtravel and crash into table clamping fixtures.

Mitsubishi

On Mitsubishi Electric CNC systems, G44 negative tool length compensation is processed through parameter No. 1268. This parameter dictates whether the offset behaves as an axis movement or a coordinate system shift.

The standard programming structure to call Mitsubishi negative tool length compensation is: G90 G00 G54 X100.0 Y100.0 ; G44 Z10.0 H01 M08 ; which positions the machine and activates the offset using register H01.

CategoryParameter / Alarm IDDescription and Value Details
ParameterNo. 1268 ext04/bit6Controls the tool length offset operation type. 0 = Axis movement type; 1 = Coordinate shift type.
ParameterNo. 1268 ext04/bit5Controls tool length offset operation when the offset value is changed. 0 = Axis movement type; 1 = Coordinate shift type.
ParameterNo. 1247 set19/bit0Controls axis movement when G44 is commanded alone. 0 = Move axis by offset amount; 1 = Apply to position counter without physical move.
ParameterNo. 1292 ext28/bit3Controls timing for applying changed offset values. 0 = Apply on next axis movement; 1 = Apply in the next block.
ParameterNo. 1274 ext10/bit3Enables updating H modal when H code is commanded alone. 0 = Invalid; 1 = Valid.
ParameterNo. 1037 cmdtypSelects the active G-code system list. 9 = Type I tool memory; 10 = Type II tool memory.
ParameterNo. 1003 iunitResolves input ranges based on precision resolutions (B, C, D, or E). Metric: ±9999.999 mm to ±9999.999999 mm. Inch: ±999.9999 in to ±99.9999999 in.
AlarmMCP Alarm Y51 108Conflict in parameter configurations for look-ahead and register updates. Triggered when No. 1247, No. 1292, and No. 1274 stand-alone bits are all set to 1.
AlarmProgram Error (P170)Command register H index exceeds the maximum number of registered tool offset sets. Input an H value within system specifications.
AlarmProgram Error (P294)G92 coordinate preset commanded while G44 coordinate shift (No. 1268 ext04/bit6 = 1) is active. Cancel compensation using G49 before writing coordinate settings.
AlarmProgram Error (P70)G44 command and circular interpolation (G02/G03) specified in the same G-code block. Program G44 and G02/G03 in separate blocks.
AlarmProgram Error (P29)Workpiece coordinate preset G92.1 commanded without designating the compensation axis, or program format switch G188/G189 called before offset cancellation. Designate the compensation axis in G92.1 or cancel G44 before G188/G189.
Version DifferenceM2/M0 FormatUnder legacy M2/M0 alternative programming formats, G44 cancels active tool offsets. Replaces G49 as the cancel command, while G43 is the universal offset starter.
Version DifferenceM800V/M80V SeriesHigh-Speed High-Accuracy Control III (G05 P20000) preprocessor limitations. Drops to High-Speed High-Accuracy II (G05 P10000) if G44 is active with G41/G42.

Warning: If parameter No. 1247 set19/bit0 is set to 0 (axis movement type), executing a standalone G49 cancel command triggers physical movement of the Z-axis by the active offset value. Ensure sufficient tool clearance before canceling to avoid fixtures.

Brand Comparison

FeatureFanucSiemensMitsubishi
Language ToggleNatively supported; G44 is recognized in standard G-code interpreter.Requires G291 ISO Dialect mode; native G290 mode completely ignores G44.Natively supported; G44 is recognized in standard G-code interpreter.
Compensation MethodExplicit G43 (+) and G44 (−) direction shifts in the program.Native mode ignores G43/G44, utilizing T and D edge registers for automatic offset directions.Explicit G43 (+) and G44 (−). Can toggle G44 to act as cancel command in M2/M0 format.
Parameter Safety CheckHandled in software without throwing PLC-level hardware alarms.Handled in software.Hardware-level operation lockout throwing MCP Alarm Y51 108 if parameters conflict.
Home Return (G28/G30)Automatically cancels tool length compensation vectors.Controlled globally by MD 10760 ($MN_G53_TOOLCORR).Temporarily cancels vectors; reactivated after return via parameter #8122.
Look-ahead LimitationsStacking more than N − 2 consecutive non-motion blocks stops buffer look-ahead, causing toolpath errors.Stacking more than 3 consecutive non-motion blocks breaks continuous path preprocessor buffers.Switches compiler modes (G188/G189) require complete compensation cancel (G49) first.

Technical Analysis

An analysis of tool length compensation systems reveals how Fanuc, Siemens, and Mitsubishi manage coordinate system shifts. On Fanuc controls, G44 represents a rigid preparatory command that shifts the active program coordinates in the negative direction, subtracting the H offset register value from the physical Z-axis toolpath coordinates. Fanuc controls require a physical coordinate shift or axis movement to execute the compensation offset. If parameter TOS (No. 5006 Bit 6) is active, calling G44 recalculates the coordinate system in the background, but look-ahead buffer pre-reading is suspended if the control encounters more than N − 2 consecutive non-motion blocks.

Siemens SINUMERIK controls bypass the positive/negative G-code dichotomy entirely in their native G290 mode. Instead, native Siemens programming relies on tool edge (D) registers to automatically determine direction based on the tool orientation. G44 is only supported when switching the interpreter to G291 ISO Dialect mode. When G291 is active, MD 18800 compiles the ISO dialect, and MD 20380 determines how the offset is processed. Siemens look-ahead preprocessors are tighter, halting continuous path smoothing if more than three consecutive non-motion blocks (such as dwells or parameter writes) are queued under compensation mode.

Mitsubishi controls implement a hybrid, highly parameterized compensation model. Unlike Fanuc and Siemens, which resolve parameter overrides in software, Mitsubishi enforces hardware-level safety checks. If parameters No. 1247 (axis movement type), No. 1292 (next block application), and No. 1274 (stand-alone H modal update) are simultaneously set to 1, the preprocessor detects a buffer conflict and locks the automatic operation system with MCP Alarm Y51 108. Furthermore, Mitsubishi integrates G44 into its G188/G189 program format switcher. If a format switch is requested while a tool length cancel (G49) is incomplete, the machine aborts execution to prevent tool collision.

Program Examples

Fanuc Example

G90 G01 G44 Z5.0 H01 F300 ;
G44 Y0.0 H02 ;
G49 Z100.0 ;

Dry Run Analysis (Fanuc): During a dry run, the operator must verify that the tool is positioned at a safe Z-clearance height before executing the first G44 block. When G44 Z5.0 H01 is processed, the spindle moves to an absolute Z of 5.0 minus the value stored in offset register H01. The second block G44 Y0.0 H02 activates axis-specific compensation, shifting the Y-axis coordinate system. Finally, G49 Z100.0 cancels the compensation and retracts the Z-axis to absolute Z100.0. The operator must check that the tool does not plunge during the cancel phase.

Siemens Example

G291 ;
G00 G44 Z5.0 H02 M03 S1500 ;
G49 G00 Z200.0 D0 ;

Dry Run Analysis (Siemens): During a dry run, the controller first compiles the G291 command, switching from native mode to ISO Dialect mode. When the second block is executed, the Z-axis rapids to Z5.0 with the negative offset of H02 applied. The spindle rotates CW at 1500 RPM. The final block G49 G00 Z200.0 D0 cancels the active tool length compensation vector and resets all active tool edge corrections to D0 while retracting the Z-axis to a safe Z200.0 coordinate.

Mitsubishi Example

G90 G00 G54 X100.0 Y100.0 ;
G44 Z10.0 H01 M08 ;
G49 Z200.0 M05 ;

Dry Run Analysis (Mitsubishi): During a dry run, the machine first positions the X and Y axes to absolute coordinates of 100.0 in the G54 coordinate system. When G44 Z10.0 H01 is parsed under coordinate shift mode (#1268 ext04/bit6 = 1), the control recalculates the Z-axis coordinate system but suppresses immediate movement until the next positioning block. The tool moves to Z10.0 compensated by H01. Finally, G49 Z200.0 cancels G44 and retracts the Z-axis. If parameter No. 1247 set19/bit0 is set to 0, the cancel block will trigger a Z-axis slide motion by the H01 offset amount, which the operator must monitor.

Error Analysis

BrandAlarm CodeTrigger ConditionOperator SymptomRoot Cause / Fix
FanucAlarm PS0366Group 23 G-code programmed when No. 5040 Bit 3 (TCT) is set to 0.Automatic cycle execution halts immediately, and the status bar displays Alarm PS0366.Change parameter No. 5040 Bit 3 (TCT) from 0 (Turret type) to 1 (ATC type) to enable G44 offsets.
FanucAlarm PS0368Switching directly between G43.7 and G43/G44 modes without writing an intermediate cancel code.The machine axes decelerate to a stop, the program stops running, and the alarm window flashes PS0368.Program an explicit G49 cancel command to reset tool position offsets before commanding G43/G44 length offsets.
SiemensAlarm 61800Executing ISO Dialect mode commands (G291/G44) while external language compiling is disabled.The control interrupts interpreter translation, prevents movement, and displays Alarm 61800 on the HMI.Access machine data and change MD 18800 $MN_MM_EXTERN_LANGUAGE to 1 to enable dialect compiling.
MitsubishiMCP Alarm Y51 108Simultaneous activation of conflict preprocessor parameters No. 1247, No. 1292, and No. 1274 bits.The machine refuses to enter automatic execution mode, and the status panel shows MCP Alarm Y51 108.Reconfigure parameters to avoid concurrent look-ahead preprocessor and register update conflicts.
MitsubishiProgram Error (P170)Commanding an H-register index that exceeds the control's maximum registered offset sets.The machine stops at the offending program block and displays Program Error (P170).Input an H value that is within the range of registered tool sets configured on the machine.

Application Note

Halting the look-ahead preprocessor during cutter compensation (G41 or G42) can lead to overcutting or gouging on high-precision workpiece profiles. When programmers command a G44 coordinate shift (TOS = 1) or change H-codes while cutter radius compensation is active, the control's look-ahead pre-read buffer is interrupted. This occurs because the control cannot calculate path intersection vectors if consecutive non-motion blocks exceed N − 2 blocks on Fanuc or 3 blocks on Siemens. To ensure smooth, uninterrupted axis movement and protect complex workpiece surfaces, operators must program G44 activation blocks before cutter compensation starts, and avoid inserting variables, dwells, or data writes between motion blocks.

Related Command Network

Conclusion

Using G44 tool length compensation requires strict attention to parameter settings and G-code cancel sequences to avoid workpiece collisions. Standardizing tool setup measurements using positive compensation G43 remains the best practice for most machine shops, but understanding G44 is critical when modifying legacy programs or managing specific machine models. Operators must verify that all tool offsets are cancelled with G49 before executing coordinate shifts or home returns.

FAQ

Why does the CNC machine crash when G28 is executed without canceling G44 first?

A G28 or G30 home return command automatically cancels the active tool length compensation vector. If the programmer fails to program an explicit G44 or G43 command after a home return, the machine descends without offset compensation, causing the spindle to crash into table fixtures. Always insert a G44 Z__ H__ command in the first approach block following any reference return.

How does parameter No. 1268 bit 6 change the behavior of G44 on Mitsubishi machines?

This parameter defines whether the G44 command operates as an axis movement or a background coordinate shift. Setting the parameter to 1 shifts the background program coordinates without physical Z-axis movement, whereas setting it to 0 immediately translates the axis by the offset amount. Operators must verify this parameter setting in the machine manual before running a program to prevent unexpected motion.

Can G44 and circular interpolation (G02/G03) be programmed in the same G-code block?

Commanding G44 and G02/G03 in the same block is forbidden and triggers Program Error (P70) on Mitsubishi controls. The control preprocessor cannot resolve coordinate system offsets and circular interpolation path vectors concurrently. Program G44 in a separate linear movement block (G00 or G01) before beginning circular machining paths.

Still not resolved?

Ask our AI assistant about this topic in natural language. Grounded in verified sources, no hallucinations.

Ask AI Assistant
Hakan Gündoğdu
Hakan Gündoğdu
  • CNC CARE Co-Founder (May 2025 - Present)
  • Mitsubishi Electric NC Sales & Service Section Manager (2008 - 2025)
  • Reis CNC Service Engineer (2003 - 2008)
  • Ören Kalıp CNC Mold Line Team Leader (1999 - 2002)

With over 25 years of experience working in all areas of the CNC machine industry, I continue my activities as a co-founder of CNC CARE, where we offer brand-independent consulting, engineering, and original spare parts services.

Related Articles

Other articles on this topic