CNC G Code Introduction

No ever cnc program can be complete or workable without CNC G codes and M codes.

This article actually describes what CNC G codes are and why any cnc program is not complete without them.

For a full Fanuc G Codes List read Fanuc G Codes List.

CNC G-Code Introduction for CNC Programmers

CNC G-Code Introduction for CNC Programmers

CNC G Codes

CNC G Code in a broader way are instructions to the cnc machine tools.

CNC G-code are instructions to cnc machine tools like

which way to go whether

to travel in a straight line (G01)

or in a curve (G02, G03)

or in taper (G01)

and with what feed (G94, G95).

Whether to travel at full feed (G00)

or with a controlled feed (G94, G95).

and if there is a stay how long will the stay be a cnc programmer calls this stay Dwell Time. (G04)

The G codes also provide some very crucial data at program start and at run time like

Tool-Offsetting data (G10)

and CNC Workpiece-Zero-Point or CNC Workshift Setting, (G10, G54, G55)

as without this data running a cnc machine is just a dream.

So after reading the above paragraph you might have understood the power of the G codes. They provide crucial and sensitive data at run time and instruct the cnc machine tools to run on the given path with a controlled feed but keeping that crucial data in mind all the time.

If I fully translate the above paragraph in cnc G code then I will say that the cnc machine will read machine zero offset with G54 and Tool-Offset with G10 and run on a path which is carved with G00 G01 G02 G03 and run with a control feed the feed is controlled with G94 G95 G96.

Important G Codes


The G00 G code of cnc machine tell the cnc machine to bring the tool to a given point given with G00 at the full feed, the feed of the G00 is given in the cnc machine parameters and normally never changed, but can be changed if really needed.


The G01 G-code of cnc machine tell the cnc machine to bring the tool with a controlled feed, unlike G00 whose feed is buried in cnc machine parameters the feed of the G01 code is given in the same program block or in the prior blocks. To control the feed another G code is used which is G95.