G-codeMotionModal group 1Mill · Lathe · 3D printer

G00: Rapid Positioning

G00 moves the tool to the coordinates on the block at the machine's rapid traverse rate. It is for getting into position, never for cutting, and the speed comes from the machine's own rapid settings rather than from the program. What the path looks like depends on the control. A Fanuc with parameter 1401 bit LRP at 0, a Haas and an Okuma drive each axis on its own, so a move in two or three axes travels a dogleg; a Mazak with parameter F91 bit 6 at 0, a Siemens under RTLION, Grbl and Marlin go in a straight line. G00 is modal in group 01, so every block after it is a rapid until G01, G02 or G03 replaces it.

Syntax

G00 X__ Y__ Z__     Rapid to a position (mill)
G00 X__ Z__         Rapid to a position, X as a diameter (lathe)
G00 U__ W__         Rapid by a distance in X and Z (lathe, Fanuc-style)

Parameters

AddressMeaningNotes
X Y ZTarget positionRead as a position under G90 and as a distance under G91
A B CTarget angle of a rotary axisMoves at that axis's own rapid rate
U WIncremental X and Z on a latheU is a change in diameter on a Haas lathe, which works in diameters
FNot the rapid speedControls rapid from machine data. Grbl stores the F for the next G01; Marlin uses it for the G0 itself

Example

O0100 (TWO SLOTS IN 6082 PLATE, CLAMPS AT Y0 AND Y40)
G21 G17 G40 G49 G80 G90          (safe start block)
T03 M06                          (10mm 3-flute carbide end mill)
G54
S6400 M03                        (about 200m/min)
G00 X30. Y20.                    (X and Y only, Z still at tool change height)
G43 H03 Z25. M08                 (Z down on its own, 25mm above the top face)
G00 Z2.                          (rapid to 2mm above the face, no lower)
G01 Z-5. F300                    (feed into the material)
X70. F1150                       (first slot)
G00 Z25.                         (retract Z on its own first)
X120. Y20.                       (then across in X and Y at a height that clears the clamps)
Z2.                              (still G00: down to 2mm above the face)
G01 Z-5. F300                    (back to feed before touching metal)
X160. F1150                      (second slot)
G00 Z25. M09                     (retract)
M05
G91 G28 Z0.                      (Z home)
G90
M30

Controller differences

ControlBehaviour
FanucParameter No. 1401 bit 1 (LRP) picks the path. At 0 the tool moves along each axis independently at rapid traverse; at 1 it positions with linear interpolation, in a straight line. The safety pages tell you to confirm the tool path carefully before programming non-linear positioning. The rapid rate is set per axis in No. 1420, the override steps are F0, 25, 50 and 100 percent, and the F0 rate is No. 1421.
HaasThe rapid is generally not a straight line: every axis named moves at the same speed, the axes do not necessarily finish together, and the next block waits until all of them have. Setting 57, Exact Stop Canned X-Y, changes how closely the machine waits for a precise stop before and after a rapid. The override keys limit rapids to 5, 25, 50 or 100 percent, and Setting 10, Limit Rapid at 50%, caps them at half for good.
Siemens 840DG0 has two path modes. RTLION interpolates the path axes together so they reach the end point at the same time; RTLIOF moves each one as a positioning axis on its own. Even under RTLIOF the control falls back to a straight line with tool radius compensation G41 or G42 active, in continuous path mode G64 to G645, with the COMPCAD compressor on and with a transformation active. The rapid speed of each axis is its maximum velocity in machine data MD32000.
MazakThe EIA/ISO manual calls G00 a linear positioning: with user parameter F91 bit 6 at 0 the tool takes the shortest path and the speed is limited by the rapid rates of the axes involved, and at 1 each axis moves at its own rapid rate, a polygonal path. The positioning time is the same either way. Parameter S13 sets the in-position width at the end of the block.
OkumaOn an OSP lathe each axis moves independently from where it is to the target at its own rapid feedrate, so the path is not always a straight line, and the rapid feedrates are fixed by the machine specification. The next block starts only once the axes are in position.
GrblG0 is planned as a straight line, slowed so that no axis passes its maximum rate, and settings $110 to $112 are both those maximum rates and the G0 seek rates. Rapid overrides are 100, 50 and 25 percent. An F on a G0 block is stored for the next feed move and does not change the rapid.
MarlinOn Cartesian and delta machines G0 is a direct alias for G1, so it runs in a straight line at the feedrate F last set, not at a separate rapid rate. A fixed G0 feedrate exists only with G0_FEEDRATE enabled in Configuration_adv.h, where it ships commented out. With the laser feature on, a G0 cannot apply power.

What goes wrong

A three-axis G00 that dives while it travels is the crash this code is known for. Take G00 X200. Y20. Z2. from X0 Y0 Z25. on a Haas, where every axis runs at the same speed: Y finishes its 20mm and Z its 23mm while X still has about 180mm to go, now 2mm above the part and straight through any clamp in the way. A Fanuc with LRP at 0 also drives each axis independently. Retract Z alone, cross in X and Y, then send Z down by itself, as the example does.

Second is G00 still live on a cutting block. It is modal, so a X70. written after a G00 Z2. with no G01 in between crosses the slot at full rapid instead of 1150mm/min. The end mill snaps and the part moves in the vice.

Third, proving a program at 100 percent rapid. The first run of a new program goes at 25 percent or F0 on a Fanuc, 5 percent on a Haas, with a hand on feed hold. On a Haas that apprentices run, Setting 10 caps every rapid at half speed.

Fourth, the same program on a different control. A path proved on a Mazak with F91 bit 6 at 0, or on a Grbl router, is a straight line; the same G00 on a Fanuc with LRP at 0 is a dogleg that passes somewhere else. On a Siemens under RTLIOF the path changes again whenever G64 or cutter compensation forces it back to linear.

Last, Haas Setting 57 off in a canned cycle. The axes do not always reach the programmed X and Y before Z starts down, which marks a fixture or a part edge on the way into the hole.

Updated 19 Oct 2026