Issue #23540, Eliminate unwanted Z movement when parking head #23565
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This is a work around for issue #23540.
Root cause is not yet known.
Early in the pause feature it attempts to do a retract but in doing so it also moves the head to the unleveled location. The same unwanted head movement also happens when restoring the head at the end of the pause.
Normally the unwanted head movement moves the head away from the print (upwards towards the park position) but, in the case where the nozzle is the probe, this is towards the print.
This work around turns off leveling before the E movement command and then restores it to it's former state immediately afterward.
In the case of UBL bilinear leveling, if the leveling matrix value is posiitive then the unwanted head movement will be towards the bed/print. If the matrix value is negative then the unwanted head movement is away from the bed (toward the park position).
Requirements
For this to be a problem the bed probe must trigger AFTER the nozzle touches the bed, PAUSE must be enabled and LEVELING must be enabled.
The DUET Smart Effector is an example of a probe that triggers after the nozzle touches the bed.
This isn't a problem for the vast majority of users because they use probes that trigger before the head touches the bed.
Configurations
See Issue #23540 for config files and for a gcode file that can be used to safely test for this issue.
This fix has been tested on a delta printer using a DUET Smart Effector and a BTT Smart Filament Sensor with UBL bilinear leveling enabled.