Skip to main content
CNC.wiki

G00 Rapid Traverse Positioning: G-Code Guide for CNC Programming

Master G00 rapid traverse on Fanuc, Siemens, and Mitsubishi CNC controls. Learn dogleg trajectories, parameter settings, and how to prevent hard crash alarms.

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

CNC CARE Co-founder

Introduction

Executing rapid machine positioning without verifying path clearance frequently leads to catastrophic collisions on the shop floor. When a G00 command is initiated, the tool turret or spindle traverses at maximum speed, risking destructive contact with workpiece clamping setups. For instance, programming a coordinate zero return using absolute values can drive the tooling assembly straight through program zero—where raw stock is clamped—resulting in a smashed spindle, destroyed fixtures, and a completely scrapped part.

Technical Summary

Technical SpecificationDetails and Values
Command CodeG00 / G0
Modal GroupGroup 01 (Motion) / Modal
Supported BrandsFanuc, Siemens, Mitsubishi
Critical ParametersFanuc 3402 Bit 0, Siemens MD20732, Mitsubishi #1086
Main ConstraintDogleg (non-linear) multi-axis trajectory by default

Quick Read

  • Dogleg Path Trajectory: By default, multi-axis G00 movements execute each axis independently at maximum speed, creating a non-linear path.
  • Clearance Verification: Operators must confirm tool clearance height relative to vise jaws, chucks, clamps, and turrets to prevent hard crashes.
  • Safe Zero Return: Avoid using absolute coordinates like G90 G28 X0 Y0 Z0; program incremental returns such as G91 G28 Z0 instead.
  • Panel overrides: Reduce rapid traverse rates to 5% or 25% on the operator override dial when testing new programs.
  • Feedrate Modality: F-word commands written in a G00 block do not limit rapid rates but are stored modally for the next cutting command.
  • Zero Offset Suppression: Zero offset suppression commands such as G53, G153, and SUPA are non-modal and apply only to their active block.

Basic Concepts

G00 Rapid Traverse is a modal motion command that moves the machine axes to target coordinates at their maximum rapid traverse rates. These maximum rates are defined by the machine tool builder's parameters and are completely independent of the program's F feedrate value. Since the rapid motion is calculated per time and is independent of spindle rotation, it can be executed regardless of the spindle state. The command remains active modally until it is canceled by another G-code in group 01, such as G01 linear interpolation, G02 circular interpolation, or G03 circular interpolation.

Multi-axis rapid traverse positioning defaults to a non-linear (dogleg) path, where each axis traverses independently at its maximum speed. This means the axis with the shortest travel distance will reach its target first while the other axis continues, creating a combined diagonal and straight movement. Programmers and operators must remain highly vigilant of this behavior because the actual tool trajectory differs significantly from straight-line interpolation and can dive directly into obstacles. Setting startup defaults and clears modal states properly is critical, as detailed in the guide on Fanuc Parameter 3402 G-Code Clear.

Command Structure

The structure of a G00 positioning block requires specifying the target coordinates using absolute or incremental coordinates depending on the active coordinate system. Under milling environments, Cartesian coordinates (X, Y, and Z) are standard, with options for additional linear or rotary axes. On lathe controls, absolute or incremental programming can be determined dynamically by axis address selection or modal G-codes. In-program offset changes and dynamic parameter adjustments can be managed programmatically as outlined in G10 Parameter Management.

To configure rapid traverse behaviors, machine parameters control default startup states and trajectory paths. The power-up default motion command can be set to either G00 positioning or G01 linear interpolation, which is governed by parameter settings. Additionally, some control systems allow programmers to override default non-linear rapid motion and force linear interpolation dynamically in the program or via parameters. Safe electronic boundaries can also be defined to restrict tool entry using G22 and G23 Stored Stroke Limits.

Fanuc Syntax

G00 X_ Y_ Z_ a_ (Milling MC System - a represents an additional rotary or linear axis)

G00 X_ Z_ or G00 U_ W_ (Lathe System A - absolute uses X/Z, incremental uses U/W)

G00 X_ Z_ (Lathe System B/C - absolute or incremental is set by G90/G91)

Siemens Syntax

G0 X... Y... Z... (Cartesian absolute dimensioning)

G0 X=IC(...) Y=IC(...) Z=IC(...) (Cartesian incremental dimensioning)

G0 AP=... RP=... (Polar coordinates with polar angle AP and polar radius RP)

Mitsubishi Syntax

G00 X_ Y_ Z_ a_ (Machining Center System)

G00 X/U_ Z/W_ (Lathe System G-code System A absolute/incremental)

G00 X_ Z_ (Y_) ,I_ (In-position width override directly commanded using address ,I)

Brand Applications

Fanuc

On Fanuc systems, rapid positioning defaults to G00. The default movement state upon power-up is defined by Parameter No. 3402 Bit 0, which selects G00 or G01. Modal parameters are cleared upon reset if Parameter No. 3402 Bit 6 is enabled. A typical milling command is written as G90 G00 X50.0 Y50.0 Z2.0; which executes absolute positioning to X50.0, Y50.0, and Z2.0. On lathe controls, incremental coordinates use address letters U and W, allowing commands like G00 U-10.0 W-5.0; for retracting.

Item TypeIdentifierDescription
ParameterParameter No. 3401 Bit 0 (DPI)Selects calculator-type decimal point programming (type II) or standard integer programming (type I).
ParameterParameter No. 3401 Bit 6 (GSB) and Bit 7 (GSC)Determines active Lathe G-code System (A, B, or C).
ParameterParameter No. 3402 Bit 0 (G01)Default motion command on power-up or system reset (G00 positioning or G01 linear interpolation).
ParameterParameter No. 3402 Bit 6 (CLR)Clear state of modal G-codes upon power-up or reset.
ParameterParameter No. 5145Permissible non-monotonous change tolerance in shape cycles before an alarm is issued.
AlarmAlarm PS0034Specified non-linear motion command (G02/G03) instead of linear block during cutter compensation (G41/G42) start-up or cancel (G40).
AlarmAlarm PS0065Sequence number P start block of multiple repetitive roughing cycles (G71/G72) contour does not program G00 or G01.
Version DifferenceSeries 16i/18i/21i vs NewerTool tip radius compensation vector path calculation during first start-up and last cancellation of G90/G94 cycles is different.
Version DifferenceOlder (3T/6T/10T/11T/15T) vs Modern (0T/16T/18T/21T)Compound thread cutting cycle (G76) requires single-block format on older controls, two-block format on modern controls.

Warning: Programming a machine home return via G90 G28 X0 Y0 Z0 instructs the control to drive the tool turret directly through the workpiece program zero where the part is clamped. This absolute coordinate command causes a severe hard collision and a scrap part. To prevent this, incremental motion should always be programmed (G91 G28 Z0 for mills or G28 U0 W0 for lathes).

Siemens

Siemens rapid traverse positioning functions can be executed in either linear (RTLION) or non-linear (RTLIOF) interpolation modes. Under the default non-linear mode (RTLIOF), each path axis interpolates as a single positioning axis, traversing independently of other axes at its maximum velocity. Consequently, axes requiring shorter travel lengths reach their targets early, producing a non-linear, dogleg tool trajectory. To avoid this hazard, programmers should incorporate RTLION to modally force a straight-line rapid motion where all axes interpolate together and reach the target point simultaneously.

Item TypeIdentifierDescription
ParameterMD20732 ($MC_EXTERN_GO_LINEAR_MODE)Controls G00 trajectory in ISO Dialect mode. 1 (ON) forces linear interpolation; 0 (OFF) forces independent traverse.
ParameterMD24000 (FRAME_ADD_COMPONENTS)Enables additive components of the programmable zero offset frame (permits G59 axial fine zero offsets).
ParameterSD42442 (TOOL_OFFSET_INCR_PROG)Bypasses active tool offset during incremental (G91) programming (0 = not traversed).
AlarmAlarm 61816Any programmed axis is not exactly positioned on its reference point during a G27 check.
AlarmAlarm 18312G58 or G59 called to program axial zero offset when fine offset is not enabled (MD24000 set to 0).
AlarmAlarm 61805Reference point approach or coordinate check intermediate position programmed with absolute and incremental values.
Version DifferenceSINUMERIK 802D vs 840D/NewerInverse-time feedrate G93 (1/min) is not supported on 802D series but is supported on 840D.
Version DifferenceSINUMERIK 802D sl vs 840D sl802D sl does not support multi-edge turning functions G50.2 and G51.2, which are supported on 840D sl.
Version Difference840DE / 840DiE vs 810DE / 840DE sl basic840DE and 840DiE support Synchronized Actions Stage 2 and Electronic Gear options; restricted on basic variants.

Warning: Using Dry Run Feedrate (DRY) during actual workpiece cutting is highly dangerous. The modal cutting velocities are replaced by a dry run feedrate, which can cause the tool to exceed its maximum permissible cutting rates when engaging the material, leading to tool breakage or a scrap part.

Mitsubishi

G00 moves machine axes at the maximum possible rapid traverse rates specified by parameter #2001 rapid. When positioning multiple axes, the actual tool trajectory is heavily dependent on the status of parameter #1086 G0Intp. If this parameter is set to non-linear positioning (1), the tool travels along a non-interpolation dogleg path because each axis moves independently at its own maximum rate. Programmers can implement the G22 and G23 Chuck Barrier and Tailstock Barrier functions to establish an electronic boundary around critical clamping devices.

Item TypeIdentifierDescription
ParameterParameter #1086 G0IntpToggles rapid traverse positioning trajectory: 0 = linear path, 1 = non-linear independent path.
ParameterParameter #1193 inposDictates active deceleration check method: 0 = command deceleration check, 1 = in-position check, 2 = smoothing check.
ParameterParameter #1205 G0bdccDetermines whether G00 pre-interpolation acceleration/deceleration is enabled: 0 = disabled, 1 = enabled, 2 = multi-step.
ParameterParameter #1442 G0olControls whether G00 rapid traverse block overlap function is enabled (1) or disabled (0).
ParameterParameter #2001 rapidDetermines independent maximum rapid traverse rate for each axis (1 to 10000000 mm/min).
ParameterParameter #2004 G0tLSets the rapid traverse acceleration/deceleration time constant (time in ms).
AlarmMCP Alarm Y51 0017Multi-step acceleration (value 2) assigned to parameter #1205 G0bdcc in any part system other than the 1st.
AlarmProgram Error P33Rapid traverse block overlap modal commands (G0.5 P1 or G0.5 P0) not commanded in independent block, or lathe G10.9 in same block as other G-codes.
AlarmProgram Error P430G29 start position return commanded without first completing an automatic reference position return (G28) after power-on.
Version DifferenceM8 Series vs C80 SeriesSequence number address (N) allows up to 8 digits on M8, limited to 6 digits on C80.
Version DifferenceM80V TypeBUnder high-speed high-accuracy control modes, executing G122, G54.4, or G07 can trigger program errors (P39, P34, P80).

Warning: Executing G29 start position return without first completing an automatic reference position return (G28) after power-on triggers Program Error P430, causing an immediate spindle and axis halt.

Brand Comparison

TopicFanucSiemensMitsubishi
Trajectory ControlParameter-controlled dogleg path; cannot be changed dynamically in program.Dynamic program selection via modal RTLION (linear) and RTLIOF (non-linear).Parameter-controlled (#1086 G0Intp = 0/1); cannot be changed dynamically.
Lathe Coordinate SystemsAddress-based System A (X/Z, U/W) is standard; G90 is turning cycle, not absolute mode.G90/G91 modal commands specify dimensioning mode.G90/G91 modal commands specify dimensioning mode.
In-Position Width OverrideSet strictly via parameters (No. 3402 etc.).Set strictly via machine data.Programmable in G00 block using ,I address.
Block OverlapDecelerates to stop at block joints (G09/G60 for exact stop).Decelerates to stop at block joints (continuous-path mode G64 is for cutting feed).Dedicated rapid block overlap G0.5 P1 with dynamic J/K overrides.
Zero Offset SuppressionSingle command G53 (basic coordinate system).Hierarchical commands: G53 (suppress settable offsets), G153 (suppress offsets and basic frame), SUPA (suppress offsets, frames, PRESET, DRF, etc.).Single command G53 (handles active tool compensation by temporary suppression and automatic restore).
Shape Program ValidationG00/G01 mandatory in first block of contour (Alarm PS0065 if omitted).No G00/G01 requirement in the first contour block.No rigid G00/G01 requirement in shape start block.

Technical Analysis

The comparative architectural layout shows distinct strategies for trajectory pathing and parameter control. Fanuc and Mitsubishi utilize parameter-locked rapid positioning trajectories where the path behavior (dogleg or linear interpolation) is determined globally by machine settings (such as Fanuc's hardware setup or Mitsubishi's #1086 G0Intp). Siemens, by contrast, gives the programmer real-time control within the active program using modal commands RTLION and RTLIOF, allowing dynamic transitions between dogleg movements and coordinated linear rapid interpolation depending on part geometry.

System design also diverges on coordinate dimensioning and zero offsets. Fanuc's Lathe G-code System A uses separate axis addresses (X/Z and U/W) to represent absolute and incremental movements in a single block without changing modes, whereas Siemens and Mitsubishi enforce strict mode selections via G90 and G91. In addition, Mitsubishi allows local block overrides for in-position widths using the ,I parameter, which on Fanuc and Siemens is strictly confined to machine parameters and data settings.

Program Examples

Fanuc Example

; Fanuc Milling absolute positioning and lathe retraction
G90 G00 X50.0 Y50.0 Z2.0;       ; Milling absolute positioning to X50.0 Y50.0 Z2.0
G00 X100.0 Z50.0;               ; Lathe absolute rapid traverse positioning (G-code System A)
G00 U-10.0 W-5.0;               ; Lathe incremental positioning command retracting -10.0 in X, -5.0 in Z

dry run: During single-block execution, the tool turret retracts incrementally away from the workpiece. Operators must verify that absolute moves do not clip any fixture clamps before executing.

Siemens Example

; Siemens absolute positioning and suppression
G90 G0 X100.0 Y100.0 Z50.0 G601;; Modal absolute positioning with exact stop fine block change active
SUPA G0 Z0.0 D0;                ; Suppress zero offsets/frames and rapidly retract Z to machine zero
G0 AP=45.0 RP=100.0;            ; Rapid traverse positioning with polar angle 45 deg, polar radius 100

dry run: The controller overrides local coordinate frames to retract Z to the machine home. Operators should monitor the axis load display during zero suppression moves.

Mitsubishi Example

; Mitsubishi local in-position and overlap
G90 G00 X100. Y150. Z50. ,I500; ; Absolute positioning with local in-position width of 500 microns
G0.5 P1;                        ; Activates modal rapid traverse block overlap function
G91 G28 X0 Y0 Z0;               ; Incremental reference position return check

dry run: The overlap function enables rapid transitions between positioning blocks without full deceleration checks. Operators must check that the tool clearance is sufficient for smooth paths.

Error Analysis

BrandAlarm CodeTriggerOperator SymptomRoot Cause / Fix
FanucAlarm PS0065Repetitive roughing cycle (G71/G72) contour start block P does not program G00 or G01.Execution stops at the repetitive cycle start, displaying Alarm PS0065.Edit the finishing shape start block (sequence P) to include a G00 or G01 motion command.
SiemensAlarm 18312G58 or G59 axial zero offset called when fine offset is disabled (MD24000 = 0).System alarm light illuminates, execution halts on the offset call block.Fine offset is not configured. Enable fine offset by setting parameter MD24000 = 1.
MitsubishiProgram Error P33Rapid traverse block overlap commands (G0.5 P1 or G0.5 P0) not programmed in an independent block.Program halts on the block containing G0.5, displaying Program Error P33.Command G0.5 or G10.9 in an independent block without other movement or auxiliary codes.
MitsubishiProgram Error P430G29 start position return commanded without first completing an automatic reference position return (G28) after power-on.Spindle and axis motions halt, screen displays Program Error P430.Modify the startup program sequence to execute a G28 reference position return first.

Application Note

Mechanical destruction of a spindle or clamping setup occurs when rapid traverse movements are executed without verification of the path trajectory. On Fanuc controls, programming a home return command like G90 G28 X0 Y0 Z0 directs the turret to travel straight through the program zero coordinate, driving the tool directly into a chuck or fixture clamp where the workpiece is secured. To prevent this severe hard collision, programmers must substitute incremental coordinate returns such as G91 G28 Z0 for milling or G28 U0 W0 for lathes. Furthermore, operators must scale down rapid override dials to 5% or 25% during first-article setups to ensure adequate reaction time for manual intervention.

Related Command Network

  • G01 (Linear Interpolation): Cancels modal G00 rapid traverse to begin controlled, straight-line cutting feedrate movements.
  • G28 (Reference Position Return): Automates rapid axis positioning to machine zero coordinates through an intermediate coordinate point.
  • G09 (Exact Stop Check): Temporarily suspends axis motion at block boundaries to verify deceleration and in-position check criteria before proceeding.
  • G22 / G23 (Stored Stroke Limit): Establishes electronic barrier boundaries around chucks and tailstocks to automatically halt G00 movements and prevent crashes.
  • G10 (Parameter Management): Enables in-program modification of coordinates, wear offsets, and system parameters that affect motion trajectories.

Conclusion

Safe rapid positioning depends on proactive clearance checks and correct coordinate format selection. Programmers must enforce incremental commands for zero returns and utilize panel-level overrides on first-run parts to eliminate trajectory collisions.

FAQ

Why does my CNC tool move in a diagonal line first and then a straight line during G00?

This non-linear movement is a dogleg path caused by axes moving independently at their maximum rapid rates. To force a coordinated straight-line rapid motion on Siemens controls, program the modal RTLION command in your startup block.

Can I use the F address to slow down the G00 rapid traverse rate?

No, the control ignores the F address during rapid positioning and runs the axes at the builder's maximum limit. To reduce speed during testing, manually dial down the Rapid Motion Override selector on the operator panel to 5% or 25%.

How can I prevent G00 coordinates from crashing into workpiece chucks and clamps?

Establish electronic safety boundaries around your fixtures using stored stroke limits. Program the G22 command to activate chuck barriers and configure parameter boundaries to trigger automatic system shutdowns before physical contact occurs.

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