<p>If you are already sure that homing is performed correctly and in valid position, then there are few reasons why printer may start printing in unexpected position.</p>
<p>Do the following checks to narrow down the actual one:</p>
<ul>
<li><p><strong>steps/mm</strong>: use <a href="https://marlinfw.org/docs/gcode/M503.html" rel="nofollow noreferrer"><code>M503</code></a> (or <a href="https://marlinfw.org/docs/gcode/M092.html" rel="nofollow noreferrer"><code>M92</code></a> without parameters) to check if currently configured steps/mm match <a href="https://blog.prusaprinters.org/calculator_3416/#steppermotors" rel="nofollow noreferrer">your hardware setup</a> for each axis</p>
</li>
<li><p><strong>offsets:</strong> use <a href="https://marlinfw.org/docs/gcode/M503.html" rel="nofollow noreferrer"><code>M503</code></a> (or <a href="https://marlinfw.org/docs/gcode/M206.html" rel="nofollow noreferrer"><code>M206</code></a> without parameters) to check that there are no offsets configured</p>
</li>
<li><p><strong>backoff:</strong> look in <em>Configuration_adv.h</em> for following line:</p>
<pre><code>//#define HOMING_BACKOFF_POST_MM { 2, 2, 2 }  // (mm) Backoff from endstops after homing
</code></pre>
<p>(Having the backoff set is nothing wrong, actually. But be sure to also check final positioning in the generated file.)</p>
</li>
<li><p><strong>slicer's Start G-code:</strong> review slicer configuration, if there is nothing suspicious injected to the print file, which could temporarily overrid printer setup - esepecially <a href="https://marlinfw.org/docs/gcode/M428.html" rel="nofollow noreferrer">M428</a>, <a href="https://marlinfw.org/docs/gcode/M206.html" rel="nofollow noreferrer">M206</a>, <a href="https://marlinfw.org/docs/gcode/G092.html" rel="nofollow noreferrer">G92</a> <em>(set position is normal for E in relative extrusion mode, but suspicious for X,Y,Z)</em></p>
</li>
<li><p><strong>generated file:</strong> review initial part of generated G-Code file, if there are any similar surprises, and if on initial layer section there is expected move to valid Z position before extrusion is made</p>
</li>
</ul>

CC BY-SA 4.0
2021-01-30T23:47:50.757Z
2021-01-31T18:46:08.987Z
2021-01-31T18:46:08.987Z
octopus8
<p>I've actually found what the issue was. It turns out that my Z steps were way out of whack (i.e. 4000 steps/mm instead of 400). Apparently, that's the default value in GitHub for version 2.0 of Marlin. Not sure if that's a typo or a valid value, anyhow setting it to 400 fixed it.</p>

CC BY-SA 4.0
2021-01-31T18:39:01.177Z
Thanks for feedback. I will add this also to my answer (the checklist, let's say).
octopus8
CC BY-SA 4.0
2021-01-31T18:34:12.960Z
2021-01-31T18:34:12.960Z
Pierre
<p>I've just changed the motherboard on my Ender 3 Pro with a MKS GEN_L v1.0 and flashed the latest Marlin version on it.</p>
<p>I've calibrated my bed manually using the default XY and Z auto home commands on OctoPrint and a piece of paper.</p>
<p>I'm happy with the calibration, however whenever I launch a print the Z axis moves up from the calibrated position by about 4 mm and starts extruding.</p>
<p>I've checked my Z endstop status with <code>M119</code> and it's triggered at the right calibrated position.</p>
<p>How can I correct this?</p>

CC BY-SA 4.0
2021-01-30T17:39:58.113Z
Looks like it is accounting for an imaginary glass bed. So it homes next to the build plate, but afterwards moves up to 4 mm? Could be an offset at play. You have the config files, so you need to figure that out, or did you flash a ready made binary file?
0scar
CC BY-SA 4.0
2021-01-30T18:02:52.237Z
4 mm is a typical glass sheet
Trish
CC BY-SA 4.0
2021-01-30T22:22:08.617Z
This is most probably caused by uploading a preconfigured binary firmware, changing the Z offset has been discussed before, e.g. [here](/a/15354) and [here](/a/7265).
0scar
<marlin><creality-ender-3><z-axis><homing><endstop>
Issue with Z homing on Ender 3 Pro with Marlin
Pierre
# Issue with Z homing on Ender 3 Pro with Marlin

(Asked by: username_0 on 2021-01-30)

I've just changed the motherboard on my Ender 3 Pro with a MKS GEN\_L v1.0 and flashed the latest Marlin version on it.

I've calibrated my bed manually using the default XY and Z auto home commands on OctoPrint and a piece of paper.

I'm happy with the calibration, however whenever I launch a print the Z axis moves up from the calibrated position by about 4 mm and starts extruding.

I've checked my Z endstop status with `M119` and it's triggered at the right calibrated position.

How can I correct this?

**Tags:** marlin, creality-ender-3, z-axis, homing, endstop

> **Comments:**
> **username_1**: Looks like it is accounting for an imaginary glass bed. So it homes next to the build plate, but afterwards moves up to 4 mm? Could be an offset at play. You have the config files, so you need to figure that out, or did you flash a ready made binary file?  
> **username_2**: 4 mm is a typical glass sheet  
> **username_1**: This is most probably caused by uploading a preconfigured binary firmware, changing the Z offset has been discussed before, e.g. [here](/a/15354) and [here](/a/7265).  

---

## 2 answers

### Answer by username_0 on 2021-01-31. Score: 2 | Accepted answer

I've actually found what the issue was. It turns out that my Z steps were way out of whack (i.e. 4000 steps/mm instead of 400). Apparently, that's the default value in GitHub for version 2.0 of Marlin. Not sure if that's a typo or a valid value, anyhow setting it to 400 fixed it.

> **Comments:**
> **username_3**: Thanks for feedback. I will add this also to my answer (the checklist, let's say).  

---

### Answer by username_3 on 2021-01-30. Score: 0

If you are already sure that homing is performed correctly and in valid position, then there are few reasons why printer may start printing in unexpected position.

Do the following checks to narrow down the actual one:

* **steps/mm**: use [`M503`](https://marlinfw.org/docs/gcode/M503.html) (or [`M92`](https://marlinfw.org/docs/gcode/M092.html) without parameters) to check if currently configured steps/mm match [your hardware setup](https://blog.prusaprinters.org/calculator_3416/#steppermotors) for each axis
* **offsets:** use [`M503`](https://marlinfw.org/docs/gcode/M503.html) (or [`M206`](https://marlinfw.org/docs/gcode/M206.html) without parameters) to check that there are no offsets configured
* **backoff:** look in *Configuration\_adv.h* for following line:

  ```
  //#define HOMING_BACKOFF_POST_MM { 2, 2, 2 }  // (mm) Backoff from endstops after homing

  ```

  (Having the backoff set is nothing wrong, actually. But be sure to also check final positioning in the generated file.)
* **slicer's Start G-code:** review slicer configuration, if there is nothing suspicious injected to the print file, which could temporarily overrid printer setup - esepecially [M428](https://marlinfw.org/docs/gcode/M428.html), [M206](https://marlinfw.org/docs/gcode/M206.html), [G92](https://marlinfw.org/docs/gcode/G092.html) *(set position is normal for E in relative extrusion mode, but suspicious for X,Y,Z)*
* **generated file:** review initial part of generated G-Code file, if there are any similar surprises, and if on initial layer section there is expected move to valid Z position before extrusion is made


---

