Question: Home Z with Z-probe before homing X & Y
-
Hello,
I have been pulling my hair out to get this resolved. I hope someone can shed some light on this mystery.
I would like to be able to home Z first with a Z-prove (proximity sensor), then home X & Y, because as of late I have replaced the mechanical endstops with optical ones for better accuracy. These can only be triggered at a certain height (Z-position) where I have attached them.
Now I have been tinkering with my homing files for hours, but could not get this to work properly. This is what "homeall.g" looks like at the moment:
; prepare homing & homing sequence G91 ; relative positioning G1 H2 Z10 F600 ; raise head to ensure it is above the switch trigger height G92 X0 Y0 Z0 ; step necessary to skip homing of X & Z ; home Z M558 F400 ; set Z-axis dive height & speed G30 ; home Z by probing the bed, remain in last position (S-1) ; home X & Y G1 H1 X-500 Y-405 F3000 ; move quickly to X and Y axis endstops and stop there (first pass) G1 H2 X15 Y5 F3000 ; go back a few mm G1 H1 X-500 Y-405 F360 ; move slowly to X and Y axis endstops once more (second pass) ; final positioning G90 ; absolute positioning G1 X5 Y5 Z0 F3000 ; go to new position
This is what I come from while I still had the mechanical switches and the script worked perfectly:
; Backup G91 ; relative positioning G1 H2 Z20 F600 ; raise head 20mm to ensure it is above the switch trigger height G1 H1 X-500 Y-405 F3000 ; move quickly to X and Y axis endstops and stop there (first pass) G1 H2 X15 Y5 F3000 ; go back a few mm G1 H1 X-500 Y-405 F360 ; move slowly to X and Y axis endstops once more (second pass) G90 ; absolute positioning G1 X4 Y0 F3000 ; go to first bed probe point and home Z M558 F600 ; set z-axis speed G30 ; home Z by probing the bed
Any idea what I might be missing?
Thank you!
-
@wieman01
the main issue that jumps out at me is that you aren't going to be able to guarantee that you're always homing Z in the same place. This may lead to inaccuracies in the Z height.
Why are you against homing X and Y first? -
Thank you. I missed to mentioned (corrected) that my optical endstops can only be triggered at a certain position where I have attached them to the frame. To home X I need to move the axis at a certain height if that makes more sense now.
Any smaller inaccuracies along the z-axis aren't a problem because this is a clay 3D printer where tolerances are much of a concern (within limits of course). The initial starting position in the X-Y-direction is what matters most.
I was just wondering if it can be done at all or whether I should ditch the idea and find another solution.
-
@wieman01 said in Question: Home Z with Z-probe before homing X & Y:
G92 X0 Y0 Z0 ; step necessary to skip homing of X & Z
You haven't posted your config.g so I can't see if you have any XY offsets set in G31 for the probe. You may be trying to force it to probe where it thinks the probe is off the bed.
What error message do you get, if any? What actually happens when you try to home all. You haven't said.
What happens if you just send G30 without the G92 X0 Y0 Z0?
-
@phaedrux said in Question: Home Z with Z-probe before homing X & Y:
@wieman01 said in Question: Home Z with Z-probe before homing X & Y:
G92 X0 Y0 Z0 ; step necessary to skip homing of X & Z
You haven't posted your config.g so I can't see if you have any XY offsets set in G31 for the probe. You may be trying to force it to probe where it thinks the probe is off the bed.
What error message do you get, if any? What actually happens when you try to home all. You haven't said.
What happens if you just send G30 without the G92 X0 Y0 Z0?
Hello @Phaedrux ,
Yes, some clarification perhaps, you're right.
First of all here are the relevant sections from "config.g":
M558 P5 C"^!zprobe.in" I1 G31 P1000 Z6.13 M564 H0 S0
(I know "M564 H0 S0" is not safe, but I want the system to be able to move beyond axes limits for now, I will change it back to "S1" at a later stage)
I have calibrated the Z probe trigger height according to the documentation, hence you see an offset.
When I home alll with "G92 X0 Y0 Z0" included, the probe moves down but stops after a few mm where it thinks Z0 is. So it never actually reaches the print bed.
When I omit "G92 X0 Y0 Z0" it complains about "insufficiently homed axes" and fails, just like if you were to issue a G30 in the console without homing X & Y first.
My goal is to be able to send a G30 first, then home X & Y. Right now the system won't allow it, because it EITHER does not move the probe to the bed close enough (with "G92 X0 Y0 Z0") OR it refuses to G30 because X & Y are not home (without "G92 X0 Y0 Z0").
I hope I am making sense now.
-
What about In your home all file to make the printer "believe" it have been homed IN XY first (I think its just to set G92 X0 Y0) and then home Z, and then home X and Y
-
@martin1454 said in Question: Home Z with Z-probe before homing X & Y:
What about In your home all file to make the printer "believe" it have been homed IN XY first (I think its just to set G92 X0 Y0) and then home Z, and then home X and Y
The "G92 X0 Y0" is what I discussed with @Phaedrux in my post above. When it is in there, the probe only moves a few mm down and never reaches the bed... unfortunately.
-
@wieman01 thats probably because you're saying Z is homed too in line 4.
Does it do the same thing if you omit the Z0 from G92? -
@jay_s_uk said in Question: Home Z with Z-probe before homing X & Y:
@wieman01 thats probably because you're saying Z is homed too in line 4.
Does it do the same thing if you omit the Z0 from G92?Wow, that did the trick! Thank you very much! I removed the "Z0" and it worked as expected right away. It's those small things sometimes that can trip you up. I really owe you one, my friend!
So it IS possible to probe Z before you home X & Y. Hope this thread serves as some sort of documentation for others with a similar issues.
Here is the correct code:
; prepare homing & homing sequence G91 ; relative positioning G92 X0 Y0 ; step necessary to skip homing of X & Z ; home Z (first pass) G1 H2 Z20 F600 ; raise head to ensure it is above the switch trigger height M558 F400 ; set speed G30 ; home Z by probing the bed, remain in last position (S-1) ; home X & Y G1 H1 X-500 Y-405 F3000 ; move quickly to X and Y axis endstops and stop there (first pass) G1 H2 X15 Y5 F3000 ; go back a few mm G1 H1 X-500 Y-405 F360 ; move slowly to X and Y axis endstops once more (second pass) G1 H2 X15 Y5 F3000 ; go back a few mm ; home Z (second pass) G1 H2 Z10 F600 ; raise head to ensure it is above the switch trigger height M558 F400 ; set speed G30 ; home Z by probing the bed, remain in last position (S-1) ; final positioning G90 ; absolute positioning G1 X10 Y10 Z20 F3000 ; go to new position
-
@wieman01 what I would add just for extra completeness is that you should rehome the Z axis at a set point on the build platform (preferably the centre) after you have completed the X and Y homing.
I know you are using it for printing clay, but it will give you a repeatable starting point just in case anything goes out of whack (especially if you have multi motor axes) and if you go for mesh levelling, its always good to use the same datum point to establish Z -
@jay_s_uk said in Question: Home Z with Z-probe before homing X & Y:
@wieman01 what I would add just for extra completeness is that you should rehome the Z axis at a set point on the build platform (preferably the centre) after you have completed the X and Y homing.
I know you are using it for printing clay, but it will give you a repeatable starting point just in case anything goes out of whack (especially if you have multi motor axes) and if you go for mesh levelling, its always good to use the same datum point to establish ZYes, you're right. I will do that, that makes sense. Thank you again, @jay_s_uk , your support was really helpful and will be put to good use.
N.B.: I have updated my script above to include the second pass z probing.
-
@wieman01 said in Question: Home Z with Z-probe before homing X & Y:
G31 P1000 Z6.13
You must define the X and Y offset of the probe. I think this is your issue.
-