G43 Tool Length Compensation Positive (+): Fanuc, Siemens, Mitsubishi
Master G43 positive tool length compensation for Fanuc, Siemens, and Mitsubishi. Learn parameters, alarms, and syntax rules to prevent spindle crashes.
Introduction
Omitting G43 positive tool length compensation from a positioning block after a machine reference return instantly triggers an uncompensated tool descent. When the spindle drives a spinning cutter toward a program zero that lacks this physical compensation offset, the tool holder or spindle head crashes directly into workholding equipment like table-mounted workpiece clamps, a fixture vise jaw, or a rotating spindle chuck. This sudden, high-force hard collision shatters the cutting tool, bends the spindle shaft, triggers an overload alarm code, and reduces the raw workpiece to a ruined scrap part.
To prevent these physical damages, CNC programmers and setup operators must establish a mathematically recalculated Z-axis trajectory across Fanuc, Siemens, and Mitsubishi control systems. The correct activation of G43 positive tool length compensation allows programmers to develop part programs offline relative to a theoretical blueprint plane, shifting the complexity of actual tool assembly measurements to the control's tool offset registers. By understanding parameter configurations, lookup buffer rules, and reset behaviors, operators ensure safe machine movement and precise contour depth. To avoid unexpected retraction collisions, programmers should execute home reference returns using g28-automatic-return-to-reference-position or g30-reference-position-return with proper retraction commands.
Technical Summary
| Technical Specification | Value / Requirement |
|---|---|
| Command Code | G43 |
| Modal Group / Modality | Group 08 / Modal |
| Supported Brands | Fanuc, Siemens, Mitsubishi |
| Critical Parameters | Fanuc: No. 5040 (Group 23 and direction switch), No. 5001 (Type A/B/C select); Siemens: MD 20380 (ISO Dialect offset mode), MD 10760 (G53 suppression); Mitsubishi: No. 1268 (coordinate shift vs. axis move) |
| Main Constraint | Tool length compensation must be active and verified before machining. On Fanuc and Mitsubishi, reference returns (G28/G30) cancel the modal offset vector. Programming offsets on thread-cutting paths is prohibited. |
Quick Read
- Set Offsets Prior to Execution: Measure the actual distance from the tool tip to the program zero and load it into the corresponding H-register before running the program.
- Select Working Plane First: Establish the active plane (G17 for milling) to ensure the control applies the positive offset to the correct physical coordinate axis.
- Avoid Thread Cutting Blocks: Never program G43 or H-offset changes in the same block as thread-cutting commands to prevent synchronization alarms.
- Track Home Return Cancellation: Always reprogram G43 after returning to machine home coordinates via g28-automatic-return-to-reference-position or g30-reference-position-return because the control automatically cancels active compensation vectors.
- Verify Parameter Shift Type: Check whether parameter settings (such as Fanuc TOS/TOP or Mitsubishi No. 1268) are set to coordinate shift or physical axis movement to anticipate motion.
- Cancel Before Program Switches: Execute a G49 cancel command prior to switching program format systems (G188/G189) or performing coordinate presets (G92.1).
Basic Concepts
Activating G43 positive tool length compensation on milling CNC controls establishes a mathematically recalculated Z-axis trajectory. This allows programmers to develop part programs offline relative to a theoretical blueprint plane without knowing the actual physical lengths of the cutting tools during programming. During machine setup, the operator measures the physical tool assembly (the distance from the tool tip to the program zero or reference line) and inputs these values directly into the corresponding registers in the control's offset table. When the G43 command is executed with the matching offset register, the motion kernel applies this value to the active axis position, ensuring that the tool tip accurately tracks the programmed coordinates.
Setup personnel and programmers must maintain extreme vigilance regarding how G43 behaves during reference point returns, coordinate transformations, and cutter compensation mode. Any offset or coordinate deviation in close proximity to workholding equipment—such as table-mounted clamps, fixture vise jaws, or the rotating spindle chuck—can result in a catastrophic hard collision where the spindle or tool turret crashes directly into the fixtures, shattering the cutting tool, triggering an overload alarm code, and producing a ruined scrap part.
Command Structure
The G43 command structure requires a coordinate axis target and a tool length compensation offset register identifier. The target coordinate, typically Z, defines the absolute position where the tool tip should go. The offset register is specified using the H address followed by an integer index representing the offset storage number. The motion control card adds the positive offset value stored in this H-register to the Z-axis coordinate, causing the physical spindle to rest higher by the measured tool length. To set the correct registers in the offset table, automatic probes can run g37-automatic-tool-length-measurement cycles.
To safely execute this command, programmers select the correct working plane (typically G17 for milling) prior to the activation block. If G43 is called in cutter compensation mode, special care is needed to avoid look-ahead interruptions. The compensation remains modal until canceled by G49 or an H0 command. This modal state ensures that all subsequent Z-axis movements are modified by the active offset value, maintaining the safe distance of the tool tip from the workpiece contour.
Syntax and Address Structure
Fanuc and Mitsubishi Milling: G17 G00 (or G01) G43 Z__ H__ ;
Siemens ISO Dialect Mode: G291 ; G00 G43 Z__ H__ ;
Siemens Native Mode: T__ D__ ;
| Address / Modifier | Description | Key Requirement |
|---|---|---|
| G43 | Tool length compensation positive (+) | Modal command that activates positive tool length compensation. |
| Z | Target coordinate | The coordinate endpoint along the tool axis (usually Z in G17). |
| H | Offset register number | Specifies the register number containing the tool length offset value. |
| G49 | Compensation cancel | Cancels the active tool length compensation modal state. |
| H0 / D0 | Register cancel | An H0 (or D0 in Siemens) command cancels the active offset vector. |
Brand Applications
Fanuc
On Fanuc systems, positive tool length compensation modal states are governed by core parameters like Parameter No. 5040 and Parameter No. 5001. If Parameter No. 5040 Bit 3 (TCT) is modified while an offset is active, Alarm PS0368 is generated.
The startup command is programmed as G90 G00 G54 X100.0 Y100.0 S1500 M03 T01 ; followed by G43 Z2.0 H01 M08 ; to activate compensation using register H01, and canceled via G49 G28 Z0.0 M05 ;.
| Category | Reference ID / Setting | Detail / Specification |
|---|---|---|
| Parameter | No. 5040 Bit 3 (TCT) | Activates G43, G44, G49 as Group 23 preparatory codes. |
| Parameter | No. 5040 Bit 4 (TLG) | Reverses the directional meaning of G43 and G44. |
| Parameter | No. 5006 Bit 6 (TOS) / No. 11400 Bit 2 (TOP) | Tool length compensation shift type. When 1 (coordinate shift), programming comp start/cancel in cutter comp mode stops look-ahead and decelerates. |
| Parameter | No. 5001 Bit 0 (TLC) and Bit 1 (TLB) | Configures Tool Length Compensation Type A, B, or C. |
| Parameter | No. 5001 Bit 3 (TAL) | Suppresses alarms when offsets are executed along two or more axes simultaneously in Type C. |
| Parameter | No. 5001 Bit 6 (EVO) | Allows dynamic updates to active tool length comp value during execution if set to 1. |
| Parameter | No. 5000 Bit 1 (MOF) | Configures axis movement when H code changes. If 0, axis moves immediately by offset deviation. |
| Parameter | No. 19625 | Look-ahead buffer size to pre-read blocks in offset mode. |
| Alarm | PS0368 | Modified Parameter No. 5040 Bit 3 while offset is active. Cancel offset first. |
| Alarm | PS0509 | Tool offset or G43 programmed in the same block as a thread cutting command (G32, G34, G35, G36). |
| Alarm | PS0170 / P170 | Programmed H code exceeds maximum allowed offset sets. |
| Version Difference | Series 30i/31i/32i-B Plus vs. 16i/18i/21i | When No. 5000 Bit 3 (GNI) is 0, G40 cancel block with vector coordinates but no motion is treated as no motion (moves perpendicularly). Set GNI to 1 for legacy safe run. |
| Version Difference | Modern Controls | If parameter #1247 set19/bit0 and #1292 ext28/bit3 are both 1, MCP alarm Y51 108 is triggered to prevent automatic start. |
Warning: Running G43 or H changes inside cutter compensation mode under coordinate shift type causes look-ahead buffer interlocks to trip. The control cannot compute intersection vectors, forcing a physical deceleration stop that gouges the workpiece, yielding a scrap part, and shattering the cutter.
Siemens
On Siemens controls, ISO dialect mode parsing is configured via MD 18800 and MD 20380. If the ISO dialect translation option is inactive, calling G43 triggers Alarm 61800.
The ISO dialect startup sequence begins with G291 ; to switch modes, then G00 G43 Z10.0 H02 M03 S1500 ; to activate the positive offset, and cancels via G49 G00 Z200.0 D0 ; before using G290 ; to return to native mode.
| Category | Reference ID / Setting | Detail / Specification |
|---|---|---|
| Parameter | MD 20380 $MC_TOOL_CORR_MODE_G43_G44 | Channel-specific data defining how G43/G44 offsets are processed when external language is active. |
| Parameter | MD 10760 $MN_G53_TOOLCORR | Suppresses active tool length and radius compensation during G53, G153, or SUPA moves if set to 1. |
| Parameter | MD 18800 $MN_MM_EXTERN_LANGUAGE | Activates external ISO Dialect interpreter (set to 1). |
| Parameter | MD 20154 $MC_EXTERN_GCODE_RESET_VALUES[n] | Defines which ISO Dialect G-codes are active upon NC reset or power-up. |
| Parameter | Address H Register | Offset range in tool offset memory (1 to 32000). |
| Alarm | 14800 | Programmed path velocity evaluates to zero in linear interpolation (G1) while G43 is active and feedrate is not programmed. |
| Alarm | 61800 | Switching to G291 or executing G43 while option MD 18800 is not active. |
| Alarm | 61000 | Calling tech cycle (POCKET3/POCKET4) when no tool offset is active. |
| Version Difference | SINUMERIK 840D sl vs. 802D sl | Multi-edge turning functions G51.2 (ON) and G50.2 (OFF) are supported on 840D sl but omitted on 802D sl. |
| Version Difference | Legacy SINUMERIK NCU571 | Keywords for Group 39 (CPRECOF/CPRECON) or Group 40 (CUTCONOF/CUTCONON) are invalid. |
Warning: If MD 10760 is configured incorrectly to retain offsets during G53 retraction moves, the spindle may overtravel, resulting in a hard collision with workpiece vise jaws or clamping fixtures.
Mitsubishi
On Mitsubishi controls, G43 operations depend on parameters such as Parameter No. 1268 and Parameter No. 1247. The selection between coordinate shift and physical axis movement is set via Parameter No. 1268 ext04/bit6.
The program activates length compensation using N10 G90 G00 G54 X100.0 Y100.0 ; followed by N20 G43 Z2.0 H01 M08 ;, and cancels using N30 G49 G00 Z200.0 ;.
| Category | Reference ID / Setting | Detail / Specification |
|---|---|---|
| Parameter | Parameter No. 1268 ext04/bit6 | Tool length offset operation type. 0 = axis movement type, 1 = coordinate shift type. |
| Parameter | Parameter No. 1268 ext04/bit5 | Offset operation type of changed amount. 0 = axis movement type, 1 = coordinate shift type. |
| Parameter | Parameter No. 1247 set19/bit0 | Movement by tool length command. 0 = moves by offset, 1 = does not move (coordinate shifts). |
| Parameter | Parameter No. 1292 ext28/bit3 | Timing for applying changed compensation values. 1 = applied from next block, 0 = next compensation axis movement block. |
| Parameter | Parameter No. 1210 RstGmd/bit18 and bit7 | G43 modal retention on NC reset. Bit 18 = 1 and Bit 7 = 0 to retain G43. |
| Parameter | Parameter No. 8122 Keep G43 MDL M-REF | If set to 1, G43 tool length compensation is automatically reactivated and maintained after a manual reference return. |
| Parameter | Parameter No. 1274 ext10/bit3 | Updating H modal when H address is standalone (e.g., H1;). 1 = valid. |
| Parameter | Parameter No. 1381 TolOfsCmdCheck_M | If bit 1 is 1, checks for empty values; triggers error if active offset evaluates to zero. |
| Alarm | MCP Alarm Y51 108 | Conflict in parameters when #1247, #1292, and/or #1274 are all 1. Halts NC. |
| Alarm | Program Error P170 | Command offset H exceeds maximum sets. |
| Alarm | Program Error P169 | Compensation command is executed while active offset amount is zero (with #1381/bit1 = 1). |
| Alarm | Program Error P29 | Program Format Switch (G188/G189) called before G43 is fully canceled; or G92.1 coordinate preset is commanded without designating comp axis. |
| Alarm | Program Error P70 | Programmed G43/G44/G49 in the same block as a circular interpolation command (G02/G03). |
| Version Difference | M800V/M80V Series | When High-speed high-accuracy control III (G05 P20000) is active and tool radius comp is turned ON, control drops down to High-Speed High-Accuracy II (G05 P10000). |
| Version Difference | Lathe vs. Milling Configurations | Lathe systems apply tool length compensation automatically via a unified T-code. Milling systems separate length offsets under modal H-code and radius offsets under modal D-code. |
Warning: Running G188 or G189 format switches while the G43 cancel is incomplete halts the compiler and displays Program Error P29, stopping spindle and axis movement.
Brand Comparison
| Topic | Fanuc | Siemens | Mitsubishi |
|---|---|---|---|
| Tool Length Direction Switch | Divided strictly between positive (G43) and negative (G44) G-code directions. | Bypassed in native mode via D-code tool-edge register geometry offsets. | Implements both axis movement and coordinate shift (parameter #1268 bit 6). |
| Reset & Reference Return behavior | Enforces automatic cancellation during G28 or G30 reference returns. | Suppresses offsets in G53/G153/SUPA via channel MD 10760. Retained upon reset by default. | Retention depends on parameters `#1210` reset settings and `#8122` manual reference return reactivations. |
| Look-ahead Interlocks & Safety | Interrupted N-2 lookup buffers in cutter compensation force a deceleration stop. | Continuous-path G642 smoothing blends inline offset updates. | Protective MCP Alarm Y51 108 halts NC automatically if parameter safety checks conflict. |
| Programming Interpreter | Native parsing. | Bilingual interpreter transition (G290/G291) to compile G43. | Unified Lathe/Milling format switching (G188/G189) with modal checks. |
Technical Analysis
Analytically, the differences in G43 positive tool length compensation implementation between Fanuc, Siemens, and Mitsubishi centers on preprocessor design, home reference return vector handling, and programming interfaces. Fanuc's preprocessor relies on a rigid look-ahead lookup buffer that triggers deceleration stops if G43 is modified in active cutter compensation mode. By contrast, Siemens and Mitsubishi utilize advanced preprocessor macro queuing and continuous-path mode smoothing to calculate tool length updates dynamically. Additionally, Fanuc divides tool length directions strictly between G43 and G44. Siemens bypasses this G-code selection entirely in native mode by using D-code cutting-edge registers, which compute offsets multidimensionally according to active plane and tool type definitions, while Mitsubishi offers a choice between physical axis translation and silent coordinate system shifts controlled by parameter settings.
Reference return behaviors and reset modal states present another major architectural divide. Fanuc enforces automatic, hardware-level cancellation of tool length vectors during home reference returns (G28 or G30), meaning any subsequent positioning block requires G43 to be explicitly redeclared. Siemens and Mitsubishi retain the modal offset states across resets and reference returns, governed by internal system configurations like Siemens MD 10760 or Mitsubishi parameter #1210. While Siemens allows developers to suppress offsets globally during G53 moves, Mitsubishi uses a structured parameter check that halts the machine with MCP Alarm Y51 108 if conflicting movement commands are active simultaneously. Mitsubishi also incorporates dynamic format switches (G188/G189) that verify the cancel state of G43 before initialization, a feature absent in the more rigid Fanuc interpreter and Siemens' bilingual G290/G291 parser.
Program Examples
Fanuc Milling Example
G90 G00 G54 X100.0 Y100.0 S1500 M03 T01 ; Absolute positioning, start spindle
G43 Z2.0 H01 M08 ; Activates G43 tool length compensation to Z2.0 using H01 and coolant ON
G49 G28 Z0.0 M05 ; Cancels tool length compensation and returns Z-axis to reference zero
Dry Run Verification: Before executing the program, verify the offset registry. During the dry run of the startup block, watch for a smooth Z-axis positive shift by the measured tool length. Verify that the Z-axis retracts to the machine reference point and that G49 cancels the offset vector, ensuring the spindle does not overtravel or crash.
Siemens ISO Dialect Example
G291 ; Switches interpreter to ISO Dialect Mode to enable G43 tool length compensation
G00 G43 Z10.0 H02 M03 S1500 ; Moves Z-axis to absolute 10.0 with positive offset applied from register H02
G49 G00 Z200.0 D0 ; Cancels tool length compensation (G49) and clears active tool offsets (D0)
Dry Run Verification: Run a simulation or dry run above the part. Confirm that G291 successfully transitions the compiler to the ISO dialect interpreter. Verify that the offset from H02 is applied smoothly along the active plane, and ensure that the D0 command cancels the active offset vector during retraction, preventing motion alarms.
Mitsubishi Milling Example
N10 G90 G00 G54 X100.0 Y100.0 ; Absolute rapid positioning to safe starting coordinates
N20 G43 Z2.0 H01 M08 ; Activates G43 (+) tool length compensation to Z2.0 with offset register H01 and coolant ON
N30 G49 G00 Z200.0 ; Cancels tool length compensation with G49 and retracts the Z-axis
Dry Run Verification: Position the spindle at a safe distance and run a dry cycle. Confirm that the tool length compensation activates on the Z-axis in block N20, shifting the coordinate counters. Verify that the retract block containing G49 cancels the compensation state completely to avoid collision warnings upon subsequent tool calls.
Error Analysis
| Brand | Alarm Code | Trigger Condition | Operator Symptom | Root Cause / Fix |
|---|---|---|---|---|
| Fanuc | PS0368 | Modified Parameter No. 5040 Bit 3 (TCT) while offset is active. | The CNC system halts and displays parameter write error. | Disable tool length compensation by commanding G49 before modifying parameter settings. |
| Fanuc | PS0509 | Tool offset or G43 is programmed in the same block as a thread cutting command (G32, G34, G35, G36). | The controller stops execution immediately at the thread block. | Avoid calling tool offsets or changing active H-codes in the same blocks that contain thread cutting paths. |
| Fanuc | PS0170 | Programmed H code exceeds maximum allowed offset sets. | The NC stops and reports an invalid register index. | Check active tool offset memory capacity. Change the H-address to a valid, supported index. |
| Siemens | Alarm 14800 | Programmed path velocity evaluates to zero in linear interpolation (G1) while G43 is active and feedrate is not programmed. | Spindle motion pauses and an interpolation error message is displayed. | Ensure a non-zero feedrate F is active in the G1 interpolation block. |
| Siemens | Alarm 61800 | Switching to G291 or executing G43 while option MD 18800 is not active. | The control system aborts program execution and flags an invalid G-code command. | Enable the external ISO dialect translation option by setting MD 18800 (and option 19800) to 1. |
| Siemens | Alarm 61000 | Calling tech cycle (POCKET3/POCKET4) when no tool offset is active. | The machining cycle fails to start and outputs an offset missing warning. | Activate a tool offset (T and D edge selection) before calling any high-level tech cycles. |
| Mitsubishi | Y51 108 | Conflict in parameters when #1247 set19/bit0, #1292 ext28/bit3, and/or #1274 ext10/bit3 are all 1. | The NC system locks out automatic operation and halts the start sequence. | Resolve conflicting parameter operations by verifying that the offset timing and standalone commands are not set to 1 simultaneously. |
| Mitsubishi | Program Error P170 | Command offset H exceeds maximum sets. | The program execution halts and displays invalid offset range. | Use an H-offset number within the system's allowed register capacity. |
| Mitsubishi | Program Error P169 | Compensation command is executed while active offset amount is zero (with #1381/bit1 = 1). | The spindle stops and displays empty offset value error. | Ensure the selected offset register in the H-table is loaded with a non-zero measured length value. |
| Mitsubishi | Program Error P29 | Program Format Switch (G188/G189) called before G43 is fully canceled; or G92.1 coordinate preset is commanded without designating comp axis. | The controller aborts operation and triggers format alarm. | Command G49 and a travel move to cancel compensation fully before switching formats or calling G92.1 presets. |
| Mitsubishi | Program Error P70 | Programmed G43/G44/G49 in the same block as a circular interpolation command (G02/G03). | The controller halts and flags an illegal arc offset format. | Separate tool offset commands from circular interpolation blocks. Activate G43 in linear or positioning blocks. |
Application Note
Gouging the workpiece and shattering the cutter will occur if a programmer modifies the active H-code inside cutter compensation mode while coordinate shift parameters (like Fanuc TOS or TOP) are set to 1. This parameter state interrupts the look-ahead buffer, forcing a physical deceleration stop. Similarly, switching working planes mid-program without canceling active offsets shifts the tool length vector, resulting in severe axis path deviation. To maintain safe clearance envelopes, operators must verify that global suppression parameters are configured to clear active offset vectors during non-modal machine coordinate movements.
Related Command Network
- g28-automatic-return-to-reference-position (Automatic Return to Reference Position): Automatically cancels active G43 tool length compensation vectors on Fanuc systems during home returns.
- g30-reference-position-return (Reference Position Return): Performs a reference return to the second coordinate position and automatically clears the active tool length offset.
- g37-automatic-tool-length-measurement (Automatic Tool Length Measurement): Commands the probe to measure tool length values and update the corresponding H-register used by G43.
Conclusion
Ensuring precise machining depths and eliminating fixture collision hazards requires systematic verification of tool offsets, active planes, and retraction routines. Operators must consistently measure actual tool lengths, reprogram G43 after any reference point returns, and keep non-motion blocks outside active offset paths to protect both the cutting tool and workpiece.
Frequently Asked Questions
Why does the control automatically cancel positive length compensation during a reference return?
The motion kernel in controls like Fanuc is designed to clear all active axis offset vectors when returning to physical machine coordinates. This hardware-level safety clearing prevents the machine from carrying dynamic tool length offsets into the physical home positions, which would otherwise cause overtravel limits to trip. Action: Always reprogram G43 with the target coordinate and H-register in the very first travel block after executing a G28 or G30 reference return.
How can I dynamically update the tool length offset value while the program is running?
Most modern controls allow real-time updates to active registers through system variables or G10 programmable data input blocks. However, you must first verify that parameter settings like Fanuc No. 5001 Bit 6 (EVO) are set to 1. If this dynamic update parameter is disabled, the control will ignore any mid-program offset modifications and continue on the old toolpath. Action: Set parameter No. 5001 Bit 6 to 1, or execute a G49 cancel block before loading new tool geometry values.
What happens if I program G43 or H codes in a thread cutting program block?
Because thread cutting requires strict feed-spindle synchronization, the control disables look-ahead calculations and offset modifications during these blocks. Programing G43 or H changes in a thread block will cause the preprocessor to fail, instantly throwing Alarm PS0509 on Fanuc systems and halting execution mid-cut. Action: Command all tool length offsets and H-register updates in the positioning blocks prior to starting the threading cycle, and ensure they are active before entering thread-cutting coordinates.
Still not resolved?
Ask our AI assistant about this topic in natural language. Grounded in verified sources, no hallucinations.

- 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
G71 Metric Dimensioning Guide for Siemens SINUMERIK Controls
Learn how to program G71 and G710 metric dimensioning on Siemens SINUMERIK controls, including parameter MD 10240, alarm codes, and G-code syntax errors.
G69 Balance Cut Cancel: Coordinate Recovery & Crash Prevention
Learn how to program the G69 balance cut cancel command for Fanuc, Siemens, and Mitsubishi turning centers. Cancel dual slide synchronization and prevent crashes.
G70 CNC Finishing Cycle Guide for Fanuc, Siemens, and Mitsubishi
Learn the G70 finishing cycle for CNC turning. Master syntax, parameters, and alarm codes for Fanuc, Siemens CYCLE95, and Mitsubishi controls to avoid crashes.
G69 Coordinate System Rotation Cancel: Modals, Alarms, and Setup
Learn to cancel G68 facing turret mirrors and coordinate rotations using G69 on Fanuc, Siemens, and Mitsubishi CNCs to prevent turret crashes.