-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Supported G codes
Move
Arc move.
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.
Retract
Retract recover
Home axis
Examples:
G28 W
Home x, y and z axes.
G28
Home x, y and z axes and then runs mesh bed leveling (G80).
Single Z Probe
Induction probe temperature calibration.
Induction probe (PINDA) detection distance increases with temperature. This leads to need of adjusting live adjust Z values often, expecially 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.
Mesh bed leveling
Print mesh bed leveling status and bed profile if activated
Prusa3D specific
Disable babystep correction after home. This G-code will be performed at the start of a calibration script.
Prusa3D specific
Enable babystep correction after home. This G-code will be performed at the end of a calibration script.
All coordinates from now on are absolute relative to the origin of the machine.
All coordinates from now on are relative to the last position.
Set position to coordinates given without physical movement.
Activate farm mode
Deactivate farm mode
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.
Power all stepper motors.
List SD card
Init SD card
Release SD card
Select file
Start SD print
Pause SD print
Set SD index
Get SD status
Begin write to SD card.
Example:
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.
Stop SD write.
Delete SD file
Show time from print start.
Select file and start SD print
Change pin status via gcode
Reset XYZ calibration
XYZ/Z calibration
Example:
M45
Runs XYZ calibration.
M45 Z
Runs Z calibration.
Show end stops dialog on display. Wait for user to press the knob.
Set E coordinates absolute.
Set E coordinates relative.
Turn off steppers.
Set inactivity shutdown timer.
Set axis steps per unit.
Sets target temperature for nozzle.
Example:
M104 S210
Sets nozzle target temperature to 210 C.
Returns current temperatures.
Turn on printer fan.
Turn off printer fan.
Set target temperature for nozzle and wait for nozzle to reach target.
Reset line position.
Emergency stop
Set or get host keepalive interval.
Current position on serial.
Prints custom status message on LCD.
Example:
M117 Hello World
Report current endstop status on serial
Disable endstops
Enable endstops
Set heatbed target temperature.
Example:
M140 S60
Sets heatbed target temperature to 60 C.
Set heatbed target temperature and wait for heatbed to reach target.
Set max. feedrate in mm/sec.
Sets acceleration.
S - normal moves
T - filament only moves
Example:
M204 S1000
Set speed factor override percentage.
Exmaple:
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
Set extrude factor override percentage.
Activate beeper
Set PID values
Allow cold extrude or set cold extrude limit.
PID autotune
Set hetbed PID values
Finish all moves
Store settings to eeprom
Read settings from eeprom
Revert to default settings
Print settings currently in memory
Force language selection. This command will invoke language selection menu after reseting/rebooting the printer.
Pause for filament change.
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.
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.
Load filament
When using multi material printer M701 loads filament in currently active extruder.
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.
Example:
M702
Unloads all filaments
M702 U
Unloads all filaments used during print
M702 C
Unloads filament in currently active extruder
Set stepper motor current
Select tool. This is used with multi material printer for switching between extruders.
Example:
T0
First extruder (counted from the left) will be used.
T?
Envokes menu on LCD display for selecting which extruder to use.
Works only in farm mode. This code serves for checking that communication is not broken.