Skip to content
BreakingChips

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.

Machine type
Add your machine

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

G and M codes for a mill, as Haas publishes them
CodeWhat it doesGroup
G00Rapid Motion Positioning01
G01Linear Interpolation Motion01
G02Circular Interpolation Motion CW01
G03Circular Interpolation Motion CCW01
G04Dwellone-shot
G09Exact Stopone-shot
G10Set Offsetsone-shot
G12Circular Pocket Milling CWone-shot
G13Circular Pocket Milling CCWone-shot
G17XY Plane Selection02
G18XZ Plane Selection02
G19YZ Plane Selection02
G20Select Inches06
G21Select Metric06
G28Return To Machine Zero Pointone-shot
G29Return From Reference Pointone-shot
G31Feed Until Skipone-shot
G35Automatic Tool Diameter Measurementone-shot
G36Automatic Work Offset Measurementone-shot
G37Automatic Tool Offset Measurementone-shot
G40Cutter Compensation Cancel07
G412D Cutter Compensation Left07
G422D Cutter Compensation Right07
G43Tool Length Compensation + (Add)08
G44Tool Length Compensation - (Subtract)08
G47Text Engravingone-shot
G49G43/G44/G143 Cancel08
G50Cancel Scaling11
G51Scaling11
G52Set Work Coordinate Systemone-shot
G53Non-Modal Machine Coordinate Selectionone-shot
G54Select Work Coordinate System #112
G55Select Work Coordinate System #212
G56Select Work Coordinate System #312
G57Select Work Coordinate System #412
G58Select Work Coordinate System #512
G59Select Work Coordinate System #612
G60Uni-Directional Positioningone-shot
G61Exact Stop Mode15
G64G61 Cancel15
G65Macro Subprogram Call Optionone-shot
G68Rotation16
G69Cancel G68 Rotation16
G70Bolt Hole Circleone-shot
G71Bolt Hole Arcone-shot
G72Bolt Holes Along an Angleone-shot
G73High-Speed Peck Drilling Canned Cycle09
G74Reverse Tap Canned Cycle09
G76Fine Boring Canned Cycle09
G77Back Bore Canned Cycle09
G80Canned Cycle Cancel09
G81Drill Canned Cycle09
G82Spot Drill Canned Cycle09
G83Normal Peck Drilling Canned Cycle09
G84Tapping Canned Cycle09
G85Boring Canned Cycle09
G86Bore and Stop Canned Cycle09
G89Bore In, Dwell, Bore Out Canned Cycle09
G90Absolute Position Command03
G91Incremental Position Command03
G92Set Work Coordinate Systems Shift Valueone-shot
G93Inverse Time Feed Mode05
G94Feed Per Minute Mode05
G95Feed per Revolution05
G98Canned Cycle Initial Point Return10
G99Canned Cycle R Plane Return10
G100Cancel Mirror Imageone-shot
G101Enable Mirror Imageone-shot
G103Limit Block Bufferingone-shot
G107Cylindrical Mappingone-shot
G110#7 Coordinate System12
G111#8 Coordinate System12
G112#9 Coordinate System12
G113#10 Coordinate System12
G114#11 Coordinate System12
G115#12 Coordinate System12
G116#13 Coordinate System12
G117#14 Coordinate System12
G118#15 Coordinate System12
G119#16 Coordinate System12
G120#17 Coordinate System12
G121#18 Coordinate System12
G122#19 Coordinate System12
G123#20 Coordinate System12
G124#21 Coordinate System12
G125#22 Coordinate System12
G126#23 Coordinate System12
G127#24 Coordinate System12
G128#25 Coordinate System12
G129#26 Coordinate System12
G136Automatic Work Offset Center Measurementone-shot
G1413D+ Cutter Compensation07
G1435-Axis Tool Length Compensation +08
G150General Purpose Pocket Millingone-shot
G154Select Work Coordinates P1-P9912
G156Broaching Canned Cycle09
G167Modify Settingone-shot
G174CCW Non-Vertical Rigid Tapone-shot
G184CW Non-Vertical Rigid Tapone-shot
G187Setting the Smoothness Levelone-shot
G234Tool Center Point Control (TCPC)08
G253Orient Spindle Normal To Feature Coordinate Systemone-shot
G254Dynamic Work Offset (DWO)23
G255Cancel Dynamic Work Offset (DWO)23
G266Visible Axes Linear Rapid % Motionone-shot
G268Enable Feature Coordinate System14
G269Disable Feature Coordinate System14
M00Stop Program
M01Optional Program Stop
M02Program End
M03Spindle Forward
M04Spindle Reverse
M05Spindle Stop
M06Tool Change
M07Shower Coolant On
M08Coolant On
M09Coolant Off
M10Engage 4th Axis Brake
M11Release 4th Axis Brake
M12Engage 5th Axis Brake
M13Release 5th Axis Brake
M16Tool Change
M19Orient Spindle
M21Optional User M Function with M-Fin
M22Optional User M Function with M-Fin
M23Optional User M Function with M-Fin
M24Optional User M Function with M-Fin
M25Optional User M Function with M-Fin
M29Set Output Relay with M-Fin (Haas); rigid tapping on Fanuc
M30Program End and Reset
M31Chip Conveyor Forward
M33Chip Conveyor Stop
M34Coolant Increment
M35Coolant Decrement
M36Pallet Part Ready
M39Rotate Tool Turret
M41Low Gear Override
M42High Gear Override
M46Jump to Line
M48Validate Program for Loaded Pallet
M50Pallet Change Sequence
M51Set Optional User M-codes
M52Set Optional User M-codes
M53Set Optional User M-codes
M54Set Optional User M-codes
M55Set Optional User M-codes
M59Set Output Relay
M61Clear Optional User M-codes
M62Clear Optional User M-codes
M63Clear Optional User M-codes
M64Clear Optional User M-codes
M65Clear Optional User M-codes
M69Clear Output Relay
M70Workholding Clamp
M71Workholding Unclamp
M73Tool Air Blast On
M74Tool Air Blast Off
M75Set G35 or G136 Reference Point
M78Alarm if Skip Signal Found
M79Alarm if Skip Signal Not Found
M80Auto Door Open
M81Auto Door Close
M82Tool Unclamp
M83Auto Air Gun On
M84Auto Air Gun Off
M86Tool Clamp
M88Through-Spindle Coolant On
M89Through-Spindle Coolant Off
M90Fixture Clamp Input On
M91Fixture Clamp Input Off
M95Sleep Mode
M96Jump If No Input
M97Local Sub-Program Call
M98Sub-Program Call
M99Sub-Program Return or Loop
M104Probe Arm Extend
M105Probe Arm Retract
M109Interactive User Input
M116Vise Air Chips Blast On
M117Vise Air Chips Blast Off
M130Display Media
M131Cancel Display Media
M138Spindle Speed Variation On
M139Spindle Speed Variation Off
M158Mist Condenser On
M159Mist Condenser Off
M160Cancel Active PulseJet
M161PulseJet Continuous Mode
M162PulseJet Single Event Mode
M163PulseJet Modal Mode
M180Auto Window Open
M181Auto Window Close
M199Pallet / Part Load or Program End
M300APL/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.