In the CNC Lessons section of our machine technology education area, we’ve devoted this article to the G01 code among the preparatory function codes. We’ll see what the G01 code is used for, and where it’s used. We’ll examine a sample use of the G01 CNC code.
G01 Code
This is a linear interpolation command at the desired feed rate; it moves to the target point by the most direct path, in a straight line, at the feed rate defined by F. This command is used during cutting operations to remove chips from the part.
How Is the G01 Code Used?
G01 X….. Y….. F…..
X,Y = Coordinate values of the target point B F = Feed rate
In the example given to the side, the cutting tool is required to move to X=25 on the X axis and Z=-30 on the Z axis (it takes a minus sign if it’s to the left relative to the reference center).
The CNC code line that could be written for this is:
N1234 G01 X25. Z-30. F0.2

Sample Programming with the G01 Code
N10 G50 S2000 T0100
G96 S180 M03:
G00 X70.5 Z5.0 T0101 M08:
G01 Z-100.0 F0.25:
G00 U2.0 Z0.5:
G01 X-1.6 F0.23:
G00 X65.0 W1.0:
G01 Z-54.5 F0.25:
G00 U2.0 Z1.0:
X60.0:
G01 Z-54.5:
G00 U2.0 Z1.0:
X55.0:
G01 Z-30.0:
X60.0 Z-54.5:
G00 U2.0 Z1.0:
X50.5:
G01 Z-30.0:
X60.3 Z-54.7:
X72.0
G00 X150.0 Z200.0 T0100:
M01:
N20 G50 S2300 T0300:
G96 S200 M03:
G00 X55.0 Z5.0 T0303 M08:
Z0:G01 X-1.6 F0.2:
G00 X46.0 Z3.0:
G42 Z1.0:
G01 X50.0 Z-1.0 F0.15:
Z-30.0:
X60.0 Z-55.0:
X68.0:
X70.0 W-1.0:
Z-100.0:
G40 U2.0 W1.0
G00 X150.0 Z200.0 M09 T0300:
M30:In this example, you can also see the use of the G00 code we covered in the previous topic.
Related Document:
Linear Cutting Motion
The G01 code makes the tool on a CNC machine move along a straight line while cutting, at a specific feed rate.
Feed Rate Parameter
In the G01 command, the F parameter determines the feed rate at which the tool advances.
Difference from G00
While G01 moves the tool while cutting, the G00 command moves the tool for rapid positioning without cutting.
Related Questions
This code makes the tool move along a straight line at a specified feed rate. Since the tool needs to advance at a controlled, constant speed during cutting, this linear, speed-adjustable command is suited to cutting operations.
The F parameter determines how fast the tool will move during that motion. If this speed isn’t specified, the tool might move too fast and damage the material or the tool, or move at an unexpected speed.
Related Posts
G74 CNC Peck Drilling Cycle Explained
G75 CNC Grooving Cycle Code Explained
Powering On a Fanuc CNC Lathe. How Is a CNC Lathe Powered On
What the Keys on the CNC Milling Control Panel Mean
CNC G Code List and Meanings (Beginner’s Guide)
CNC Milling Workshop Operating Instructions
G02 and G03 Codes: Circular Motion Commands
Mechanical Clamping Elements on Machine Tools
