G01 Code | Linear Interpolation

G01 CNC Code

G01 is a CNC code and used in CNC machines to perform linear interpolation, in other words cutting motion. Cutting motion is done in a linear plane with G01 G code. G01 code is used both in CNC Turning and CNC Machining Centers for the same purpose.

This command is the most common CNC G code - because CAD-CAM programs calculate the machine tool paths by giving point-by-point coordinates instead of generating them with cycles. This means that the program is usually produced with G01, G02, and G03 codes.

If G01 command is used anywhere in the program, the machine will move to all coordinates specified in the program by making a linear movement until one of G00, G02 or G03 codes are activated.

G01 code, which is a linear interpolation command, is designed to make linear cutting in a workpiece and must be used together with the F__ (Feedrate) variable. If the F__ command is not written, the system will consider the last used F__ value in the program as valid feedrate. F__ variable given in the program before using the G01 command again will be directly accepted by the machine and will change the feedrate of the G01.

Absolute and Incremental System

In CNC lathe machines; if U and W are used as axis names G01 will perform an incremental movement. If axis names are used as X and Z, the system will move absolute.

In CNC Machining Centers G91 code is used to specify incremental system/motion. Absolute system/motion is activated with the G90 code. In other words, these modes are selected with the help of separate G codes, not by changing the axis names like in CNC lathe.

The table below shows how to switch between absolute and incremental systems on CNC machines.

CNC Lathe CNC Milling
Command G00, G01, G02 etc. G00, G01, G02 etc.
Absolute system X, Z, C etc. G90
Incremental system U, W etc. G91
Absolute system example G01 X10. Z10. ; G90 G01 X10. Z10. ;
Incremental system example G01 U10. W10. ; G91 G01 X10. Z10. ;

When the absolute system is selected, the exact position (coordinate) the tool will go to on the machine is specified. While in the incremental system, how far the tool will travel from its current location is specified.

G01 CNC Code Format

G01 Code Format for CNC Turning

G01 X(U) Z(W) F_ ;

In CNC lathe machines; if U and W are used as axis names G01 G code will perform an incremental movement. If axis names are used as X and Z, the system will move absolute. The F value given with the command determines the feedrate.

G01 Code Format for CNC Milling

G01 X_ Y_ Z_ F_ ;

In CNC Machining Centers G91 code is used to specify incremental system/motion. Absolute system/motion is activated with the G90 code. In other words, these modes are selected with the help of separate G codes, not by changing the axis names like in CNC lathe. The F value given with the command determines the feedrate.

Chamfer and Radius with G01

C and R parameters can be used in the same line with G01 G code for chamfering and radius machining on the workpiece.

Chamfering with G01

N5 G01 X_ Y_ C_ ;
N6 G01 X_ Y_ ;

C : Chamfer value
Machine will perform chamfering with the given C value at the intersection of N5 and N6 lines.

Radius with G01

N5 G01 X_ Y_ R_ ;
N6 G01 X_ Y_ ;

R : Radius value
Machine will perform radius cutting with the given R-value at the intersection point of N5 and N6 lines.

G01 Code Examples

G01 Code Example for Turning

O0002;
N10 G50 S2000;
G96 S200 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;
M01;
N20 G50 S2000;
G96 S220 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;
M30;

“Click here to see all examples about G01 Linear Interpolation”