<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>Setting Z offset for printing</title>
        <description> Hi,

I have some difficulty understanding the implementation of bed leveling in Duet Wifi. My problem is with the Z offset between the switch (BLTouch) and the hotend&#039;s nozzle. In Marlin you could set it in the firmware. In Smoothieware you had to use a G30 Zx.x command to set it at the beginning of the g code. 

In Duet, I can use BLTouch to probe the bed and create a height map. Then, I have added the following to the starting gcode:

G28 XY; Home X and Y axis
M280 P3 S10 I1; BLTouch Pin down
G1 X100 Y100; Go to 100,100
G28 Z; Home Z
G29 S1 ; Bed leveling with already recorded height map
M280 P3 S90 I1; BLTouch pin up

I also have determined the trigger height of the probe using the method at [duet3d.com]

The problem I am facing is I don&#039;t know how to set the Z offset. When I start a print, it starts too high (at least 0,4 mm) from the bed, which prevents adhesion. I have to babystep manually 0.4 mm downwards, so that the printing head can touch the bed. But this defeats the purpose of leveling the bed. Which part I am doing is wrong? Where do I set the Z offset?

Thanks</description>
        <link>https://reprap.org/forum/read.php?416,762755,762755#msg-762755</link>
        <lastBuildDate>Thu, 08 Oct 2026 03:03:54 -0400</lastBuildDate>
        <generator>Phorum 5.2.23</generator>
        <item>
            <guid>https://reprap.org/forum/read.php?416,762755,762905#msg-762905</guid>
            <title>Re: Setting Z offset for printing</title>
            <link>https://reprap.org/forum/read.php?416,762755,762905#msg-762905</link>
            <description><![CDATA[ Do you have a config-override.g file, and a M501 command in config.g to invoke it? If so then it will override the values in config,g. To update config-override.g you can:<br />
<br />
1. Send the new G31 Z command.<br />
2. Send M500 to save all run-time configurable values to config-override.g. The values saved are the G31 command, the delta parameters, and the heater models.]]></description>
            <dc:creator>dc42</dc:creator>
            <category>Duet</category>
            <pubDate>Mon, 17 Apr 2017 14:58:32 -0400</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?416,762755,762878#msg-762878</guid>
            <title>Re: Setting Z offset for printing</title>
            <link>https://reprap.org/forum/read.php?416,762755,762878#msg-762878</link>
            <description><![CDATA[ I changed the Z value to different values and interestingly it always ends up at the same height? Does anything in my starting script override it? Shall I use a G30 Z value to set the Z offset?<br />
<br />
An update: I use the G31 T command to check for the trigger height but it isn't the same with what I have in cofig.g:<br />
<br />
G31 P10 X-30 Y0 Z1.35 ; Set Z probe trigger value, offset and trigger height <br />
<br />
This is the relevant line in the endstops section of the config.g but the G31 T command returns me 1.65 and it doesn't change even if I change it on the config.<br />
<br />
Could this be a problem similar to that: [<a href="https://www.duet3d.com/forum/thread.php?id=1277#p12332" target="_blank"  rel="nofollow">www.duet3d.com</a>]<br />
<br />
(I am also on 1.18)<br />
<br />
Thanks<br />
<br />
Second update: I think I have found the problem. I thought that the homez.g code on the SD card was only used if you pressed the home Z button on the web page. It seems that it is used whenever a G28 Z is issued. At the end of that G code there is a G92 Z command which sets the Z offset. Changing that solved the problem. However I don't understand what the Z parameter in G31 does? Does it really affect the BLTouch probe? Or is it for some other kind of probe? It seems to have no effect on its function.]]></description>
            <dc:creator>drmaestro</dc:creator>
            <category>Duet</category>
            <pubDate>Mon, 17 Apr 2017 12:13:00 -0400</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?416,762755,762774#msg-762774</guid>
            <title>Re: Setting Z offset for printing</title>
            <link>https://reprap.org/forum/read.php?416,762755,762774#msg-762774</link>
            <description><![CDATA[ No, if you use the probe for Z homing, always at the same XY coordinates, then there is no need to.]]></description>
            <dc:creator>dc42</dc:creator>
            <category>Duet</category>
            <pubDate>Sun, 16 Apr 2017 17:31:39 -0400</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?416,762755,762771#msg-762771</guid>
            <title>Re: Setting Z offset for printing</title>
            <link>https://reprap.org/forum/read.php?416,762755,762771#msg-762771</link>
            <description><![CDATA[ <blockquote class="bbcode"><div><small>Quote<br /></small><strong>dc42</strong><br />
<br />
Unless you are also using the probe to do Z homing, I recommend that after homing and before probing with G29 or loading the height map, you do a single G30 probe to establish the Z=0 position more accurately than homing does.</div></blockquote>
<br />
I use BLTouch for Z homing, I don't have a separate endstop. Shall I still do what you told me here?]]></description>
            <dc:creator>drmaestro</dc:creator>
            <category>Duet</category>
            <pubDate>Sun, 16 Apr 2017 17:27:57 -0400</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?416,762755,762762#msg-762762</guid>
            <title>Re: Setting Z offset for printing</title>
            <link>https://reprap.org/forum/read.php?416,762755,762762#msg-762762</link>
            <description><![CDATA[ <blockquote class="bbcode"><div><small>Quote<br /></small><strong>drmaestro</strong><br />
Hi,<br />
<br />
I have some difficulty understanding the implementation of bed leveling in Duet Wifi. My problem is with the Z offset between the switch (BLTouch) and the hotend's nozzle. In Marlin you could set it in the firmware. In Smoothieware you had to use a G30 Zx.x command to set it at the beginning of the g code. <br />
<br />
In Duet, I can use BLTouch to probe the bed and create a height map. Then, I have added the following to the starting gcode:<br />
<br />
G28 XY; Home X and Y axis<br />
M280 P3 S10 I1; BLTouch Pin down<br />
G1 X100 Y100; Go to 100,100<br />
G28 Z; Home Z<br />
G29 S1 ; Bed leveling with already recorded height map<br />
M280 P3 S90 I1; BLTouch pin up<br />
<br />
I also have determined the trigger height of the probe using the method at [<a href="https://duet3d.com/wiki/Using_mesh_bed_compensation" target="_blank"  rel="nofollow">duet3d.com</a>]<br />
<br />
The problem I am facing is I don't know how to set the Z offset. When I start a print, it starts too high (at least 0,4 mm) from the bed, which prevents adhesion. I have to babystep manually 0.4 mm downwards, so that the printing head can touch the bed. But this defeats the purpose of leveling the bed. Which part I am doing is wrong? Where do I set the Z offset?<br />
<br />
Thanks</div></blockquote>
<br />
It sounds to me that your measurement of trigger height wasn't accurate. Add 0.4 to the Z parameter in your G31 command, that should fix it.<br />
<br />
The nozzle should not be touching the bed when the print starts, it should be at the first layer height that you set in the slicer.<br />
<br />
Unless you are also using the probe to do Z homing, I recommend that after homing and before probing with G29 or loading the height map, you do a single G30 probe to establish the Z=0 position more accurately than homing does.]]></description>
            <dc:creator>dc42</dc:creator>
            <category>Duet</category>
            <pubDate>Sun, 16 Apr 2017 16:45:30 -0400</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?416,762755,762759#msg-762759</guid>
            <title>Re: Setting Z offset for printing</title>
            <link>https://reprap.org/forum/read.php?416,762755,762759#msg-762759</link>
            <description><![CDATA[ You shall set trigger height in config.g with G31. <br />
<br />
For example my trigger height is negative because of FSR sensors for bed levelling:<br />
<br />
G31 P1000 X0 Y0 Z-0.15 ; Set Z probe trigger value, offset and trigger height<br />
<br />
Your Z offset should be 0.4 instead of -0.15 approximately I guess.]]></description>
            <dc:creator>heapstar</dc:creator>
            <category>Duet</category>
            <pubDate>Sun, 16 Apr 2017 16:32:54 -0400</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?416,762755,762755#msg-762755</guid>
            <title>Setting Z offset for printing</title>
            <link>https://reprap.org/forum/read.php?416,762755,762755#msg-762755</link>
            <description><![CDATA[ Hi,<br />
<br />
I have some difficulty understanding the implementation of bed leveling in Duet Wifi. My problem is with the Z offset between the switch (BLTouch) and the hotend's nozzle. In Marlin you could set it in the firmware. In Smoothieware you had to use a G30 Zx.x command to set it at the beginning of the g code. <br />
<br />
In Duet, I can use BLTouch to probe the bed and create a height map. Then, I have added the following to the starting gcode:<br />
<br />
G28 XY; Home X and Y axis<br />
M280 P3 S10 I1; BLTouch Pin down<br />
G1 X100 Y100; Go to 100,100<br />
G28 Z; Home Z<br />
G29 S1 ; Bed leveling with already recorded height map<br />
M280 P3 S90 I1; BLTouch pin up<br />
<br />
I also have determined the trigger height of the probe using the method at [<a href="https://duet3d.com/wiki/Using_mesh_bed_compensation" target="_blank"  rel="nofollow">duet3d.com</a>]<br />
<br />
The problem I am facing is I don't know how to set the Z offset. When I start a print, it starts too high (at least 0,4 mm) from the bed, which prevents adhesion. I have to babystep manually 0.4 mm downwards, so that the printing head can touch the bed. But this defeats the purpose of leveling the bed. Which part I am doing is wrong? Where do I set the Z offset?<br />
<br />
Thanks]]></description>
            <dc:creator>drmaestro</dc:creator>
            <category>Duet</category>
            <pubDate>Sun, 16 Apr 2017 16:12:11 -0400</pubDate>
        </item>
    </channel>
</rss>
