Professional Documents
Culture Documents
Custom M Codes
M3
Spindle on, Clockwise or Laser on during G1 moves.
M4
Spindle on, Counterclockwise.
M5
Spindle off, Laser off.
M20
List SD card
M21
Init SD card
M22
Release SD card
M23
Select SD file (M23 filename.g)
M24
Start/resume SD print
M25
Pause SD print
M26
Set SD position in bytes (M26 S12345)
M27
Report SD print status
M28
Start SD write (M28 filename.g)
M29
Stop SD write
M30 <filename>
Delete file on sd card
M32 <dirname>
Create subdirectory
M42 P<pin number> S<value 0..255>
Change output of pin P to S. Does not work on most important pins.
M80
Turn on power supply
M81
Turn off power supply
M82
Set E codes absolute (default)
M83
Set E codes relative while in Absolute Coordinates (G90) mode
M84
Disable steppers until next move, or use S<seconds> to specify an inactivity timeout, after
which the steppers will be disabled. S0 to disable the timeout.
M85
Set inactivity shutdown timer with parameter S<seconds>. To disable set zero (default)
M92
Set axisStepsPerMM - same syntax as G92
M99 S<delayInSec> X0 Y0 Z0
Disable motors for S seconds (default 10) for given axis.
M104 S<temp> T<extruder> P1 F1
Set temperature without wait. P1 = wait for moves to finish, F1 = beep when temp.
reached first time
M105 X0
Get temperatures. If X0 is added, the raw analog values are also written.
M112
Emergency kill
M115
Capabilities string
M116
Wait for all temperatures in a +/- 1 degree range
M117 <message>
Write message in status row on lcd
M119
Report endstop status
M140 S<temp> F1
Set bed target temp, F1 makes a beep when temperature is reached the first time
M163 S<extruderNum> P<weight>
Set weight for this mixing extruder drive
M164 S<virtNum> P<0 = dont store eeprom,1 = store to eeprom>
Store weights as virtual extruder S
M190
Wait for bed current temp to reach target temp.
M200 T<extruder> D<diameter>
Use volumetric extrusion. Set D0 or omit D to disable volumetric extr. Omit T for current
extruder.
M201
Set max acceleration in units/s^2 for print moves (M201 X1000 Y1000)
M202
Set max acceleration in units/s^2 for travel moves (M202 X1000 Y1000)
M203
Set temperture monitor to Sx
M204
Set PID parameter X => Kp Y => Ki Z => Kd S<extruder> Default is current extruder.
NUM_EXTRUDER=Heated bed
M205
Output EEPROM settings
M206
Set EEPROM value
M207 X<XY jerk> Z<Z Jerk> E<ExtruderJerk>
Changes current jerk values, but do not store them in eeprom.
M209 S<0/1>
Enable/disable autoretraction
M220 S<Feedrate multiplier in percent>
Increase/decrease given feedrate
M221 S<Extrusion flow multiplier in percent>
Increase/decrease given flow rate
M226 P<pin> S<state 0/1>
Wait for pin getting state S. Add X0 to init as input without pullup and X1 for input with
pullup.
M231 S<OPS_MODE> X<Min_Distance> Y<Retract> Z<Backlash> F<ReatrctMove>
Set OPS parameter
M232
Read and reset max. advance values
M233 X<AdvanceK> Y<AdvanceL>
Set temporary advance K-value to X and linear term advanceL to Y
M251
Measure Z steps from homing stop (Delta printers). S0 - Reset, S1 - Print, S2 - Store to Z
length (also EEPROM if enabled)
M280 S<mode>
Set ditto printing mode. mode: 0 = off, 1 = 1 extra extruder, 2 = 2 extra extruder, 3 = 3
extra extruders
M281
Test if watchdog is running and working.
M300 S<Frequency> P<DurationMillis>
Play frequency
M302 S<0 or 1>
Allow cold extrusion. Without S parameter it will allow. S1 will disallow.
M303 P<extruder/bed> S<printTemerature> X0
Autodetect pid values. Use P<NUM_EXTRUDER> for heated bed. X0 saves result in
EEPROM.
M320
Activate autolevel
M321
Deactivate autolevel
M322
Reset autolevel matrix
M323 S0/S1
Enable disable distortion correction P0 = not permanent, P1 = permanent = default
M340 P<servoId> S<pulseInUS>
servoID = 0..3, Servos are controlled by a pulse with normally between 500 and 2500 with
1500ms in center position. 0 turns servo off.
M350 S<mstepsAll> X<mstepsX> Y<mstepsY> Z<mstepsZ> E<mstepsE0> P<mstespE1>
Set microstepping on RAMBO board
M355 S<0/1>
Turn case light on/off, no S = report status
M360
Show configuration
M400
Wait until move buffers empty.
M401
Store x, y and z position.
M402
Go to stored position. If X, Y or Z is specified, only these coordinates are used. F changes
feedrate fo rthat move.
M408 S<0-5>
Return status as json string (requires matching feature) for PanelDue.
M450
Reports printer mode
M451
Set printer mode to FFF
M452
Set printer mode to laser
M453
Set printer mode to CNC
M460 X Y
SSet temperature range for thermistor controlled fan.
M500
Store settings to EEPROM
M501
Load settings from EEPROM
M502
Reset settings to the one in configuration.h. Does not store values in EEPROM!
M513
Clear all jam marker.
M600
Change filament
M601 S<1/0>
Pause extruders. Paused extrudes disable heaters and motor. Unpausing reheats
extruder to old temp.
M602 S<1/0> P<1/0>
Debug jam control (S) Disable jam control (P). If enabled it will log signal changes and will
not trigger jam errors!
M603
Simulate a jam
M604 X Y Z T
Set jam detection values on a per extruder basis. If not set it uses defaults from
Configuration.h
M908 P<address> S<value>
Set stepper current for digipot (RAMBO board)
M999
Continue from fatal error. M999 S1 will create a fatal error for testing.