[last updated: 2022-01-16]
3d printing home page
gCode Details
gCode Home page
-----
------------------------------------------------------------------
G-codes:
- G0 & G1 ; Move
see: go to: gCode Details page ...
- G2 & G3 ; Arc move.
- G4 ; Pause the machine for a period of time.
Parameters: Pnnn ; time to wait, in milliseconds
Snnn ; time to wait, in seconds
Example: G4 S2 ; waits for 2 seconds.
- G10 ; Retract
- G11 ; Retract recover
- G21 ; set units to mm
- G28 ; Home axis
G28 W ; Home x, y and z axes.
G28 ; Home x, y and z axes and then runs mesh bed leveling (G80)
- G30 ; Single Z Probe
- G76 ; Induction probe temperature calibration.
Induction probe (PINDA) detection distance increases with temperature. This leads to need of adjusting live adjust Z values often, especially when printing with different materials. Main contributor to PINDA temperature shift is heat received from heatbed.
G76 runs temperature calibration, which consist of preheating PINDA probe near the heatbed surface for different heatbed temperatures and measuring how its detection distance changes. Measured detection distance shifts are saved to EEPROM.
When new print is started and using temperature calibration is turned on in Calibration -> Temp. calibration menu, PINDA probe is preheated for two minutes near the heatbed again to achieve defined temperature. Then mesh bed leveling is run and Z axis shift counted from temperature calibration data is applied. Then live adjust Z is applied.
- G80 ; Mesh bed leveling
- G81 ; Print mesh bed leveling status and bed profile if activated
- G86 Prusa3D specific
Disable babystep correction after home. This G-code will be performed at the start of a calibration script.
- G87 ; Prusa3D specific
Enable babystep correction after home. This G-code will be performed at the end of a calibration script.
- G90 ; All coordinates from now on are absolute relative to the origin of the machine.
- G91 ; All coordinates from now on are relative to the last position.
- G92 ; Set position to coordinates given without physical movement.
- G98 ; Activate farm mode
- G99 ; Deactivate farm mode
------------------------------------------------------------------
M-codes:
- M0 & M1 ... Wait for user to press the knob. This command can be used without additional parameters or with:
Pnnn Time to wait, in milliseconds Snnn Time to wait, in seconds
Examples: M1 Waits until user presses the knob. "Wait for user..." message is shown as LCD status message.
M1 S2 Waits until user presses the knob. Max. waiting time is 2s. "Wait for user..." message is shown as LCD status message.
M1 Hello World Waits until user presses the knob. "Hello World" message is shown as LCD status message.
- M17 ... Power all stepper motors.
- M20 ... List SD card
- M21 ... Init SD card
- M22 ... Release SD card
- M23 ... Select file
- M24 ... Start SD print
- M25 ... Pause SD print
- M26 ... Set SD index
- M27 ... Get SD status
- M28 ... Begin write to SD card.
M28 filename.gco File specified by filename.gco is created (or overwritten if it exists) on the SD card and all subsequent commands sent to the machine are written to that file. Writing to file is terminated with M29.
- M29 ... Stop SD write.
- M30 ... Delete SD file
- M31 ... Show time from print start.
- M32 ... Select file and start SD print
- M42 ... Change pin status via gcode
- M44 ... Reset XYZ calibration
- M45 ... XYZ/Z calibration
M45 Runs XYZ calibration.
- M45 Z ... Runs Z calibration.
- M47 Show end stops dialog on display. Wait for user to press the knob.
- M73 ; Set current print progress percentage for LCD
M73 P50 ; set the current build progress percentage so the machine can display this on LCD
M73 ; by itself to get a report of the current print progress.
??? M73 Q0 ; sets the percentage of the total time printed in the stealth mode
??? M73 R0 ; sets the total time remaining in normal mode
??? M73 S0 ; sets the total time remaining in stealth mode
- M82 Set E coordinates absolute.
- M83 Set Extruder coordinates relative.
- M84 Turn off steppers.
- M85 ... Set inactivity shutdown timer.
- M92 ... Set axis steps per unit.
- M104 ... Sets target temperature for nozzle. Example: M104 S210 Sets nozzle target temperature to 210 C.
- M105 ... Returns current temperatures.
- M106 ... Turn on printer fan.
- M107 ... Turn off printer fan.
- M109 ... Set target temperature for nozzle and wait for nozzle to reach target.
- M110 ... Reset line position.
- M112 ... Emergency stop
- M113 ... Set or get host keepalive interval.
- M114 ... Current position on serial.
- M115 ... M115 U3.3.1 ; tell printer latest fw version
- M117 ... Prints custom status message on LCD.
- M119 Report current endstop status on serial
- M120 Disable endstops
- M121 ... Enable endstops
- M140 Set heatbed target temperature. Example: M140 S60 Sets heatbed target temperature to 60 C.
- M190 Set heatbed target temperature and wait for heatbed to reach target.
- M201 ,,, Set max acceleration
M201 X1000 Y1000 Z1000 E5000
- M203 Set max. feedrate in mm/sec.
eg: M203 X200 Y200 Z12 E120
- M204 Sets acceleration.
S - normal moves
T - filament only moves
R - retract moves
Example: M204 S1000
- M205 ... sets jerk limits
M205 X8.00 Y8.00 Z0.40 E1.50
M205 S0 T0 ; sets the minimum extruding and travel feed rate, mm/sec
- M207
- M208
- M209
- M220 Set speed factor override percentage.
M220 Sxxx -sets speed factor
M220 Sxxx B -backups current speed factor and then sets new speed factor
M220 B -just backups current speed factor
M220 R -restore saved speed factor
- M221 ... Set extrude factor override percentage.
- M226 ; "open valve"
from Marlin: // M226 P
S
- Wait until the specified pin reaches the state required
- M227 ; "close valve"
- M300 ; Activate beeper
- M301 ... Set PID values
- M302 ... Allow cold extrude or set cold extrude limit.
- M303 ... PID autotune
- M304 ... Set heatbed PID values
- M350
- M351
- M400 ... Finish all moves
- M500 ... Store settings to eeprom
- M501 ... Read settings from eeprom
- M502 ... Revert to default settings
- M503 ... Print settings currently in memory
- M509 ... Force language selection. This command will invoke language selection menu after reseting/rebooting the printer.
- M600 ... Pause for filament change.
- M601 ... Long pause
Suitable for pausing sd card print. Long pause print procedure contains seting nozzle target temperature to zero, moving extruder to pause print position and turning off print fan. When nozzle cools down nozzle fan is also turned off and printer remains silent during pause. Heatbed remains heated during pause print to maintain good attachement between printed object and heatbed. In pause position heatbed with printed object is moved foward to make printed object accessible.
- M602 ... Resume SD card print from long pause. Previous print settings (fan speed and feemultiply, nozzle target temperature) are restored. Time when the printer is paused is not counted to print time statistics.
- M701 ... Load filament
When using multi material printer M701 loads filament in currently active extruder.
- M702 ... Unload filament
Multi material usage:
With multi material firmware, it is possible to unload all filaments, all filaments which were used during previous print or just current filament.
M702 Unloads all filaments
M702 U Unloads all filaments used during print
M702 C Unloads filament in currently active extruder
- M907 ... Set stepper motor current
------------------------------------------------------------------
T-Codes:
Select tool. This is used with multi material printer for switching between extruders.
- T0 First extruder (counted from the left) will be used.
- T? Envokes menu on LCD display for selecting which extruder to use.
------------------------------------------------------------------
Unknown misc:
PRUSA-codes
PRUSA Ping
Works only in farm mode. This code serves for checking that communication is not broken.
PRUSA PRN
PRUSA Fn
PRUSA fv
eof