Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

G28 / G30 probe related changes #25652

Merged
merged 15 commits into from
Sep 28, 2024

Conversation

dfries
Copy link
Contributor

@dfries dfries commented Apr 8, 2023

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.

dfries added 4 commits April 8, 2023 20:57
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.
It seems like a bad idea to leave it deployed after Z home.
"Fix, Improve Power-Loss Recovery (MarlinFirmware#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.
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
@dfries dfries force-pushed the bugfix-2.1.x_probe branch from e994134 to e4244fc Compare April 9, 2023 01:57
@thinkyhead
Copy link
Member

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.

@thinkyhead thinkyhead changed the title Bugfix 2.1.x probe related changes, G28 G30 G28 / G30 probe related changes Apr 10, 2023
@thinkyhead
Copy link
Member

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.

@thinkyhead
Copy link
Member

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.

@thinkyhead thinkyhead force-pushed the bugfix-2.1.x branch 3 times, most recently from de391db to 0f34163 Compare April 12, 2023 05:14
@thinkyhead
Copy link
Member

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.

@thinkyhead thinkyhead force-pushed the bugfix-2.1.x branch 2 times, most recently from 9c65146 to 4f65466 Compare January 26, 2024 00:13
@thinkyhead thinkyhead force-pushed the bugfix-2.1.x branch 3 times, most recently from 37d77d6 to aa44542 Compare September 28, 2024 01:10
@thinkyhead thinkyhead merged commit e70bd3c into MarlinFirmware:bugfix-2.1.x Sep 28, 2024
63 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants