Quick Guide to the G00 CNC G Code [Tips and Tricks]

a graphic of a cnc machine with text that says learn g code today g00 rapid travel

Code

G00

Name

Rapid travel

Type

Modal - stays on until changed

Description

The machine will move at full speed to all new locations given

A G00 code is a rapid traverse CNC G code. G00 controls the speed of the machines motion.

It is used to move the CNC table and/or spindle around in a straight line (linearly) at the maximum speed. When the G00 code is used, the machine ignores any set feed rate and goes as fast as possible.

When to use a G00 code

G00 codes get used when the CNC programmer wants to move the tool very quickly. This happens at many points throughout a program.

The G00 command moves the machine quickly to decrease the time it takes to run a CNC program (cycle time)

It does this by moving full speed when there is no cutting motions being performed on the workpiece, such as when performing a tool change.

If the cycle time is decreased, more parts can be manufactured in the same amount of time.

What to think about when using a G00 code

Units

First, make sure you know what units you are working in. Moving 10 inches instead of 10 millimeters is a big difference. A G20 (inches) or G21 (mm) code should identify the units you are working in before your G00 code.

comparison of units of measurement for cnc programming

Absolute vs incremental positioning mode

The second thing to know is how the machine will understand position locations.

This is determined by whether you are working in absolute (G90) or incremental (G91) coordinates. The most recent G90 or G91 code in the program will determine which mode you are in.

Absolute positioning will move from a set zero location such as your machines home location or a specified location on your part.

Incremental positioning will move relative to your current position.

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.

Notice how in absolute mode, all locations are relative to a single location, usually either the workpiece zero or machine home location. 

In incremental mode locations, all locations are relative to the machine’s current location.

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

Machine movement

Know your machine. Some machines will move all 3 axes at once. Some won’t.

Others will move a single axis at a time. Most machines will move all 3 at once but make sure you know the path your CNC will take when using the G00 code.

Start and stop locations

Lastly, make sure you understand the path that the tool will take from it’s start location to the new location.

Check  where you are currently position wise (X, Y & Z location), where you will be moving to and if there is anything in between the two locations.

The G00 code will move the machine very quickly to the new location. You don’t want anything in the way or to miscalculate your stop point. Crashing your machine is never a good time.

G00 vs G01

G01 is a very similar command. It also controls straight line movement, otherwise known as linear interpolation, of the CNC machine. 

The difference is that G01 will not move at maximum speed and will instead move at the last feed rate listed in the CNC program using the F command.

G01 is used for cutting motions. G00 is not.

6 G00 code examples and descriptions of what they do

For the examples below, we will assume your machine is in absolute mode (G90). If you are working in incremental mode (G91), the resulting movements will be different. 

Check out our guides to G90 and G91 G codes to understand the difference between the two movement types.

Example #1

N005 G00 X4.0 Y5.0 Z2.0

This is line number 5 of the program.

G00 sets the movement mode as rapid travel.

X4.0 Y5.0 Z2.0 is the location the machine will move to. If the Z location of the machine was already at 2.0, then the Z axis will not move. This is the same for each axis.

Example #2

N050 G00 X4.0 Y5.0

This is line number 50 of the program.

G00 sets the movement mode as rapid travel.

X4.0 Y5.0 is the location that the machine will move to. The Z axis of the machine will not change and remain at the location it was previously set at.

Example #3

N100 G00 Y5.0 Z2.0

This is line number 100 of the program.

G00 sets the movement mode as rapid travel.

Y5.0 Z2.0 is the location that the machine will move to. The X axis of the machine will not change and remain at the location it was previously set at.

Example #4

N010 G00 Y5.0

This is line number 10 of the program.

G00 sets the movement mode as rapid travel.

Y5.0 is the location that the machine will move to. The X and Z axes of the machine will not change and remain at the location they were previously set at.

Example #5

N075 G00

This is line number 75 of the program.

G00 sets the movement mode as rapid travel.

There is no location specified on this line. The machine will not move based on this code line.

Example #6

N256 G00 X4.0

This is line number 256 of the program.

G00 sets the movement mode as rapid travel.

X4.0 is the location that the machine will move to. The Y and Z axes of the machine will not change and remain at the location they were previously set at.

CNC codes that are similar to G00

a comparison of the type of movement created with G00, G01, G02 and G03 cnc g codes

Note that all the movement codes listed below are modal. This means they will stay in the movement mode identified by the code until switched to a different mode.

Want to learn more about G Code for your CNC?

Leave a Comment