Marlin
Marlin copied to clipboard
G28 / G30 probe related changes
Description
4 commits related to probes.
- Moved
bltouch.triggered()
until after the raise - G28 add stow()
- G28 H Z, comment the H, it is generally useful, don't put it behind POWER_LOSS_RECOVERY
- G30 allow probe at current location
Moved bltouch.triggered()
…
until after the raise, which might just clear the trigger If it is triggered, something is triggering it. This is about to move up to a safe z height anyway, which could clear the trigger condition. The move will also give it additional time to settle if it is transient.
Remove only checking if it is in high_speed_mode, while it should only be deployed if in high speed mode, if it is in an alarm condition it needs to be reset either way.
G28 add stow()
G28
add stow()
when in high_speed_mode
It seems like a bad idea to leave it deployed after Z home.
G28 H Z, comment…
… the H, it is generally useful, don't put it behind POWER_LOSS_RECOVERY
G28 H Z, home Z at the current X/Y independent of POWER_LOSS_RECOVERY
"Fix, Improve Power-Loss Recovery (#22828)" enabled this H option, but only when POWER_LOSS_RECOVERY is defined. This is useful beyond power loss recover, such as printing from OctoPrint, or any time there may be a model at the normal safe x/y location and a Z home is needed. It is also more flexible in letting the user choose the location based on where the model was sliced for this print. Add comments to document H.
In my latest recovery I first needed the model height, home XY, home Z (avoiding the model), move to the model, G30 to probe the model height. Then I could restart the print at that location. Printing from OctoPrint power loss recovery was not involved.
Note the probe to nozzle offset means some locations next to the edge of the build plate will probe once, then fail because it sees the location as unreachable and fail the home Z.
G30 allow probe at current location
G30
select relative or absolute positions
Absolute is where to move the print head (nozzle), relative will move the probe to that bed location using the probe offset. Without X or Y this will now use absolute so it will probe straight down instead of first moving the probe to that location. This is useful when jogging the probe to a model you want to measure, or just repeating the measurement at the current location compared to always using relative tool head would move over with each measurement. From the G30
documentation "By default probe in the current position." Which I take to be straight down, otherwise it requires…
Requirements
I'm using the BLTouch. Commits that are BLTouch specific continue to have preprocessor macros.
It may be better for you to get involved with #25631 rather than bringing a new set of at-odds PRs into the mix. Please join the conversation there and we'll see which elements of this PR and #25655 and #25656 should be incorporated so as to bring everything up to snuff.
For G30
we should review and discuss the changes made at #24953. There are different possibilities for behavior, and of course CNC systems probably have their own approach. We should look at how the addition of X
and Y
parameters affects the standard, and the intent of G30
without XY in its original specification.
I've applied changes to G30
and tested them, more or less similar to where this PR started out, except that at the end of G30
the nozzle is always moved back to the original position, or if X / Y are given they override the original position. This ensures that repeated G30
will not move the nozzle around, and when X / Y are given, they produce the expected result of leaving the nozzle over the point where the probe was told to go. The extra lateral moves are actually kind of sensible, since you want to probe "the current position" which happens to be directly under the nozzle. I'm not sure it will be to everyone's liking, but it is perfectly consistent now, at least.
With the probe behavior fixed now merged, we can take a fresh look at the remaining changes proposed here. There is still the issue complicating G28 H
that Z homing with planar leveling relies on the homing position being known and preserved, since it is used as the fulcrum for tilt calculations.