Lesson 3: Rapid and Linear Moves G00 and G01
Updated
G00 is rapid positioning at maximum machine speed, never used for cutting, and its path may not be straight. G01 is a straight move at the programmed feed F, given in mm/min under G94. The tool rapids above the point and down to Z5, and enters the material only with G01.
In this lesson you will learn:
- how G00 rapid positioning works and why it must never cut;
- how feed F is programmed for G01 and what G94 means;
- why the program states the working plane G17;
- which heights to use when approaching the part;
- how to write your first real cutting program – an 80 × 40 mm groove.
G00 – rapid positioning
G00 moves the tool to the target at the machine's maximum speed – on modern machining centres often tens of metres per minute. The F address does not apply to G00; the operator can slow it only with the rapid override (e.g. 100 %, 50 %, 25 %).
Important: on many machines the G00 path is not a straight line. Each axis moves at its own maximum speed, so the axis with the shorter distance arrives first and the path bends (a "dog-leg"). Some controls can be set by parameter to linear rapid, but program as if the path were bent: there must be no clamps or stock between start and target. Never cut with G00.
G01 – linear interpolation
G01 moves the tool in a straight line at the programmed feed F. Milling controls default to G94 – feed in millimetres per minute; G95 would mean mm per revolution. F is modal: write it once and change it only when needed. If no F has been programmed before the first G01 block, the control normally raises an alarm.
For T1 we use the example values S6000 and F1200 (plunge F300); the tool maker's data always takes priority. F1200 at 6000 rpm with 3 flutes equals 1200 / (3 × 6000) ≈ 0.067 mm feed per tooth, and the cutting speed is π × 10 × 6000 / 1000 ≈ 188 m/min (see feed per tooth and cutting speed and rpm).
| Property | G00 | G01 |
|---|---|---|
| Speed | Maximum machine speed | Programmed feed F (mm/min, G94) |
| Path | May be bent | Always straight |
| Cutting | Never | Yes |
| Override | Rapid override | Feed override |
| Typical use | Positioning, retract | Plunging, contours, slotting |
Working plane G17
G17 selects the XY plane. The plane does not affect straight moves, but it determines arc (G02/G03) direction and how cutter compensation works, so it always belongs in the safe start block.
Approach heights
| Height | Purpose | Move |
|---|---|---|
| Z50.0 | Safe height above clamps and stock | G00 |
| Z5.0 | Approach plane above the surface | G00 |
| Z-1.0 | Cutting depth | G01 F300 |
Rule: going down, move X and Y at the safe height first, then Z; going up, move Z first, then X and Y. From Z5 to the surface the tool travels at feed, so even a small Z0 error will not cause a crash at rapid speed.
Example: an 80 × 40 mm groove
T1 mills a 1 mm deep rectangular groove whose centre line is 80 × 40 mm, centred on the plate at X50 Y30. Corners: X10 Y10, X90 Y10, X90 Y50, X10 Y50. We program the tool centre path (no cutter compensation), so the groove width equals the cutter diameter, 10 mm: the outer edge runs from X5 to X95 and Y5 to Y55, the inner edge from X15 to X85 and Y15 to Y45. The end mill must be centre-cutting to plunge vertically.
%
O1003 (LESSON 3 - GROOVE 80X40)
N10 G21 G17 G40 G49 G80 G90
N20 T1 M06 (END MILL D10 3FL)
N30 G54 G00 X10.0 Y10.0 S6000 M03
N40 G43 H1 Z50.0 M08
N50 Z5.0
N60 G94 G01 Z-1.0 F300
N70 X90.0 F1200
N80 Y50.0
N90 X10.0
N100 Y10.0
N110 G00 Z5.0
N120 Z50.0 M09
N130 G91 G28 Z0
N140 G90
N150 M05
N160 M30
%
N30 rapids above the start point and starts the spindle, N40 brings the tool to the safe height with length offset and switches coolant on, N50 rapids to Z5. N60 plunges at F300, N70–N100 mill the four sides at F1200 (G01 and F stay modal). N110–N120 retract at rapid.
Exercise
Write the T1 path for a 0.5 mm deep triangular groove with corners at X20 Y10, X80 Y10 and X50 Y50. Use the same speeds, feeds and heights as in the example. The side lengths should be 60, 50 and 50 mm – check them. The answer is in the FAQ.
Next lesson: Lesson 4: Arcs G02 and G03. For a summary of the basics, see G-code basics.
Frequently asked questions
Why must G00 never be used for cutting?
G00 runs at maximum machine speed rather than a programmed feed, and its path may be bent. The tool would break or damage the part and the machine.
What is a G00 dog-leg?
When the axes move independently at their own maximum speeds, the axis with the shorter distance arrives first, so the path looks like a bent line instead of a straight one.
Do I need F in every G01 block?
No. F is modal and stays active until changed. Write it in the first G01 block and whenever the feed changes, for example after plunging.
Why rapid down to Z5 instead of to the surface?
The approach plane leaves a margin for Z0 or tool length errors; the last few millimetres are travelled at feed.
Exercise answer
G54 G00 X20.0 Y10.0 S6000 M03; G43 H1 Z50.0 M08; Z5.0; G01 Z-0.5 F300; X80.0 F1200; X50.0 Y50.0; X20.0 Y10.0; G00 Z5.0; Z50.0 M09. Sides: 80 − 20 = 60 mm, and each sloping side √(30² + 40²) = 50 mm.
Looking for someone to do this job? Find a manufacturer on the marketplace or post a request.
Services offered I need a service