-
-
Notifications
You must be signed in to change notification settings - Fork 19.2k
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
Feature: Hotend Shutdown/Restart While Waiting for Filament Change #5675
Comments
Ooooh... That would be nice. |
That would be almost trivial to add. Maybe a 5 minute default until the nozzle is turned off? |
I wouldn't think so. 5 minutes is a long time with no filament movement. I would be more worried about the heat traveling past the heatbreak and causing issues. |
Just the option to use or not use would be nice. |
Actually.... to your point... It is worse than that. The M600 retracts the filament out of the nozzle so the only filament left is the stuff that is stuck to the inside wall of the nozzle. I suspect my nozzle would be OK with a 5 minute delay. After all, the nozzle is going to hold temperature at the 'correct' number during that time. But still.... it would be easy to make it user configurable (probably in Configuration_adv.h). I am out of town without my printer. I have no way to test code right now. But I can take a look at it and see how bad the changes are to do this. If it isn't too complex, I might be able to post the changes for you to try out and verify. |
Ok. I am eagerly waiting. ;) |
Turning it off is easy... We just modify this loop to also watch for the default time out for the nozzle: while (wait_for_user) {
#if HAS_BUZZER
millis_t ms = millis();
if (ms >= next_buzz) {
BUZZ(300, 2000);
next_buzz = ms + 2500; // Beep every 2.5s while waiting
}
#endif
idle(true);
} But then... If the nozzle has been turned off, we will need to add a loop (much like UBL's G26 nozzle and bed preheat) to get it back up to temperature prior to continuing. This is the UBL code to get the bed and nozzle up to temperature. Obviously, the bed code can be removed. And probably the messages and confirmation should be changed. bool turn_on_heaters() {
#if HAS_TEMP_BED
#if ENABLED(ULTRA_LCD)
if ( bed_temp > 25 ) {
lcd_setstatus( "G26 Heating Bed. ", true);
lcd_quick_feedback();
#endif
UBL_has_control_of_LCD_Panel++;
thermalManager.setTargetBed( bed_temp );
while( abs(thermalManager.degBed()-bed_temp) > 3 ) {
if ( G29_lcd_clicked() ) {
strcpy( lcd_status_message, "Leaving G26 "); // We can't do lcd_setstatus() without having it continue;
while ( G29_lcd_clicked() ) // Debounce the switch
idle();
lcd_setstatus( "Leaving G26 ", true); // Now we do it right.
return 1;
}
idle();
}
#if ENABLED(ULTRA_LCD)
}
lcd_setstatus( "G26 Heating Nozzle. ", true);
lcd_quick_feedback();
#endif
#endif
//
// Now turn on the hotend (nozzle) and wait for it to come up to
// temperature.
thermalManager.setTargetHotend( hotend_temp , 0 );
while( abs(thermalManager.degHotend(0)-hotend_temp) > 3 ) {
if ( G29_lcd_clicked() ) {
strcpy( lcd_status_message, "Leaving G26 "); // We can't do lcd_setstatus() without having it continue;
while ( G29_lcd_clicked() ) // Debounce the switch
idle();
lcd_setstatus( "Leaving G26 ", true); // Now we do it right.
return 1;
}
idle();
}
#if ENABLED(ULTRA_LCD)
lcd_setstatus( " ", true);
lcd_quick_feedback();
#endif
return 0;
} I'll get things sorted out over the next few days and make one small code block you can surgically insert into M600. It should be just a cut and paste to try it out when I get the first pass of it done. |
Great! Thank you. |
OK! I have the first pass done. I'm sorry it took so long. I'm skiing and by the end of the day I'm so tired I can barely layout my cloths for the next day. Right now I have the nozzle time out set for 5 minutes (in Configuration_adv.h) You can change that to 10 seconds to verify correct operation if you don't want to wait that long. It is very likely it won't work the first time. But it should be close. If you tell me how it fails, we can probably get it working pretty quickly. You can download the code at: https://github.com/Roxy-3D/Marlin/tree/RCBugFix This addition is based off of RCBugFix (as of today). |
Very much appreciated. I'll give it a try and let you know. Thank you! |
Ok, this is what we have so far. It turns off the heaters after the timeout. It would be nice if it showed the temperature during this process. However, when I click to reheat, the machine just shuts down within seconds. |
Yes... I realized this morning I was missing a call to idle(); in the warm up loop. I didn't have any way to get to a computer and fix that until just now. Without the call to idle(); the watchdog timers will trigger and shut down the machine. I believe it should be showing the temperature during both the wait (and cool down) as well as the re-heat period. I have the idle() call inserted. If you can give it another try... It might just work for you now. @Tannoo Are you following this thread still? It might be ready for you to jump in and test it. |
Yes I am. And I will. |
I'm using the RepRapDiscountSmartGraphicsController. When M600 is sent, the whole screen goes to the changing filament message. It doesn't show any stats on the heaters or position or anything else during that time. I'll add the idle() call and try again. |
Oh! I understand what you are saying... I added a couple of messages: lcd_filament_change_show_message(FILAMENT_CHANGE_MESSAGE_CLICK_TO_HEAT_NOZZLE);
lcd_filament_change_show_message(FILAMENT_CHANGE_MESSAGE_WAIT_FOR_NOZZLES_TO_HEAT); I think what you are saying is the Filament Change code takes over the entire LCD Panel and right now we are losing the temperature and position numbers. It is only being used to display simple instructions to the user and not display the machine's status. When I get home and can look at things on a live printer, I suspect we can easily get those numbers back on the display. But I wouldn't dare try to do that without having a printer to look at. Please see if the new messages make sense and accurately reflect the state of the machine. |
Hopefully we don't loose the stepper positioning during this event. Meaning that I hope the steppers don't timeout. |
In Configuration_adv.h you can set the default stepper deactivation time. You may want to bump it up. #define DEFAULT_STEPPER_DEACTIVE_TIME 120 But... I wonder if the M600 filament change command should over ride this. If we are waiting for the user to do a filament change, should we keep the steppers locked in position? It would seem to me that would make sense. Does anybody have any strong feelings on this thought? |
I have a stronger feeling of where to put
tmps was not declared in this scope. |
@Tannoo It's supposed to be "temps" |
ok...Roxy must have been typing too fast. lol |
Also Tannoo, don't forget to enable: #define FILAMENT_CHANGE_FEATURE // Enable filament exchange menu and M600 g-code (used for runout sensor too) in configuration_adv.h |
Well, seems to work now. I haven't used it mid print yet, but so far so good. Looking forward to display data during the filament change. |
I've got a super bad internet connection. I apologize for the double post! (but I deleted it!) I'm kind of soliciting feedback about how badly people will react if #define DEFAULT_STEPPER_DEACTIVE_TIME 120 doesn't always do what it is specified as. If we over ride this timeout, we aren't doing what we say we will do. But to your point.... I don't think it makes sense to lose position just because the user takes 10 minutes to change the filament. If somebody has a strong feeling about this, PLEASE SPEAK UP NOW! Please explain why it gives you heartburn! Maybe the 'Right' way to handle this is to add one more #define in the Filament Change configuration area that says: #define STEPPER_MOTORS_DONT_TIMEOUT_DURING_FILAMENT_CHANGE |
I would strongly say yes, lock the steppers while the filament change is occuring. My client can go for very prolonged periods (hours up to a day maybe) before getting to change the filament. It would be very bad if the position changed because the motors were no longer locked. |
A little humor never hurts anything. :P |
Very true. Some of us aren't as good at humor as others...(like me) |
Agreed... I'll start looking at how complicated it will be to add the control: #define STEPPER_MOTORS_DONT_TIMEOUT_DURING_FILAMENT_CHANGE That's not a joke! |
I sent Adding the hotend temp on the filament change screen would be a good thing. Plus:
Should it say to |
I'm not sure it is valid to change multiple nozzle filaments with a single M600. The reason is it is very typical to lower the temperature of all nozzles that are not the active tool at the moment. I'm not sure the lower temperature is appropriate for retracting and removing the filament and it probably is not suitable for starting the new filament.
stepper.synchronize();
lcd_filament_change_show_message(FILAMENT_CHANGE_MESSAGE_UNLOAD);
// Unload filament
...
// Synchronize steppers and then disable extruders steppers for manual filament changing
stepper.synchronize();
disable_e0();
disable_e1();
disable_e2();
disable_e3();
delay(100);
...
// Wait for filament insert by user and press button
lcd_filament_change_show_message(FILAMENT_CHANGE_MESSAGE_INSERT); The retraction is very short in time. Are you sure you didn't just miss it? But I wonder if we need an idle(); call right after the lcd_filament_change_show_message(FILAMENT_CHANGE_MESSAGE_UNLOAD); to get it up onto the display before it gets over written by the next lcd_filament_change_show_message() call ???? Can you try adding an idle(); right after that and see if that forces the message to be displayed? If so, I'll update the fork with that at the same time I add the #define STEPPER_MOTORS_DONT_TIMEOUT_DURING_FILAMENT_CHANGE |
I can see it being really quick if the Dunno what happened to this one yet. BTW, I have removed the (s)'s. |
OK! I'll look at that tomorrow. That probably won't be hard to get cleaned up. |
@Tannoo I didn't check to see if it compiles clean. (It should) But it should behave correctly in all cases now. |
I was about to try to create a PR on your branch....I had just gotten it to work by adding just 2 lines:
That would be the |
That is because I found out that the |
Yeah... There are a couple of solutions. The problem is, if the nozzle doesn't time out... The temps are never remembered. So in the case where the user terminates the loop early... It wants to wait for the nozzle to be at some random temperatures. In my fix, I just move the part that stores the current nozzle temperatures (before setting them at 0.0) up outside the loop so we always know what the temps should be. |
ok. I will try it. |
Compiles fine. |
Now the big question: I'm going to put this into the UBL code base. But that is a development branch. New features are welcome in development branches. The question I have is if these new features should go into a 'Release Candidate'. Opinions from the users are very welcome. |
I say go for it. |
Release candidates are mostly bug free. |
The issue is... If we keep adding new options and features, the code base never stabilizes. I feel pretty confident about these changes. But it really does set a bad example. |
Further to qualify "the ENTIRE reason I suggested it", my client originally contacted me about the issue with the hotend turning off during the filament change longterm wait and it was a solution we came up with together. |
I think I agree. This actually is a safety item (at least to help protect the printer) and in hindsight it really is necessary for the function to work correctly. I feel better about merging it! |
Do you think it also makes sense for the print job timer to pause itself during M600? …adding that. |
Another thing that may happen if the machine is left sitting too long inside |
What about double the nozzle shutdown time down to a min of 10mins? |
Maybe a max of an hour? |
Pausing the print job timer, I have no objections to that. |
Pausing print timer sounds good to me. |
Various fixes, print job timer pause, and the problem of the first click being eaten have been fixed, and merged into |
What was eating the 'first click' ? I thought it was eating the 'last click' ! That might have been why I was having a hard time finding it.
Will do... |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Title kind of says it all. On a long print, the printer may come to a filament change point in code and need to wait some time before the user comes along to change the filament. There's no point in the hotend staying on for hours until one comes along to change the filament. In the m600 code, perhaps there could be code to shut down the hotend in when #defined HOTEND_OFF_DURING_FILAMENT_CHANGE.
The text was updated successfully, but these errors were encountered: