M600 has timeout for nozzle, different procedure for unload

This commit is contained in:
PavelSindler 2018-01-15 11:30:28 +01:00
parent 1fbed53200
commit c36af887b7
8 changed files with 121 additions and 14 deletions

View file

@ -546,7 +546,7 @@ const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic o
#define HEATBED_V2 #define HEATBED_V2
#define M600_TIMEOUT 10 //600 //seconds #define M600_TIMEOUT 600 //seconds
//#define SUPPORT_VERBOSITY //#define SUPPORT_VERBOSITY

View file

@ -5525,12 +5525,14 @@ case 404: //M404 Enter the nominal filament width (3mm, 1.75mm ) N<3.0> or disp
KEEPALIVE_STATE(PAUSED_FOR_USER); KEEPALIVE_STATE(PAUSED_FOR_USER);
uint8_t cnt = 0; uint8_t cnt = 0;
int counterBeep = 0; int counterBeep = 0;
lcd_display_message_fullscreen_P(MSG_PRESS_TO_UNLOAD); fanSpeed = 0;
unsigned long waiting_start_time = millis(); unsigned long waiting_start_time = millis();
while (!lcd_clicked() && (millis() < waiting_start_time + M600_TIMEOUT * 1000)){ uint8_t wait_for_user_state = 0;
lcd_display_message_fullscreen_P(MSG_PRESS_TO_UNLOAD);
while (!(wait_for_user_state == 0 && lcd_clicked())){
cnt++; //cnt++;
manage_heater(); manage_heater();
manage_inactivity(true); manage_inactivity(true);
@ -5540,7 +5542,7 @@ case 404: //M404 Enter the nominal filament width (3mm, 1.75mm ) N<3.0> or disp
#endif // SNMM*/ #endif // SNMM*/
if (cnt == 0) //if (cnt == 0)
{ {
#if BEEPER > 0 #if BEEPER > 0
if (counterBeep == 500) { if (counterBeep == 500) {
@ -5553,6 +5555,7 @@ case 404: //M404 Enter the nominal filament width (3mm, 1.75mm ) N<3.0> or disp
if (counterBeep == 20) { if (counterBeep == 20) {
WRITE(BEEPER, LOW); WRITE(BEEPER, LOW);
} }
counterBeep++; counterBeep++;
#else #else
#if !defined(LCD_FEEDBACK_FREQUENCY_HZ) || !defined(LCD_FEEDBACK_FREQUENCY_DURATION_MS) #if !defined(LCD_FEEDBACK_FREQUENCY_HZ) || !defined(LCD_FEEDBACK_FREQUENCY_DURATION_MS)
@ -5562,18 +5565,61 @@ case 404: //M404 Enter the nominal filament width (3mm, 1.75mm ) N<3.0> or disp
#endif #endif
#endif #endif
} }
switch (wait_for_user_state) {
case 0:
delay_keep_alive(4);
if (millis() > waiting_start_time + M600_TIMEOUT * 1000) {
lcd_display_message_fullscreen_P(MSG_PRESS_TO_PREHEAT);
wait_for_user_state = 1;
setTargetHotend(0, 0);
setTargetHotend(0, 1);
setTargetHotend(0, 2);
st_synchronize();
disable_e0();
disable_e1();
disable_e2();
}
break;
case 1:
delay_keep_alive(4);
if (lcd_clicked()) {
setTargetHotend(HotendTempBckp, active_extruder);
lcd_wait_for_heater();
wait_for_user_state = 2;
}
break;
case 2:
if (abs(degTargetHotend(active_extruder) - degHotend(active_extruder)) < 1) {
lcd_display_message_fullscreen_P(MSG_PRESS_TO_UNLOAD);
waiting_start_time = millis();
wait_for_user_state = 0;
}
else {
counterBeep = 20; //beeper will be inactive during waiting for nozzle preheat
lcd.setCursor(1, 4);
lcd.print(ftostr3(degHotend(active_extruder)));
}
break;
}
} }
WRITE(BEEPER, LOW); WRITE(BEEPER, LOW);
lcd_change_fil_state = 0; lcd_change_fil_state = 0;
while (lcd_change_fil_state == 0) {
// Unload filament
lcd_display_message_fullscreen_P(MSG_UNLOADING_FILAMENT); lcd_display_message_fullscreen_P(MSG_UNLOADING_FILAMENT);
KEEPALIVE_STATE(IN_HANDLER); KEEPALIVE_STATE(IN_HANDLER);
custom_message = true; custom_message = true;
lcd_setstatuspgm(MSG_UNLOADING_FILAMENT); lcd_setstatuspgm(MSG_UNLOADING_FILAMENT);
// Unload filament
if (code_seen('L')) if (code_seen('L'))
{ {
target[E_AXIS] += code_value(); target[E_AXIS] += code_value();
@ -5625,16 +5671,31 @@ case 404: //M404 Enter the nominal filament width (3mm, 1.75mm ) N<3.0> or disp
//finish moves //finish moves
st_synchronize(); st_synchronize();
lcd_display_message_fullscreen_P(MSG_PULL_OUT_FILAMENT);
//disable extruder steppers so filament can be removed //disable extruder steppers so filament can be removed
disable_e0(); disable_e0();
disable_e1(); disable_e1();
disable_e2(); disable_e2();
delay(100); delay(100);
WRITE(BEEPER, HIGH);
counterBeep = 0;
while(!lcd_clicked() && (counterBeep < 50)) {
if(counterBeep > 5) WRITE(BEEPER, LOW);
delay_keep_alive(100);
counterBeep++;
}
WRITE(BEEPER, LOW);
KEEPALIVE_STATE(PAUSED_FOR_USER); KEEPALIVE_STATE(PAUSED_FOR_USER);
lcd_change_fil_state = !lcd_show_fullscreen_message_yes_no_and_wait_P(MSG_UNLOAD_SUCCESSFULL, false, false); lcd_change_fil_state = lcd_show_fullscreen_message_yes_no_and_wait_P(MSG_UNLOAD_SUCCESSFULL, false, true);
if (lcd_change_fil_state == 0) lcd_show_fullscreen_message_and_wait_P(MSG_CHECK_IDLER);
//lcd_return_to_status(); //lcd_return_to_status();
lcd_update_enable(true); lcd_update_enable(true);
}
//Wait for user to insert filament //Wait for user to insert filament
lcd_wait_interact(); lcd_wait_interact();
//load_filament_time = millis(); //load_filament_time = millis();
@ -5766,6 +5827,7 @@ case 404: //M404 Enter the nominal filament width (3mm, 1.75mm ) N<3.0> or disp
//Not let's go back to print //Not let's go back to print
fanSpeed = fanSpeedBckp;
//Feed a little of filament to stabilize pressure //Feed a little of filament to stabilize pressure
target[E_AXIS]+= FILAMENTCHANGE_RECFEED; target[E_AXIS]+= FILAMENTCHANGE_RECFEED;

View file

@ -341,6 +341,13 @@ const char * const MSG_CHANGING_FILAMENT_LANG_TABLE[LANG_NUM] PROGMEM = {
MSG_CHANGING_FILAMENT_CZ MSG_CHANGING_FILAMENT_CZ
}; };
const char MSG_CHECK_IDLER_EN[] PROGMEM = "Please open idler and remove filament manually.";
const char MSG_CHECK_IDLER_CZ[] PROGMEM = "Prosim otevrete idler a manualne odstrante filament.";
const char * const MSG_CHECK_IDLER_LANG_TABLE[LANG_NUM] PROGMEM = {
MSG_CHECK_IDLER_EN,
MSG_CHECK_IDLER_CZ
};
const char MSG_CHOOSE_EXTRUDER_EN[] PROGMEM = "Choose extruder:"; const char MSG_CHOOSE_EXTRUDER_EN[] PROGMEM = "Choose extruder:";
const char MSG_CHOOSE_EXTRUDER_CZ[] PROGMEM = "Vyberte extruder:"; const char MSG_CHOOSE_EXTRUDER_CZ[] PROGMEM = "Vyberte extruder:";
const char * const MSG_CHOOSE_EXTRUDER_LANG_TABLE[LANG_NUM] PROGMEM = { const char * const MSG_CHOOSE_EXTRUDER_LANG_TABLE[LANG_NUM] PROGMEM = {
@ -1437,6 +1444,13 @@ const char * const MSG_PRESS_LANG_TABLE[LANG_NUM] PROGMEM = {
MSG_PRESS_CZ MSG_PRESS_CZ
}; };
const char MSG_PRESS_TO_PREHEAT_EN[] PROGMEM = "Press knob to preheat nozzle and continue.";
const char MSG_PRESS_TO_PREHEAT_CZ[] PROGMEM = "Pro nahrati trysky a pokracovani stisknete tlacitko.";
const char * const MSG_PRESS_TO_PREHEAT_LANG_TABLE[LANG_NUM] PROGMEM = {
MSG_PRESS_TO_PREHEAT_EN,
MSG_PRESS_TO_PREHEAT_CZ
};
const char MSG_PRESS_TO_UNLOAD_EN[] PROGMEM = "Please press the knob to unload filament"; const char MSG_PRESS_TO_UNLOAD_EN[] PROGMEM = "Please press the knob to unload filament";
const char MSG_PRESS_TO_UNLOAD_CZ[] PROGMEM = "Pro vysunuti filamentu stisknete prosim tlacitko"; const char MSG_PRESS_TO_UNLOAD_CZ[] PROGMEM = "Pro vysunuti filamentu stisknete prosim tlacitko";
const char * const MSG_PRESS_TO_UNLOAD_LANG_TABLE[LANG_NUM] PROGMEM = { const char * const MSG_PRESS_TO_UNLOAD_LANG_TABLE[LANG_NUM] PROGMEM = {
@ -1484,6 +1498,13 @@ const char * const MSG_PRUSA3D_HOWTO_LANG_TABLE[LANG_NUM] PROGMEM = {
MSG_PRUSA3D_HOWTO_CZ MSG_PRUSA3D_HOWTO_CZ
}; };
const char MSG_PULL_OUT_FILAMENT_EN[] PROGMEM = "Please pull out filament immediately";
const char MSG_PULL_OUT_FILAMENT_CZ[] PROGMEM = "Prosim vyjmete urychlene filament";
const char * const MSG_PULL_OUT_FILAMENT_LANG_TABLE[LANG_NUM] PROGMEM = {
MSG_PULL_OUT_FILAMENT_EN,
MSG_PULL_OUT_FILAMENT_CZ
};
const char MSG_REBOOT_EN[] PROGMEM = "Reboot the printer"; const char MSG_REBOOT_EN[] PROGMEM = "Reboot the printer";
const char MSG_REBOOT_CZ[] PROGMEM = "Restartujte tiskarnu"; const char MSG_REBOOT_CZ[] PROGMEM = "Restartujte tiskarnu";
const char * const MSG_REBOOT_LANG_TABLE[LANG_NUM] PROGMEM = { const char * const MSG_REBOOT_LANG_TABLE[LANG_NUM] PROGMEM = {
@ -2195,8 +2216,8 @@ const char * const MSG_UNLOAD_FILAMENT_4_LANG_TABLE[LANG_NUM] PROGMEM = {
MSG_UNLOAD_FILAMENT_4_CZ MSG_UNLOAD_FILAMENT_4_CZ
}; };
const char MSG_UNLOAD_SUCCESSFULL_EN[] PROGMEM = "Repeat unloading filament?"; const char MSG_UNLOAD_SUCCESSFULL_EN[] PROGMEM = "Was filament successfully unloaded?";
const char MSG_UNLOAD_SUCCESSFULL_CZ[] PROGMEM = "Opakovat vysunuti filamentu?"; const char MSG_UNLOAD_SUCCESSFULL_CZ[] PROGMEM = "Bylo vysunuti filamentu uspesne?";
const char * const MSG_UNLOAD_SUCCESSFULL_LANG_TABLE[LANG_NUM] PROGMEM = { const char * const MSG_UNLOAD_SUCCESSFULL_LANG_TABLE[LANG_NUM] PROGMEM = {
MSG_UNLOAD_SUCCESSFULL_EN, MSG_UNLOAD_SUCCESSFULL_EN,
MSG_UNLOAD_SUCCESSFULL_CZ MSG_UNLOAD_SUCCESSFULL_CZ

View file

@ -126,6 +126,8 @@ extern const char* const MSG_CHANGE_SUCCESS_LANG_TABLE[LANG_NUM];
#define MSG_CHANGE_SUCCESS LANG_TABLE_SELECT(MSG_CHANGE_SUCCESS_LANG_TABLE) #define MSG_CHANGE_SUCCESS LANG_TABLE_SELECT(MSG_CHANGE_SUCCESS_LANG_TABLE)
extern const char* const MSG_CHANGING_FILAMENT_LANG_TABLE[LANG_NUM]; extern const char* const MSG_CHANGING_FILAMENT_LANG_TABLE[LANG_NUM];
#define MSG_CHANGING_FILAMENT LANG_TABLE_SELECT(MSG_CHANGING_FILAMENT_LANG_TABLE) #define MSG_CHANGING_FILAMENT LANG_TABLE_SELECT(MSG_CHANGING_FILAMENT_LANG_TABLE)
extern const char* const MSG_CHECK_IDLER_LANG_TABLE[LANG_NUM];
#define MSG_CHECK_IDLER LANG_TABLE_SELECT(MSG_CHECK_IDLER_LANG_TABLE)
extern const char* const MSG_CHOOSE_EXTRUDER_LANG_TABLE[LANG_NUM]; extern const char* const MSG_CHOOSE_EXTRUDER_LANG_TABLE[LANG_NUM];
#define MSG_CHOOSE_EXTRUDER LANG_TABLE_SELECT(MSG_CHOOSE_EXTRUDER_LANG_TABLE) #define MSG_CHOOSE_EXTRUDER LANG_TABLE_SELECT(MSG_CHOOSE_EXTRUDER_LANG_TABLE)
extern const char* const MSG_CLEAN_NOZZLE_E_LANG_TABLE[LANG_NUM]; extern const char* const MSG_CLEAN_NOZZLE_E_LANG_TABLE[LANG_NUM];
@ -480,6 +482,8 @@ extern const char* const MSG_PREPARE_FILAMENT_LANG_TABLE[LANG_NUM];
#define MSG_PREPARE_FILAMENT LANG_TABLE_SELECT(MSG_PREPARE_FILAMENT_LANG_TABLE) #define MSG_PREPARE_FILAMENT LANG_TABLE_SELECT(MSG_PREPARE_FILAMENT_LANG_TABLE)
extern const char* const MSG_PRESS_LANG_TABLE[LANG_NUM]; extern const char* const MSG_PRESS_LANG_TABLE[LANG_NUM];
#define MSG_PRESS LANG_TABLE_SELECT(MSG_PRESS_LANG_TABLE) #define MSG_PRESS LANG_TABLE_SELECT(MSG_PRESS_LANG_TABLE)
extern const char* const MSG_PRESS_TO_PREHEAT_LANG_TABLE[LANG_NUM];
#define MSG_PRESS_TO_PREHEAT LANG_TABLE_SELECT(MSG_PRESS_TO_PREHEAT_LANG_TABLE)
extern const char* const MSG_PRESS_TO_UNLOAD_LANG_TABLE[LANG_NUM]; extern const char* const MSG_PRESS_TO_UNLOAD_LANG_TABLE[LANG_NUM];
#define MSG_PRESS_TO_UNLOAD LANG_TABLE_SELECT(MSG_PRESS_TO_UNLOAD_LANG_TABLE) #define MSG_PRESS_TO_UNLOAD LANG_TABLE_SELECT(MSG_PRESS_TO_UNLOAD_LANG_TABLE)
extern const char* const MSG_PRINTER_DISCONNECTED_LANG_TABLE[1]; extern const char* const MSG_PRINTER_DISCONNECTED_LANG_TABLE[1];
@ -494,6 +498,8 @@ extern const char* const MSG_PRUSA3D_FORUM_LANG_TABLE[LANG_NUM];
#define MSG_PRUSA3D_FORUM LANG_TABLE_SELECT(MSG_PRUSA3D_FORUM_LANG_TABLE) #define MSG_PRUSA3D_FORUM LANG_TABLE_SELECT(MSG_PRUSA3D_FORUM_LANG_TABLE)
extern const char* const MSG_PRUSA3D_HOWTO_LANG_TABLE[LANG_NUM]; extern const char* const MSG_PRUSA3D_HOWTO_LANG_TABLE[LANG_NUM];
#define MSG_PRUSA3D_HOWTO LANG_TABLE_SELECT(MSG_PRUSA3D_HOWTO_LANG_TABLE) #define MSG_PRUSA3D_HOWTO LANG_TABLE_SELECT(MSG_PRUSA3D_HOWTO_LANG_TABLE)
extern const char* const MSG_PULL_OUT_FILAMENT_LANG_TABLE[LANG_NUM];
#define MSG_PULL_OUT_FILAMENT LANG_TABLE_SELECT(MSG_PULL_OUT_FILAMENT_LANG_TABLE)
extern const char* const MSG_REBOOT_LANG_TABLE[LANG_NUM]; extern const char* const MSG_REBOOT_LANG_TABLE[LANG_NUM];
#define MSG_REBOOT LANG_TABLE_SELECT(MSG_REBOOT_LANG_TABLE) #define MSG_REBOOT LANG_TABLE_SELECT(MSG_REBOOT_LANG_TABLE)
extern const char* const MSG_RECOVERING_PRINT_LANG_TABLE[LANG_NUM]; extern const char* const MSG_RECOVERING_PRINT_LANG_TABLE[LANG_NUM];

View file

@ -368,7 +368,10 @@ ve
#define MSG_PLACE_STEEL_SHEET "Umistete prosim tiskovy plat na heatbed" #define MSG_PLACE_STEEL_SHEET "Umistete prosim tiskovy plat na heatbed"
#define MSG_RECOVER_PRINT "Detekovan vypadek proudu.Obnovit tisk?" #define MSG_RECOVER_PRINT "Detekovan vypadek proudu.Obnovit tisk?"
#define MSG_PRESS_TO_UNLOAD "Pro vysunuti filamentu stisknete prosim tlacitko" #define MSG_PRESS_TO_UNLOAD "Pro vysunuti filamentu stisknete prosim tlacitko"
#define MSG_UNLOAD_SUCCESSFULL "Opakovat vysunuti filamentu?" #define MSG_UNLOAD_SUCCESSFULL "Bylo vysunuti filamentu uspesne?"
#define MSG_PRESS_TO_PREHEAT "Pro nahrati trysky a pokracovani stisknete tlacitko."
#define MSG_PULL_OUT_FILAMENT "Prosim vyjmete urychlene filament"
#define MSG_CHECK_IDLER "Prosim otevrete idler a manualne odstrante filament."
#define MSG_FILE_INCOMPLETE "Soubor nekompletni. Pokracovat?" #define MSG_FILE_INCOMPLETE "Soubor nekompletni. Pokracovat?"
#define MSG_FILE_CNT "Nektere soubory nebudou setrideny. Maximalni pocet souboru pro setrideni je 100." #define MSG_FILE_CNT "Nektere soubory nebudou setrideny. Maximalni pocet souboru pro setrideni je 100."
#define MSG_SORT_TIME "Trideni [Cas]" #define MSG_SORT_TIME "Trideni [Cas]"

View file

@ -383,7 +383,10 @@
#define(length=17, lines=1) MSG_FSENS_AUTOLOAD_OFF "F. autoload [off]" #define(length=17, lines=1) MSG_FSENS_AUTOLOAD_OFF "F. autoload [off]"
#define(length=17, lines=1) MSG_FSENS_AUTOLOAD_NA "F. autoload [N/A]" #define(length=17, lines=1) MSG_FSENS_AUTOLOAD_NA "F. autoload [N/A]"
#define(length=20, lines=4) MSG_PRESS_TO_UNLOAD "Please press the knob to unload filament" #define(length=20, lines=4) MSG_PRESS_TO_UNLOAD "Please press the knob to unload filament"
#define(length=20, lines=2) MSG_UNLOAD_SUCCESSFULL "Repeat unloading filament?" #define(length=20, lines=4) MSG_PRESS_TO_PREHEAT "Press knob to preheat nozzle and continue."
#define(length=20, lines=2) MSG_UNLOAD_SUCCESSFULL "Was filament successfully unloaded?"
#define(length=20, lines=4) MSG_CHECK_IDLER "Please open idler and remove filament manually."
#define(length=20, lines=4) MSG_PULL_OUT_FILAMENT "Please pull out filament immediately"
#define(length=20, lines=2) MSG_FILE_INCOMPLETE "File incomplete. Continue anyway?" #define(length=20, lines=2) MSG_FILE_INCOMPLETE "File incomplete. Continue anyway?"
#define(length=20, lines=4) MSG_DEFAULT_SETTINGS_LOADED "Default settings loaded" #define(length=20, lines=4) MSG_DEFAULT_SETTINGS_LOADED "Default settings loaded"

View file

@ -2455,6 +2455,17 @@ void lcd_adjust_z() {
} }
void lcd_wait_for_heater() {
lcd_display_message_fullscreen_P(MSG_WIZARD_HEATING);
lcd.setCursor(0, 4);
lcd.print(LCD_STR_THERMOMETER[0]);
lcd.print(ftostr3(degHotend(active_extruder)));
lcd.print("/");
lcd.print(ftostr3(degTargetHotend(active_extruder)));
lcd.print(LCD_STR_DEGREE);
}
void lcd_wait_for_cool_down() { void lcd_wait_for_cool_down() {
lcd_set_custom_characters_degree(); lcd_set_custom_characters_degree();
setTargetHotend(0,0); setTargetHotend(0,0);

View file

@ -258,6 +258,7 @@ void lcd_farm_sdcard_menu();
void lcd_farm_sdcard_menu_w(); void lcd_farm_sdcard_menu_w();
//void get_description(); //void get_description();
void lcd_wait_for_heater();
void lcd_wait_for_cool_down(); void lcd_wait_for_cool_down();
void adjust_bed_reset(); void adjust_bed_reset();
void lcd_extr_cal_reset(); void lcd_extr_cal_reset();