<p>I had the same problem, solved it by inserting</p>
<pre><code>// Move X and Y to 0 after homing
process_subcommands_now_P(&quot;G1 X0 Y0 F5000&quot;);
</code></pre>
<p>at the end of <code>G28.cpp</code>, just before <code>ui.refresh();</code></p>
<p>This moves the print head to X0, Y0 and leaves Z untouched after the homing procedure. This way any oozing that might happen while the extruder heats up will be outside of the bed.</p>

CC BY-SA 4.0
2021-01-01T04:33:32.903Z
Hi and welcome to SE.3DP. Could you expand upon your answer a little, by explaining what the additional code does and why it solves the issue?
Greenonline
CC BY-SA 4.0
2021-01-03T17:45:38.147Z
This is pretty cumbersome, while adding `G1 X0 Y0` after `G28` or `G29` would do exactly the same (in your start G-code script), but it doesn't require any firmware changes. It is `Z_SAFE_HOMING` causing Z to home in the middle of the bed (as instructed by the configuration file) for safety so that the probe hits the bed surface at any time.
0scar
CC BY-SA 4.0
2020-12-30T16:11:46.620Z
2021-01-03T16:47:28.483Z
2021-01-03T16:47:28.483Z
Raahs
<p>This is a consequence of enabling <code>Z_SAFE_HOMING</code>:</p>
<blockquote>
<p>Z Safe Homing prevents Z from homing when the probe (or nozzle) is outside bed area by moving to a defined XY point (by default, the middle of the bed) before Z Homing when homing all axes with <code>G28</code>. As a side-effect, X and Y homing are required before Z homing. If stepper drivers time out, X and Y homing will be required again.</p>
<p>Enable this option if a probe (not an endstop) is being used for Z homing. Z Safe Homing isn’t needed if a Z endstop is used for homing, but it may also be enabled just to have XY always move to some custom position after homing.</p>
</blockquote>
<p>My default Cura start G-code contained this sequence:</p>
<pre><code>G28 X0 Y0 ;move X/Y to min endstops
G28 Z0 ;move Z to min endstops
</code></pre>
<p>I changed this to</p>
<pre><code>G28 ;safe homing
G90 ;absolute positioning
G0 X0 Y0 ; move to bottom-left corner for nozzle wipe
</code></pre>
<p>However any oozing will still happen at the center of the build plate, which is a problem.</p>

CC BY-SA 4.0
2020-06-14T22:22:00.877Z
Note that `G28 X0 Y0` and `G28 Z0` are incorrect instructions, from the wiki: `The X, Y, and Z parameters act only as flags. Any coordinates given are ignored. For example, G28 Z10 results in the same behavior as G28 Z.`
0scar
CC BY-SA 4.0
2020-06-15T06:29:33.597Z
you should possibly retract the filament before probing Z to prevent oozing
Trish
CC BY-SA 4.0
2020-06-14T18:07:30.437Z
2020-06-14T19:53:15.737Z
2020-06-18T08:29:41.667Z
rgov
<p>I installed a BLTouch bed leveling probe on my printer which uses Marlin 2.0.5.3.</p>

<p>Now the printer seems to be of two minds when it comes to finding the origin. Homing XY moves to the lower left as it always has, but homing Z moves not only to Z=0, but also to the center of the build plate. The printer knows this is (100,100,0) and is not mistakenly thinking it is (0,0,0).</p>

<p>This causes some issues such as now the nozzle wipe at the beginning of a print happens right in the center of where the print is supposed to be.</p>

<p>Is this expected behavior?</p>

CC BY-SA 4.0
2020-06-14T16:56:56.587Z
what did you do besides mounting the bed leveling sensor? Which distribution of marlin did you install? Which slicer do you use? Did you hook "Origin is in center"?
Trish
CC BY-SA 4.0
2020-06-14T17:36:55.847Z
I'm not sure what distribution you're referring to, I built it myself from source. I do not have `BED_CENTER_AT_0_0` enabled. I mounted and wired up the sensor but have not calibrated the Z offset yet.
rgov
<marlin><bed-leveling><homing>
Installed bed leveling probe, now Z homing moves to center
rgov
# Installed bed leveling probe, now Z homing moves to center

(Asked by: username_0 on 2020-06-14)

I installed a BLTouch bed leveling probe on my printer which uses Marlin 2.0.5.3.

Now the printer seems to be of two minds when it comes to finding the origin. Homing XY moves to the lower left as it always has, but homing Z moves not only to Z=0, but also to the center of the build plate. The printer knows this is (100,100,0) and is not mistakenly thinking it is (0,0,0).

This causes some issues such as now the nozzle wipe at the beginning of a print happens right in the center of where the print is supposed to be.

Is this expected behavior?

**Tags:** marlin, bed-leveling, homing

> **Comments:**
> **username_1**: what did you do besides mounting the bed leveling sensor? Which distribution of marlin did you install? Which slicer do you use? Did you hook "Origin is in center"?  
> **username_0**: I'm not sure what distribution you're referring to, I built it myself from source. I do not have `BED_CENTER_AT_0_0` enabled. I mounted and wired up the sensor but have not calibrated the Z offset yet.  

---

## 2 answers

### Answer by username_0 on 2020-06-14. Score: 5 | Accepted answer

This is a consequence of enabling `Z_SAFE_HOMING`:

> Z Safe Homing prevents Z from homing when the probe (or nozzle) is outside bed area by moving to a defined XY point (by default, the middle of the bed) before Z Homing when homing all axes with `G28`. As a side-effect, X and Y homing are required before Z homing. If stepper drivers time out, X and Y homing will be required again.
>
> Enable this option if a probe (not an endstop) is being used for Z homing. Z Safe Homing isn’t needed if a Z endstop is used for homing, but it may also be enabled just to have XY always move to some custom position after homing.

My default Cura start G-code contained this sequence:

```
G28 X0 Y0 ;move X/Y to min endstops
G28 Z0 ;move Z to min endstops

```

I changed this to

```
G28 ;safe homing
G90 ;absolute positioning
G0 X0 Y0 ; move to bottom-left corner for nozzle wipe

```

However any oozing will still happen at the center of the build plate, which is a problem.

> **Comments:**
> **username_4**: Note that `G28 X0 Y0` and `G28 Z0` are incorrect instructions, from the wiki: `The X, Y, and Z parameters act only as flags. Any coordinates given are ignored. For example, G28 Z10 results in the same behavior as G28 Z.`  
> **username_1**: you should possibly retract the filament before probing Z to prevent oozing  

---

### Answer by username_2 on 2020-12-30. Score: 2

I had the same problem, solved it by inserting

```
// Move X and Y to 0 after homing
process_subcommands_now_P("G1 X0 Y0 F5000");

```

at the end of `G28.cpp`, just before `ui.refresh();`

This moves the print head to X0, Y0 and leaves Z untouched after the homing procedure. This way any oozing that might happen while the extruder heats up will be outside of the bed.

> **Comments:**
> **username_3**: Hi and welcome to SE.3DP. Could you expand upon your answer a little, by explaining what the additional code does and why it solves the issue?  
> **username_4**: This is pretty cumbersome, while adding `G1 X0 Y0` after `G28` or `G29` would do exactly the same (in your start G-code script), but it doesn't require any firmware changes. It is `Z_SAFE_HOMING` causing Z to home in the middle of the bed (as instructed by the configuration file) for safety so that the probe hits the bed surface at any time.  

---

