Setting Z offset

Hi,

I have my leveling strategy working as it should, the bed compensates where it should but the Z height is still not sticking.
My only goal here is to have the bed do a fresh round of probing every print and to automatically set the Z height of the print so the nozzle is against the bed at the start of a print no matter if it has moved down or up from a previous print. This is my interpretation of the Zprobe page.

Explanation of the code
-G30 Z2.8 moves a variable distance to the bed it could be closer than the previous print or farther it doesn’t matter the probe will find it
-once its found now we have set it to 2.8
-the reason for setting it to 2.8 is because that’s a fixed value that we know is the distance between when our probe detects something (triggers) and the nozzle tip this will not change from print to print or ever unless you change how its mounted
-so now by saying G0 Z0 we are moving Z in the other direction no longer searching for a variable position but instead moving a fixed distance (the gap between the nozzle tip and the probe trigger point) which will perfectly close the gap between the nozzle and the bed to have the nozzle right against the bed
-now finally we need to save this as our new Z0 point for this print session and that is done by doing G92 Z0 so now all Z offsets etc will be done from this point

G28
G1 Z10; move bed down so probe reads open
G4 P1000; delay to allow bed to drop
G30 Z2.8; find bed and set it to 2.8 which is distance from trigger point of probe to nozzle but this is NOT actually 2.8mm down this is variable distance
G4 P1000; wait a second for it to finish
G0 Z0; by moving to 0 from pretend 2.8 that was set im actually covering the full variable distance AND the fixed distance of 2.8mm so nozzle is right on bed
M306 Z0; now since nozzle on bed has been figured out dynamically set this as what will be treated as Z0 for this print session
G4 P5000

I have also tried having G92 Z0 instead of M306 Z0 but again no matter what I do at the start of the print the bed moves down after I have the nozzle perfectly against the bed to start.

Imported from wikidot

Wait why do you need to wait for your bed to “drop” ??

After a G28 the bed is close enough to the inductive sensor to trigger it high. You can’t run G30 or G32 if the probe starts with a triggered value so I drop the bed and add a small delay

You don’t understand. I’m not asking about the drop, I’m asking about the wait, why would you have all those G4s there ?

For the exact same reasoning as I stated? The inductive sensor reads high because my bed is still in range if I have no delay in between issuing G1 Z10 and G30 or G32. The delay simply gives the bed a second to move out of trigger range of the sensor… some of the delays are pointless and were more for debugging purposes such as the G4 P5000 at the end but really none of those should effect the question at hand it just makes the whole process a few seconds longer…

I still don’t understand why any of them are necessary. Smoothie waits until a command is executed before doing the next one, so you shouldn’t have to add waits for anything, ever. Are you doing something very special there ?

Nothing special I have a z endstop so I home before I do anything and at the home position my inductive sensor is lit up because it’s close to the bed. I’ll give it another try without the pauses but if we get past that the big issue I’m hitting is the bed is set to the height I want right before a print starts by the end of my startup gcode sequence but then moves downward a little bit right before the print begins. It’s as if my new Z0 position that I set is just ignored despite following the method outlined in the zprobe wiki. I have no z offset set in my slicer.

So I decided to try 3 point grid leveling again and after setting the Z height automatically so the nozzle is against the the bed im not seeing an extra Z movement when the print commences so thats good.

This is my startup gcode for the exact same print

G28
G1 Z10; 
G4 P1000; 
G32

G28
G1 Z10;
G1 X512.5 Y80 F5000
G4 P1000;
G30 Z2.8; find bed and set it to 2.8 which is distance from trigger point of probe to nozzle but this is NOT actually 2.8mm down this is variable distance
G4 P1000; wait a second for it to finish
G0 Z0; by moving to 0 from pretend 2.8 that was set im actually covering the full variable distance AND the fixed distance of 2.8mm so nozzle is right on bed
M306 Z0; now since nozzle on bed has been figured out dynamically set this as what will be treated as Z0 for this print session


This code is very very similar to the code im using for the rectangular grid leveling with the exception that I move to the first probe point to also set the Z height as instructed by the wiki. However with 3 point im still not getting the greatest compensation as I have 3 corners that are coming out perfectly but one corner and the center not consistent with the others, something im hoping using rectangular grid will help fix

I’m having a very similar problem. I’m really interested if you find a solution. I’ll be playing with my setup this weekend, hopefully I’ll have some notes for us to compare.