| G & M Code Reference Table |
|
| |
| G-Code |
Group |
Function |
|
| G00* |
01 |
Rapid Positioning Motion (X,Y,Z,A,B)(Setting 10, 56, 101) |
| G01 |
01 |
Linear Interpolation Motion (X,Y,Z,A,B,F) |
| G02 |
01 |
Circular Interpolation Motion CW (X,Y,Z,A,I,J,K,R,F) |
| G03 |
01 |
Circular Interpolation Motion CCW (X,Y,Z,A,I,J,K,R,F) |
| G04 |
00 |
Dwell (P) (P =seconds"."milliseconds) |
| G09 |
00 |
Exact Stop, Non-Modal |
| G10 |
00 |
Programmable Offset Setting (X,Y,Z,A,L,P,R) |
| G12 |
00 |
Circular Pocket Milling CW (Z,I,K,Q,D,L,F) |
| G13 |
00 |
Circular Pocket Milling CCW (Z,I,K,Q,D,L,F) |
| G17* |
02 |
Circular Motion XY Plane Selection (G02 or G03) (Setting 56) |
| G18 |
02 |
Circular Motion ZX Plane Selection (G02 or G03) |
| G19 |
02 |
Circular Motion YZ Plane Selection (G02 or G03) |
| G20* |
06 |
Verify Inch Coordinate Positioning (Setting 9 will need to be INCH) (Setting 56) |
| G21 |
06 |
Verify Metric Coordinate Positioning (Setting 9 will need to be METRIC) |
| G28 |
00 |
Machine Zero Return Thru Reference Point (X,Y,Z,A,B) (Setting 108) |
| G29 |
00 |
Move to location Thru G28 Reference Point (X,Y,Z,A,B) |
| G31** |
00 |
Feed Until Skip Function (X,Y,Z,A,B,F) |
| G35** |
00 |
Automatic Tool Diameter Measurement (D,H,Z,F) |
| G36** |
00 |
Automatic Work Offset Measurement (X,Y,Z,A,B,I,J,K,F) |
| G37** |
00 |
Automatic Tool Offset Measurement (D,H,Z,F) |
| G40* |
07 |
Cutter Compensation Cancel G41/G42/G141 (X,Y) (Setting 56) |
| G41 |
07 |
2D Cutter Compensation Left (X,Y,D) (Setting 43, 44, 58) |
| G42 |
07 |
2D Cutter Compensation Right (X,Y,D) (Setting 43, 44, 58) |
| G43 |
08 |
Tool Length Compensation + (H,Z) (Setting 15) |
| G44 |
08 |
Tool Length Compensation - (H,Z) (Setting 15) |
| G47 |
00 |
Text Engraving (X,Y,Z,R,I,J,P,E,F) (Macro Variable #599 to Change Serial Number) |
| G49* |
08 |
Tool Length Compensation Cancel G43/G44/G143 (Setting 56) |
| G50* |
11 |
Scaling G51 Cancel (Setting 56) |
| G51** |
11 |
Scaling (X,Y,Z,P) (Setting 71) |
| G52 |
12 |
Select Work Coordinate System G52 (Setting 33, YASNAC) |
| G52 |
00 |
Global Work Coordinate System Shift (Setting 33, FANUC) |
| G52 |
00 |
Global Work Coordinate System Shift (Setting 33, HAAS) |
| G53 |
00 |
Machine Zero XYZ Positioning, Non-Modal |
| G54* |
12 |
Work Offset Positioning Coordinate #1 (Setting 56) |
| G55 |
12 |
Work Offset Positioning Coordinate #2 |
| G56 |
12 |
Work Offset Positioning Coordinate #3 |
| G57 |
12 |
Work Offset Positioning Coordinate #4 |
| G58 |
12 |
Work Offset Positioning Coordinate #5 |
| G59 |
12 |
Work Offset Positioning Coordinate #6 |
| G60 |
00 |
Uni-Directional Positioning (X,Y,Z,A,B) (Setting 35) |
| G61 |
13 |
Exact Stop, Modal (X,Y,Z,A,B) |
| G64* |
13 |
Exact Stop G61 Cancel (Setting 56) |
| G65** |
00 |
Macro Sub-Routine Call |
| G68** |
16 |
Rotation (G17,G18,G19,X,Y,Z,A,R) (Setting 72, 73) |
| G69* |
16 |
Rotation G68 Cancel (Setting 56) |
| G70 |
00 |
Bolt Hole Circle with a Canned Cycle (,I,J,L) |
| G71 |
00 |
Bolt Hole Arc with a Canned Cycle (,I,J,K,L) |
| G72 |
00 |
Bolt Holes Along an Angle with a Canned Cycle (,I,J,L) |
| G73 |
09 |
High Speed Peck Drill Canned Cycle (X,Y,A,B,Z,I,J,K,Q,P,R,L,F) (Setting 22) |
| G74 |
09 |
Reverse Tapping Canned Cycle (X,Y,A,B,Z,R,J,L,F) (Setting 130, 133) |
| G76 |
09 |
Fine Boring Canned Cycle (X,Y,A,B,Z,I,J,P,Q,P,R,L,F) (Setting 27) |
| G77 |
09 |
Back Bore Canned Cycle(X,Y,A,B,Z,I,J,Q,R,L,F) (Setting 27) |
| G80* |
09 |
Cancel Canned Cycle (Setting 56) |
| G81 |
09 |
Drill Canned Cycle (X,Y,A,B,Z,R,L,F) |
| G82 |
09 |
Spot Drill / Counterbore Canned Cycle (X,Y,A,B,Z,P,R,L,F) |
| G83 |
09 |
Peck Drill Deep Hole Canned Cycle (X,Y,A,B,Z,I,J,K,Q,P,R,L,F) (Setting 22, 52) |
| G84 |
09 |
Tapping Canned Cycle (X,Y,A,B,Z,R,J,L,F) (Setting 130, 133) |
| G85 |
09 |
Bore in~Bore out Canned Cycle (X,Y,A,B,Z,R,L,F) |
| G86 |
09 |
Bore in~Stop~Rapid out Canned Cycle (X,Y,A,B,Z,R,L,F) |
| G87 |
09 |
Bore in~Manual Retract Canned Cycle (X,Y,A,B,Z,R,L,F) |
| G88 |
09 |
Bore~Dwell~Manual Retract Canned Cycle (X,Y,A,B,Z,P,R,L,F) |
| G89 |
09 |
Bore~Dwell~Bore out Canned Cycle (X,Y,A,B,Z,R,L,F) |
| G90* |
03 |
Absolute Positioning Command (Setting 56) |
| G91 |
03 |
Incremental Positioning Command (Setting 29) |
| G92 |
00 |
Set Work Coordinate Value (Fanuc) (HAAS) |
| G92 |
00 |
Global Work Coordinate System Shift (Yasnac) |
| G93 |
05 |
Inverse Time Feed Mode ON |
| G94* |
05 |
Inverse Time Feed Mode OFF/Feed Per Minute ON (Setting 56) |
| G95 |
05 |
Feed Per Revolution |
| G98* |
10 |
Canned Cycle Initial Point Return (Setting 56) |
| G99 |
10 |
Canned Cycle "R" Plane Return |
| G100 |
00 |
Mirror Image Cancel |
| G101 |
00 |
Mirror Image (X,Y,Z,A,B) (Setting 45, 46, 47, 48, 80) |
| G102 |
00 |
Programmable Output to RS-232 (X,Y,Z,A,B) |
| G103 |
00 |
Limit Block Look-a-head (P0-P15 for number of lines control looks ahead) |
| G107 |
00 |
Cylindrical Mapping (X,Y,Z,A,Q,R) |
| G110 |
12 |
Work Offset Positioning Coordinate #7 |
| G111 |
12 |
Work Offset Positioning Coordinate #8 |
| G112 |
12 |
Work Offset Positioning Coordinate #9 |
| G113 |
12 |
Work Offset Positioning Coordinate #10 |
| G114 |
12 |
Work Offset Positioning Coordinate #11 |
| G115 |
12 |
Work Offset Positioning Coordinate #12 |
| G116 |
12 |
Work Offset Positioning Coordinate #13 |
| G117 |
12 |
Work OffsetPositioning Coordinate #14 |
| G118 |
12 |
Work Offset Positioning Coordinate #15 |
| G119 |
12 |
Work Offset Positioning Coordinate #16 |
| G120 |
12 |
Work Offset Positioning Coordinate #17 |
| G121 |
12 |
Work Offset Positioning Coordinate #18 |
| G122 |
12 |
Work Offset Positioning Coordinate #19 |
| G123 |
12 |
Work Offset Positioning Coordinate #20 |
| G124 |
12 |
Work Offset Positioning Coordinate #21 |
| G125 |
12 |
Work Offset Positioning Coordinate #22 |
| G126 |
12 |
Work Offset Positioning Coordinate #23 |
| G127 |
12 |
Work Offset Positioning Coordinate #24 |
| G128 |
12 |
Work Offset Positioning Coordinate #25 |
| G129 |
12 |
Work Offset Positioning Coordinate #26 |
| G136** |
00 |
Automatic Work Offset Center Measurement |
| G141 |
07 |
3D+ Cutter Compensation (X,Y,Z,I,J,K,D,F) |
| G143** |
08 |
5 Axis Tool Length Compensation+ (X,Y,Z,A,B,H) (Setting 117) |
| G150 |
00 |
General Purpose Pocket Milling (X,Y,P,,Z,I,J,K,Q,D,R,L,S,F) |
| G153** |
09 |
5 Axis High Speed Peck Drill Canned Cycle (X,Y,A,B,Z,I,J,K,Q,P,E,L,F) (Setting 22) |
| G154 |
09 |
Select Work Offset Positioning Coordinate P1-99 |
| G155** |
09 |
5 Axis Reverse Tapping Canned Cycle (X,Y,A,B,Z,J,E,L,F) |
| G161** |
09 |
5 Axis Drill Canned Cycle (X,Y,A,B,Z,E,L,F) |
| G162** |
09 |
5 Axis Spot Drill/Counterbore Canned Cycle (X,Y,A,B,Z,P,E,L,F) |
| G163** |
09 |
5 Axis Peck Drill Canned Cycle (X,Y,A,B,Z,I,J,K,Q,E,L,F) (Setting 22) |
| G164** |
09 |
5 Axis Tapping Canned Cycle (X,Y,A,B,Z,J,E,L,F) |
| G165** |
09 |
5 Axis Bore in, Bore out Canned Cycle (X,Y,A,B,Z,E,L,F) |
| G166** |
09 |
5 Axis Bore in, Stop, Rapid out Canned Cycle (X,Y,A,B,Z,E,L,F) |
| G169** |
09 |
5 Axis Bore, Dwell, Bore out Canned Cycle (X,Y,A,B,Z,P,E,L,F) |
| G174 |
00 |
Special Purpose Non-Vertical Rigid Tapping CCW (X,Y,Z,F) |
| G184 |
00 |
Special Purpose Non-Vertical Rigid Tapping CW (X,Y,Z,F) |
| G187 |
00 |
Accuracy Control for High Speed Machining (E) |
| G188 |
00 |
Get Program From PST (Program Schedule Table) |
| |
|
|
* = Defaults
** = Optional |
| |
|
|
| M-Codes |
Function |
|
| M00 |
The M00 code is used for a Program Stop command on the machine.
It stops the spindle, turns off coolant and stops look-a-head processing.
Pressing CYCLE START again will continue the program on the next
block of the program. |
| M01 |
The M01 code is used for an Optional Program Stop command.
Pressing the OPT STOP key on the control panel signals the machine
to perform a stop command when the control reads an M01 command.
It will then perform like an M00. |
| M03 |
Starts the spindle CLOCKWISE. Must have a spindle speed defined. |
| M04 |
Starts the spindle COUNTERCLOCKWISE. Must have a spindle speed defined. |
| M05 |
STOPS the spindle. |
| M06 |
Tool change command along with a tool number will execute a
tool change for that tool. This command will automatically stop the
spindle, Z-axis will move up to the machine zero position and the
selected tool will be put in spindle. The coolant pump will turn off
right before executing the tool change. |
| M08 |
Coolant ON command. |
| M09 |
Coolant OFF command. |
| M30 |
Program End and Reset to the beginning of program. |
| M97 |
Local Subroutine call |
| M98 |
Subprogram call |
| M99 |
Subprogram return (M98) or Subroutine return (M97), or a Program loop. |
| |
|
NOTE: Only one "M" code can be used per line. And the M-codes will be the last command to be
executed in a line, regardless of where it's located in that line. |
|
| |
| |
|
| |
|