thinkyhead sustmi shitcreek

M420 - Bed Leveling State

planner Get and/or set bed leveling state and fade height AUTO_BED_LEVELING_(3POINT|LINEAR|BILINEAR|UBL)|MESH_BED_LEVELING

Description

Get and/or set the enabled state of bed leveling compensation, plus Z fade height.

This command has been extended with L to load a mesh for Unified Bed Leveling.

Notes

The “current position” may change in response to M420 Sn.

G28 disables bed leveling. Follow with M420 S to turn leveling on, or use RESTORE_LEVELING_AFTER_G28 to automatically keep leveling on after G28.

Usage

M420 [C<bool>] [L<int>] [S<bool>] [T<0|1|4>] [V<bool>] [Z<linear>]

Parameters

[C<bool>]

Center the mesh on the mean of the lowest and highest points

[L<int>]

Load mesh from EEPROM index (Requires AUTO_BED_LEVELING_UBL and EEPROM_SETTINGS)

[S<bool>]

Enabled state

[T<0|1|4>]

Format to print the mesh data

  • T0:

    Human readable

  • T1:

    CSV

  • T4:

    Compact

[V<bool>]

Verbose: Print the stored mesh / matrix data

[Z<linear>]

Leveling fade Z height (Requires ENABLE_LEVELING_FADE_HEIGHT)

  • While printing, gradually reduce leveling correction until the specified height is reached.
    At which point the movement will be level to the machine’s XY plane as if bed leveling was disabled.
  • When Z is not provided (eg M420) or is set to zero (eg M420 Z0), the leveling correction is fully applied at all heights.