G-Code / M-Code list for 3D printers
G-Code Description
G0 Rapid Movement
G1 Movement with a feed rate
G2 Clockwise arc
G3 Anti-clockwise arc
G4 Dwell
G20 Set units to inch
G21 Set units to mm
G28 Move to home position
G90 Absolute positioning
G91 Incremental positioning
G92 Set Position to value
M-Codes Description
M0 Machine Stop
M17 Enable all stepper motors
M18 Disable all stepper motors
M20 List files at the root folder of the SD Card
M21 Initialise (mount) SD Card
M22 Release (unmount) SD Card
M23 Select File for Printing
M24 Start / Resume SD Card Print
M25 Pause SD Card Print
M26 Set SD Position in bytes
M27 Report SD Print status
M28 Write programm to SD Card
M29 Stop writing programm to SD Card
M40 Eject part
M41 Loop Program
M42 Stop if out of material, heated bed off
M43 Stop if out of material, heated bed on
M80 Turn on ATX Power
M81 Turn off ATX Power
M84 Stop idle hold
M92 Programm set S steps per unit
M101 Set extruder 1 to forward
M102 Set extruder 1 to reverse
M103 Turn all extruders off
M104 Set extruder temperature
M105 Get extruder Temperature
M106 Set Fan Speed to S and start
M107 Turn Fan off
M108 Set extruder speed
M109 Set extruder Temperature
M110 Set current line number
M111 Set Debug Level
M112 Emergency Stop
M113 Set Extruder PWM to S
M114 Get Current Position
M115 Get Firmeware Version and Capabilities
M116 Wait for ALL temperatures
M117 Get Zero Position in steps
M119 Get Endstop Status
M126 Open extruder valve
M127 Close extruder valve
M128 Set internal extruder pressure
M129 Turn off extruder pressure
M140 Set heated bed temperature
M141 Set chamber temperature
M142 Set holding pressure
M143 Set maximum hot-end temperture
M160 Set the number of materials the extruder can handle
M203 Set Z offset
M226 Pauses printing
M227 Enables Automatic Reverse and Prime
M228 Disables Automatic Reverse and Prime
M230 Enable / Disable wait for temp
M240 Start conveyor belt motor
M241 Stop conveyor belt motor
M245 Start cooler fan
M246 Stops cooler fan
M300 Beep with S Hz for P ms
https://gcodetutor.com