Measures to adopt The resolution also calls upon the Member States to adopt the following measures: - ratification of the international instruments concerning the fight against all forms of racial discrimination; - development, in teaching systems, in vocational training establishments and instructor training establishments as well as in training programmes for public servants and business.
A list of g-codes and m-codes for milling in the Fanuc, LinuxCNC, GRBL, and Haas dialects. We give a quick definition of each g-code along with a link to tutorials and examples of how to use it. Click the g-code link (if any) to visit a tutorial from our popuplar Online Free G-Code Training that shows examples and teaches how to program the g-code.
Function | Notes | ||
G00 | Move in a straight line at rapids speed. | XYZ of endpoint | |
G01 | Motion | Move in a straight line at last speed commanded by a (F)eedrate | XYZ of endpoint |
G02 | Clockwise circular arc at (F)eedrate | XYZ of endpoint IJK relative to center R for radius | |
G03 | Motion | Counter-clockwise circular arc at (F)eedrate | XYZ of endpoint IJK relative to center R for radius |
G04 | Dwell: Stop for a specified time. | P for milliseconds X for seconds | |
G05 | Motion | FADAL Non-Modal Rapids | |
G09 | Exact stop check | ||
G10 | Compensation | Programmable parameter input | |
G15 | Turn Polar Coordinates OFF, return to Cartesian Coordinates | ||
G16 | Coordinate | Turn Polar Coordinates ON | |
G17 | Select X-Y plane | ||
G18 | Coordinate | Select X-Z plane | |
G19 | Select Y-Z plane | ||
G20 | Coordinate | Program coordinates are inches | |
G21 | Program coordinates are mm | ||
G27 | Motion | Reference point return check | |
G28 | Return to home position | ||
G29 | Motion | Return from the reference position | |
G30 | Return to the 2nd, 3rd, and 4th reference point | ||
G32 | Canned | Constant lead threading (like G01 synchronized with spindle) | |
G40 | Tool cutter compensation off (radius comp.) | ||
G41 | Compensation | Tool cutter compensation left (radius comp.) | |
G42 | Tool cutter compensation right (radius comp.) | ||
G43 | Compensation | Apply tool length compensation (plus) | |
G44 | Apply tool length compensation (minus) | ||
G49 | Compensation | Tool length compensation cancel | |
G50 | Reset all scale factors to 1.0 | ||
G51 | Compensation | Turn on scale factors | |
G52 | Local workshift for all coordinate systems: add XYZ offsets | ||
G53 | Machine coordinate system (cancel work offsets) | ||
G54 | Work coordinate system (1st Workpiece) | ||
G55 | Work coordinate system (2nd Workpiece) | ||
G56 | Work coordinate system (3rd Workpiece) | ||
G57 | Work coordinate system (4th Workpiece) | ||
G58 | Work coordinate system (5th Workpiece) | ||
G59 | Work coordinate system (6th Workpiece) | ||
G61 | Other | Exact stop check mode | |
G62 | Automatic corner override | ||
G63 | Other | Tapping mode | |
G64 | Best speed path | ||
G65 | Other | Custom macro simple call | |
G68 | Coordinate System Rotation | ||
G69 | Coordinate | Cancel Coordinate System Rotation | |
G73 | High speed drilling cycle (small retract) | ||
G74 | Canned | Left hand tapping cycle | |
G76 | Fine boring cyle | ||
G80 | Canned | Cancel canned cycle | |
G81 | Simple drilling cycle | ||
G82 | Canned | Drilling cycle with dwell (counterboring) | |
G83 | Peck drilling cycle (full retract) | ||
G84 | Canned | Tapping cycle | |
G85 | Boring canned cycle, no dwell, feed out | ||
G86 | Canned | Boring canned cycle, spindle stop, rapid out | |
G87 | Back boring canned cycle | ||
G88 | Canned | Boring canned cycle, spindle stop, manual out | |
G89 | Boring canned cycle, dwell, feed out | ||
G90 | Absolute programming of XYZ (type B and C systems) | ||
G90.1 | Absolute programming IJK (type B and C systems) | ||
G91 | Incremental programming of XYZ (type B and C systems) | ||
G91.1 | Incremental programming IJK (type B and C systems) | ||
G92 | Offset coordinate system and save parameters | ||
G92 (alternate) | Motion | Clamp of maximum spindle speed | S |
G92.1 | Cancel offset and zero parameters | ||
G92.2 | Cancel offset and retain parameters | ||
G92.3 | Offset coordinate system with saved parameters | ||
G94 | Motion | Units per minute feed mode. Units in inches or mm. | |
G95 | Units per revolution feed mode. Units in inches or mm. | ||
G96 | Motion | Constant surface speed | |
G97 | Cancel constant surface speed | ||
G98 | Canned | Return to initial Z plane after canned cycle | |
G99 | Return to initial R plane after canned cycle |
Function | Notes | |
M00 | Program Stop (non-optional) | |
M01 | M-Code | Optional Stop: Operator Selected to Enable |
M02 | End of Program | |
M03 | M-Code | Spindle ON (CW Rotation) |
M04 | Spindle ON (CCW Rotation) | |
M05 | M-Code | Spindle Stop |
M06 | Tool Change | |
M07 | M-Code | Mist Coolant ON |
M08 | Flood Coolant ON | |
M09 | M-Code | Coolant OFF |
M17 | FADAL subroutine return | |
M29 | M-Code | Rigid Tapping Mode on Fanuc Controls |
M30 | End of Program, Rewind and Reset Modes | |
M97 | M-Code | Haas-Style Subprogram Call |
M98 | Subprogram Call | |
M99 | M-Code | Return from Subprogram |
Bonus: Check Out our Other CNC Cookbooks for More In-Depth CNC Information!
If you’re a CNC Beginnner, check out our CNC Beginner’s Cookbook. It’ll get you up to speed with a solid CNC foundation fast.
We also have Cookbooks for Feeds and Speeds, G-Code Programming, CNC Manufacturing and Shop Management, DIY CNC, and don’t forget the CNC Cookbook Blog–with over 4 million visitors a year it’s the most popular CNC blog by far on the web.
More Resources
Get the 2019 Feeds & Speeds Master Class Lessons sent to your inbox every Friday. In addition, we'll send you our blog posts via email newsletter. Includes Basic, Intermediate, and Advanced Lessons.
Document your code
Every project on GitHub comes with a version-controlled wiki to give your documentation the high level of care it deserves. It’s easy to create well-maintained, Markdown or rich text documentation alongside your code.
Sign up for free See pricing for teams and enterprises The arduino file seems to be the most up-to-date list of these codes https://github.com/repetier/Repetier-Firmware/blob/master/src/ArduinoAVR/Repetier/Repetier.inoThis page needs to be updated or removed.
Implemented Codes
- G0 -> G1
- G1 - Coordinated Movement X Y Z E
- G4 - Dwell S or P
- G20 - Units for G0/G1 are inches.
- G21 - Units for G0/G1 are mm.
- G28 - Home all axis or named axis.
- G90 - Use absolute coordinates
- G91 - Use relative coordinates
- G92 - Set current position to cordinates given
RepRap M Codes
- M104 S[targetTemperature] - Set extruder target temp
- M105 - Read current temp
- M106 S[Speed 0..255] - Fan on
- M107 - Fan off
- M109 - Wait for extruder current temp to reach target temp.
- M112 - Emergency stop.
- M114 - Display current position
- M119 - Show end stop stats
Custom M Codes
- M80 - Turn on Power Supply
- M20 - List SD card
- M21 - Init SD card
- M22 - Release SD card
- M23 - Select SD file (M23 filename.g)
- M24 - Start/resume SD print
- M25 - Pause SD print
- M26 - Set SD position in bytes (M26 S12345)
- M27 - Report SD print status
- M28 - Start SD write (M28 filename.g)
- M29 - Stop SD write
- M80 - Turn on power supply
- M81 - Turn off power supply
- M82 - Set E codes absolute (default)
- M83 - Set E codes relative while in Absolute Coordinates (G90) mode
- M84 - Disable steppers until next move,or use S to specify an inactivity timeout, after which the steppers will be disabled. S0 to disable the timeout.
- M85 - Set inactivity shutdown timer with parameter S. To disable set zero (default)
- M92 - Set axis_steps_per_unit - same syntax as G92
- M115 - Capabilities string
- M140 S[TargetTemperature] - Set bed target temp
- M190 - Wait for bed current temp to reach target temp.
- M201 - Set max acceleration in units/s^2 for print moves (M201 X1000 Y1000)
- M202 - Set max acceleration in units/s^2 for travel moves (M202 X1000 Y1000)
- M203 - Set temperture monitor to Sx
- M204 X[Kp] Y[Ki] Z[Kd] - Set PID parameter. Values are 100*real value!
- M205 - Output EEPROM settings
- M206 - Set EEPROM value
- M231 S[OPS_MODE] X[Min_Distance] Y[Retract] Z[Backslash] F[ReatrctMove] - Set OPS parameter
- M232 - Read and reset max. advance values