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

PFW-1052: "Unknown z" improvements #1768

Merged
merged 2 commits into from
Nov 8, 2019

Conversation

wavexx
Copy link
Collaborator

@wavexx wavexx commented Apr 25, 2019

This PR fixes #1748

I introduce a new function, raise_z_above to move Z carefully when the current position is potentially unknown, making it useful for several lcd functions which can be issued just after starting the printer.

raise_z_above uses stallguard when the Z position is unknown and a regular move otherwise.
The following conditions will now use raise_z_above:

  • during filament loading/unloading, for blob clearance.

  • extruder spacing when preheating. This is done to avoid buildplate marks on the PEI sheet, which is something I have, as I often preheat from the menu and sometimes come back late.

  • before homing to avoid scratching the build plate. This was already done, but incorrectly.

In the original homing sequence, G28 will raise Z, home XY, then raise again unconditionally. If the printer was already at max height, a G28 will crash twice against the Z tops. The same was true during filament unloading if the printer was reset and issued an unload from the LCD.

raise_z_above is a no-op if the position is already above the target, which avoids several useless moves also when homing the axes independently.

@wavexx wavexx changed the title Unknown z improvements "Unknown z" improvements Apr 25, 2019
@wavexx wavexx force-pushed the unknown_z_improvements branch 3 times, most recently from 6c0b55a to cfe0347 Compare April 28, 2019 17:41
@wavexx
Copy link
Collaborator Author

wavexx commented Apr 28, 2019

Now also fixes #1668 and #1410 (which seems identical, both pointing to mmu_lcd_load_to_nozzle), superseding pr #1767. I cannot verify the MMU2 behavior myself though.

@wavexx
Copy link
Collaborator Author

wavexx commented May 18, 2019

@mkbel Noticed dad2065 now conflicts with this. Since lcd_mmu_load_to_nozzle can probably be called without Z being homed yet, I assume the above still applies.

It doesn't raise while extruding since SG can be on, but I could definitely also include this option by combining both moves if Z is known, and doing them separately if not.

@wavexx
Copy link
Collaborator Author

wavexx commented May 24, 2019

I updated the PR to combine raising and slow extrusion, as "rise_z" did.
The moves are only combined only when Z height is known.

@wavexx wavexx force-pushed the unknown_z_improvements branch from d055ae1 to 09ec930 Compare June 5, 2019 16:13
@wavexx wavexx mentioned this pull request Jul 11, 2019
@@ -3166,10 +3200,7 @@ void gcode_M701()
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 400 / 60, active_extruder); //fast sequence
st_synchronize();

marlin_rise_z();
current_position[E_AXIS] += 30;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why didn't you keep this line? With these changes my filament only loads to the nozzle and doesn't extrude any filament. I have to click NO and only then does it start extruding

@wavexx
Copy link
Collaborator Author

wavexx commented Jul 12, 2019 via email

@wavexx wavexx force-pushed the unknown_z_improvements branch from 09ec930 to 1ee8d58 Compare July 13, 2019 18:42
@wavexx
Copy link
Collaborator Author

wavexx commented Jul 13, 2019

Updated

@wavexx wavexx force-pushed the unknown_z_improvements branch from 1ee8d58 to 3c220ac Compare August 31, 2019 14:10
- Introduce raise_z_above to move Z carefully when the current position
  is potentially unknown, using stallguard
- Use raise_z_above for:
  * filament loading/unloading clearance
  * extruder spacing when preheating (to avoid buildplate marks on PEI)
  * before homing to avoid damaging the build plate and to avoid
    repeated Z moves as well

Since raise_z_above is conditional, it will only raise when needed.

Calling raise_z_above when the extruder position is unknown and already
at maximum travel is safe and will prevent further vertical moves.
@wavexx wavexx force-pushed the unknown_z_improvements branch from 3c220ac to e25befa Compare October 22, 2019 13:49
@DRracer DRracer merged commit 42d70f3 into prusa3d:MK3 Nov 8, 2019
@wavexx wavexx deleted the unknown_z_improvements branch November 9, 2019 17:16
@DRracer DRracer changed the title "Unknown z" improvements PFW-1052: "Unknown z" improvements Nov 15, 2019
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.

Z raised above maximum when issuing "G28" (autohome) or filament autoload from maximum height
3 participants