CNC Path Analyzer

G00 rapid traverse and G01 linear cutting: why they differ even when both look like straight lines

Explains the difference between G00 and G01 in terms of speed, path shape, modal behavior and safe height, and shows how to read the approach, plunge, cut and retract sequence of a milling example together with its path drawing.

In one sentence

G00 means "go to that coordinate as fast as possible", while G01 means "go there in an exact straight line at the specified feed rate F". Both only state the end-point coordinates, but they differ completely in whether the tool is allowed to touch the workpiece.

How G00 and G01 speeds differ

G00 ignores the program's F value and moves at the rapid rate set for each axis in the machine parameters. On a machining center this often reaches tens of meters per minute. The speed can only be reduced with the rapid override on the operator panel (typically F0, 25%, 50% and 100%).

G01 always needs a feed rate. It uses the F given in the same block or an earlier one, and the unit depends on whether G94 (feed per minute, mm/min) or G95 (feed per revolution, mm/rev) is active. Many lathe controllers use G98/G99 for the same purpose. If G01 is reached before any F has been specified, most controllers raise an alarm.

Path shape: G00 may not be a straight line

On screen, G00 is often drawn as a line joining the start and end points, but the real machine may behave differently. That is because, by default, many controllers start every axis at the same time at its own maximum speed. For example, if a G00 move travels 100 mm in X and 20 mm in Y, Y arrives first and only X moves for the rest of the way, so the path becomes a bent line (a dogleg).

The FANUC family can select linear-interpolation-type rapid positioning with a parameter, but the setting differs from machine to machine. That is why experienced programmers split the axes when a G00 move passes near clamps or a vise, for example by raising Z first and moving XY afterwards. The example's G00 X-10. Y5. Z50. is safe only on the assumption that the tool is already high up.

Approach, plunge, cut and retract in an example

A milling path that approaches from a safe height and follows a U-shaped slot 2 mm deep

O2001
T1 M6
G21 G90 G17 G40 G49 G80 G94
G54
S3000 M03
G00 X-10. Y5. Z50.
Z3.
G01 Z-2. F80
X60. F300
Y25.
X-10.
G00 Z50.
M30
A milling path that approaches from a safe height and follows a U-shaped slot 2 mm deep — XY pathXY
Dashed light blue is G00 rapid traverse; solid orange is cutting motion. Arcs are expanded into calculated static curves.

The figure above is the CNC Path Analyzer result for this program (rapid 3 segments, linear cutting 4 segments).

Reading the source line by line

  1. G21 G90 G17 G40 G49 G80 G94: millimeters, absolute coordinates, XY plane, cancel cutter radius compensation, tool length compensation and canned cycles, feed per minute. A safety block that resets the modal state at the start of the program.
  2. G00 X-10. Y5. Z50.: rapid approach to a point above and outside the workpiece.
  3. Z3.: still rapid, because G00 is modal. Comes down quickly to 3 mm above the top face of the workpiece (Z0).
  4. G01 Z-2. F80: cutting starts here. This is a vertical plunge, so it goes down slowly at F80.
  5. X60. F300: G01 stays active and only the feed is raised to F300 to cut the slot in X.
  6. Y25., X-10.: complete the U-shaped path with the same G01 and F300.
  7. G00 Z50.: retract at rapid to the safe height.

Modal commands stay active

G00 and G01 are modal commands in the same group (group 01). Once commanded, they stay in effect until another code of the same group (G01, G02, G03, canned cycles and so on) appears. That is why a line with only coordinates, such as Y25. in the example, acts as a cutting move.

Typical accidents caused by this behavior are "a G01 mistaken for G00" and the reverse. If you delete a block containing G01 while editing a program and the coordinates on the next line are inside the workpiece, that line is interpreted in the previous mode, G00, and the tool may enter the workpiece at rapid instead of at cutting feed. Whenever you delete or reorder blocks, always check again which mode the lines above and below end up in.

When to use which

SituationRecommendedReason
Moving near the workpiece after a tool changeG00The tool is in the air and saving time matters
Descending to a few mm above the top faceG00Only when the stock height and tool length offset are certain
First move into the workpieceG01 + low FProtects the cutting edge and reduces entry shock
Contour and slot cuttingG01 / G02 / G03A defined speed and path determine quality
Retract after machiningG00Move off the machined surface vertically first, then travel

Getting a feel for the numbers: F and machining time

A feed per minute of F300 means moving 300 mm in one minute. The cutting section of the example is X 70 mm, Y 20 mm and X 70 mm, 160 mm in total, so the pure cutting time is 160 ÷ 300 ≈ 0.53 min, about 32 seconds. The 5 mm vertical plunge (Z3 → Z-2) at F80 adds 5 ÷ 80 × 60 ≈ 3.8 seconds.

Converting the same F300 into the thickness each cutting edge removes gives an idea of the tool load. A 2-flute end mill turning at S3000 passes 6,000 edges per minute, so the feed per tooth is 300 ÷ 6,000 = 0.05 mm. Choosing F by comparing with the recommended feed per tooth in the tool catalog gives a more stable tool life than choosing it by feel.

ValueFormulaExample
Cutting time (min)Distance ÷ F160 ÷ 300 = 0.53
Feed per tooth (mm)F ÷ (S × number of flutes)300 ÷ (3000 × 2) = 0.05
Feed per revolution (mm/rev)F ÷ S300 ÷ 3000 = 0.1

How to check it in CNC Path Analyzer

In the tool, rapid and cutting sections are shown in different colors and line styles, and the current block is highlighted in the source during playback. If a rapid line crosses the workpiece area, or a cutting line starts higher than expected, first suspect a G00/G01 mode change or the Z values. Circular moves continue in the article on G02/G03 circular interpolation.

Frequently asked questions

Are G0 and G00 the same command?
Yes. The leading zero can be omitted, so G0 and G00, and G1 and G01, mean the same thing. Settling on one notation according to your in-house rules makes reviews easier.
What happens if I write F in a G00 block?
It has no effect on the G00 move itself, but the F value is remembered modally and may be used by later G01 blocks. Because it can cause an unintended feed rate, it is safer not to write F in G00 blocks.

Next steps

Check the path in CNC Path Analyzer