What is a G00 Code? [With Lots of Examples]

The information below is meant for beginners. If you are experienced with CNC programming, then you probably already know this stuff and much more. If you are new to CNC programming, this is the place for you.

Please note that some of the topics below could include more information on the subject. However, in the interest of keeping things simple for those just starting out, they have been left out of this G code guide.

Ready to learn? Let’s go.

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. It is used to move the CNC table and/or spindle.

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 code is used to decrease the time it takes to run a CNC program (cycle time). 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.

Absolute vs incremental mode

The second thing to look for is 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 coordinates will move from a set zero location such as your machines home location or a specified location on your part.

Incremental coordinates will move relative to your current position. See our posts on G90 and G91 codes to learn more about the differences between absolute and incremental coordinates.

Machine movement

Know your machine. Some machines will move all 3 axes at once. Others will move a single axis at a time. Most machines will move all 3 at once but make sure you know how your CNC will execute the code.

Start and stop locations

Lastly, make sure you understand 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.

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

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.

Leave a Comment