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.

`[Ynnn]`

where `nnn`

is a co-ordinate point on the Y axis.

`[Znnn]`

where `nnn`

is a co-ordinate point on the Z axis.

`[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.

Homes a specified axes or all axes.

**Parameters**

```
G28 [X] [Y] [Z]
```

**Examples**

`G28 X Y`

Homes X and Y axes.

`G28`

Home all axes.

Initiates auto bed leveling with the nozzle probe.
Requires `G28`

beforehand.
This will probe the bed with a multi-point grid, then move the active tool to the front-middle of the bed.

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 range from 0mm to 450mm. Be careful not to probe outside the bed area, you could damage your toolhead.

**Parameters**

```
G29 [D] [Snnn] [Fnnn] [Bnnn] [Lnnn] [Rnnn] [Tnnn] [Xnnn] [Ynnn]
```

`[D]`

Dry-run mode. Evaluates the bed topology and does not apply or alter the bed level data. Useful to check the topology after a first run of G29.

`[Snnn]`

Set `nnn`

as the XY travel speed between probe points in mm/min. Default to 30000.

`[Fnnn]`

Set `nnn`

as the front limit of the probing grid in mm. Defaults to 30.

`[Bnnn]`

Set `nnn`

as the back limit of the probing grid in mm. Defaults to 400.

`[Lnnn]`

Set `nnn`

as the left limit of the probing grid in mm. Defaults to 30.

`[Rnnn]`

Set `nnn`

as the right limit of the probing grid in mm. Defaults to 420.

`[Tnnn]`

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 10.

`[Ynnn]`

Set `nnn`

as the number of probe points in Y. Defaults to 10.

Sets G-code interpretation to absolute position mode where positions are given as absolute values in co-ordinate space.

**Parameters**

```
G90
```

Sets G-code interpretation to relative position mode where the next position is calculated relative to the last known position in co-ordinate space.

**Parameters**

```
G91
```

Manually sets the current position to the values specified by this command. Homing
(`G28`

) and probing (`G29`

) will invalidate any set values.

Only use this feature if you absolutely know what you are doing!

**Parameters**

```
G92 [Ennn] [Xnnn] [Ynnn] [Znnn]
```

`[Ennn]`

where `nnn`

is the extruder position, in mm

`[Xnnn]`

where `nnn`

is the X position, in mm

`[Ynnn]`

where `nnn`

is the Y position, in mm

`[Znnn]`

where `nnn`

is the Z position, in mm

**Examples**

`G92 X50 Y50 Z1`

sets the current known position to X=50, Y=50, Z=1 regardless of the
actual physical location of the axes.

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 and waits for user input, or pauses for a fixed period of time.

**Parameters**

```
M0 [Snnn]
```

`[Snnn]`

where `nnn`

denotes the pause time length in seconds.

**Examples**

`M0`

causes the printer to stop and wait until an `M108`

command is sent.

`M0 S5`

will cause the printer to stop for 5 seconds

Overrides G91 to set just the extruder into absolute co-ordinates mode. If used, ensure that it is disabled after use to avoid unintended retractions.

**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 co-ordinates mode.

**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 value of motor steps to be sent per mm of travel.

The steps-per-mm value for the movement axes (XYZ) are determined by the hardware and should not be modified. Only to be used for recalibrating the Extruder axes. Extruder flow adjustment is preferably done through the slicer settings.

**Parameters**

```
M92 [Ennn] [Tx] [Xnnn] [Ynnn] [Znnn]
```

`[Ennn]`

where `nnn`

is the steps-per-mm for the extruder axis. 640 by default on the M2.

`[Tx]`

where `x`

can be 0 or 1 to set independent steps-per-mm for each toolhead.

`[Xnnn]`

where `nnn`

is the steps-per-mm for the X axis. 40 by default on the M2.

`[Ynnn]`

where `nnn`

is the steps-per-mm for the Y axis. 40 by default on the M2.

`[Znnn]`

where `nnn`

is the steps-per-mm for the Z axis. 400 by default on the M2.

**Examples**

`M92 E645 T1`

sets the T1 extruder steps-per-mm to 645.

Sets the hot end/chamber target temperature and continues to the next command.

**Parameters**

```
M104 [Tx] [Snnn]
```

`[Tx]`

where `x`

is 0 (T0), 1 (T1), or 2 (Chamber Heater)

`[Snnn]`

where `nnn`

is the target temperature in °C.

**Examples**

`M104 T1 S250`

Set T1 to 250°C

`M104 T2 S120`

Set chamber temperature to 120°C

Report all temperatures.

**Parameters**

```
M105
```

**Examples**

`M105`

returns temperature values for all sensors (T0, T1, chamber, bed)

Turns on and set fan speeds via PWM.

**Parameters**

```
M106 [Px] [Snnn]
```

`[Px]`

where `x`

is an index of 0, 1, or 2. The M2 only has a chamber fan, accessible
as index 2.

`[Snnn]`

where `nnn`

is a value between 0-255 for PWM.

**Examples**

`M106 P2 S255`

turn chamber heater fan on to full power.

Turns fans off.

**Parameters**

```
M107 [Px]
```

`[Px]`

where `x`

is an index of 0, 1, or 2. The M2 only has a chamber fan, accessible
as index 2.

**Examples**

`M107 P2`

turns chamber heater fans off.

Continues after a pause (M0) command. Can also override the waiting period for M109 and M190.

**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]
```

`[Tx]`

where `x`

is 0 (T0), 1 (T1), or 2 (Chamber Heater)

`[Snnn]`

where `nnn`

is the target temperature in °C.

**Examples**

`M109 T1 S250`

Set T1 to 250°C

`M109 T2 S120`

Set chamber temperature to 120°C

Sets advanced debugging outputs.

**Parameters**

```
M111 [Sx]
```

`[Sx]`

where `x`

is a binary summation of the desired debug bits from the following chart:

Bits | Name | Description |
---|---|---|

1 | ECHO | Echo all parser commands |

2 | INFO | Extra info messages |

4 | ERRORS | Extra error messages |

8 | DRYRUN | Print without extrusion |

16 | COMM | Communications |

32 | LEVELING | Extra homing/probing info |

**Examples**

`M111 S35`

turns on ECHO, INFO, and LEVELING (1+2+32=35)

Virtual emergency stop. Immediately stops all movement, shuts down all heaters, stops further communication. Overrides any commands in the buffer, and will require a hard reboot once triggered.

**Parameters**

```
M112
```

**Examples**

`M112`

shuts down.

Gets the current position of the active toolhead.

**Parameters**

```
M114
```

**Examples**

`M114`

reports axes co-ordinates of the current active toolhead.

Outputs current firmware information.

**Parameters**

```
M115
```

**Examples**

`M115`

returns a string with information on current firmware.

Outputs current status of all endstops and probes - either open or triggered.

**Parameters**

```
M119
```

**Examples**

`M119`

returns set of strings reporting on Xmin, Xmax, Y1, Y2, Z1, Z2, Probe.

Sets the bed temperature and continues the next command in the buffer.

**Parameters**

```
M140 [Snnn]
```

`[Snnn]`

where `nnn`

is the desired target temperature in °C.

**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]
```

`[Snnn]`

where `nnn`

is the desired target temperature in °C.

**Examples**

`M190 S150`

sets the bed target to 150°C

Set global maximum acceleration rate for each movement axes in mm/s^2^

**Parameters**

```
M201 [Ennn] [Xnnn] [Ynnn] [Znnn]
```

`[Ennn]`

where `nnn`

is an integer value for acceleration in mm/s^2^. Default value is 10000.

`[Xnnn]`

where `nnn`

is an integer value for acceleration in mm/s^2^. Default value is 3000.

`[Ynnn]`

where `nnn`

is an integer value for acceleration in mm/s^2^. Default value is 3000.

`[Znnn]`

where `nnn`

is an integer value for acceleration in mm/s^2^. Default value is 100.

**Examples**

`M201 X6000 Y6000 Z120`

sets X/Y acceleration to 6000 mm/s^2^ and Z acceleration to 120 mm/s^2^.

Set maximum travel/feedrate for each movement axes in mm/s.

The default values reach the upper limit of step generation rates on the microcontroller. Setting to higher values WILL result in print failure.

**Parameters**

```
M203 [Ennn] [Xnnn] [Ynnn] [Znnn]
```

`[Ennn]`

where `nnn`

is an integer value for max velocity in mm/s. Default value is 30.

`[Xnnn]`

where `nnn`

is an integer value for max velocity in mm/s. Default value is 499.

`[Ynnn]`

where `nnn`

is an integer value for max velocity in mm/s. Default value is 499.

`[Znnn]`

where `nnn`

is an integer value for max velocity in mm/s. Default value is 10.

**Examples**

`M203 X350 Y350`

sets the maximum travel speed of X/Y axes to 350mm/s.

Sets acceleration values for different types of axes movements in mm/s^2^. Cannot exceed global maximums set by `M201`

.

**Parameters**

```
M204 [Pnnn] [Rnnn] [Tnnn]
```

`[Pnnn]`

where `nnn`

is an integer value for printing moves acceleration in mm/s^2^. Default value is 3000.

`[Rnnn]`

where `nnn`

is an integer value for retraction moves acceleration in mm/s^2^. Default value is 3000.

`[Tnnn]`

where `nnn`

is an integer value for travel moves acceleration in mm/s^2^. Default value is 3000.

**Examples**

`M204 P1500 T2500`

sets acceleration during printing moves to 1500 and during travel moves to 2500.

Sets other miscellaneous advanced variables.

**Parameters**

```
M205 [Bnnn] [Ennn] [Snnn] [Tnnn] [Xnnn] [Ynnn] [Znnn]
```

`[Bnnn]`

where `nnn`

is the minimum allowable print segment time in microseconds.

`[Ennn]`

where `nnn`

is the allowable instantaneous change in velocity for the Extruder in mm/s.

`[Snnn]`

where `nnn`

is the minimum allowable travel rate for printing moves in mm/min.

`[Tnnn]`

where `nnn`

is the minimum allowable travel rate for travel moves in mm/min.

`[Xnnn]`

where `nnn`

is the allowable instantaneous change in velocity for the X axis in mm/s.

`[Ynnn]`

where `nnn`

is the allowable instantaneous change in velocity for the Y axis in mm/s.

`[Znnn]`

where `nnn`

is the allowable instantaneous change in velocity for the Z axis in mm/s.

Applies an offset to the homed zero positions to effectively shift the build area in co-ordinate space.

**Parameters**

```
M206 [Xnnn] [Ynnn] [Znnn]
```

`[Xnnn]`

where `nnn`

is a value in mm.

`[Ynnn]`

where `nnn`

is a value in mm.

`[Znnn]`

where `nnn`

is a value in mm.

**Examples**

`M206 X10`

shifts the build area 10mm to the left.

`M206 Z0.1`

increases gap between nozzle and bed by 0.1mm.

Adjusts the dual extruder offset calibration.

**Parameters**

```
M218 [T1] [Xnnn] [Ynnn] [Znnn]
```

`[Xnnn]`

where `nnn`

is the X offset of T1 relative to T0 in mm. Default is 615.

`[Ynnn]`

where `nnn`

is the Y offset of T1 relative to T0 in mm. Default is 0.

`[Znnn]`

where `nnn`

is the Z offset of T1 relative to T0 in mm. Default is 0.

**Examples**

`M218 T1 X605 Y-0.2 Z0.1`

compensates for T1 that prints 10mm too far to the left, 0.2mm too close towards the front, and 0.1mm too far from the bed.

During a print, overrides the XYZ axes movement speed by a percentage value.

**Parameters**

```
M220 [Snnn]
```

`[Snnn]`

where `nnn`

is a percentage value between 0-200%

**Examples**

`M220 S125`

increases print speed by 25%.

During a print, overrides the extruder flow rate by a percentage value.

**Parameters**

```
M221 [Snnn]
```

`[Snnn]`

where `nnn`

is a percentage value between 0-200%

**Examples**

`M221 S95`

decreases material flow rate by 5%.

Allows for micro-adjustments of toolhead Z offset position. This should be used to calibrate the tool position after probing the bed and is equivalent to “touching off” in machining processes.

**Parameters**

```
M290 [Znnn]
```

`[Znnn]`

where `nnn`

is a value in mm to shift the toolhead location by in the Z axis.

**Examples**

`M290 Z-0.1`

decreases the nozzle-to-bed distance by 0.1mm.

Sets PID values for the hot ends and chamber heater. Obtain PID values from `M303`

and
set using this command. Save with `M500`

.

**Parameters**

```
M301 [Ex] [Pnnn] [Innn] [Dnnn]
```

`[Ex]`

where `x`

is an index of 0 (T0), 1 (T1), or 2 (chamber heater)

`[Pnnn]`

where `nnn`

is the proportional term of the PID.

`[Innn]`

where `nnn`

is the integral term of the PID.

`[Dnnn]`

where `nnn`

is the derivative term of the PID.

**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]
```

`[Cnn]`

where `nnn`

is an integer value denoting the number of heating/cooling cycles

`[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]`

optional - automatically applies the PID values to the heater indexed by `[Ex]`

. Save with `M500`

.

**Examples**

`M303 C5 E0 S300 U`

run PID tuning on T0 around 300°C cycling 5 times and apply PID values immediately.

The counterpart to `M301`

to set PID values for the bed determined by `M303`

.

**Parameters**

```
M304 [Pnnn] [Innn] [Dnnn]
```

`[Pnnn]`

where `nnn`

is the proportional term of the PID.

`[Innn]`

where `nnn`

is the integral term of the PID.

`[Dnnn]`

where `nnn`

is the derivative term of the PID.

**Examples**

`M304 P10 I0.1 D300`

sets bed PID to 10, 0.1, 300.

Saves variables to EEPROM (programmable read-only memory)

**Parameters**

```
M500
```

Restores variable values previously stored in EEPROM.

**Parameters**

```
M501
```

Clears EEPROM and restores default values from the firmware.

**Parameters**

```
M502
```

Outputs all variables and values stored in EEPROM.

**Parameters**

```
M503
```

Switches control mode for the independent dual extruders.

**Parameters**

```
M605 [Sx]
```

`[Sx]`

where `x`

is an index of 1 (dual extrusion mode) or 2 (duplication mode)

**Examples**

`M605 S2`

sets the printer to print in duplication mode.

Sets the offset between two endstops on the same movement axes to account for skew/squareness.

**Parameters**

```
M666 [Ynnn] [Znnn]
```

`[Ynnn]`

where `nnn`

is a value in mm representing the offset of the second Y endstop (right hand side) relative to to the first.

`[Znnn]`

where `nnn`

is a value in mm representing the offset of the second Z endstop (right hand side) relative to to the first.

**Examples**

`M666 Z0.1`

after the Z axis homes, the right hand side Z motor will lower by 0.1mm.