G-code reference
G01 G-Code: Linear Interpolation (Feed Move)
Linear Interpolation (Feed Move) — Moves the tool in a straight line at the programmed feed rate F. This is the basic cutting move used for facing, contouring, slotting and drilling plunges.
| Property | Value |
|---|---|
| Code | G01 |
| Function | Linear Interpolation (Feed Move) |
| Modal group | 01 |
| Type | Modal — stays active until replaced by another code of the same group |
| Used on | Mills and lathes |
| Syntax | G01 X_ Y_ Z_ F_ |
What does G01 do?
Moves the tool in a straight line at the programmed feed rate F. This is the basic cutting move used for facing, contouring, slotting and drilling plunges.
G01 is modal: once programmed it remains in effect for the following blocks until another code from modal group 01 replaces it or the control is reset.
Syntax and parameters
G01 X_ Y_ Z_ F_| Address | Meaning |
|---|---|
X Y Z | End point of the line |
F | Feed rate (mm/min or in/min in G94; per revolution in G95/G99) |
G01 example program
G01 Z-2.0 F150.
G01 X50.0 F600.
G01 Y30.0
G01 X0▶ Open this example in the G-code viewer
Tips and common mistakes
- F is modal: once set it stays active until changed.
- If no F has been programmed yet, most controls raise an alarm on the first G01.
- Combine X/Y/Z in one block for ramping entry moves.
Controller compatibility
G01 follows the ISO/Fanuc dialect used by Fanuc, Haas, Brother, Doosan, Hurco (ISO mode), Mazak (EIA/ISO mode), Okuma (G-code mode) and Siemens in ISO dialect mode. Parameters, option packages and builder-specific behaviour can differ, so confirm the details in your machine's programming manual before running a new program.
Related codes
- G00 — Rapid Positioning
- G02 — Circular Interpolation Clockwise
- G03 — Circular Interpolation Counter-Clockwise
- G94 — Feed per Minute (Mill) / Facing Cycle (Lathe)
- G95 — Feed per Revolution (Mill)