Auto Filament Change Reworked: finally working#3638
Auto Filament Change Reworked: finally working#3638clexpert wants to merge 17 commits intoMarlinFirmware:RCBugFixfrom clexpert:RCBugFix
Conversation
Marlin/Configuration_adv.h
Outdated
| #define AUTO_FILAMENT_CHANGE //This extrude filament until you press the button on LCD | ||
| #define AUTO_FILAMENT_CHANGE_LENGTH 0.04 //Extrusion length on automatic extrusion loop | ||
| #define AUTO_FILAMENT_CHANGE_FEEDRATE 300 //Extrusion feedrate (mm/min) on automatic extrusion loop | ||
| #define FILAMENT_CHANGE_ENABLE // Enable filament exchange menu and M600 g-code (used for runout sensor too) |
There was a problem hiding this comment.
We should keep it disabled by default.
Marlin/Marlin_main.cpp
Outdated
| #endif | ||
|
|
||
| //return to normal | ||
| millis_t ms = millis(); |
There was a problem hiding this comment.
The buzz block should be inside #if HAS_BUZZER.
There was a problem hiding this comment.
@clexpert if ms is not used elsewhere I would suggest:
#if HAS_BUZZER
millis_t ms = millis();
if (ms >= next_tick) {
buzz(300, 2000);
next_tick = ms + 2500; // Beep every 2.5s while waiting
}
#endif| void lcd_buttons_update(); | ||
| extern volatile uint8_t buttons; //the last checked buttons in a bit array. | ||
| #if ENABLED(FILAMENT_CHANGE_ENABLE) | ||
| enum FilamentChangeMessage { |
There was a problem hiding this comment.
Remove the attributions from the enum:
enum FilamentChangeMessage {
FILAMENT_CHANGE_MESSAGE_INIT,
FILAMENT_CHANGE_MESSAGE_UNLOAD,
FILAMENT_CHANGE_MESSAGE_INSERT,
FILAMENT_CHANGE_MESSAGE_LOAD,
FILAMENT_CHANGE_MESSAGE_EXTRUDE,
FILAMENT_CHANGE_MESSAGE_OPTION,
FILAMENT_CHANGE_MESSAGE_RESUME,
FILAMENT_CHANGE_MESSAGE_STATUS
};|
@clexpert good work this seems to be very promising, a proper process to handle filament changes on single extruder setups was really missing in Marlin. |
|
@clexpert may I suggest a rebase of this PR using |
|
@jbrazio Thank you very much for all your quick comments. I corrected all your remarks. So I use web based github only so I cannot merge commits together. |
|
Is there anything in here that will prevent this from working with multiple extruders? i.e., if T1 is the active tool, that should be the tool where the retraction occurs. If a position to move to is configured, this should honor any M218 settings. Just a thought as multiple extruders aren't always multiple colors, but sometimes multiple materials (soluble support for example). Many thanks for working auto filament change whatever the response :) |
|
That is a very interesting point @Spoonunit, |
Marlin/Marlin_main.cpp
Outdated
| #ifdef FILAMENTCHANGE_ZADD | ||
| else destination[Z_AXIS] += FILAMENTCHANGE_ZADD; | ||
| #ifdef FILAMENT_CHANGE_Z_ADD | ||
| else destination[Z_AXIS] += FILAMENT_CHANGE_Z_ADD; |
There was a problem hiding this comment.
An improvement suggestion, this should check if the move will not go over Z-Max.
|
@jbrazio Thanks for the idea. I will check it and update today. |
|
@jbrazio |
|
@clexpert This requires some git ninja skills as @thinkyhead did some refactoring on functions that are now methods and your code is still using the function names. When this is merged I'm sure @thinkyhead will resolve those conflicts or I can step in to help you out on the command line as it seems you're lacking the skills. Do you consider this rework done thus ready to be merged ? |
|
@jbrazio It would be nice :-) Yes, I am sure that this rework is ready to be merged. I tested it on my 3D printer without any problem. I only think that it needs test on delta printer. I think that @thinkyhead has the one. |
|
@thinkyhead is running a Prusa i3, Delta.. @Roxy-3DPrintBoard has one and @CONSULitAS also has a Kossel I believe. |
|
I've made a copy of this branch and will patch it up and rebase it to the latest |
|
@jbrazio Would like to test asap. But i am rather busy now. |
|
This is moved over to #3662, rebased on the latest code with excess commits squashed. |
TM: Consume LCD click after calibration
(Don't mix up with Manual filament change #3605)
Background
Months ago, someone suggested reworking (or at leats make existing function work) Auto filament change in #2926 and #2933. This function is working (as mentioned there) in Prusa's firmware and many other closed-source 3D printer. But neither of them is sufficient to be publicated for community of most used 3D firmware, with variety of printers, extruders and displays. So we started working on complete rewrite of filament change function, to make it work for us and then make it open to everyone here on GitHub.
Functions
This change rewrites Auto Filament Change controlled by G-Code M600.
The procedure of change is:
Every step is clearly documented with information messages displayed on the display. As suggested by others, KEEP_ALIVE is also used. Simple working procedure makes it easy to change filament for everyone.
TODO list for community