<p>I don't know how your firmware load handles <code>G29</code> ,but here's a guess, based on information at the  <a href="http://reprap.org/wiki/G-code#G29:_Detailed_Z-Probe" rel="nofollow noreferrer">reprap wiki</a> .  Try using <code>FBLR</code> to force the travel limits. </p>

<blockquote>
  <h3>Parameters</h3>
  
  <p>P Set the size of the grid that will be probed (P x P
  points). Not supported by non-linear delta printer bed leveling. 
  Example: G29 P4 S Set the XY travel speed between probe points (in
  units/min)<br>
  D Dry-Run mode. Just evaluate the bed Topology - Don't
  apply or clean the rotation Matrix. Useful to check the topology after
  a first run of G29.<br>
  V Set the verbose level (0-4). Example: G29 V3<br>
  T
  Generate a Bed Topology Report. Example: G29 P5 T for a detailed
  report. This is useful for manual bed leveling and finding flaws in
  the bed (to assist with part placement). Not supported by non-linear
  delta printer bed leveling.<br>
  F Set the Front limit of the probing grid<br>
  B Set the Back limit of the probing grid.<br>
     L Set the Left limit of the
  probing grid<br>
  R Set the Right limit of the probing grid</p>
</blockquote>

CC BY-SA 3.0
2017-05-25T11:26:37.923Z
2017-05-25T11:26:37.923Z
Carl Witthoft
<p>I am trying to add auto bed leveling to my Prusa i3. When I run <code>G28</code> my printer hits the X and Y end stops properly, then it assumes X=25, Y=99 position on the bed and performs Z homing, after which it stays there. The problem is when I run <code>G29</code> then it starts following the grid points from this position and tries to go out of bed.</p>

<p>My settings for the grid are:</p>

<pre><code>#define LEFT_PROBE_BED_POSITION 10
#define RIGHT_PROBE_BED_POSITION 140
#define BACK_PROBE_BED_POSITION 140
#define FRONT_PROBE_BED_POSITION 20
</code></pre>

<p>And travel limits are set to this:</p>

<pre><code>#define X_MAX_POS 150
#define X_MIN_POS 0
#define Y_MAX_POS 150
#define Y_MIN_POS 0
#define Z_MAX_POS 220
#define Z_MIN_POS 0
</code></pre>

<p>I guess this might be relevant too:</p>

<pre><code>#ifdef Z_SAFE_HOMING

  #define Z_SAFE_HOMING_X_POINT (X_MAX_LENGTH/2)
  #define Z_SAFE_HOMING_Y_POINT (Y_MAX_LENGTH/2)

#endif
</code></pre>

CC BY-SA 4.0
2019-07-24T10:06:45.473Z
What should be added to your question is the offset position of the sensor to determine the correct sensor bounds (see e.g. [How to set Z-probe boundary limits in firmware when using automatic bed leveling?](/q/8153)). Note that the presented code is somewhat dated w.r.t. current Marlin configuration, but, if correctly inserted, the printer homes in the middle of the bed dimensions.
0scar
<printer-building>
Printer goes beyond the bed when auto leveling
tosterovic
# Printer goes beyond the bed when auto leveling

(Asked by: username_0 on 2017-05-21)

I am trying to add auto bed leveling to my Prusa i3. When I run G28 my printer hits the X and Y end stops properly, then it assumes X=25, Y=99 position on the bed and performs Z homing, after which it stays there. The problem is when I run G29 then it starts following the grid points from this position and tries to go out of bed.
My settings for the grid are:
#define LEFT_PROBE_BED_POSITION 10
#define RIGHT_PROBE_BED_POSITION 140
#define BACK_PROBE_BED_POSITION 140
#define FRONT_PROBE_BED_POSITION 20

And travel limits are set to this:
#define X_MAX_POS 150
#define X_MIN_POS 0
#define Y_MAX_POS 150
#define Y_MIN_POS 0
#define Z_MAX_POS 220
#define Z_MIN_POS 0

I guess this might be relevant too:
#ifdef Z_SAFE_HOMING

  #define Z_SAFE_HOMING_X_POINT (X_MAX_LENGTH/2)
  #define Z_SAFE_HOMING_Y_POINT (Y_MAX_LENGTH/2)

#endif

**Tags:** printer-building
> **Comments:**
> **username_1**: What should be added to your question is the offset position of the sensor to determine the correct sensor bounds (see e.g. [How to set Z-probe boundary limits in firmware when using automatic bed leveling?](/q/8153)). Note that the presented code is somewhat dated w.r.t. current Marlin configuration, but, if correctly inserted, the printer homes in the middle of the bed dimensions.  

---

## 1 answers

### Answer by username_2 on 2017-05-25. Score: 1

I don't know how your firmware load handles `G29` ,but here's a guess, based on information at the [reprap wiki](http://reprap.org/wiki/G-code#G29:_Detailed_Z-Probe) . Try using `FBLR` to force the travel limits.

> ### Parameters
>
> P Set the size of the grid that will be probed (P x P
> points). Not supported by non-linear delta printer bed leveling.
> Example: G29 P4 S Set the XY travel speed between probe points (in
> units/min)  
> D Dry-Run mode. Just evaluate the bed Topology - Don't
> apply or clean the rotation Matrix. Useful to check the topology after
> a first run of G29.  
> V Set the verbose level (0-4). Example: G29 V3  
> T
> Generate a Bed Topology Report. Example: G29 P5 T for a detailed
> report. This is useful for manual bed leveling and finding flaws in
> the bed (to assist with part placement). Not supported by non-linear
> delta printer bed leveling.  
> F Set the Front limit of the probing grid  
> B Set the Back limit of the probing grid.  
> L Set the Left limit of the
> probing grid  
> R Set the Right limit of the probing grid


---

