This is a list of currently implemented G-Codes in Prusa firmware for i3 series printers. The description is only for Prusa Research-specific G-codes. The rest can be found on RepRap Wiki. With exception of M117, they are all shown in order of appearance in the code. That is why some G Codes aren't in numerical order.
These are used by internal functions to process certain actions in the right order. Some of these are also usable by the user. They are processed early as the commands are complex (strings). These are only available on the MK3(S) as these require TMC2130 drivers:
M0 [P<ms<] [S<sec>] [string] M1 [P<ms>] [S<sec>] [string]
P<ms>
- Expire time, in millisecondsS<sec>
- Expire time, in secondsstring
- Must for M1 and optional for M0 message to display on the LCDSet of internal PRUSA commands
PRUSA [ Ping | PRN | FAN | fn | thx | uvlo | MMURES | RESET | fv | M28 | SN | Fir | Rev | Lang | Lz | Beat | FR ]
Ping
PRN
- Prints revision of the printerFAN
- Prints fan detailsfn
- Prints farm no.thx
uvlo
MMURES
- Reset MMURESET
- (Careful!)fv
- ?M28
SN
Fir
- Prints firmware versionRev
- Prints filament size, elelectronics, nozzle typeLang
- Reset the languageLz
Beat
- Kick farm link timerFR
- Full factory resetnozzle set <diameter>
- set nozzle diameter (farm mode only), e.g. PRUSA nozzle set 0.4
nozzle D<diameter>
- check the nozzle diameter (farm mode only), works like M862.1 P, e.g. PRUSA nozzle D0.4
nozzle
- prints nozzle diameter (farm mode only), works like M862.1 P, e.g. PRUSA nozzle
In Prusa Firmware G0 and G1 are the same.
G0 [ X | Y | Z | E | F | S ] G1 [ X | Y | Z | E | F | S ]
X
- The position to move to on the X-axisY
- The position to move to on the Y-axisZ
- The position to move to on the Z-axisE
- The amount to extrude between the starting point and ending pointF
- The feedrate per minute of the move between the starting point and ending point (if supplied)These commands don't propperly work with MBL enabled. The compensation only happens at the end of the move, so avoid long arcs.
G2 [ X | Y | I | E | F ] (Clockwise Arc)
G3 [ X | Y | I | E | F ] (Counter-Clockwise Arc)
X
- The position to move to on the X-axisY
- The position to move to on the Y-axisI
- The point in X space from the current X position to maintain a constant distance fromJ
- The point in Y space from the current Y position to maintain a constant distance fromE
- The amount to extrude between the starting point and ending pointF
- The feedrate per minute of the move between the starting point and ending point (if supplied)Pause the machine for a period of time.
G4 [ P | S ]
P
- Time to wait, in millisecondsS
- Time to wait, in secondsRetracts filament according to settings of
M207
Unretracts/recovers filament according to settings of
M208
Units are in millimeters. Prusa doesn't support inches.
Using
G28
without any parameters will perform homing of all axes AND mesh bed leveling, while G28 W
will just home all axes (no mesh bed leveling).
G28 [ X | Y | Z | W | C ]
X
- Flag to go back to the X axis originY
- Flag to go back to the Y axis originZ
- Flag to go back to the Z axis originW
- Suppress mesh bed leveling if X
, Y
or Z
are not providedC
- Calibrate X and Y origin (home) - Only on MK3/sG28 issued without parameters homes the MMU as well (invalidates the homing flags of Selector and Idler and these will perform homing async once it is considered safe, i.e. no filament in the selector)
In Prusa i3 Firmware this G-code is deactivated by default, must be turned on in the source code.
See
G81
In Prusa Firmware this G-code is deactivated by default, must be turned on in the source code.
In Prusa Firmware this G-code is deactivated by default, must be turned on in the source code.
In Prusa Firmware this G-code is deactivated by default, must be turned on in the source code.
The sensor must be over the bed. The maximum travel distance before an error is triggered is 10mm.
Show/print PINDA temperature interpolating.
This G-code is used to calibrate the temperature drift of the PINDA (inductive Sensor).
The PINDAv2 sensor has a built-in thermistor which has the advantage that the calibration can be done once for all materials.
The Original i3 Prusa MK2/s uses PINDAv1 and this calibration improves the temperature drift, but not as good as the PINDAv2.
SuperPINDA sensor has internal temperature compensation and no thermistor output. There is no point of doing temperature calibration in such case. If PINDA_THERMISTOR and SUPERPINDA_SUPPORT is defined during compilation, calibration is skipped with serial message "No PINDA thermistor". This can be caused also if PINDA thermistor connection is broken or PINDA temperature is lower than PINDA_MINTEMP.
Default 3x3 grid can be changed on MK2.5/s and MK3/s to 7x7 grid.
G80 [ N | C | O | M | L | R | F | B | X | Y | W | H ]
Using the following parameters enables additional "manual" bed leveling correction. Valid values are -100 microns to 100 microns.
The following parameters are used to define the area used by the print:
Prints mesh bed leveling status and bed profile if activated.
WARNING! USE WITH CAUTION! If you'll try to probe where is no leveling pad, nasty things can happen! In Prusa Firmware this G-code is deactivated by default, must be turned on in the source code.
In Prusa Firmware this G-code is deactivated by default, must be turned on in the source code.
In Prusa Firmware this G-code is deactivated by default, must be turned on in the source code.
In Prusa Firmware this G-code is deactivated by default, must be turned on in the source code.
This G-code will be performed at the start of a calibration script. (Prusa3D specific)
This G-code will be performed at the end of a calibration script. (Prusa3D specific)
Currently has no effect.
All coordinates from now on are absolute relative to the origin of the machine. E axis is left intact.
All coordinates from now on are relative to the last position. E axis is left intact.
It is used for setting the current position of each axis. The parameters are always absolute to the origin. If a parameter is omitted, that axis will not be affected. If
X
, Y
, or Z
axis are specified, the move afterwards might stutter because of Mesh Bed Leveling. E
axis is not affected if the target position is 0 (G92 E0
). A G92 without coordinates will reset all axes to zero on some firmware. This is not the case for Prusa-Firmware!
G92 [ X | Y | Z | E ]
X
- new X axis positionY
- new Y axis positionZ
- new Z axis positionE
- new extruder positionEnable Prusa-specific Farm functions and g-code. See Internal Prusa commands.
Disables Prusa-specific Farm functions and g-code.
M20 [ L | T ]
T
- Report timestamps as well. The value is one uint32_t encoded as hex. Requires host software parsing (Cap:EXTENDED_M20).L
- Reports long filenames instead of just short filenames. Requires host software parsing (Cap:EXTENDED_M20).M23 [filename]
Set position in SD card file to index in bytes. This command is expected to be called after M23 and before M24. Otherwise effect of this command is undefined.
M26 [ S ]
S
- Index in bytesM27 [ P ]
P
- Show full SFN path instead of LFN only.Stops writing to the SD file signaling the end of the uploaded file. It is processed very early and it's not written to the card.
M30 [filename]
M928 [filename]
M42 [ P | S ]
P
- Pin number.S
- Pin value. If the pin is analog, values are from 0 to 255. If the pin is digital, values are from 0 to 1.M45 [ V ]
V
- Verbosity level 1, 10 and 20 (low, mid, high). Only when SUPPORT_VERBOSITY is defined. Optional.Z
- If it is provided, only Z calibration will run. Otherwise, full calibration is executed.This function assumes the bed has been homed. Specifically, that a G28 command has been issued prior to invoking the M48 Z-Probe repeatability measurement function. Any information generated by a prior G29 Bed leveling command will be lost and needs to be regenerated.
The number of samples will default to 10 if not specified. You can use upper or lower case letters for any of the options EXCEPT n. n must be in lower case because Marlin uses a capital N for its communication protocol and will get horribly confused if you send it a capital N.
Usage
M48 [ n | X | Y | V | L ]
n
- Number of samples. Valid values 4-50X
- X position for samplesY
- Y position for samplesV
- Verbose level. Valid values 1-4L
- Legs of movement prior to doing probe. Valid values 1-15Without any parameter get printer state.
0 = NotReady Used by PrusaConnect
1 = IsReady Used by PrusaConnect
2 = Idle
3 = SD printing finished
4 = Host printing finished
5 = SD printing
6 = Host printing
M72 [ S ]
M73 [ P | R | Q | S | C | D ]
P
- Percent in normal modeR
- Time remaining in normal modeQ
- Percent in silent modeS
- Time in silent modeC
- Time to change/pause/user interaction in normal modeD
- Time to change/pause/user interaction in silent modeStart the printer-host enable keep-alive timer. While the timer has not expired, the printer will enable host specific features.
M79 [ S ]
M104 [ S ]
S
- Target temperatureIt is processed much earlier as to bypass the cmdqueue.
M140 [ S ]
S
- Target temperaturePrints temperatures:
T:
- Hotend (actual / target)B:
- Bed (actual / target)Tx:
- x Tool (actual / target)@:
- Hotend powerB@:
- Bed powerP:
- PINDAv2 actual (only MK2.5/s and MK3/s)A:
- Ambient actual (only MK3/s)Example:
ok T:20.2 /0.0 B:19.1 /0.0 T0:20.2 /0.0 @:0 B@:0 P:19.8 A:26.4
M155 [ S ] [ C ]
S
- Set autoreporting interval in seconds. 0 to disable. Maximum: 255C
- Activate auto-report function (bit mask). Default is temperature.
bit 0 = Auto-report temperatures bit 1 = Auto-report fans bit 2 = Auto-report position bit 3 = free bit 4 = free bit 5 = free bit 6 = free bit 7 = free
M104 [ B | R | S ]
S
- Set extruder temperatureR
- Set extruder temperatureB
- Set max. extruder temperature, while S
is min. temperature. Not active in default, only if AUTOTEMP is defined in source code.Parameters S and R are treated identically. Command always waits for both cool down and heat up. If no parameters are supplied waits for previously set extruder temperature.
M190 [ R | S ]
S
- Set extruder temperature and wait for heatingR
- Set extruder temperature and wait for heating or coolingIf no parameter is supplied, waits for heating or cooling to previously set temperature.
M106 [ S ]
S
- Specifies the duty cycle of the print fan. Allowed values are 0-255. If it's omitted, a value of 255 is used.Only works if the firmware is compiled with PS_ON_PIN defined.
Only works if the firmware is compiled with PS_ON_PIN defined.
Makes the extruder interpret extrusion as absolute positions.
Makes the extruder interpret extrusion values as relative positions.
This command can be used to set the stepper inactivity timeout (
S
) or to disable steppers (X
,Y
,Z
,E
) This command can be used without any additional parameters. In that case all steppers are disabled.
The file completeness check uses this parameter to detect an incomplete file. It has to be present at the end of a file with no parameters.
M84 [ S | X | Y | Z | E ]
S
- SecondsX
- X axisY
- Y axisZ
- Z axisE
- ExruderEqual to M84 (compatibility)
M85 [ S ]
S
- specifies the time in seconds. If a value of 0 is specified, the timer is disabled.When safety timer expires, heatbed and nozzle target temperatures are set to zero.
M86 [ S ]
S
- specifies the time in seconds. If a value of 0 is specified, the timer is disabled.Allows programming of steps per unit (usually mm) for motor drives. These values are reset to firmware defaults on power on, unless saved to EEPROM if available (M500 in Marlin)
M92 [ X | Y | Z | E ]
X
- Steps per unit for the X driveY
- Steps per unit for the Y driveZ
- Steps per unit for the Z driveE
- Steps per unit for the extruder driveSets the line number in G-code
M110 [ N ]
N
- Line numberDuring some lengthy processes, such as G29, Marlin may appear to the host to have “gone away.” The “host keepalive” feature will send messages to the host when Marlin is busy or waiting for user response so the host won’t try to reconnect (or disconnect).
M113 [ S ]
S
- Seconds. Default is 2 seconds between "busy" messagesPrint the firmware info and capabilities Without any arguments, prints Prusa firmware version number, machine type, extruder count and UUID.
M115 U
Checks the firmware version provided. If the firmware version provided by the U code is higher than the currently running firmware, it will pause the print for 30s and ask the user to upgrade the firmware.
Examples:
M115
results:
FIRMWARE_NAME:Prusa-Firmware 3.8.1 based on Marlin FIRMWARE_URL:https://github.com/prusa3d/Prusa-Firmware PROTOCOL_VERSION:1.0 MACHINE_TYPE:Prusa i3 MK3S EXTRUDER_COUNT:1 UUID:00000000-0000-0000-0000-000000000000
M115 V
results:
3.8.1
M115 U3.8.2-RC1
results on LCD display for 30s or user interaction:
New firmware version available: 3.8.2-RC1 Please upgrade.
M115 [ V | U ]
This causes the given message to be shown in the status line on an attached LCD. It is processed early as to allow printing messages that contain G, M, N, or T.
M118 [ A1 | E1 ] [ String ]
Returns the current state of the configured X, Y, Z endstops. Takes into account any 'inverted endstop' settings, so one can confirm that the machine is interpreting the endstops correctly.
This command is used to report fan speeds and fan pwm values.
M123
Example:
E0:3240 RPM PRN1:4560 RPM E0@:255 PRN1@:255
In Prusa Firmware this G-code is deactivated by default, must be turned on in the source code by defining BLINKM and its dependencies.
M150 [ R | U | B ]
R
- Red color valueU
- Green color value. It is NOT G
!B
- Blue color valueM200 [ D | T ]
D
- Diameter in mmT
- Number of extruder (MMUs)For each axis individually.
For each axis individually.
M204 [ S | T ]
S
- normal movesT
- filament only movesM204 [ P | R | T ]
P
- printing movesR
- filament only movesT
- travel moves (as of now T is ignored)Set some advanced settings related to movement.
M205 [ S | T | B | X | Y | Z | E ]
S
- Minimum feedrate for print moves (unit/s)T
- Minimum feedrate for travel moves (units/s)B
- Minimum segment time (us)X
- Maximum X jerk (units/s)Y
- Maximum Y jerk (units/s)Z
- Maximum Z jerk (units/s)E
- Maximum E jerk (units/s)M206 [ X | Y | Z ]
X
- X axis offsetY
- Y axis offsetZ
- Z axis offsetM207 [ S | F | Z ]
S
- positive length to retract, in mmF
- retraction feedrate, in mm/minZ
- additional zlift/hopM208 [ S | F ]
S
- positive length surplus to the M207 Snnn, in mmF
- feedrate, in mm/secThis boolean value S 1=true or 0=false enables automatic retract detect if the slicer did not support G10/G11: every normal extrude-only move will be classified as retract depending on the direction.
M209 [ S ]
S
- 1=true or 0=falseM214 [P] [S] [N] [R] [F]
In Prusa Firmware this G-code is only active if
EXTRUDERS
is higher then 1 in the source code. On Original i3 Prusa MK2/s MK2.5/s MK3/s it is not active.
M218 [ X | Y ]
X
- X offsetY
- Y offsetM220 [ B | S | R ]
B
- Backup current speed factorS
- Speed factor override percentage (0..100 or higher)R
- Restore previous speed factorM221 [ S | T ]
S
- Extrude factor override percentage (0..100 or higher), default 100%T
- Extruder drive number (Prusa Firmware only), default 0 if not set.Wait until the specified pin reaches the state required
M226 [ P | S ]
P
- pin numberS
- pin stateIn Prusa Firmware this G-code is deactivated by default, must be turned on in the source code.
M280 [ P | S ]
P
- Servo index (id)S
- Target positionIn Prusa Firmware the defaults are
100Hz
and 1000ms
, so that M300
without parameters will beep for a second.
M300 [ S | P ]
S
- frequency in Hz. Not all firmware versions support this parameterP
- duration in millisecondsSets Proportional (P), Integral (I) and Derivative (D) values for hot end. See also PID Tuning.
M301 [ P | I | D | C ]
P
- proportional (Kp)I
- integral (Ki)D
- derivative (Kd)C
- heating power=Kc*(e_speed0)Sets Proportional (P), Integral (I) and Derivative (D) values for bed. See also PID Tuning.
M304 [ P | I | D ]
P
- proportional (Kp)I
- integral (Ki)D
- derivative (Kd)In Prusa Firmware this G-code is deactivated by default, must be turned on in the source code.
You need to (re)define and assign
CHDK
or PHOTOGRAPH_PIN
the correct pin number to be able to use the feature.
This tells the printer to allow movement of the extruder motor above a certain temperature, or if disabled, to allow extruder movement when the hotend is below a safe printing temperature.
M302 [ S ]
S
- Cold extrude minimum temperaturePID Tuning refers to a control algorithm used in some repraps to tune heating behavior for hot ends and heated beds. This command generates Proportional (Kp), Integral (Ki), and Derivative (Kd) values for the hotend or bed. Send the appropriate code and wait for the output to update the firmware values.
M303 [ E | S | C ]
E
- Extruder, default E0
. Use E-1
to calibrate the bed PIDS
- Target temperature, default 210°C
for hotend, 70 for bedC
- Cycles, default 5
M310 ; report values
M310 [ A ] [ F ] ; autotune
M310 [ S ] ; set 0=disable 1=enable
M310 [ I ] [ R ] ; set resistance at index
M310 [ P | U | V | C ] ; set power, temperature coefficient, intercept, capacitance
M310 [ D | L ] ; set simulation filter, lag
M310 [ B | E | W ] ; set beeper, warning and error threshold
M310 [ T ] ; set ambient temperature correction
Finishes all current moves and and thus clears the buffer. Equivalent to
G4
with no parameters.
Currently three different materials are needed (default, flex and PVA).
And storing this information for different load/unload profiles etc. in the future firmware does not have to wait for "ok" from MMU.
M403 [ E | F ]
E
- Extruder number. 0-indexed.F
- Filament typeTurn on Filament Sensor extrusion control.
M405
Turn off Filament Sensor extrusion control.
M406
Prints mesh bed leveling status and bed profile if activated.
Save current parameters to EEPROM.
Set the active parameters to those stored in the EEPROM. This is useful to revert parameters after experimenting with them.
This command resets all tunable parameters to their default values, as set in the firmware's configuration files. This doesn't reset any parameters stored in the EEPROM, so it must be followed by M500 to write the default settings.
This command asks the firmware to reply with the current print settings as set in memory. Settings will differ from EEPROM contents if changed since the last load / save. The reply output includes the G-Code commands to produce each setting. For example, Steps-Per-Unit values are displayed as an M92 command.
Resets the language to English. Only on Original Prusa i3 MK2.5/s and MK3/s with multiple languages.
In Prusa Firmware this G-code is deactivated by default, must be turned on in the source code. You must define
ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
.
M540 [ S ]
S
- disabled=0, enabled=1Sets the Z-probe Z offset. This offset is used to determine the actual Z position of the nozzle when using a probe to home Z with G28. This value may also be used by G81 (Prusa) / G29 (Marlin) to apply correction to the Z position. This value represents the distance from nozzle to the bed surface at the point where the probe is triggered. This value will be negative for typical switch probes, inductive probes, and setups where the nozzle makes a circuit with a raised metal contact. This setting will be greater than zero on machines where the nozzle itself is used as the probe, pressing down on the bed to press a switch. (This is a common setup on delta machines.)
M851 [ Z ]
Z
- Z offset probe to nozzle.Sets the printer IP address that is shown in the support menu. Designed to be used with the help of host software. If P is not specified nothing happens. If the structure of the IP address is invalid, 0.0.0.0 is assumed and nothing is shown on the screen in the Support menu.
M552 [ P<IP_address> ]
P
- The IP address in xxx.xxx.xxx.xxx format. Eg: P192.168.1.14Initiates Filament change, it is also used during Filament Runout Sensor process. If the
M600
is triggered under 25mm it will do a Z-lift of 25mm to prevent a filament blob.
M600 [ X | Y | Z | E | L | AUTO ]
X
- X position, default 211Y
- Y position, default 0Z
- relative lift Z, default 2.E
- initial retract, default -2L
- later retract distance for removal, default -80AUTO
- Automatically (only with MMU)Without any parameters it will park the extruder to default or last set position. The default pause position will be set during power up and a reset, the new pause positions aren't permanent.
M601 [ X | Y | Z | S ]
Without any parameters it will park the extruder to default or last set position. The default pause position will be set during power up and a reset, the new pause positions aren't permanent.
M125 [ X | Y | Z | S ]
Without any parameters it will park the extruder to default or last set position. The default pause position will be set during power up and a reset, the new pause positions aren't permanent.
M25 [ X | Y | Z | S ]
Get and Set Sheet parameters.
M850 [ S | Z | L | B | P | A ]
Z and L are optional, if one or both are missing the current values are reported instead.
If L and/or Z are specified, the sheet's values are updated.
Z range is validated
Sheet index is validated
Requesting info (no L or Z) on an uncalibrated sheet reports as such.
Pronterface capitalizes anything sent. To use lowercase in your sheet names you'll need to use a different terminal program.
Wait for PINDA thermistor to reach target temperature
M860 [ S ]
S
- Target temperatureSet compensation ustep value
S
for compensation table index I
.
M861 [ ? | ! | Z | S | I ]
?
- Print current EEPROM offset values!
- Set factory default valuesZ
- Set all values to 0 (effectively disabling PINDA temperature compensation)S
- MicrostepsI
- Table indexChecks the parameters of the printer and gcode and performs compatibility check
When run with P<> argument, the check is performed against the input value. When run with Q argument, the current value is shown.
M862.3 accepts text identifiers of printer types too. The syntax of M862.3 is (note the quotes around the type):
M862.3 P "MK3S"
Accepted printer type identifiers and their numeric counterparts:
Sets the advance extrusion factors for Linear Advance. If any of the R, W, H, or D parameters are set to zero the ratio will be computed dynamically during printing.
M900 [ K | R | W | H | D]
K
- Advance K factorR
- Set ratio directly (overrides WH/D)W
- WidthH
- HeightD
- Diameter Set ratio from WH/DSet digital trimpot motor current using axis codes (X, Y, Z, E, B, S). M907 has no effect when the experimental Extruder motor current scaling mode is active (that applies to farm printing as well)
M907 [ X | Y | Z | E | B | S ]
X
- X motor driverY
- Y motor driverZ
- Z motor driverE
- Extruder motor driverB
- Second Extruder motor driverS
- All motorsIn Prusa Firmware this G-code is deactivated by default, must be turned on in the source code. Not usable on Prusa printers.
M908 [ P | S ]
P
- channelS
- currentNot active in default, only if
TMC2130_SERVICE_CODES_M910_M918
is defined in source code.
Not active in default, only if
TMC2130_SERVICE_CODES_M910_M918
is defined in source code.
M911 [ X | Y | Z | E ]
X
- X stepper driver holding current valueY
- Y stepper driver holding current valueZ
- Z stepper driver holding current valueE
- Extruder stepper driver holding current valueNot active in default, only if
TMC2130_SERVICE_CODES_M910_M918
is defined in source code.
M912 [ X | Y | Z | E ]
X
- X stepper driver running current valueY
- Y stepper driver running current valueZ
- Z stepper driver running current valueE
- Extruder stepper driver running current valueNot active in default, only if
TMC2130_SERVICE_CODES_M910_M918
is defined in source code. Shows TMC2130 currents.
Updates EEPROM only if "P" is given, otherwise temporary (lasts until reset or motor idle timeout)
M914 [ P | R | Q ]
Updates EEPROM only if "P" is given, otherwise temporary (lasts until reset or motor idle timeout)
M915 [ P | R | Q]
Not active in default, only if
TMC2130_SERVICE_CODES_M910_M918
is defined in source code.
M916 [ X | Y | Z | E ]
X
- X stepper driver stallguard sensitivity threshold valueY
- Y stepper driver stallguard sensitivity threshold valueZ
- Z stepper driver stallguard sensitivity threshold valueE
- Extruder stepper driver stallguard sensitivity threshold valueNot active in default, only if
TMC2130_SERVICE_CODES_M910_M918
is defined in source code.
M917 [ X | Y | Z | E ]
X
- X stepper driver PWM amplitude offset valueY
- Y stepper driver PWM amplitude offset valueZ
- Z stepper driver PWM amplitude offset valueE
- Extruder stepper driver PWM amplitude offset valueNot active in default, only if
TMC2130_SERVICE_CODES_M910_M918
is defined in source code.
M918 [ X | Y | Z | E ]
X
- X stepper driver PWM amplitude gradient valueY
- Y stepper driver PWM amplitude gradient valueZ
- Z stepper driver PWM amplitude gradient valueE
- Extruder stepper driver PWM amplitude gradient valuePrinters with TMC2130 drivers have
X
, Y
, Z
and E
as options. The steps-per-unit value is updated accordingly. Not all resolutions are valid! Printers without TMC2130 drivers also have B
and S
options. In this case, the steps-per-unit value in not changed!
M350 [ X | Y | Z | E | B | S ]
X
- X new resolutionY
- Y new resolutionZ
- Z new resolutionE
- E new resolutionOnly valid for MK2.5(S) or printers without TMC2130 drivers
B
- Second extruder new resolutionS
- All axes new resolutionToggle MS1 MS2 pins directly.
M351 [B<0|1>] [E<0|1>] S<1|2> [X<0|1>] [Y<0|1>] [Z<0|1>]
X
- Update X axisY
- Update Y axisZ
- Update Z axisE
- Update E axisS
- which MSx pin to toggleB
- new pin valueLoad filament into the active extruder.
M701 [ P | T | L | Z ]
M702 [ U | Z ]
M704 [ P ]
M705 [ P ]
M706 [ P ]
M707 [ A ]
M707 A0X19 - Read a 8bit integer from register 0X19 (Idler_sg_thrs_R) and prints the result onto the serial line.
Does nothing if the A parameter is not present or if MMU is not enabled.
M708 [ A | X ]
M708 A0x19 X07 - Write to register 0x19 (Idler_sg_thrs_R) the value 07. Does nothing if A parameter is missing or if MMU is not enabled.
The MK3S cannot not power off the MMU, for that reason the functionality is not supported.
M709 [ S | X ]
S - En-/disable the MMU (0:off | 1:on)
M709 X0 - issue an X0 command via communication into the MMU (soft reset)
M709 X1 - toggle the MMU's reset pin (hardware reset)
M709 X42 - erase MMU EEPROM
M709 S1 - enable MMU
M709 S0 - disable MMU
M709 - Serial message if en- or disabled
End of M-Commands
T<extruder nr.> - Select extruder in case of multi extruder printer or MMU1. Select filament position 1-5 (T0-T4) in case of MMU2/S or MMU3.
T? - Printer asks user to select a filament position. Then loads the desired filament from the multiplexer (Y-splitter) into the nozzle.
T<extruder nr.> - Selects the filament position. A Gcode to load a filament to the nozzle must follow.
Tx - Printer asks user to select a filament position. Then loads the filament from the MMU unit into the extruder wheels only. G-code to heat up the nozzle follows.
Tc - Loads the filament tip from the extruder wheels into the nozzle.
D0 [ B ]
B
- BootloaderD1
This command can be used without any additional parameters. It will read the entire RAM.
D2 [ A | C | X ]
A
- Address (x0000-x1fff)C
- Count (1-8192)X
- DataThis command can be used without any additional parameters. It will read the entire eeprom.
D3 [ A | C | X ]
A
- Address (x0000-x0fff)C
- Count (1-4096)X
- Data (hex)To read the digital value of a pin you need only to define the pin number.
D4 [ P | F | V ]
P
- Pin (0-255)F
- Function in/out (0/1)V
- Value (0/1)This command can be used without any additional parameters. It will read the 1kb FLASH.
D5 [ A | C | X | E ]
A
- Address (x00000-x3ffff)C
- Count (1-8192)X
- Data (hex)E
- EraseReserved
Reserved
D8 [ ? | ! | P | Z ]
?
- Read PINDA temperature shift values!
- Reset PINDA temperature shift values to defaultP
- Pinda temperature [C]Z
- Z Offset [mm]D9 [ I | V ]
I
- ADC channel index
0
- Heater 0 temperature1
- Heater 1 temperature2
- Bed temperature3
- PINDA temperature4
- PWR voltage5
- Ambient temperature6
- BED voltageV
Value to be written as simulatedWrites the current time in the log file.
Generate a crash dump for later retrival.
D20 [E]
Output the complete crash dump (if present) to the serial.
D21
The starting address can vary between builds, but it's always at the beginning of the data section.
Clear an existing internal crash dump.
D22
On boards without offline dump support, request online dumps to the serial port on firmware faults. When online dumps are enabled, the FW will dump memory on the serial before resetting.
D23 [E] [R]
D70 [ S ]
This command will log data to SD card file "mesh.txt".
D80 [ E | F | G | H | I | J ]
E
- Dimension X (default 40)F
- Dimention Y (default 40)G
- Points X (default 40)H
- Points Y (default 40)I
- Offset X (default 74)J
- Offset Y (default 34)This command will log data to SD card file "wldsd.txt".
D81 [ E | F | G | H | I | J ]
E
- Dimension X (default 40)F
- Dimention Y (default 40)G
- Points X (default 40)H
- Points Y (default 40)I
- Offset X (default 74)J
- Offset Y (default 34)D2130 [ Axis | Command | Subcommand | Value ]
X
- X stepper driverY
- Y stepper driverZ
- Z stepper driverE
- Extruder stepper driver0
- Current off1
- Current on+
- Single step-
- Single step oposite directionNNN
- Value sereval steps?
- Read registermres
- Micro step resolution. More information in datasheet '5.5.2 CHOPCONF – Chopper Configuration'step
- Stepmscnt
- Microstep counter. More information in datasheet '5.5 Motor Driver Registers'mscuract
- Actual microstep current for motor. More information in datasheet '5.5 Motor Driver Registers'wave
- Microstep linearity compensation curve!
- Set registermres
- Micro step resolutionstep
- Stepwave
- Microstep linearity compensation curve0, 180 --> 250
- Off0.9 --> 1.25
- Valid values (recommended is 1.1)@
- Home calibrate axisExamples:
D2130E?wave
Print extruder microstep linearity compensation curve
D2130E!wave0
Disable extruder linearity compensation curve, (sine curve is used)
D2130E!wave220
(sin(x))^1.1 extruder microstep compensation curve used
Notes: For more information see https://www.trinamic.com/fileadmin/assets/Products/ICs_Documents/TMC2130_datasheet.pdf
D9125 [ ? | ! | R | X | Y | L ]
?
- Print values!
- Print valuesR
- Resolution. Not active in codeX
- X valuesY
- Y valuesL
- Activate filament sensor logIf you have a question about something that isn't covered here, check out our additional resources.
And if that doesn't do the trick, you can send an inquiry to [email protected] or through the button below.