<p>This answer is intended to be a generic answer for Z-offset determination. The question is not clear on how the Z-offset has been determined. It appears as if this distance is measured, while in reality this cannot be measured.</p>

<p>A touch (or a inductive or capacitive) probe uses a trigger point to determine the distance of the probe trigger point to the bed print surface. Correct installation is trivial, as is the determination of the nozzle to trigger point definition. For a touch sensor, the probing element is either stowed, fully deployed, or pushed in during leveling up to the point that the trigger point is reached and the probe stowes the rest of the pin, see figure:</p>

<p><a href="https://i.sstatic.net/wdto7.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/wdto7.png" alt="BLTouch or 3DTouch sensor Z-offset definition"></a></p>

<p>The <code>M851 Zxx.xx</code> offset is determined by lowering the nozzle beyond the  trigger point until the nozzle hits a paper sheet. If the stowed position to nozzle distance is used, the distance is too large and the nozzle will dive into the bed on printing.</p>

CC BY-SA 4.0
2020-02-10T19:19:49.060Z
2020-03-13T12:14:34.727Z
2020-03-13T12:14:34.727Z
0scar
<p>You should be able to offset this with a <code>G54 Z-1.3</code> - <strong>if your setup accepts these gcodes</strong>. </p>

<p>If you do this, always add a <code>G53</code> to the very start and just before the <code>M30</code> to clear all offsets after job finish (or in the event of a cancel, at the start of the next job).</p>

<p>I'm not experienced with a wide variety of printers or firmware, but our repetier-based printers (and we use the same controls for our refurbished Fadal CNC machines) use G53-G59:</p>

<p><a href="https://www.cnccookbook.com/g54-g92-g52-work-offsets-cnc-g-code/" rel="nofollow noreferrer">As explained in this tutorial from cnccookbook.com</a>:</p>

<blockquote>
  <p>Basic work offsets are very simple to specify: simply enter one of G54, G55, G56, G57, G58, or G59. [...] When you execute the work offset g-code, the XYZ offset will be added to all of your coordinates from that point forward.</p>
</blockquote>

<p><a href="https://en.wikipedia.org/wiki/G-code" rel="nofollow noreferrer">As detailed on Wikipedia</a>:</p>

<blockquote>
  <p><strong>G54-59</strong>: Have largely replaced position register (G50 and G92). Each tuple of axis offsets relates program zero directly to machine zero. Standard is 6 tuples (G54 to G59), with optional extensibility to 48 more via G54.1 P1 to P48.</p>
</blockquote>

<p><a href="http://hyrel3d.net/wiki/index.php/Gcode#G54_through_G59_-_Set_Offsets" rel="nofollow noreferrer">And on the gcode dictionary provided by Hyrel 3D</a>:</p>

<blockquote>
  <p><strong>G54 through G59 - Set Offsets</strong>
  G54, G55, G56, G57, G58, and G59 will each store and invoke offsets in the X, Y, and/or Z axes for all subsequent moves. Any values not invoked will remain with their previous value (0 unless earlier specified otherwise).</p>
  
  <ul>
  <li>X is the offset in mm in the X axis.</li>
  <li>Y is the offset in mm in the Y axis.</li>
  <li>Z is the offset in mm in the Z axis.</li>
  </ul>
  
  <p>Here is an example:</p>
  
  <p><code>G54 X100 Y-50</code></p>
  
  <p>This command is decoded and executed by the printer as follows:</p>
  
  <p>G54 (set offsets)<br>
  - X100 (+100mm to all X coordinates)<br>
  - Y-50 (-50mm to all Y coordinates)<br></p>
  
  <p>Note that this differs from an M6, where the offsets are only applied to a SINGLE tool position.</p>
</blockquote>

<p><em>Disclaimer: I work for Hyrel 3D.</em></p>

CC BY-SA 4.0
2019-09-13T20:25:29.910Z
G-code `G54`, is not listed in e.g. [this G-code overview](https://reprap.org/wiki/G-code). Repetier does not support `G54` according to the [sources](https://github.com/repetier/Repetier-Firmware/blob/master/src/ArduinoAVR/Repetier/Commands.h). This must be a custom firmware, not based on Repetier. And Marlin doesn't support the code either. I guess Hyrel is more onto CNC firmware. Thanks for the information!
0scar
CC BY-SA 4.0
2019-09-14T02:22:54.660Z
We do our own firmware in-house, built on a repetier base. It's available from https://hyrel3d.com/wiki/index.php/New_Install but it is not open source and I don't expect it to work on non-hyrel equipment. We have our own interpreter, and run things more like a CNC.
Davo
CC BY-SA 4.0
2019-09-13T13:00:15.363Z
2019-09-13T15:25:14.227Z
2019-09-13T15:25:14.227Z
Davo
<p>I am having a few problems with my BLTouch. I have calibrated it several times using different methods and get the nozzle being 1.3&nbsp;mm lower than the BLTouch pin so a Z offset of -1.3&nbsp;mm. This works fine for auto homing, bed levelling and using code <code>G1 Z0</code> to lower to where needed. However when using Cura to print the nozzle homes exactly as it should then drives the nozzle in to the bed as it starts or tries to start to print and not just a little bit either. Anyone have any ideas?</p>

<p>Start G-code is:</p>

<pre>
G28 ;Home
G29 ;Probe
G1 Z15.0 F6000 ;Move Platform down 15 mm
G92 E0
G1 F200 E3
G92 E0
</pre>

CC BY-SA 4.0
2019-09-13T12:52:56.660Z
Hi MattW49, welcome to 3DPrinting.SE! Maybe you can share the first lines from a Cura sliced model up to the point it dives into the bed according to your observations. Furthermore please answer by [edit]: "Does this only happen with Cura (so not with other slicers)? Has it ever worked well? What steps did you use to calibrate the Z offset and store it in memory?" With more information people can provide better answers to help you out.
0scar
CC BY-SA 4.0
2019-09-13T14:26:28.040Z
Could [this answer](/a/9824/) on question "[Specifying Z offset in Marlin firmware](/q/9820)" be of assistance?
0scar
CC BY-SA 4.0
2019-09-17T04:30:46.383Z
F6000 is too high, you will miss some steps.
Fernando Baltazar
CC BY-SA 4.0
2019-10-21T13:58:15.197Z
What printer is this BL Touch on?  Did it come as stock on that printer, or have you added it as an after-market mod? If the latter, did you flash the printer with new firmware?  Which firmware build and how is it configured?
Ty Hayes
CC BY-SA 4.0
2020-02-10T18:34:32.980Z
Are you measuring the offset, so retracted with respect to the nozzle? If so, that is not how you do it, the actual distance (the triggerpoint to the nozzle distance should be used, this is a smaller value). If you use the measured distance, the value is too large and it will dive into the bed.
0scar
CC BY-SA 4.0
2020-02-10T19:03:48.763Z
@FernandoBaltazar Good spot, that is a high velocity for the Z-axis. But if you miss steps, the distance would be shorter, not longer; i.e. there would be a gap, not diving into the bed.
0scar
<bed-leveling><bltouch>
BLTouch calibrated, nozzle still dives into the bed
MattW49
# BLTouch calibrated, nozzle still dives into the bed

(Asked by: username_0 on 2019-09-13)

I am having a few problems with my BLTouch. I have calibrated it several times using different methods and get the nozzle being 1.3 mm lower than the BLTouch pin so a Z offset of -1.3 mm. This works fine for auto homing, bed levelling and using code G1 Z0 to lower to where needed. However when using Cura to print the nozzle homes exactly as it should then drives the nozzle in to the bed as it starts or tries to start to print and not just a little bit either. Anyone have any ideas?
Start G-code is:

G28 ;Home
G29 ;Probe
G1 Z15.0 F6000 ;Move Platform down 15 mm
G92 E0
G1 F200 E3
G92 E0

**Tags:** bed-leveling, bltouch
> **Comments:**
> **username_1**: Hi MattW49, welcome to 3DPrinting.SE! Maybe you can share the first lines from a Cura sliced model up to the point it dives into the bed according to your observations. Furthermore please answer by [edit]: "Does this only happen with Cura (so not with other slicers)? Has it ever worked well? What steps did you use to calibrate the Z offset and store it in memory?" With more information people can provide better answers to help you out.  
> **username_1**: Could [this answer](/a/9824/) on question "[Specifying Z offset in Marlin firmware](/q/9820)" be of assistance?  
> **username_2**: F6000 is too high, you will miss some steps.  
> **username_3**: What printer is this BL Touch on?  Did it come as stock on that printer, or have you added it as an after-market mod? If the latter, did you flash the printer with new firmware?  Which firmware build and how is it configured?  
> **username_1**: Are you measuring the offset, so retracted with respect to the nozzle? If so, that is not how you do it, the actual distance (the triggerpoint to the nozzle distance should be used, this is a smaller value). If you use the measured distance, the value is too large and it will dive into the bed.  
> **username_1**: @FernandoBaltazar Good spot, that is a high velocity for the Z-axis. But if you miss steps, the distance would be shorter, not longer; i.e. there would be a gap, not diving into the bed.  

---

## 2 answers

### Answer by username_1 on 2020-02-10. Score: 2

This answer is intended to be a generic answer for Z-offset determination. The question is not clear on how the Z-offset has been determined. It appears as if this distance is measured, while in reality this cannot be measured.

A touch (or a inductive or capacitive) probe uses a trigger point to determine the distance of the probe trigger point to the bed print surface. Correct installation is trivial, as is the determination of the nozzle to trigger point definition. For a touch sensor, the probing element is either stowed, fully deployed, or pushed in during leveling up to the point that the trigger point is reached and the probe stowes the rest of the pin, see figure:

[![BLTouch or 3DTouch sensor Z-offset definition](https://i.sstatic.net/wdto7.png)](https://i.sstatic.net/wdto7.png)

The `M851 Zxx.xx` offset is determined by lowering the nozzle beyond the trigger point until the nozzle hits a paper sheet. If the stowed position to nozzle distance is used, the distance is too large and the nozzle will dive into the bed on printing.


---

### Answer by username_4 on 2019-09-13. Score: 1

You should be able to offset this with a `G54 Z-1.3` - **if your setup accepts these gcodes**.

If you do this, always add a `G53` to the very start and just before the `M30` to clear all offsets after job finish (or in the event of a cancel, at the start of the next job).

I'm not experienced with a wide variety of printers or firmware, but our repetier-based printers (and we use the same controls for our refurbished Fadal CNC machines) use G53-G59:

[As explained in this tutorial from cnccookbook.com](https://www.cnccookbook.com/g54-g92-g52-work-offsets-cnc-g-code/):

> Basic work offsets are very simple to specify: simply enter one of G54, G55, G56, G57, G58, or G59. [...] When you execute the work offset g-code, the XYZ offset will be added to all of your coordinates from that point forward.

[As detailed on Wikipedia](https://en.wikipedia.org/wiki/G-code):

> **G54-59**: Have largely replaced position register (G50 and G92). Each tuple of axis offsets relates program zero directly to machine zero. Standard is 6 tuples (G54 to G59), with optional extensibility to 48 more via G54.1 P1 to P48.

[And on the gcode dictionary provided by Hyrel 3D](http://hyrel3d.net/wiki/index.php/Gcode#G54_through_G59_-_Set_Offsets):

> **G54 through G59 - Set Offsets**
> G54, G55, G56, G57, G58, and G59 will each store and invoke offsets in the X, Y, and/or Z axes for all subsequent moves. Any values not invoked will remain with their previous value (0 unless earlier specified otherwise).
>
> * X is the offset in mm in the X axis.
> * Y is the offset in mm in the Y axis.
> * Z is the offset in mm in the Z axis.
>
> Here is an example:
>
> `G54 X100 Y-50`
>
> This command is decoded and executed by the printer as follows:
>
> G54 (set offsets)  
> - X100 (+100mm to all X coordinates)  
> - Y-50 (-50mm to all Y coordinates)
>
> Note that this differs from an M6, where the offsets are only applied to a SINGLE tool position.

*Disclaimer: I work for Hyrel 3D.*

> **Comments:**
> **username_1**: G-code `G54`, is not listed in e.g. [this G-code overview](https://reprap.org/wiki/G-code). Repetier does not support `G54` according to the [sources](https://github.com/repetier/Repetier-Firmware/blob/master/src/ArduinoAVR/Repetier/Commands.h). This must be a custom firmware, not based on Repetier. And Marlin doesn't support the code either. I guess Hyrel is more onto CNC firmware. Thanks for the information!  
> **username_4**: We do our own firmware in-house, built on a repetier base. It's available from https://hyrel3d.com/wiki/index.php/New_Install but it is not open source and I don't expect it to work on non-hyrel equipment. We have our own interpreter, and run things more like a CNC.  

---

