Gcode

Unified Gcode reference for all shop robots.

success.gif — Supported fully
warning.gif — Partially supported, or has issues
exclamation.gif — Software support present, hardware not equipped.
no.gif — Not supported
Gcode Description Makerbot (FiveD) Mendel (Sprinter) Big Robot (Mach3) Blue Mill PCB mill
G0 X# Y# Z# Move to specified coordinate at machine maximum feedrate success.gif success.gif success.gif success.gif ?
G1 F# X# Y# Z# E# Move to specified coordinate at feedrate (F#)
If F not specified, uses most recently specified feedrate
If F greater than G0 feedrate, uses G0 feedrate
E# is extruder feed, which is an axis on RepRap-based printers
success.gif success.gif success.gif success.gif success.gif
G2 I# J# Clockwise arc with center at (I, J) no.gif no.gif success.gif warning.gif ?
G3 I# J# Counterclockwise arc with center at (I, J) no.gif no.gif success.gif warning.gif ?
G4 P# Delay P seconds success.gif success.gif success.gif warning.gif ?
G10 L1 P# X# Y# Z# Set tool offset for tool (P#) to position (X#, Y#, Z#) no.gif no.gif success.gif no.gif ?
G10 L2 P# X# Y# Z# Set tool offset for fixture (P#) to position (X#, Y#, Z#) no.gif no.gif success.gif no.gif ?
G15 Enter polar coordinate mode, origin = current point no.gif no.gif success.gif no.gif ?
G16 Exit polar coordinate mode no.gif no.gif success.gif no.gif ?
G17 Select X-Y plane for G2 and G3 no.gif no.gif success.gif no.gif ?
G18 Select X-Z plane for G2 and G3 no.gif no.gif success.gif no.gif ?
G19 Select Y-Z plane for G2 and G3 no.gif no.gif success.gif no.gif ?
G20 Set units to inches
Does not move machine
success.gif success.gif success.gif success.gif ?
G21 Set units to millimetres
Does not move machine
success.gif success.gif success.gif success.gif ?
G28 Go to home position at max speed no.gif no.gif success.gif success.gif ?
G28.1 Find home using endstops no.gif no.gif success.gif no.gif ?
G30 X# Y# Z# Go to home position at max speed via intermediate position no.gif no.gif success.gif success.gif ?
G50 Reset axis scale factors no.gif no.gif success.gif no.gif ?
G51 X# Y# Z# Set axis scale multipliers no.gif no.gif success.gif no.gif ?
G81 X# Y# Z# Drill hole: Go to position (X#, Y#) at G0 speed
Then move straight down from the current Z location down to (Z#) at G0 speed (which seems wrong)
Then move back up to the starting height at G0 speed
no.gif no.gif success.gif success.gif ?
G90 Set machine to absolute positioning mode
Does not move machine
success.gif success.gif success.gif success.gif ?
G91 Set machine to incremental (relative) positioning mode
Does not move machine
success.gif success.gif success.gif success.gif ?
G92 Set the current position as home location
Does not move machine
success.gif success.gif no.gif success.gif ?
G93 Enable inverse time feed mode
In this mode, F# values mean “complete the move in 1/(F#) minutes”
no.gif no.gif success.gif no.gif ?
G94 Enable units-per-minute feed mode
This mode is the opposite of G93, so F# values mean “complete the move at a feedrate of (F#) units per minute”
? ? success.gif no.gif ?
M0 Stop machine success.gif success.gif no.gif no.gif ?
M3 Turn toolhead motor on (clockwise) no.gif no.gif success.gif success.gif ?
M4 Turn toolhead motor on (counterclockwise) no.gif no.gif success.gif success.gif ?
M5 Turn toolhead motor off no.gif no.gif success.gif success.gif ?
M20 List SD card contents success.gif success.gif no.gif no.gif no.gif
M21 Mount SD card success.gif success.gif no.gif no.gif no.gif
M22 Unmount SD card success.gif success.gif no.gif no.gif no.gif
M23 filename.gco Select SD card file (8.3 name) success.gif success.gif no.gif no.gif no.gif
M24 Start / resume SD card print success.gif success.gif no.gif no.gif no.gif
M25 Pause SD card print success.gif success.gif no.gif no.gif no.gif
M26 S# Set SD position to (S#) bytes in file success.gif success.gif no.gif no.gif no.gif
M27 Report SD card print status success.gif success.gif no.gif no.gif no.gif
M28 filename.gco Begin write to SD card
File is created or overwritten, subsequent commands sent write to the file
success.gif success.gif no.gif no.gif no.gif
M29 filename.gco End writing, close file success.gif success.gif no.gif no.gif no.gif
M82 ??? no.gif no.gif no.gif warning.gif ?
M84 Stop idle hold (turn off motor drivers) success.gif success.gif no.gif no.gif no.gif
M92 X# Y# Z# Set steps-per-unit for the specified axis no.gif success.gif no.gif no.gif no.gif
M100 X# Y# Z# Set drive current for X, Y, Z motors, in amperes no.gif no.gif ? exclamation.gif ?
M101 X# Y# Z# Set steps-per-inch for each axis no.gif no.gif ? success.gif ?
M102 X# Y# Z# Set maximum feedrate for each axis no.gif no.gif ? success.gif ?
M103 S# Set microstepping for all axes (S = {1, 2, 4, 16}) no.gif no.gif ? exclamation.gif ?
M104 X# Y# Z# Set normal (0) or reverse (1) direction for each axis no.gif no.gif ? success.gif ?
M104 S# Set extruder temperature to (S#)
Does not wait for extruder to heat before continuing
success.gif success.gif no.gif no.gif no.gif
M105 Request current extruder temperature success.gif success.gif no.gif no.gif no.gif
M105 S# Set PWM S#/255 for spindle motor (S = [0, 255]) no.gif no.gif ? warning.gif ?
M106 S# Turn fan on with PWM value (S#)/255 success.gif success.gif no.gif no.gif no.gif
M107 Turn fan off success.gif success.gif no.gif no.gif no.gif
M108 S# Set extruder speed to PWM value (S#)/255 exclamation.gif exclamation.gif no.gif no.gif no.gif
M108 R# Set extruder speed to RPM value (R#) success.gif success.gif no.gif no.gif no.gif
M109 S# Set extruder temperature to (S#)
Waits for extruder to heat to the specified temperature before continuing to the next command
success.gif success.gif no.gif no.gif no.gif
N# M110 Set current line number to (N#) success.gif success.gif no.gif no.gif no.gif
M111 S# Set debug verbosity to (S#) success.gif success.gif no.gif no.gif no.gif
M112 Software scram success.gif success.gif no.gif no.gif no.gif
M113 S# Set extruder PWM to value (S#) (S = [0.0, 1.0]) success.gif success.gif no.gif no.gif no.gif
M114 Report current position success.gif success.gif no.gif no.gif no.gif
M115 Get firmware version success.gif success.gif no.gif no.gif no.gif
M116 Wait for all temperatures to stabilize success.gif success.gif no.gif no.gif no.gif
M117 Get last zero position success.gif success.gif no.gif no.gif no.gif
M118 P# Negotiate features (for future use) success.gif success.gif no.gif no.gif no.gif
M119 Get endstop status success.gif success.gif no.gif no.gif no.gif
M126 Open extruder valve (if equipped) success.gif success.gif no.gif no.gif no.gif
M127 Close extruder valve (if equipped) success.gif success.gif no.gif no.gif no.gif
M140 Set bed temperature
Does not wait for bed to heat before continuing
success.gif success.gif no.gif no.gif no.gif
M141 Set chamber temperature
Does not wait for chamber to heat before continuing
exclamation.gif exclamation.gif no.gif no.gif no.gif
M142 S# Set holding pressure to (S#) bar exclamation.gif exclamation.gif no.gif no.gif no.gif
M143 S# Set maximum safe hot-end temperature to (S#)
Robot should scram if this temperature is ever exceeded
success.gif success.gif no.gif no.gif no.gif
M200 Save configuration to non-volatile memory no.gif no.gif no.gif success.gif ?
M201 Output configuration to the console no.gif no.gif no.gif success.gif ?
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License