Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • I - resistance index position (0-15)
  • R - resistance value at index (K/W; requires I)
  • P - power (W)
  • C - capacitance (J/K)
  • S - set 0=disable 1=enable
  • B - beep and warn when reaching warning threshold 0=disable 1=enable (default: 1)
  • E - error threshold (K/s; default in variant)
  • W - warning threshold (K/s; default in variant)
  • T - ambient temperature correction (K; default in variant)
  • A - autotune C+R values
  • F - force model self-test state (0=off 1=on) during autotune using current values

M330

Sets up metrics handler

Usage

M330 [ H ]                                   ; Set up metrics

Parameters

  • H - Prefered metrics handler; Supported handlers are: SYSLOG, UART, SENSOR_INFO_SCREEN

M331

Set specific metric to be reported. If set up of disabled metric is attempted, printer will report error.

Usage

M331 [ M ]                                   ; Set up named metric to track

Parameters

  • M - Name of metric to be tracked, list of which can be acquired via M333

M332

Disable specific metric

Usage

M332 [ M ]                                  ; Disable named metric

Parameters

  • M - Name of metric to disable, list of which can be acquired via M333

M333

Lists metrics and whether they are enable or disabled for current handler

Usage

M333                                        ; List metrics

M400 - Wait for all moves to finish M400: Wait for current moves to finish

...

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.

Usage

M403 [ E | F ]

Parameters

  • E - Extruder number. 0-indexed.
  • F - Filament type

...

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.

Usage

M540 [ S ]

Parameters

  • S - disabled=0, enabled=1

M851 - Set Z-Probe Offset M851: Set Z-Probe Offset"

Sets 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.)

Usage

M851 [ Z ]

Parameters

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

Usage

M552 [ P<IP_address> ]

Parameters

  • P - The IP address in xxx.xxx.xxx.xxx format. Eg: P192.168.1.14

...

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

Usage

M600 [ X | Y | Z | E | L | AUTO ]

...

Wait for PINDA thermistor to reach target temperature

Usage

M860 [ S ]

Parameters

  • S - Target temperature

M861 - Set/Get PINDA temperature compensation offsets M861 Set Probe Thermal Compensation

Set compensation ustep value S for compensation table index I.

Usage

M861 [ ? | ! | Z | S | I ]

Parameters

  • ? - Print current EEPROM offset values
  • ! - Set factory default values
  • Z - Set all values to 0 (effectively disabling PINDA temperature compensation)
  • S - Microsteps
  • I - Table index

...

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.

Usage

M900 [ K | R | W | H | D]

Parameters

  • K - Advance K factor
  • R - Set ratio directly (overrides WH/D)
  • W - Width
  • H - Height
  • D - Diameter Set ratio from WH/D

...

Set 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)

Usage

M907 [ X | Y | Z | E | B | S ]

Parameters

  • X - X motor driver
  • Y - Y motor driver
  • Z - Z motor driver
  • E - Extruder motor driver
  • B - Second Extruder motor driver
  • S - All motors

...

In Prusa Firmware this G-code is deactivated by default, must be turned on in the source code. Not usable on Prusa printers.

Usage

M908 [ P | S ]

Parameters

  • P - channel
  • S - current

M910 - TMC2130 init M910: TMC2130 init

...

Not active in default, only if TMC2130_SERVICE_CODES_M910_M918 is defined in source code.

Usage

M911 [ X | Y | Z | E ]

Parameters

  • X - X stepper driver holding current value
  • Y - Y stepper driver holding current value
  • Z - Z stepper driver holding current value
  • E - Extruder stepper driver holding current value

...

Not active in default, only if TMC2130_SERVICE_CODES_M910_M918 is defined in source code.

Usage

M912 [ X | Y | Z | E ]

Parameters

  • X - X stepper driver running current value
  • Y - Y stepper driver running current value
  • Z - Z stepper driver running current value
  • E - Extruder stepper driver running current value

...

Not active in default, only if TMC2130_SERVICE_CODES_M910_M918 is defined in source code.

Usage

M916 [ X | Y | Z | E ]

Parameters

  • X - X stepper driver stallguard sensitivity threshold value
  • Y - Y stepper driver stallguard sensitivity threshold value
  • Z - Z stepper driver stallguard sensitivity threshold value
  • E - Extruder stepper driver stallguard sensitivity threshold value

...

Not active in default, only if TMC2130_SERVICE_CODES_M910_M918 is defined in source code.

Usage

M917 [ X | Y | Z | E ]

Parameters

  • X - X stepper driver PWM amplitude offset value
  • Y - Y stepper driver PWM amplitude offset value
  • Z - Z stepper driver PWM amplitude offset value
  • E - Extruder stepper driver PWM amplitude offset value

...

Not active in default, only if TMC2130_SERVICE_CODES_M910_M918 is defined in source code.

Usage

M918 [ X | Y | Z | E ]

Parameters

  • X - X stepper driver PWM amplitude gradient value
  • Y - Y stepper driver PWM amplitude gradient value
  • Z - Z stepper driver PWM amplitude gradient value
  • E - Extruder stepper driver PWM amplitude gradient value

...

Printers 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!

Usage

M350 [ X | Y | Z | E | B | S ]

Parameters

  • X - X new resolution
  • Y - Y new resolution
  • Z - Z new resolution
  • E - E new resolution

...

Toggle MS1 MS2 pins directly.

Usage

M351 [B<0|1>] [E<0|1>] S<1|2> [X<0|1>] [Y<0|1>] [Z<0|1>]

Parameters

  • X - Update X axis
  • Y - Update Y axis
  • Z - Update Z axis
  • E - Update E axis
  • S - which MSx pin to toggle
  • B - new pin value

...

Load filament into the active extruder.

Usage

M701 [ P | T | L | Z ]

Parameters

  • P - n index of MMU slot (zero based, so 0-4 like T0 and T4)
  • T - Alias of P. Used for compatibility with Marlin
  • L - Extrude distance for insertion (positive value)(manual reload)
  • Z - Move the Z axis by this distance. Default value MIN_Z_FOR_LOAD

M702 - Unload filament G32: Undock Z Probe sled

Usage

M702 [ U | Z ]

Parameters

  • U - Retract distance for removal (manual reload). Default value is 0.
  • Z - Move the Z axis by this distance. Default value MIN_Z_FOR_UNLOAD.

M704 - Load to MMU M704: Load to MMU

Usage

M704 [ P ]

Parameters

  • P - n index of slot (zero based, so 0-4 like T0 and T4)

M705 - Eject filament M705: Eject filament

Usage

M705 [ P ]

Parameters

  • P - n index of slot (zero based, so 0-4 like T0 and T4)

M706 - Cut filament M706: Cut filament

Usage

M706 [ P ]

Parameters

  • P - n index of slot (zero based, so 0-4 like T0 and T4)

M707 - Read from MMU register M707: Read from MMU register

Usage

M707 [ A ]

Parameters

  • A - Address of register in hexidecimal.

...

M708 - Write to MMU register M707: Write to MMU register

Usage

M708 [ A | X ]

Parameters

  • A - Address of register in hexidecimal.
  • X - Data to write (16-bit integer). Default value 0.

...

The MK3S cannot not power off the MMU, for that reason the functionality is not supported.

Usage

M709 [ X ]

Parameters

  • X - Reset MMU (0:soft reset | 1:hardware reset)

...

D-1 - Endless Loop D-1: Endless Loop

D0 - Reset D0: Reset

Usage

D0 [ B ]

Parameters

  • B - Bootloader

D1 - Clear EEPROM and RESET D1: Clear EEPROM and RESET

...

This command can be used without any additional parameters. It will read the entire RAM.

Usage

D2 [ A | C | X ]

Parameters

  • A - Address (x0000-x1fff)
  • C - Count (1-8192)
  • X - Data

...

This command can be used without any additional parameters. It will read the entire eeprom.

Usage

D3 [ A | C | X ]

Parameters

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

Usage

D4 [ P | F | V ]

Parameters

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

Usage

D5 [ A | C | X | E ]

Parameters

  • A - Address (x00000-x3ffff)
  • C - Count (1-8192)
  • X - Data (hex)
  • E - Erase

...

D8 - Read/Write PINDA D8: Read/Write PINDA

Usage

D8 [ ? | ! | P | Z ]

Parameters

  • ? - Read PINDA temperature shift values
  • ! - Reset PINDA temperature shift values to default
  • P - Pinda temperature [C]
  • Z - Z Offset [mm]

D9 - Read ADC D9: Read ADC

Usage

D9 [ I | V ]

Parameters

  • I - ADC channel index
    • 0 - Heater 0 temperature
    • 1 - Heater 1 temperature
    • 2 - Bed temperature
    • 3 - PINDA temperature
    • 4 - PWR voltage
    • 5 - Ambient temperature
    • 6 - BED voltage
  • V Value to be written as simulated

...

Generate a crash dump for later retrival.

Usage

D20 [E]

Parameters

  • E - Perform an emergency crash dump (resets the printer).

    Notes

...

Output the complete crash dump (if present) to the serial.

Usage

D21

Notes

  • The starting address can vary between builds, but it's always at the beginning of the data section.

...

Clear an existing internal crash dump.

Usage

D22

D23 - Request emergency dump on serial D23: Request emergency dump on serial

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.

Usage

D23 [E] [R]

Parameters

  • E - Perform an emergency crash dump (resets the printer).
  • R - Disable online dumps.

D70 - Enable low-level temperature model logging for offline simulation

Usage

D70 [ S ]

Parameters

  • S - Enable 0-1 (default 0)

...

This command will log data to SD card file "mesh.txt".

Usage

D80 [ E | F | G | H | I | J ]

Parameters

  • 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".

Usage

D81 [ E | F | G | H | I | J ]

Parameters

  • 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)

...

Todo:Please review by owner of the code. RepRap Wiki Gcode needs to be updated after review of owner as well.

Usage

D2130 [ Axis | Command | Subcommand | Value ]

Parameters

  • Axis
    • X - X stepper driver
    • Y - Y stepper driver
    • Z - Z stepper driver
    • E - Extruder stepper driver
  • Commands
    • 0 - Current off
    • 1 - Current on
    • + - Single step
    • - - Single step oposite direction
    • NNN - Value sereval steps
    • ? - Read register
    • Subcommands for read register
      • mres - Micro step resolution. More information in datasheet '5.5.2 CHOPCONF – Chopper Configuration'
      • step - Step
      • mscnt - 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 register
    • Subcommands for set register
      • mres - Micro step resolution
      • step - Step
      • wave - Microstep linearity compensation curve
      • Values for set register
        • 0, 180 --> 250 - Off
        • 0.9 --> 1.25 - Valid values (recommended is 1.1)
    • @ - Home calibrate axis

...

D9125 - PAT9125 filament sensor D9125: PAT9125 filament sensor

Usage

D9125 [ ? | ! | R | X | Y | L ]

Parameters

  • ? - Print values
  • ! - Print values
  • R - Resolution. Not active in code
  • X - X values
  • Y - Y values
  • L - Activate filament sensor log

...