Another Question about G30 and v3.2
-
While trying to help out folks here I was motivated to run some tests. For that I usedbolded text a Duet 3 Mini 5 with v3.2 firmware.
Here are the relevant parts of the configuration:
; end stops M574 X1 S1 P"!^io0.in" ; configure active-high endstop for low end on X M574 Y1 S1 P"!^io1.in" ; configure active-high endstop for low end on Y M574 Z1 S1 P"!^io2.in" ; configure active-high endstop for low end on Z ; z probe M558 P5 C"^io3.in" H5 F120 T10000 R0.2 A1 S0.03 ; set type for filtered digital and set default parameters G31 P500 X0 Y0 Z10 ; set trigger value, offset and trigger height (larger = closer)
The probe X Y offsets are 0 because I was simulating a Z probe using a simple switch.
What I found is the basis for my question.
The conditions for the test were X and Y homed, Z not homed.
Even with an end stop configured for the Z axis when issuing the G30 the firmware began the process of using the Z probe to home the Z axis.
I expected to see an error about an un-homed axis.
Triggering the probe completed the homing of Z.
With Z homed subsequent G30s performed the typical bed probing process which was easily observed by the limited movement of the Z axis before the error message about probe not triggered popped up - which I caused by not triggering the probe.
When the probe is used for homing it allows much more movement before displaying the error.
So now to my question: Why does it work this way? Why does it not see that there is a Z end stop configured and not try to home with the Z probe?
Thanks.
Frederick
-
I'm not sure I understand. G30 will call the probe regardless of what is configured with M574 Z.
-
@Phaedrux said in Another Question about G30 and v3.2:
I'm not sure I understand. G30 will call the probe regardless of what is configured with M574 Z.
Understood - that is the behavior I observed.
It just seems to me that if Z end stops are installed and configured that should be a signal to the firmware to not try and home using the Z probe.
Some folks use a removable Z probe and only install it to, say, create the height map. Clearly homing Z with the probe missing might not end well.
It's not a really big deal - the behavior caught me by surprise - it's just not how I would have done it.
Frederick
-
@fcwilt depends whats in your homing files
What if you have Z endstops installed at the maxima and always use the probe to home?
What should happen then? -
@jay_s_uk said in Another Question about G30 and v3.2:
@fcwilt depends whats in your homing files
What if you have Z endstops installed at the maxima and always use the probe to home?
What should happen then?That's exactly what I have.
G1 H1 Z+ to home to zmax with the endstop
G30 to home with the probe -
@jay_s_uk said in Another Question about G30 and v3.2:
@fcwilt depends whats in your homing files
What if you have Z endstops installed at the maxima and always use the probe to home?
What should happen then?The location of the Z end stop does not enter into it.
What happens is that if Z is homed or not it will attempt to probe the bed and set the Z=0 datum - and mark Z homed in the process.
But I think you have missed my point.
I expected that with a configured Z end stop that any attempt to use the Z probe when the Z axis was not homed would generate an un-homed axis error.
Consider my printer that has three Z steppers, each with it's own end stop. I rely on homing Z using the end stops to get the bed nearly level even if it starts out very un-level - as @Phaedrux has seen in the video I posted.
Given the starting state that I used in the video and the current behavior of G30 if I attempted to execute G30 it would try to probe the bed and crash since parts of the extruder assembly would contact the bed before the probe would.
I am not criticizing the current behavior of G30 - just remarking that it surprised me.
Now knowing how it works I will simply exercise caution to avoid inadvertently executing a G30 when the Z axis is not homed.
Frederick
-
@fcwilt said in Another Question about G30 and v3.2:
I expected that with a configured Z end stop that any attempt to use the Z probe when the Z axis was not homed would generate an un-homed axis error.
G30 is the same as G1 H1. Seek the endstop. The probe is just a mobile endstop afterall.
It would be abnormal to call G30 by itself. Same way it would be abnormal to call G1 H1 moves by themselves. They would normally be called in homeall/homez/bed where there is some preparation and sequencing done.
I guess asked another way, if you didn't have an endstop for Z at all, and only a probe, as many do, how would you home z before using the probe, when you only have the probe to home z?
-
@Phaedrux
That's how my machines are set up.
None of them have a z endstop, only probes. -
@fcwilt said in Another Question about G30 and v3.2:
M574 X1 S1 P"!^io0.in" ; configure active-high endstop for low end on X
Is the comment correct? IMHO the endstops pullup is activated and is active low (inverted)
When I upgraded from v2.05 to v3.x, I had to change the probe definition from "!^..." to "^..." although the hardware didn't change. (capacitive NPN probe)
Bug or feature?In your test, did you try to trigger the z-endstop instead of the probe? Would be interesting to see if there's an OR behaviour when running G30.
-
@o_lampe said in Another Question about G30 and v3.2:
@fcwilt said in Another Question about G30 and v3.2:
M574 X1 S1 P"!^io0.in" ; configure active-high endstop for low end on X
Is the comment correct? IMHO the endstops pullup is activated and is active low (inverted)
Yes - I was using the NC (normally closed) terminal on the switch.
Frederick