Back to GSM Code List

G01: linear interpolation at a programmed feedrate

G01 moves the tool in a straight line from where it is to the programmed coordinate, at feedrate F and with every axis in the block coordinated so they all arrive together. It is the code you cut with: any straight path that removes material is written with G01. Both the code and the feedrate are modal, so once written they stay block after block until another motion code (G00, G02, G03) or a new F replaces them.

For reference only: syntax changes with the control, the post-processor and the machine parameters. Check the official manual and run a simulation before cutting. Legal notice.

Family
Movement
Machine
Milling, Turning, Mill-turn, Laser/cut
Risk
Medium
Example
G01 X25 F180

Syntax by control

Fanuc (milling)

G01 X80. Y20. Z-5. F250

With G94 active the feedrate is in mm/min. F is modal: you write it in the first cutting block and the following ones inherit it. If no F has ever been programmed, the control throws a zero feedrate alarm when it runs the first G01.

Fanuc / Haas (turning)

G01 X40. Z-25. F0.2

On a lathe the normal mode is G95, feed per revolution: F0.2 is two tenths of a millimeter per rev, not 0.2 mm/min. That is the unit turning insert tables are written in.

Haas (milling)

G01 X80. Y20. Z-5. F250

Same syntax as Fanuc. How the corners come out also depends on the accuracy mode: on the machines that have it, G187 sets the trade-off between speed and exactness at changes of direction.

Siemens 840D / 828D

G1 X80 Y20 Z-5 F250

Siemens writes G1 with no zero. The feedrate follows the G94/G95 mode just as on Fanuc, and FGROUP lets you decide which axes set the vector speed when rotaries are in play.

Heidenhain TNC (Klartext)

L X+80 Y+20 Z-5 R0 F250

L is the straight line. After the point comes the radius compensation (R0, RL or RR) and then the feedrate; write FMAX instead of F and that same block turns into a rapid.

Address letters used with it

LetterWhat it setsUnit
X Y ZEnd point of the move, absolute under G90 and incremental under G91. If you write several axes, the control coordinates them so the resulting path is a straight line in space.mm / in
FFeedrate along the path, not of each axis separately. It is modal and the panel override multiplies it in real time.mm/min under G94, mm/rev under G95
A B CRotary axes. Combined with the linear ones in the same G01, the control splits the speed among them all, and the result at the tool tip can be very different from the programmed F.degrees
,C / ,RAutomatic chamfer or corner radius between two consecutive straight lines on Fanuc and Haas: G01 X50. ,C2. leaves a 2 mm chamfer at the corner without working the points out. It is a control option, not on every machine.mm

Worked example

A 10 mm wide, 40 mm long slot in steel, opened up with a three flute 10 mm cutter that does not cut on center. You cannot go in plunging straight down, so it ramps in: X and Z move together inside the same G01 and the cutter enters cutting on its side. Final depth is 6 mm, split into four ramps.

O0101 (RANURA CON ENTRADA EN RAMPA)
( Program header. )
G21 G17 G40 G49 G80
( Millimeters, XY plane and a clean state. )
G91 G28 Z0.
( Z to the reference point in incremental before the change. )
T3 M06
( Three flute 10 mm cutter. )
G90 G54 G00 X20. Y25.
( Absolute, work offset and positioning over the start of the slot with Z up. )
G43 H03 Z50. M03 S2200
( T3 length offset and spindle on. )
G00 Z1. M08
( Rapid down to 1 mm above the face and coolant on. From here everything is G01. )
G01 X60. Z-1.5 F200
( First ramp: the cutter travels 40 mm in X while it drops 2.5 mm in Z, and both axes arrive together. The slope is about 3.6 degrees, within what a three flute cutter takes in steel. )
G01 X20. Z-3.
( Ramps back the other way and drops another 1.5 mm. G01 and F are modal: no need to repeat them. )
X60. Z-4.5
( Third ramp. You do not even need to write the G: the modal is still G01. )
X20. Z-6.
( Fourth ramp, now at the final depth of 6 mm. )
G01 X60. F150
( Finish pass along the bottom at constant depth, with the feedrate dropped to 150 mm/min to leave a clean surface. )
G01 X20.
( Goes back over the slot the other way to even the bottom up in both cutting directions. )
G00 Z50. M09
( Retract in Z and coolant off. Travel through air is done in rapid, not in G01. )
G91 G28 Z0. M05
( Z to the reference point and spindle stop. )
G90 M30
( Back to absolute and end. )
Open the simulator to check the example

Practical keys to using G01 in the workshop

What the F feedrate actually means

F is the speed of the tool tip along the path, not the speed of each axis. In a move that combines X and Z, each axis runs slower than F so that the resulting vector is F. The number comes from the tooling manufacturer's table, which gives feed per tooth: F = fz x number of teeth x rpm. That calculation is what decides whether the cutter lasts or breaks, and it is also why the same cutter carries one feedrate in roughing and another in finishing. On top of all that sits the panel override, which multiplies what you programmed and tends to stay wherever the last part left it.

How you enter the material with G01

Plunging straight down is only valid with drills and with cutters that cut on center. An ordinary three or four flute cutter has a gap on the axis: plunge straight and the middle rubs instead of cutting, heats up and the tool blows apart. The alternatives are the ramp entry, combining an axis in the plane with Z in the same G01 (between 1 and 5 degrees depending on material and tool), the helical entry with G02/G03 and entering through a pre-drilled hole. Finishing a wall, on top of that, you come in tangent to the contour so no entry mark is left behind.

G01, corners and real cycle time

The machine cannot change direction at constant speed: at every corner it decelerates and accelerates again. How aggressively it does that depends on the accuracy mode, which on Fanuc is G61 (exact stop) and G64 (continuous cutting) and on many Haas machines is set with G187. That is why a program with thousands of very short G01 segments, typical of 3D machining out of CAM, runs well below the programmed F: block processing time and acceleration are in charge, not the feedrate. Lengthening the segments or raising the CAM tolerance changes cycle time more than raising F does.

Mistakes that cost you a part (or a tool)

  • Programming a G01 when no F has ever been given: the control throws a zero feedrate alarm or, worse, starts with the feedrate inherited from the previous operation.
  • Switching from G94 to G95 without rewriting the feedrate: F200 under G95 is 200 millimeters per revolution, a value no machine can give and that usually ends in an alarm or a broken tool.
  • Plunging straight down with a cutter that does not cut on center: the tool rubs, heats up and snaps at the shank.
  • Leaving the G out of the block and trusting the modal when the previous block was a G00: the X80. Y20. you read as a cutting pass runs in rapid.
  • Using G01 at cutting feed for a long move through air: cycle time goes through the roof for no benefit at all.
  • Drawing conclusions about the finish without looking at the feed override, which may still be at 60 percent from the previous part.
  • Chaining segments a few tenths of a millimeter long and expecting the programmed feedrate: between corner deceleration and block time, the real speed is much lower.

Frequently Asked Questions (FAQ)

What is the difference between G00 and G01?

G00 traverses at the top speed of the axes and takes no feedrate; G01 moves in a straight line at the F speed you program. You use G00 to move through air and G01 for everything that cuts. On top of that, G00 can make a broken diagonal, while G01 is always a real straight line.

Do I have to write G01 in every block?

No, it is modal: once it is active, blocks that only carry coordinates run as linear moves. Repeating it does no harm and plenty of post processors always write it, precisely so that a block read on its own cannot be mistaken for a rapid.

What happens if I forget the feedrate?

If no F has ever been programmed, the control throws a zero feedrate alarm. The dangerous case is when there is one stored from before: the block runs at the feedrate of another operation, which could be an end mill finishing feed applied to a drill.

What units is F in?

It depends on the feed mode: under G94 millimeters per minute (or inches per minute under G20) and under G95 millimeters per spindle revolution. Milling normally runs G94 and turning G95, so much so that on many lathes it is the default mode at power up.

Can I move three axes at once with G01?

Yes, and the resulting path is a straight line in space: the control splits the speed between the axes so the tip travels at F and they all arrive together. That is exactly what a ramp entry takes advantage of, where an axis in the plane and Z move together.

Related codes

Other codes in Movement

See the full list of G and M codes

Related tools