Skip to main content
CNC.wiki

G42 Cutter Radius Compensation Right: Fanuc, Siemens, Mitsubishi

Master G42 tool radius compensation right for Fanuc, Siemens, and Mitsubishi. Learn syntax, parameters, errors, and safety rules to prevent collisions.

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

CNC CARE Co-founder

Introduction

An incorrect entry in the CNC control's tool geometry offset register—such as entering a diameter value instead of a radius—instantly corrupts the path calculations for G42 tool nose radius compensation right. When this toolpath deviation occurs near a workpiece fixture vise jaw, table-mounted clamps, or the rotating spindle chuck, the tool turret executes a rapid, unprogrammed shift. The resulting hard collision shatters the carbide insert, bends the spindle, triggers a severe axis-overload alarm code, and produces a ruined scrap part. To eliminate these physical risks, operators and programmers must understand the exact mechanics, parameter dependencies, and startup rules of G42 across Fanuc, Siemens, and Mitsubishi control systems.

Running a program without verifying offset modes often leaves errors undetected until the final inspection. A minor miscalculation during startup or cancellation travel coordinates will result in an immediate gouge or tolerance overrun, scrap-loading the production cycle. Processing G42 right-side cutter compensation reliably requires a precise combination of plane selection, linear startup moves, safe clearance coordinates, and brand-specific parameter checks.

Technical Summary

Technical SpecificationValue / Requirement
Command CodeG42
Modal Group / ModalityGroup 07 / Modal
Supported BrandsFanuc, Siemens, Mitsubishi
Critical ParametersFanuc: No. 19625 (look-ahead buffer size), No. 5003 Bit 0 (Type A/B startup); Siemens: MD 20250 (consecutive non-motion limit), DISC (transition overshoot); Mitsubishi: No. 8157 (Type A/B startup)
Main ConstraintStartup and cancellation must be performed in positioning (G00) or linear interpolation (G01) mode with coordinate travel. Changing planes or presetting coordinates in compensation mode is strictly prohibited.

Quick Read

  • Select Plane Prior to Activation: Establish the active working plane (G17, G18, or G19) before activating G42; plane changes during active compensation trigger immediate alarms.
  • Command Linear Startup: Activate G42 only in blocks containing G00 or G01 movement with travel distance in the active plane to allow the controller to build the offset vector.
  • Maintain Clearance Envelopes: Design startup and retraction clearances larger than twice the tool nose radius (or four times the radius for diameter programming) to prevent interference halts.
  • Prevent Buffer Interruptions: Keep consecutive non-motion blocks (such as dwells, M-codes, or comments) below the look-ahead threshold to prevent premature vector cancellation.
  • Deactivate Safely: Always program a linear retract block containing G40 to cancel compensation before moving the tool to tool-change or home coordinates.
  • All-Axis Coordinate Presets: If presetting coordinates (G92.1) while G42 is modal, program all active compensation axes in the same block to prevent program errors.

Basic Concepts

Activating G42 tool nose or tool radius compensation right shifts the tool center trajectory to the right side of the programmed workpiece contour relative to the direction of travel. This allows programmers to write G-code coordinates directly from blueprint dimensions without manually calculating offset paths for the tool nose radius or cutter size. By reading the actual tool radius or wear values from the active offset registers, the CNC motion kernel automatically computes the offset vectors perpendicular to the movement direction. This means any wear or deviation on the cutting tool can be adjusted directly at the control panel by changing the wear offset value, avoiding the necessity of regenerating the CAM part program.

The transition block from cancel mode (G40) to offset mode is the startup block. During this startup transition, the tool center point shifts from the uncompensated position to the right-side offset position. Programmers must ensure that G42 startup blocks have sufficient lead-in travel in a clear area away from the workpiece. If the startup or retraction move has a clearance envelope smaller than twice the tool radius, or if the diameter designation parameter is configured incorrectly, the path will deviate, leading to potential tool and fixture damage.

During machining operations, G42 is modal, meaning the control remains in the right-side compensation state until a cancel command is read. This is especially critical during taper turning, facing, and contour milling where the tool nose radius (nose R) would otherwise leave uncut material on tapers or overcut critical dimensions. Understanding this behavior allows operators to achieve tight tolerances and superior surface finishes while maintaining structural part integrity.

Command Structure

The command structure of G42 requires defining the working plane, the startup movement, the compensation code, the target coordinates, and the offset index. The working plane must be selected before activating compensation so that the motion kernel knows which axes require correction. For machining centers, G17 selects the XY plane, G18 selects the ZX plane, and G19 selects the YZ plane. On turning centers, plane selection G18 (ZX plane) is the default configuration for tool nose radius compensation.

The startup block must contain a G00 positioning or G01 linear interpolation command, along with a travel move in the selected working plane. The D-address designates the cutter compensation offset register on milling machines, whereas the T-address represents the tool select and offset index on lathes. Once G42 is called, the controller maintains the right-side offset vectors for all subsequent linear and circular moves until deactivated by a G40 command.

Syntax and Address Structure

Fanuc and Mitsubishi Milling: G17 G00 (or G01) G42 X... Y... D... F... ;

Fanuc and Mitsubishi Turning: G18 G00 (or G01) G42 X(U)... Z(W)... T... ;

Siemens Native Mode (G290): G17 G42 [NORM/KONT/KONTC/KONTT] [G0/G1] X... Y... [D...] [T...] [OFFN=...]

Address / ModifierDescriptionKey Requirement
G17 / G18 / G19Active plane selectionDetermines which coordinate axes are offset by the control.
X, Y, ZTarget coordinatesEndpoint coordinates of the startup movement block.
DOffset register numberUsed in milling mode to load the tool radius value.
TTool and offset indexUsed in turning mode to load turret index and tool nose radius.
NORM / KONT / KONTC / KONTTSiemens Group 17 modifiersDefines approach and retract path vectors (normal or contour-wrapping).
OFFNSiemens contour allowancePrograms a normal offset value on top of the programmed contour.

Brand Applications

Fanuc

On Fanuc controls, G42 functions as a modal command that offsets the tool path to the right of the contour. The look-ahead buffer pre-reads up to 5 blocks (configured by parameter No. 19625) to calculate intersection vectors.

The G-code for startup is programmed as G18 G90 G00 G42 X20.0 Z1.0 T0101 M08 ; to activate tool nose radius compensation right on the ZX plane using Tool 1 Offset 1, and cancelled using G40 G00 X100.0 Z20.0 T0100 ;.

CategoryReference IDDetail / Specification
ParameterNo. 19625Specifies the look-ahead block pre-read buffer size.
ParameterNo. 5003 Bit 0 (SUP)Switches startup/cancel calculation between Type A (0) and Type B (1).
ParameterNo. 5106 Bit 2 (NT1)Ignores G40/G41/G42 inside finishing target shapes of canned roughing cycles (G71/G72/G73).
ParameterNo. 3402 Bit 6 (CLR)Configures reset modal behavior (preserve or clear active G41/G42 modal on reset).
ParameterNo. 5000 Bit 3 (GNI)Controls G40 cancellation behavior when no tool movement is programmed.
AlarmAlarm PS0325Activation of G41 or G42 inside finishing target shapes of canned roughing cycles.
AlarmAlarm PS0041Outer corner pocket/groove/slot or chamfer is smaller than cutter radius.
AlarmAlarm PS0538Omitting G40 cancel command in the final block (Q) of G70 finishing shape program.
Version DifferenceSeries 30i vs 16iSeries 30i treats G40 with no motion and vector modifiers as normal to previous block when No. 5000 Bit 3 (GNI) is 0 (can cause uncut/overcut). Set GNI to 1 for legacy programs.

Warning: Stacking more than N-2 non-movement blocks (such as G04 dwells, coordinate transformations, or M-codes) inside the contour halts the buffer, creating a perpendicular vector that gouges the workpiece, yielding a scrap part.

Siemens

On Siemens controls, G42 shifts the tool center trajectory to the right of the programmed contour. The control utilizes MD 20250 to restrict the pre-read look-ahead buffer, allowing a maximum of 3 consecutive blocks without travel commands.

The G-code syntax in native Siemens mode uses: N30 G00 G42 X20 Y20 M3 S300 ; which activates G42 right compensation during rapid positioning to X20 Y20, utilizing cutting edge D1 and tool selection.

CategoryReference IDDetail / Specification
ParameterMD 10760Suppresses tool length/radius compensation for G53, G153, and SUPA.
ParameterMD 20250Maximum consecutive blocks/M-codes without travel commands allowed during active compensation.
ParameterDISCControls transition circle overshoot at outer corners with G450 (value range 0 to 100).
ParameterOFFNNormal contour allowance (offset) on the programmed contour.
AlarmAlarm 10751No intersection is geometrically possible during G40 retraction under G461/G462.
AlarmAlarm 61105Pocket radius is smaller than the active tool radius in circular cycles (e.g. POCKET2).
AlarmAlarm 61000Calling a canned cycle (POCKET3) without active program tool compensation.
Version Difference840D sl vs 802D sl840D sl supports G50.2 (Multi-edge turning OFF) and G51.2 (Multi-edge turning ON); 802D sl does not.

Warning: Attempting to switch planes or call standard cycles while tool compensation is active will result in program failure. Ensure G40 is modal before executing high-level canned subroutines.

Mitsubishi

On Mitsubishi systems, G42 establishes a mathematically recalculated, real-time equidistant offset path. The CNC system uses parameter No. 8157 to toggle between Type A (0) and Type B (1) startup behaviors.

The G-code for startup is programmed as G00 G42 X-1.5 Z1.0 T0101 M08 ; to activate G42 tool nose radius compensation right using Tool 1 Offset 1, and cancelled using G40 G01 X100.0 Z50.0 T0100 ;.

CategoryReference IDDetail / Specification
ParameterNo. 8157Toggles startup/cancel type between Type A (0, perpendicular offset) and Type B (1, intersection).
ParameterNo. 1381 Bit 0Triggers program alarm if a tool offset code (H or D) targets a register with a value of 0.
ParameterNo. 1289 ext25/bit0Criteria for executing outer rounding at small corners in radius compensation.
AlarmProgram Error (P128)Machining Condition Selection command (G120.1/G121) executed while G41/G42 is modal.
AlarmProgram Error (P29)Switching program format (G188/G189) or presetting coordinates (G92.1) while tool offset/compensation cancel is incomplete.
AlarmProgram Error (P153)Look-ahead interference check deletes all vectors at the end of a block, indicating an overcut.
Version DifferenceM800V/M80V seriesG42 blocks temporarily suspend look-ahead parsing under high-speed high-accuracy control III (G05 P20000). The control drops to High-Speed High-Accuracy II (G05 P10000) during active compensation.

Warning: When executing a workpiece coordinate preset (G92.1) while in compensation mode, operators must command all active compensation axes in the same preset block to prevent Program Error (P29) and axis distortion.

Brand Comparison

TopicFanucSiemensMitsubishi
Look-Ahead Buffer & InterruptionEnforces a strict look-ahead buffering constraint (N-2 non-motion blocks governed by Parameter No. 19625) which cancels the compensation vector if exceeded.Allows more flexible preprocessor caching and macro queuing, but limits consecutive non-motion blocks to standard 3 (MD 20250).Parses up to 2 movement blocks or 5 non-movement blocks. Stacking 4 or more consecutive non-motion blocks cancels the offset.
Canned Cycles & High-Level CyclesRequires G42 to be modal and commanded strictly outside finishing contours (P to Q) of cycles G71/G72/G73. Inside causes Alarm PS0325.Boundary compensation handled dynamically by cycle arguments or native high-level cycle structures (e.g. POCKET2/3).Canned cycles must be canceled; has strict format switch constraints (G188/G189) that require G40 cancel first.
Startup Approach ModifiersSwitches startup/cancel between Type A and Type B using Parameter No. 5003 Bit 0 (SUP) without inline approach modifiers.Utilizes G-code Group 17 commands (NORM, KONT, KONTC, KONTT) directly in the active program to define approaches.Switches startup/cancel via Parameter No. 8157. Also features unique automatic direction G-code (G46) for lathe systems.

Technical Analysis

Analytically, the differences in G42 implementation between Fanuc, Siemens, and Mitsubishi center on preprocessor design, corner path interpolation, and cyclic error handling. Fanuc enforces a rigid look-ahead constraint governed by parameter No. 19625. If the program contains more than N-2 consecutive non-motion blocks (such as dwells, variable math, or comments) while G42 is modal, the motion kernel fails to pre-calculate the next intersection vector. This forces the compensation vector to collapse perpendicularly to the last block, resulting in overcutting and scrapped workpieces. Mitsubishi and Siemens utilize more flexible preprocessor caching to prevent sudden vector cancellation, though Siemens still enforces a strict three-block limit under MD 20250, where zero-travel blocks also count as interruptions.

In addition, Siemens relies on dedicated Group 17 modifiers like NORM and KONT to automate retraction paths, whereas Fanuc and Mitsubishi rely on parameter-driven startup and cancel behaviors (Type A vs. Type B) using Parameter No. 5003 Bit 0 (SUP) and Parameter No. 8157 respectively. For corner path smoothing, Siemens uses DISC to control G450 transition circles, and Mitsubishi features a unique G62 Automatic Corner Override that decelerates feedrates at corner transitions. In cycles, Fanuc requires G42 to be modal before cycle activation and fully canceled via G40 outside finishing contours to prevent Alarm PS0325, while Siemens processes offsets dynamically via canned cycle arguments.

Program Examples

Fanuc Turning Example

G18 G90 G00 G42 X20.0 Z1.0 T0101 M08 ; Activates G42 tool nose radius compensation right on the ZX plane using Tool 1 Offset 1
G01 Z-20.0 F0.2 ; Cuts linear contour with tool offset right of workpiece direction of travel
G40 G00 X100.0 Z20.0 T0100 ; Cancels tool nose radius compensation and returns tool to safe retract point

Dry Run Verification: Run this program above the workpiece with Z-axis offset. Verify that during the startup block (G42 X20.0 Z1.0 T0101), the tool turret executes a smooth right-side shift. Monitor the axis coordinates during retraction to confirm that G40 cancels the offset vector and returns the tool to the uncompensated target position without any rapid side-travel.

Siemens Milling Example

N10 G17 T1 D1 M6 ; Selects XY plane, tool T1, cutting edge D1, and executes tool change
N20 S1200 M3 ; Spindle start
N30 G00 G42 X20 Y20 M3 S300 ; Activates G42 right compensation during rapid positioning to X20 Y20
N40 G01 Z-10 F150 ; Feed to depth
N50 G1 X50 F0.2 ; Cuts linear contour with tool offset right of workpiece direction of travel
N60 G40 G00 X100 Y100 ; Cancels tool radius compensation and returns to safe retract point

Dry Run Verification: Before machining, execute a dry run. Ensure that the active D1 offset matches the actual cutter radius. Confirm that block N30 performs a smooth approach transition to the right side of the contour, and that no Alarm 10751 is triggered during the approach or retract movement.

Mitsubishi Turning Example

G18 G90 G00 X280.0 Z380.0 T0100 ; Positions tool holder before applying offset on lathe
G00 G42 X-1.5 Z1.0 T0101 M08 ; Activates G42 right nose radius compensation with Tool 1 Offset 1
G01 Z-30.0 F0.2 ; Cuts linear contour with tool offset right of workpiece direction of travel
G40 G01 X100.0 Z50.0 T0100 ; Cancels tool nose radius compensation during linear retract

Dry Run Verification: With the tool positioned safely away from the workpiece, execute a dry cycle. Confirm that the right nose radius compensation activates on the ZX plane in block two. Verify that the tool nose radius index T0101 is loaded with a non-zero value and that G40 cancels the offset smoothly during the linear retraction block.

Error Analysis

BrandAlarm CodeTrigger ConditionOperator SymptomRoot Cause / Fix
FanucPS0325Activation of G41/G42 inside P-to-Q shape definition blocks of G71/G72/G73 cycles.The controller halts execution immediately and displays the shape definition alarm.Position G42 strictly outside the shape program definition, or set parameter No. 5106 Bit 2 (NT1) to 1.
FanucPS0041Outer corner pocket/groove/slot or chamfer is smaller than cutter radius, or approach clearance is smaller than tool radius.The machine stops mid-travel and displays a cutter radius interference warning.The tool nose radius exceeds the programmed contour pocket size. Increase approach clearance or use a smaller tool.
SiemensAlarm 10751No intersection is geometrically possible during G40 retraction under G461/G462.The program aborts before executing the cancel block, indicating a collision risk.Modify retraction paths to allow sufficient space, or activate G461/G462 boundary extensions.
SiemensAlarm 61105Pocket radius is smaller than the active tool radius in circular cycles (e.g. POCKET2).The control stops cycle calculations and reports that the cutter radius is too large.The programmed pocket dimensions are smaller than the active tool radius. Select a smaller tool.
MitsubishiProgram Error (P128)Machining Condition Selection command (G120.1/G121) executed while G41/G42 is modal.The spindle stops and the screen displays a machining condition error.Cancel compensation using G40 before calling G120.1 or G121 parameters.
MitsubishiProgram Error (P29)Switching program format (G188/G189) or presetting coordinates (G92.1) while compensation cancel is incomplete.The CNC aborts and reports format error.Perform G40 cancel and travel before switching formats or presetting coordinate systems.

Application Note

For turning operations involving G42 on Fanuc and Mitsubishi controls, the virtual tool tip point P must be set to 0 when integrating radius compensation with inclined surface machining (G68.2). If the operator leaves the nose point P at any non-zero value during inclined coordinate rotation, the motion kernel applies incorrect vector offsets. This path distortion causes the tool turret to wander, resulting in a gouged workpiece and a spoiled scrap part. To safeguard critical parts, always activate the coordinate rotation G68.2 first, then nest G42 inside the modal envelope, and completely cancel the offset via G40 before calling G69.1 to exit the rotated plane.

Related Command Network

  • G40 (Cutter Compensation Cancel): Deactivates G42 tool radius/nose radius compensation and returns the tool path to the uncompensated center line.
  • G41 (Cutter Compensation Left): Offsets the tool center path to the left of the programmed workpiece contour, which is the mirror command of G42.
  • G39 (Corner Circular Interpolation): Automatically inserts a corner rounding arc to smooth transitions at sharp convex corners while G42 is active.
  • G46 (Automatic Tool Nose Radius Compensation): Automatically determines whether the tool should offset to the left or right of the contour on Mitsubishi lathe systems based on the initial movement vector.

Conclusion

Achieving flawless finishes and dimensional accuracy on tapered and circular surfaces requires rigorous verification of G42 startup blocks, look-ahead buffer limits, and geometry offsets. By ensuring startup movements occur in clear areas and verifying that the offset registers are correct before running, operators can eliminate collision risks and maximize tool life.

Frequently Asked Questions

Why does the machine throw a coordinate preset alarm when using G92.1?

When G42 is active, the motion kernel expects any coordinate preset command to address all active compensation axes simultaneously to recalculate the offset vectors. If you only program one axis during a G92.1 preset, the control cannot resolve the offset state of the other axis and aborts with an alarm such as Program Error (P29). Action: Cancel compensation using G40 before resetting workpiece coordinate systems, or program both the X and Z axes in the preset block.

How does a look-ahead buffer overrun cause the tool to gouge the workpiece?

If a program contains more than the maximum allowed consecutive non-motion blocks (such as three blocks for Siemens or four for Mitsubishi under G42 modal), the look-ahead parser cannot pre-calculate the next intersection vector. This forces the control to terminate the current vector perpendicularly, causing the tool to plunge directly into the contour. Action: Consolidate comments, dwells, and M-codes so they do not interrupt travel blocks, and configure parameter look-ahead sizes (like Parameter No. 19625) to match program complexity.

Can G42 be active when switching G-code format modes or coordinate planes?

No, attempting to switch planes (G17/G18/G19) or change format systems (G188/G189) while G42 is modal is strictly prohibited and will trigger immediate programming alarms. The control must have G40 commanded with travel motion to clear the offset vectors before executing any plane or mode changes. Action: Program a retraction block containing G40 and select the new plane or format mode in a subsequent block.

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