G00 Code: CNC Rapid Traverse Explained with Examples

G00 is the rapid traverse command in CNC G-code. It moves the machine at maximum speed — ignoring any programmed feed rate — along any combination of the X, Y, and Z axes.

It’s one of the first codes you’ll see in almost every CNC program.

Key Takeaways

  • G00 moves the machine at maximum speed — no cutting, no feed rate control
  • Use it to position the tool before a cut, after a tool change, or when moving to a safe height
  • Never use G00 while the cutter is in contact with the part
  • G00 is modal — it stays active until you switch to G01, G02, or G03
  • G0 and G00 are identical — the extra zero is optional
G00 – At A Glance
FunctionRapid Traverse (position at maximum speed)
FormatG00 X__ Y__ Z__
TypeModal (Group 1 – Motion)
Cancelled byG01, G02, G03
Feed rateIgnored – machine runs at maximum rapid speed

WHAT DOES G00 DO?

G00 puts the machine into rapid traverse mode, sometimes referred to as rapid travel. When active, the CNC ignores any feed rate set with the F code and instead moves at the machine’s maximum speed. You can move any combination of the X, Y, and Z axes in a single G00 block.

an illustration that shows the X, Y and Z axes on a CNC machine

Because G00 is a modal code, you don’t need to repeat it on every line. Once active, it stays on until you switch to another motion mode — G01 for linear cutting, G02 for clockwise arcs, or G03 for counterclockwise arcs.

CODE EXAMPLE — Rapid to Start Position

G90 G54 (Absolute positioning, Work offset 1)
G00 Z1.0 (Rapid Z to safe height)
G00 X1.5 Y2.0 (Rapid to XY start position)
G43 H01 Z0.1 (Tool length comp, move to clearance plane)
G01 Z-0.5 F10.0 (Linear feed into the part — cutting begins)

G00 is only used while the cutter is clear of the part. G01 takes over the moment cutting starts, where feed rate control actually matters.

G0 VS G00 — IS THE EXTRA ZERO REQUIRED?

No. G0 and G00 are read identically by the CNC controller. The leading zero is a formatting preference, not a functional difference.

Textbooks and formal reference materials tend to use G00 while many programmers will use G0 to save a keystroke. If your shop has a standard, follow it — otherwise use whichever you prefer.

WHEN TO USE G00

G00 shows up constantly throughout a CNC program. Use it any time you need to move the tool quickly and there’s no cutting happening including:

  • Positioning to the start of a cut after a tool change
  • Pulling Z up to a safe clearance height between features
  • Moving to the tool change position (often combined with M05 and M09)
  • Repositioning to a new XY location between holes in a drilling pattern

COMMON MISTAKE – Cutting with G00

Never use G00 while the tool is in contact with the part.

Rapid traverse gives you no control over cutting conditions — the machine will move at full speed regardless of material, chip load, or tool diameter. The result is usually a broken tool, a scrapped part, or a machine crash.

Always switch to G01 (or G02/G03) before any cutting motion.

G00 FORMAT

Specify the destination coordinates for any axes you want to move:

G00 X__ Y__ Z__

You don’t need to include all three axes. These are all valid G00 commands:

G00 Z1.0  (move Z only)
G00 X3.0 Y4.5   (move X and Y simultaneously)
G00 X1.0 Y2.0 Z3.0  (move all three axes)

Because G00 is a modal code, you don’t need to repeat it on every line. If G00 is already active, the next line with coordinates will also execute as a rapid move.

IMPORTANT CONSIDERATIONS WHEN USING G00

Units — Inches or Millimeters

Make sure G20 (inches) or G21 (mm) is set before your G00 command. Moving 10 inches instead of 10 millimeters is a significant difference — and the machine won’t warn you.

Absolute vs. Incremental Mode

How the controller interprets your coordinates depends on whether you’re in G90 (absolute) or G91 (incremental) mode.

  • Absolute (G90): coordinates are measured from the program zero. G00 X3.0 Y2.0 always moves to the same fixed location.
  • Incremental (G91): coordinates are measured from the current position. G00 X3.0 Y2.0 moves 3 inches in X and 2 inches in Y from wherever the tool is now.

The images below show the difference between the absolute and incremental positioning modes. The numbers in parentheses are the locations given to the the machine to make the move.

graph paper example of absolute positioning with multiple points as examples
graph paper example of incremental positioning with multiple points as examples

Most production programs run in G90. Check your setup block to confirm which mode is active before editing any G00 lines.

Know Your Path — Check for Obstacles

Before running a G00 move, think through the full path from start to finish. Where is the tool now, where is it going, and is there anything in between such as clamps, fixtures, the part, or the machine table itself.

G00 moves fast. There’s no time to react if something is in the way.

Machine Movement Behavior

Not all CNC machines behave the same way during rapid moves. Most will move all three axes simultaneously, which produces a straight-line path. Some machines move axes one at a time or at different speeds, producing a “dog-leg” path where the tool doesn’t travel in a straight line.

COMMON MISTAKE — Dog-Leg Movement: Don’t Assume a Straight Line

If your machine runs X, Y, and Z at different rapid speeds, a move that looks diagonal on paper can actually travel in a stepped path — potentially colliding with a clamp or part feature that a straight-line move would have cleared.

When in doubt, break the move into separate single-axis rapids or test at reduced rapid override before running full speed.

illustration of dog leg movement on a CNC machine

HOW TO CANCEL G00

There’s no dedicated cancel command for G00. To exit rapid traverse, switch to another motion code in Group 1 such as:

Using any of these codes will turn G00 rapid movement off and switch to the new movement mode.

G00 VS G01 — WHAT’S THE DIFFERENCE?

G01 also moves in a straight line, but at the feed rate set by the F code. G01 is the code used for cutting in a straight line. G00 is for rapid movement.

The rule is simple: if the tool is touching the part, use G01. If it’s not, G00 is faster.

FAQS

What is the difference between G00 and G01?

G00 moves the machine at maximum rapid speed with no feed rate control — it’s for positioning, not cutting. G01 moves in a straight line at the feed rate you specify with the F code. Use G01, G02, or G03 whenever the tool is in contact with the part.

Can I use G00 to cut material?

No. G00 ignores the feed rate and moves at the machine’s maximum speed. Using it while cutting gives you no control over chip load, surface finish, or tool load — and will almost certainly break the tool or damage the part.

Does G00 move in a straight line?

It depends on the machine. Most modern CNC machines move all axes simultaneously during a rapid, which produces a straight-line path.

However, there are still many older CNC machines in use and some machines move axes independently or at different speeds, creating a “dog-leg” path. Check your machine’s documentation or test at reduced rapid override if you’re unsure.

What cancels G00?

Any other motion code in Group 1 will cancel G00 — typically G01 (linear feed), G02 (clockwise arc), or G03 (counterclockwise arc). There’s no dedicated cancel command like there is for canned cycles.

Leave a Comment