What is G Code?

Updated: Apr 26, 2021

G-Code simply put is a CNC program generated written in g code. When following what it means in the program the G in the code is followed by a certain number. This number indicates a change in geometry and movement which is therefore followed by another code, lists of codes or movements right after.


Activating and Deactivating G Codes

Keep in mind when activating a G Code that the last G code will remain active until either you place a code when needed to deactivate that code is entered. G codes can be activated in MDI mode or written within the program.


G Code List


G00: Rapid movement

In placing a G00 movement you are telling the machine to move at a rapid pace which can be controlled in the rapid control on your control. When moving in rapid often times the tool has to be above or away from the part to prevent a crash.


G01: Linear

The linear movement tells the machine to move in a straight direction. This is controlled with the feed rate on the control.


G02: clockwise interpolation with feed rate

This tells the machine to move into a clockwise arc. The points are normally controlled with an R for radius and specified points in the program where the tool wants to move.


G03: counterclockwise interpolation with feed rate

This tells the machine to move into a counterclockwise arc. The points are normally controlled with an R for radius and specified points in the program where the tool wants to move.


G04: Dwell time

This tells the machine to pause for a certain programmed time that is specified with the P command.


G17: XY plane selection

Tells the machine to activate XY plane selection.


G18: ZX plane selection

Tells the machine to activate ZX plane selection.


G19: YZ plane selection

Tells the machine to activate YZ plane selection.


G20: Freely definable plane selection


G21: Parallel axes on


G28: return to machine zero

Activated with an axis to return to its machine home parameter


G40: Path composition off

Used to turn cutter comp off


G41: Path composition left

Normally used in interpolation defining the path in which the tool compensates to the left. Mainly seen on the CNC mill accompanied with a D comp.


G42: Path composition right

Normally used in interpolation defining the path in which the tool compensates to the right. Mainly seen on the CNC mill accompanied with a D comp


G43: Tool height offset negative compensation

Known as the tool height offset accompanied by the H value


G44: Tool height offset positive compensation

Known as the tool height offset accompanied by the H value


G49: Tool height offset cancel compensation

Cancel the height offset that was previously entered.


G54-G59: Work coordinate system offset

These are know as the work center offsets. Depending on where your program was made to define its cutting coordinates


G68: Coordinate system rotation

Rotates the program at the specified angle. Often used when placing a finished part back on the machine and realigning with the program.


G81-G89: canned cycles


G90: Absolute

Movement from work offset center


G91: Incremental

movement from the previous position


G92: position preset


G98-G99: Canned cycle return level

Where does the can cycle return to

13 views0 comments