G & M Codes
G&M Codes make up the
most of the contents of the CNC program. The definition of each class of code
and specific meanings of the most important codes are covered next.
G-Codes
Codes that begin with G
are called preparatory words because they prepare the machine for a certain
type of motion. The most common G-codes are shown in Table 5.3 and a complete
list and their meaning is included in Appx D - G-M Codes
Reference.
|
|
Note: Older controls
required G-codes to be written with a leading zero, like G01. Most machines
now allow the leading zero to be omitted, as shown in the table below.
|
|
Table 5.3: Common G-Codes
|
|
|
Code
|
Meaning
|
|
G0
|
Rapid motion. Used to
position the machine for non-milling moves.
|
|
G1
|
Line motion at a
specified feed rate.
|
|
G2
|
Clockwise arc.
|
|
G3
|
Counterclockwise arc.
|
|
G4
|
Dwell.
|
|
G28
|
Return to machine home
position.
|
|
G40
|
Cutter Diameter
Compensation (CDC) off.
|
|
G41
|
Cutter Diameter
Compensation (CDC) left.
|
|
G42
|
Cutter Diameter
Compensation (CDC) right.
|
|
G43
|
Tool length offset
(TLO).
|
|
G54
|
Fixture Offset #1.
|
|
G55
|
Fixture Offset #2.
|
|
G56
|
Fixture Offset #3.
|
|
G57
|
Fixture Offset #4.
|
|
G58
|
Fixture Offset #5.
|
|
G59
|
Fixture Offset #6.
|
|
G80
|
Cancel drill cycle.
|
|
G81
|
Simple drill cycle.
|
|
G82
|
Simple drill cycle with
dwell.
|
|
G83
|
Peck drill cycle.
|
|
G84
|
Tap cycle.
|
|
G90
|
Absolute coordinate
programming mode.
|
|
G91
|
Incremental coordinate
programming mode.
|
|
G98
|
Drill cycle return to
Initial point (R).
|
|
G99
|
Drill cycle return to Reference plane (last Z Height)
|
