Welcome! Log In Create A New Profile

Advanced

Setting Z offset for printing

Posted by drmaestro 
Setting Z offset for printing
April 16, 2017 04:12PM
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'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'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
Re: Setting Z offset for printing
April 16, 2017 04:32PM
You shall set trigger height in config.g with G31.

For example my trigger height is negative because of FSR sensors for bed levelling:

G31 P1000 X0 Y0 Z-0.15 ; Set Z probe trigger value, offset and trigger height

Your Z offset should be 0.4 instead of -0.15 approximately I guess.


Gruß
Niko

NXD evo (Duet Wifi, RepRap Firmware 3.1.1, Duet 3d smart effektor & Haydn Huntley Magrods, Bondtech BMG (flying) extruder.
Re: Setting Z offset for printing
April 16, 2017 04:45PM
Quote
drmaestro
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'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'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

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.

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.

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.

Edited 3 time(s). Last edit at 04/16/2017 04:51PM by dc42.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Setting Z offset for printing
April 16, 2017 05:27PM
Quote
dc42

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.

I use BLTouch for Z homing, I don't have a separate endstop. Shall I still do what you told me here?
Re: Setting Z offset for printing
April 16, 2017 05:31PM
No, if you use the probe for Z homing, always at the same XY coordinates, then there is no need to.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Setting Z offset for printing
April 17, 2017 12:13PM
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?

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:

G31 P10 X-30 Y0 Z1.35 ; Set Z probe trigger value, offset and trigger height

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.

Could this be a problem similar to that: [www.duet3d.com]

(I am also on 1.18)

Thanks

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.

Edited 2 time(s). Last edit at 04/17/2017 03:04PM by drmaestro.
Re: Setting Z offset for printing
April 17, 2017 02:58PM
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:

1. Send the new G31 Z command.
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.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Sorry, only registered users may post in this forum.

Click here to login