Z setting

found how to get nozzle to bed marlin m851
thinkyhead

M851 - XYZ Probe Offset

none Set the Z probe XYZ offset from nozzle HAS_BED_PROBE

Description

Set the XYZ distance from the nozzle to the probe trigger-point.

The easiest way to get the Z offset value is to:

  • Home the Z axis.
  • Raise Z and deploy the probe.
  • Move Z down slowly until the probe triggers.
  • Take the current Z value and negate it. (5.2 => -5.2)
  • Set with M851 Z-5.2 and #define Z_PROBE_OFFSET_FROM_EXTRUDER -5.2.

For X and Y you have to measure the distance.

Notes

The default (factory) values are set by

  • (version 1.x)
    • X_PROBE_OFFSET_FROM_EXTRUDER
    • Y_PROBE_OFFSET_FROM_EXTRUDER
    • Z_PROBE_OFFSET_FROM_EXTRUDER
  • (version 2.x)
    • NOZZLE_TO_PROBE_OFFSET

and are integer values.

Positions: X offset: -left +right [of the nozzle] Y offset: -front +behind [the nozzle] Z offset: -below +above [the nozzle]

   +-- BACK ---+
   |           |
 L |    (+) P  | R <-- probe (20,20)
 E |           | I
 F | (-) N (+) | G <-- nozzle (10,10)
 T |           | H
   |    (-)    | T
   |           |
   O-- FRONT --+
 (0,0)

Usage

M851 [X<linear>] [Y<linear>] [Z<linear>]
also found m206 to be useful
thinkyhead

M206 - Set Home Offsets

motion Apply a persistent offset HAS_HOME_OFFSET

Description

Use M206 to apply a persistent offset to the native home position and coordinate space. This effectively shifts the coordinate space in the negative direction. See examples below.

  • The current position is adjusted to align to the new home offset values.
  • The home offset is persistent — added to the current position until changed.
  • Some uses include fine adjustment of Z position (without moving endstops) and shifting the coordinate space to print on a different part of the bed.

Notes

  • This command isn’t available on DELTA. (For delta use M665 H.)
  • This G-code can be disabled with NO_WORKSPACE_OFFSETS to optimize movement.
  • Changing the home offsets will not invalidate bed leveling or other saved data.
  • View the current offsets with M503.
  • If EEPROM_SETTINGS is enabled, the home offsets are saved with M500, loaded with M501, and reset with M502.
  • M428 sets home offsets so the current position aligns to the native home position.

Usage

M206 [P<offset>] [T<offset>] [X<offset>] [Y<offset>] [Z<offset>]

Parameters

[P<offset>] SCARA Psi offset (Requires MORGAN_SCARA)
[T<offset>] SCARA Theta offset (Requires MORGAN_SCARA)
[X<offset>] X home offset
[Y<offset>] Y home offset
[Z<offset>] Z home offset