Mythos M420 - ThomasToka/MarlinFirmware GitHub Wiki

I want to share some technical details about the M420 thing.

Basics:

  • G28 disables automatic bedleveling (abl and ubl) by design
  • our firmware is compiled with "#define RESTORE_LEVELING_AFTER_G28"

This is how it is described in the firmware:

/**
 * Normally G28 leaves leveling disabled on completion. Enable one of
 * these options to restore the prior leveling state or to always enable
 * leveling immediately after G28.
 */
#define RESTORE_LEVELING_AFTER_G28
//#define ENABLE_LEVELING_AFTER_G28

We use #define RESTORE_LEVELING_AFTER_G28 .

  • this means that the state of autoleveling (enabled or disabled) is restored automatically after a G28 run to the state it was before the G28 run.
  • this means that if your autoleveling was enabled before issuing G28 it will be enabled after the G28 run.
  • this means that if your autoleveling was disabled before issuing G28 it will be disabled after the G28 run.

Now what does this mean for these 3 questions:

a) Why dont we use "#define ENABLE_LEVELING_AFTER_G28" to enable leveling always after the G28 run?

--> Answer: Its important to only enable bedleveling for printing and not for calibration tasks. So if we would always enable leveling certain calibrations would not be possible.

b) Do i have to put "M420 S1 Z10" (enable leveling with Z10 as the fade height in mm) or "M420 S1" (enabling leveling with the default fade height of 5mm) into the printers/slicers start gcode?

--> Answer: To ensure that your leveling is enabled you should add one of those two "M420 S1 Z10" or "M420 S1".

c) Do i have to add "G29" to my start gcode right after G28 and not M420 S1?

--> Answer: This your decision. If you add G29 a autoleveling run will be initiated before each print and the leveling will be enabled with this also. Every bed needs about 10minutes to expand fully. And that is how you should make your mesh. Doing a G29 right after heatup is not the best method to generate a mesh. So i cant recommend the G29 method. My preferred method is to use M420 like described in b) and only do the mesh on calibration with a well heated bed and hotend and enable it while printing.

d) What happens if i dont add M420 S1 with or without Z$number to my start gcode:

--> Answer: If your leveling was on before initiating a print with a G28 in the gcode leveling will also be activated like you would have set "M420 S1" in your machine start gcode.

Conculsion: People simply dont know what they are talking about. Trust a dev only!