Skip to content

[1.1.x] Fix G1 behaviour after tool unpark#10777

Merged
thinkyhead merged 3 commits intoMarlinFirmware:bugfix-1.1.xfrom
orcinus:bugfix-1.1.x
May 22, 2018
Merged

[1.1.x] Fix G1 behaviour after tool unpark#10777
thinkyhead merged 3 commits intoMarlinFirmware:bugfix-1.1.xfrom
orcinus:bugfix-1.1.x

Conversation

@orcinus
Copy link
Contributor

@orcinus orcinus commented May 18, 2018

Setup

  • DUAL_X_CARRIAGE
  • DXC_AUTO_PARK_MODE

Description

After every tool change, the first G1 that follows (whatever it is, even if not affecting X) results in the carriage going back to its X parking position very slowly, then the actual requested G1 move after that.

Reverting do_blocking_move_to back to prepare_move_to_destination in tool_change seems to completely fix the issue.

Benefits

Pre-fix:
https://www.youtube.com/watch?v=m4hY3lAxMaw

Post-fix:
https://www.youtube.com/watch?v=2RZavWEiwBY

Related Issues

Issue 2 from #10749

@GMagician
Copy link
Contributor

GMagician commented May 19, 2018

@orcinus I think this will break SWITCHING_EXTRUDER SWITCHING_NOZZLE logic!
I suppose do_blocking_move_to was used to move xy before z: xy is repositionated then Z is re-lowered

@thinkyhead
Copy link
Member

thinkyhead commented May 19, 2018

If the only issue is that destination is not being copied to current_position, then the correct solution is:

  do_blocking_move_to(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS]);
+ set_current_from_destination();

Please give that a try and report whether it works.

@orcinus
Copy link
Contributor Author

orcinus commented May 19, 2018

Please give that a try and report whether it works.

Unfortunately, no, same behaviour as just do_blocking_move_to.

I could just wrap it in #if ENABLED(DUAL_X_CARRIAGE) ... #else or #if DISABLED(SWITCHING_NOZZLE) ... #else. Not a permanent solution, though, if the issue is elsewhere.

FWIW, prepare_move_to_destination() causes issues too, but only if doing a new tool_change before the unpark finishes. This will lead to completely messed up current position, and eventually one tool crashing into another. This scenario (two tool changes in a row) isn't very probable, though. If that becomes a problem, the tool_change state can be tracked via a new var (i don't think there is one currently), so one tool_change in progress blocks the next until finished.

@thinkyhead
Copy link
Member

If the precise cause of the issue can be determined, that would be best. Here is a hint…

In a dual X carriage setup any G0 through G5 move is supposed to unpark the parked extruder before initiating the move.

The unpark logic is the most likely source of the strange slow move, and DEBUG_LEVELING_FEATURE plus M111 S32 will add extra debug messages to all these procedures. So please turn on this debugging and see what kind of output it gives.

If needed, we can add further debug output to track down the precise logical error.

@thinkyhead thinkyhead force-pushed the bugfix-1.1.x branch 4 times, most recently from b36aa68 to 8fd00ff Compare May 20, 2018 01:59
@orcinus
Copy link
Contributor Author

orcinus commented May 20, 2018

DEBUG_LEVELING_FEATURE won't compile with MBL, trying without it.

Edit: scratch that, it won't work with no BL, and i don't want to test with UBL as that already has problems of its own with tool_change so it will just muddy the waters further... Gonna see what's breaking with MBL and try and patch it up for testing purposes.

@orcinus
Copy link
Contributor Author

orcinus commented May 20, 2018

Figured it out...
Turns out DEBUG_LEVELING_FEATURE needs to have ENABLE_LEVELING_FADE_HEIGHT or it fails on get_z function signature (three parameters vs. two).

@orcinus
Copy link
Contributor Author

orcinus commented May 20, 2018

I think i've found the issue.
Commit coming soon.

@orcinus
Copy link
Contributor Author

orcinus commented May 20, 2018

As it turns out, tool_change wasn't setting active_extruder_parked to false after unparking, causing the dual_x_carriage_unpark called from G0-G5 to attempt an unpark of an already unparked extruder.

thinkyhead added a commit that referenced this pull request May 22, 2018
@thinkyhead thinkyhead merged commit 4e67660 into MarlinFirmware:bugfix-1.1.x May 22, 2018
thinkyhead added a commit that referenced this pull request May 22, 2018
Fix #10777 for 2.0.x

Co-Authored-By: Ante Vukorepa <o.orcinus@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants