Performs a linear move between two points at a certain speed while extruding material.
Parameters
G1 [Xnnn] [Ynnn] [Znnn] [Ennn] [Fnnn]
[Xnnn]
where nnn
is a co-ordinate point on the X axis.
Limited to [-88, 450] for T0 and [0, 526 + M218 X offset] for T1.
[Ynnn]
where nnn
is a co-ordinate point on the Y axis.
Limited to [-42, 450].
[Znnn]
where nnn
is a co-ordinate point on the Z axis.
Limited to [0, 620].
[Ennn]
where nnn
is a value in mm determining how many mm of filament to extrude during the movement.
[Fnnn]
where nnn
is the speed of movement in mm/min.
Examples
G1 X50.2 Y10.7 E2.6 F1800
move to XY co-ordinate (50.2,10.7) in a straight line at 1800mm/min velocity while extruding 2.6mm of filament.
Makes a pause for a specified period in second or in millisecond before executing next G-code command.
Parameters
G4 [Snnn] [Pnnn]
[Snnn]
where nnn
is the number of seconds to wait.
[Pnnn]
where nnn
is the number of milliseconds to wait.
If P and S are specified then both values are summed. Limited to [0, 1800000] milliseconds.
Examples
G4 S60
waits for a minute before executing the next G-code command.
G4 P1000
waits for one second before executing the next G-code command.
G4 S60 P1000
waits for a minute and one second before executing the next G-code command.
Homes a specified axis or all axes. Specifying no parameter homes all axes.
Parameters
G28 [X] [Y] [Z]
Using G28 X Z
and G28 Y Z
are not supported as they can cause toolhead crash.
Examples
G28 X Y
Homes X and Y axes.
G28
Home all axes.
Initiates auto bed leveling with the active toolhead probe. Homes XY automatically before probing. Homes Z axis only if the printer has not been homed in Z. This will probe the bed with a multi-point grid, then move the active tool to the front-middle of the probing area.
After the probing process is complete, you should always verify that the nozzle is not making firm contact with the bed or depressing the probe mechanism.
Adjustments should be made using M290
.
All parameters are optional.
The probing grid limits the range from 0mm to 450mm but the bed can be smaller. Be careful not to probe outside the bed area, you could damage your toolhead.
Parameters
G29 [Snnn] [Fnnn] [Bnnn] [Lnnn] [Rnnn] [Tnnn] [Xnnn] [Ynnn]
[Snnn]
Set nnn
as the XY travel speed between probe points in mm/min.
Defaults to 30000.
Limited to minimum travel feedrate when jogging (M205 T) and to the maximum feedrate of the slowest axis between X and Y (M203).
[Fnnn]
Set nnn
as the front limit of the probing grid in mm.
Defaults to 35.
Limited to [0, 420]. Must be less than [Bnnn - 30].
[Bnnn]
Set nnn
as the back limit of the probing grid in mm.
Defaults to 415.
Limited to [30, 450]. Must be greater than [Fnnn + 30].
[Lnnn]
Set nnn
as the left limit of the probing grid in mm.
Defaults to 35.
Limited to [0, 420]. Must be less than [Rnnn - 30].
[Rnnn]
Set nnn
as the right limit of the probing grid in mm.
Defaults to 415.
Limited to [30, 450]. Must be greater than [Lnnn + 30].
[Tnnn]
Override toolhead temperature protection.
Set nnn
as the maximum toolhead temperature to probe in Celsius.
Defaults to 200.
[Xnnn]
Set nnn
as the number of probe points in X.
Defaults to 8.
Limited to [3, 10].
[Ynnn]
Set nnn
as the number of probe points in Y.
Defaults to 8.
Limited to [3, 10].
Sets G-code interpretation to absolute position mode where positions are given as absolute values in coordinate space.
Parameters
G90
Sets G-code interpretation to relative position mode where the next position is calculated relative to the last known position in coordinate space.
Parameters
G91
Manually sets the current position to the values specified by this command.
Parameters
G92 [Ennn]
[Ennn]
where nnn
is the extruder position, in mm.
Examples
G92 E0
sets the current known position to E=0 regardless of the actual physical location of the extruder position.
Changes the active toolhead. This will move the initial toolhead back to its parked position, and enable the new toolhead mesh and Z offset.
Parameters
[Tx]
[Tx]
where x
is an index between 0 or 1 corresponding to the desired tool.
Examples
T1
changes the active toolhead to T1 (right extruder).
If the active toolhead is already T1, does nothing.
Pauses the printer once all previously queued movement commands have completed.
Execution can be resumed with the M108
command.
Parameters
M0 [Snnn] [Pnnn]
[Snnn]
where nnn
denotes the pause time length in seconds. Limited to [0, 1800]. (0 waits forever).
[Pnnn]
where nnn
denotes the pause time length in milliseconds. Limited to [0, 1800000]. (0 waits forever).
If P and S are specified then both values are summed. Limited to [0, 1800000] milliseconds.
Examples
M0
causes the printer to pause and wait until an M108
command is sent to resume printing.
M0 S5
causes the printer to pause for 5 seconds and then resume printing.
Overrides G91
to set just the extruder into absolute coordinates mode.
G91
will also override M82
to set all motion, including extrusion moves, to relative.
Pairs with M83
to control the coordinate mode for extrusion moves without affecting X/Y/Z motion.
The system default for all motion is absolute coordinates mode.
Any movement from the UI (extrusion, jogging the tools, and/or moving the bed) will reset all motion to absolute coordinates by sending a G90
command.
Parameters
M82
Examples
G91 ;sets all axes to relative mode
M82 ;sets E to absolute mode, all other axes remain in relative mode
Overrides G90
to set just the extruder into relative coordinates mode.
G90
in turn overrides M83
to set all motion, including extrusion moves, back to absolute.
Pairs with M82
to control the coordinate mode for extrusion moves without affecting X/Y/Z motion.
The system default for all motion is absolute coordinates mode.
Any movement from the UI (extrusion, jogging the tools, and/or moving the bed) will reset all motion to absolute coordinates by sending a G90
command.
Parameters
M83
Examples
G90 ;sets all axes to absolute mode
M83 ;sets E to relative mode, all other axes remain in absolute mode
Sets the hot end/chamber target temperature and continues to the next command.
Parameters
M104 [Tx] [Snnn] [Rnnn]
[Tx]
where x
is 0 (T0), 1 (T1), or 2 (Chamber Heater)
[Snnn]
where nnn
is the target temperature in °C.
Waits only when heating.
No default.
Limited to [0, 500] for tool head and [0, 135] for chamber.
[Rnnn]
where nnn
is the target temperature in °C.
Waits when heating and cooling.
No default.
Limited to [0, 500] for tool head and [0, 135] for chamber.
Examples
M104 T1 S250
Set T1 to 250°C
M104 T2 S120
Set chamber temperature to 120°C
Continues after a pause (M0
) command.
Can also override the waiting period for M109
and M190
.
Does not affect the target temperature.
Aborts M303
.
Parameters
M108
Examples
M0 ;pauses print job
M108 ;resumes print job
Sets the hot end/chamber target temperature and waits until target temperature is reached before continuing to the next command.
Parameters
M109 [Tx] [Snnn] [Rnnn]
[Tx]
where x
is 0 (T0), 1 (T1), or 2 (Chamber Heater)
[Snnn]
where nnn
is the target temperature in °C.
Waits only when heating.
No default.
Limited to [0, 500] for toolhead and [0, 135] for chamber.
[Rnnn]
where nnn
is the target temperature in °C.
Waits when heating and cooling.
No default.
Limited to [0, 500] for toolhead and [0, 135] for chamber.
If the temperature does not decrease by 1.5°C within 60 seconds, the wait is cancelled to avoid an infinite wait time when cooling using Rnnn
.
Examples
M109 T1 S250
Set T1 to 250°C and completes its execution only when the temperature is at least at 250.
M109 T2 S120
Set chamber temperature to 120°C and completes its execution only when the temperature is at 120.
Reports the current position of the active toolhead.
Parameters
M114 [D]
[D]
Detailed mode. Shows detailed position information.
Examples
M114
reports axes co-ordinates of the current active toolhead.
Reports the current firmware information.
Parameters
M115
Examples
M115
returns a string with information on current firmware.
Reports the current status of all end stops, the probes, and the filament sensor - either open or triggered.
Parameters
M119
Examples
M119
returns set of strings reporting on x_min, x_max, y_min, y2_min, z_min, z2_min, z_probe, and filament.
Sets the bed temperature and continues the next command in the buffer.
Parameters
M140 [Snnn] [Rnnn]
[Snnn]
where nnn
is the desired target temperature in °C.
Waits only when heating.
No default.
Limited to [0, 220].
[Rnnn]
where nnn
is the desired target temperature in °C.
Waits when heating and cooling.
No default.
Limited to [0, 220].
Examples
M140 S150
sets the bed target to 150°C
Sets the bed temperature and waits for target to be reached before continuing to the next command in the buffer.
Parameters
M190 [Snnn] [Rnnn]
[Snnn]
where nnn
is the target temperature in °C.
Waits only when heating.
No default.
Limited to [0, 220].
[Rnnn]
where nnn
is the target temperature in °C.
Waits when heating and cooling.
No default.
Limited to [0, 220].
If the temperature does not decrease by 1.5°C within 60 seconds, the wait is cancelled to avoid an infinite wait time when cooling using Rnnn
.
Examples
M190 S150
sets the bed target to 150°C and completes its execution only when the temperature is at least at 150°C.
M190 R120
sets the chamber temperature to 120°C and completes its execution only when the temperature is at 120°C.
Adjusts the dual extruder offset calibration. If only T1 is provided echo current offset. Automatically homes the axis/axes when an offset is changed. Automatically saves offset.
Parameters
M218 T1 [Xnnn] [Ynnn]
[Xnnn]
where nnn
is the X offset in mm of T1 from its theoretical home position.
Default is 0.
Limited to [-5, 5].
[Ynnn]
where nnn
is the Y offset of T1 relative to T0 in mm.
Default is 0.
Limited to [-5, 5].
Examples
M218 T1 X-1.5 Y0.6
compensates for T1 that prints 1.5 mm too far to the right and 0.6 mm too close towards the front of the bed.
During a print, overrides the XYZ axes movement speed by a percentage value. This override stays active until the machine is fully restarted.
Parameters
M220 [Snnn]
[Snnn]
where nnn
is a percentage value applied on the feed rate that decreases print speed or increases print speed up to the maximum feed rate of the printer.
Default to 100.
Limited to [1, 2500].
Examples
M220 S125
increases print speed by 25%.
M220 S10
decreases print speed to 10%.
M220 S100
returns the print to its original speed.
During a print, overrides the extruder flowrate by a percentage value. This override stays active until the machine is fully restarted.
Parameters
M221 [Tx] [Snnn]
[Tx]
where x
is the optional extruder number.
Current extruder if omitted.
[Snnn]
where nnn
is a percentage value applied on the extruder flow rate that decreases extrusion speed or increases extrusion speed up to the maximum material flow rate of the printer.
Default to 100.
Limited to [1, 2500].
Examples
M221 S95
decreases material flow rate by 5%.
M221 S110
increases material flow rate by 10%.
M221 S100
returns the print to its original flow rate.
Allows for micro-adjustments of toolhead Z offset position. This should be used to calibrate the tool position after probing the bed.
Parameters
M290 [Tx] [Znnn] [Snnn]
[Tx]
Optional extruder number.
Active extruder if omitted.
[Znnn]
where nnn
is a value in mm to shift the toolhead location by in the Z axis.
If a value of 0 or no Z is provided then the current Z offset is output.
Default to 0.
Limited to [-0.5, 0.5].
Final Z offset is limited to [-30, 100].
[Snnn]
where nnn
is a value in mm to set the toolhead location in the Z axis.
Default to 3.
Limited to [-30, 100].
Examples
M290 Z-0.1
decreases the nozzle-to-bed distance by 0.1 mm.
Sets PID values for the hot ends and chamber heater.
Obtain PID values from M303
and set them using this command.
Save with M500
.
Parameters
M301 [Ex] [Pnnn] [Innn] [Dnnn]
[Ex]
where x
is an index of -1 (Bed), 0 (T0), 1 (T1), or 2 (chamber heater)
[Pnnn]
where nnn
is the proportional term of the PID.
Default to [10.0, 15.0, 15.0, 100.0].
[Innn]
where nnn
is the integral term of the PID.
Default to [0.02, 1.0, 1.0, 1.8].
[Dnnn]
where nnn
is the derivative term of the PID.
Default to [305.4, 50, 50, 300].
Examples
M301 E0 P15 I1 D50
sets the T0 PID to 15, 1, 50.
Automatically determines the appropriate PID values using the Ziegler-Nichols tuning method.
Optionally, automatically applies PID values without the use of M301
.
Parameters
M303 [Cnnn] [Ex] [Snnn] [U] [Rx]
[Cnnn]
where nnn
is an integer value denoting the number of heating/cooling cycles.
Default 5.
[Ex]
where x is an index of -1 (Bed), 0 (T0), 1 (T1), or 2 (Chamber)
[Snnn]
where nnn
is the set point around which to perform the tuning.
[U]
If 0 or not present, only perform test.
With a non-zero value applies the result to current settings.
[Rx]
Tuning method to use (default 1):
Examples
M303 C5 E0 S300 U
run Classic Ziegler-Nichols PID tuning on T0 around 300°C cycling 5 times and apply PID values immediately.
Prints leveling information including values from the last execution of G29
and M290
for both toolheads.
Parameters
M420 [V]
[V]
verbose - adds the grid of probed values for both toolheads to the terminal output.
Examples
< M420
> Bed Leveling On
> Z Offset T0 0.80
> Grid Start X : 35.00 Y : 35.00
> Grid Stop X : 415.00 Y : 415.00
> Grid Spacing X : 45.00 Y : 45.00
> Z Offset T1 1.30
> Grid Start X : 35.00 Y : 35.00
> Grid Stop X : 415.00 Y : 415.00
> Grid Spacing X : 45.00 Y : 45.00
> Fade Height Off
Saves configuration to EEPROM (programmable read-only memory).
Parameters
M500
Restores configuration previously stored in EEPROM. If you need reset them after you changed them temporarily.
Parameters
M501
Clears EEPROM and restores default values from the firmware, i.e., reverts to the default “factory settings”.
You still need to store them in EEPROM afterwards if you want to by entering M500
.
Parameters
M502
Reports the current configuration, i.e., not necessarily the one stored in EEPROM.
To report the configuration stored in EEPROM, make sure you issue M501
before.
Parameters
M503