M421 - Set Mesh Value

Description

This command is used to set a single Z value for a mesh point in the stored bed leveling data.

Allowed forms are M421 In Jn Zn, M421 Xn Yn Zn (MESH_BED_LEVELING only) or M421 C Zn (AUTO_BED_LEVELING_UBL only).

Parameters

M421 [C<bool>] [I<int>] [J<int>] [N<bool>] [Q<linear>] [X<linear>] [Y<linear>] [Z<linear>]
[C<bool>]

Set the mesh point closest to the current nozzle position (requires AUTO_BED_LEVELING_UBL)

[I<int>]

X index into the mesh array

[J<int>]

Y index into the mesh array

[N<bool>]

Set the mesh point to undefined (requires AUTO_BED_LEVELING_UBL)

[Q<linear>]

A value to add to the existing Z value

[X<linear>]

X position (which should be very close to a grid line) (requires MESH_BED_LEVELING)

[Y<linear>]

Y position (which should be very close to a grid line) (requires MESH_BED_LEVELING)

[Z<linear>]

The new Z value to set

Examples

Set the Z height in the middle of a 5x5 grid

M421 I2 J2 Z-0.05

Set the same Z height using XY

M421 X100 Y100 Z-0.05

Adjust the mesh point by -0.01

M421 I2 J2 Q-0.01