G00 CNC Code Explained: An Easy Intro for Beginners [Rapid Travel]

Welcome to our comprehensive guide to using the G00 CNC code. Whether you’re a beginner learning CNC programming or an experienced machinist, understanding the G00 CNC code is extremely important.

In this guide, we’ll break down everything you need to know about this rapid traverse command, including how, when, and why to use it.

What does a G00 code do?

G00 sets the CNC movement mode to rapid traverse, sometimes called rapid travel. 

G00 controls the speed of the machine’s motion.

This code is used to move the CNC table and/or spindle around in a straight line (linearly) at the maximum speed. 

picture of the inside of a cnc machine with the spindle identified

When G00 is used, the machine ignores any feed rate set with the F code and instead goes as fast as possible.

Any combination of 1 or more of the machines axes can be moved in rapid mode. This includes the X, Y and Z axes.

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

Because G00 is a modal code, it will stay on until you switch it to another movement mode such as G01 – Linear interpolation or G02 – Clockwise circular interpolation

Ready to master CNC programming?

Try the free 30 minute intro course to see how simple and easy G code can be. Take the shortcut to becoming a G Code Master today!

G00 vs G0: Clearing the Confusion

Some people get confused about whether the extra 0 is required to be included with an G00 code.

To clear this up, there is no need to include the extra zero in the code. The CNC machine will read the code the same. It really is just a matter of preference.

Often you will see the full G00 code used in textbooks or other reference materials. In practice though, many prefer the shortened G0 code in their programs.

If you are working on your own, then go with whichever format you prefer. If you work in a bigger shop, make sure to stick to the format that the business has been using.

When to use the G00 code

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

Rapid positioning with G00 moves the machine at full speed. This allows the program to be run faster and decreases the part cycle time which means parts can be made faster. 

G00 should only be used when there is no cutting action happening.

Using G00 while cutting your part would not give you good control over the cutting conditions and would most likely damage your part and/or your machine.

Use the G00 code to move the cutter to the location where it will start cutting or to other locations in the CNC such as the tool change position.

Format for using a G00 code

G00 X1.0 Y2.0 Z3.0

G00 is a simple code. You only need to specify the stop location for the movement.

Because G00 is a modal code, you don’t need to specify it on every line of code. If the next line of code after the one above was X4.0 Y5.0 Z6.0 then the machine would still move to the location in rapid mode. Because it’s modal it stays on until switched to another mode.

How to turn off a G00 code

There isn’t a specific cancel command for G00 like there is for canned cycles.

Instead, to turn G00 off you will need to switch it to another code in the same group of movement codes.

The other codes in the movement group are:

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

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 zero location on your part.

Incremental positioning will move relative to the machine’s 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.

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

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, all locations are relative to the machine’s current location.

Start and stop locations

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.

Machine movement

There are many different CNC machines throughout the world. Unfortunately, they don’t all behave exactly the same. For this reason you need to make sure you know your machine when it comes to how it moves, especially when it comes to rapid movement.

Some machines will move all 3 axes at once. Some will rapid one at a time.

Some machines will move the different axes at different speeds causing a “dog leg” movement where the machine doesn’t move in a single straight line.

illustration of dog leg movement on a CNC machine

Most machines will move all 3 at once, but make sure you know the path your CNC will take when using the G00 code.

It’s important to understand how you individual CNC machine will move because you need to make sure there isn’t something that the CNC will crash into in that path.

G00 [Rapid Travel] vs G01 [Linear Interpolation]

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

The difference between the two 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.

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.

Ready to master CNC programming?

Try the free 30 minute intro course to see how simple and easy G code can be. Take the shortcut to becoming a G Code Master today!

Leave a Comment