CNC · Lathe · Mill
G-code checker
Paste a program. It's checked as you type for the mistakes that alarm out, crash a tool or scrap a part, each with its line, plus a searchable G- and M-code reference.
Fanuc-style (G90/G91, G94/G95 feed modes). Stays on this device.
Check
Paste a program to check it.
G- and M-code reference · mill
| Code | What it does | Group |
|---|---|---|
| G00 | Rapid Motion Positioning | 01 |
| G01 | Linear Interpolation Motion | 01 |
| G02 | Circular Interpolation Motion CW | 01 |
| G03 | Circular Interpolation Motion CCW | 01 |
| G04 | Dwell | one-shot |
| G09 | Exact Stop | one-shot |
| G10 | Set Offsets | one-shot |
| G12 | Circular Pocket Milling CW | one-shot |
| G13 | Circular Pocket Milling CCW | one-shot |
| G17 | XY Plane Selection | 02 |
| G18 | XZ Plane Selection | 02 |
| G19 | YZ Plane Selection | 02 |
| G20 | Select Inches | 06 |
| G21 | Select Metric | 06 |
| G28 | Return To Machine Zero Point | one-shot |
| G29 | Return From Reference Point | one-shot |
| G31 | Feed Until Skip | one-shot |
| G35 | Automatic Tool Diameter Measurement | one-shot |
| G36 | Automatic Work Offset Measurement | one-shot |
| G37 | Automatic Tool Offset Measurement | one-shot |
| G40 | Cutter Compensation Cancel | 07 |
| G41 | 2D Cutter Compensation Left | 07 |
| G42 | 2D Cutter Compensation Right | 07 |
| G43 | Tool Length Compensation + (Add) | 08 |
| G44 | Tool Length Compensation - (Subtract) | 08 |
| G47 | Text Engraving | one-shot |
| G49 | G43/G44/G143 Cancel | 08 |
| G50 | Cancel Scaling | 11 |
| G51 | Scaling | 11 |
| G52 | Set Work Coordinate System | one-shot |
| G53 | Non-Modal Machine Coordinate Selection | one-shot |
| G54 | Select Work Coordinate System #1 | 12 |
| G55 | Select Work Coordinate System #2 | 12 |
| G56 | Select Work Coordinate System #3 | 12 |
| G57 | Select Work Coordinate System #4 | 12 |
| G58 | Select Work Coordinate System #5 | 12 |
| G59 | Select Work Coordinate System #6 | 12 |
| G60 | Uni-Directional Positioning | one-shot |
| G61 | Exact Stop Mode | 15 |
| G64 | G61 Cancel | 15 |
| G65 | Macro Subprogram Call Option | one-shot |
| G68 | Rotation | 16 |
| G69 | Cancel G68 Rotation | 16 |
| G70 | Bolt Hole Circle | one-shot |
| G71 | Bolt Hole Arc | one-shot |
| G72 | Bolt Holes Along an Angle | one-shot |
| G73 | High-Speed Peck Drilling Canned Cycle | 09 |
| G74 | Reverse Tap Canned Cycle | 09 |
| G76 | Fine Boring Canned Cycle | 09 |
| G77 | Back Bore Canned Cycle | 09 |
| G80 | Canned Cycle Cancel | 09 |
| G81 | Drill Canned Cycle | 09 |
| G82 | Spot Drill Canned Cycle | 09 |
| G83 | Normal Peck Drilling Canned Cycle | 09 |
| G84 | Tapping Canned Cycle | 09 |
| G85 | Boring Canned Cycle | 09 |
| G86 | Bore and Stop Canned Cycle | 09 |
| G89 | Bore In, Dwell, Bore Out Canned Cycle | 09 |
| G90 | Absolute Position Command | 03 |
| G91 | Incremental Position Command | 03 |
| G92 | Set Work Coordinate Systems Shift Value | one-shot |
| G93 | Inverse Time Feed Mode | 05 |
| G94 | Feed Per Minute Mode | 05 |
| G95 | Feed per Revolution | 05 |
| G98 | Canned Cycle Initial Point Return | 10 |
| G99 | Canned Cycle R Plane Return | 10 |
| G100 | Cancel Mirror Image | one-shot |
| G101 | Enable Mirror Image | one-shot |
| G103 | Limit Block Buffering | one-shot |
| G107 | Cylindrical Mapping | one-shot |
| G110 | #7 Coordinate System | 12 |
| G111 | #8 Coordinate System | 12 |
| G112 | #9 Coordinate System | 12 |
| G113 | #10 Coordinate System | 12 |
| G114 | #11 Coordinate System | 12 |
| G115 | #12 Coordinate System | 12 |
| G116 | #13 Coordinate System | 12 |
| G117 | #14 Coordinate System | 12 |
| G118 | #15 Coordinate System | 12 |
| G119 | #16 Coordinate System | 12 |
| G120 | #17 Coordinate System | 12 |
| G121 | #18 Coordinate System | 12 |
| G122 | #19 Coordinate System | 12 |
| G123 | #20 Coordinate System | 12 |
| G124 | #21 Coordinate System | 12 |
| G125 | #22 Coordinate System | 12 |
| G126 | #23 Coordinate System | 12 |
| G127 | #24 Coordinate System | 12 |
| G128 | #25 Coordinate System | 12 |
| G129 | #26 Coordinate System | 12 |
| G136 | Automatic Work Offset Center Measurement | one-shot |
| G141 | 3D+ Cutter Compensation | 07 |
| G143 | 5-Axis Tool Length Compensation + | 08 |
| G150 | General Purpose Pocket Milling | one-shot |
| G154 | Select Work Coordinates P1-P99 | 12 |
| G156 | Broaching Canned Cycle | 09 |
| G167 | Modify Setting | one-shot |
| G174 | CCW Non-Vertical Rigid Tap | one-shot |
| G184 | CW Non-Vertical Rigid Tap | one-shot |
| G187 | Setting the Smoothness Level | one-shot |
| G234 | Tool Center Point Control (TCPC) | 08 |
| G253 | Orient Spindle Normal To Feature Coordinate System | one-shot |
| G254 | Dynamic Work Offset (DWO) | 23 |
| G255 | Cancel Dynamic Work Offset (DWO) | 23 |
| G266 | Visible Axes Linear Rapid % Motion | one-shot |
| G268 | Enable Feature Coordinate System | 14 |
| G269 | Disable Feature Coordinate System | 14 |
| M00 | Stop Program | |
| M01 | Optional Program Stop | |
| M02 | Program End | |
| M03 | Spindle Forward | |
| M04 | Spindle Reverse | |
| M05 | Spindle Stop | |
| M06 | Tool Change | |
| M07 | Shower Coolant On | |
| M08 | Coolant On | |
| M09 | Coolant Off | |
| M10 | Engage 4th Axis Brake | |
| M11 | Release 4th Axis Brake | |
| M12 | Engage 5th Axis Brake | |
| M13 | Release 5th Axis Brake | |
| M16 | Tool Change | |
| M19 | Orient Spindle | |
| M21 | Optional User M Function with M-Fin | |
| M22 | Optional User M Function with M-Fin | |
| M23 | Optional User M Function with M-Fin | |
| M24 | Optional User M Function with M-Fin | |
| M25 | Optional User M Function with M-Fin | |
| M29 | Set Output Relay with M-Fin (Haas); rigid tapping on Fanuc | |
| M30 | Program End and Reset | |
| M31 | Chip Conveyor Forward | |
| M33 | Chip Conveyor Stop | |
| M34 | Coolant Increment | |
| M35 | Coolant Decrement | |
| M36 | Pallet Part Ready | |
| M39 | Rotate Tool Turret | |
| M41 | Low Gear Override | |
| M42 | High Gear Override | |
| M46 | Jump to Line | |
| M48 | Validate Program for Loaded Pallet | |
| M50 | Pallet Change Sequence | |
| M51 | Set Optional User M-codes | |
| M52 | Set Optional User M-codes | |
| M53 | Set Optional User M-codes | |
| M54 | Set Optional User M-codes | |
| M55 | Set Optional User M-codes | |
| M59 | Set Output Relay | |
| M61 | Clear Optional User M-codes | |
| M62 | Clear Optional User M-codes | |
| M63 | Clear Optional User M-codes | |
| M64 | Clear Optional User M-codes | |
| M65 | Clear Optional User M-codes | |
| M69 | Clear Output Relay | |
| M70 | Workholding Clamp | |
| M71 | Workholding Unclamp | |
| M73 | Tool Air Blast On | |
| M74 | Tool Air Blast Off | |
| M75 | Set G35 or G136 Reference Point | |
| M78 | Alarm if Skip Signal Found | |
| M79 | Alarm if Skip Signal Not Found | |
| M80 | Auto Door Open | |
| M81 | Auto Door Close | |
| M82 | Tool Unclamp | |
| M83 | Auto Air Gun On | |
| M84 | Auto Air Gun Off | |
| M86 | Tool Clamp | |
| M88 | Through-Spindle Coolant On | |
| M89 | Through-Spindle Coolant Off | |
| M90 | Fixture Clamp Input On | |
| M91 | Fixture Clamp Input Off | |
| M95 | Sleep Mode | |
| M96 | Jump If No Input | |
| M97 | Local Sub-Program Call | |
| M98 | Sub-Program Call | |
| M99 | Sub-Program Return or Loop | |
| M104 | Probe Arm Extend | |
| M105 | Probe Arm Retract | |
| M109 | Interactive User Input | |
| M116 | Vise Air Chips Blast On | |
| M117 | Vise Air Chips Blast Off | |
| M130 | Display Media | |
| M131 | Cancel Display Media | |
| M138 | Spindle Speed Variation On | |
| M139 | Spindle Speed Variation Off | |
| M158 | Mist Condenser On | |
| M159 | Mist Condenser Off | |
| M160 | Cancel Active PulseJet | |
| M161 | PulseJet Continuous Mode | |
| M162 | PulseJet Single Event Mode | |
| M163 | PulseJet Modal Mode | |
| M180 | Auto Window Open | |
| M181 | Auto Window Close | |
| M199 | Pallet / Part Load or Program End | |
| M300 | APL/Robot Custom Sequence |
From Haas's published lists (G-codes, M-codes), which follow Fanuc's. Options and other controls differ: check your control's manual.