Marlin icon indicating copy to clipboard operation
Marlin copied to clipboard

[BUG] M600 and pause broken on Ender-3 S1 (and V2?)

Open Jackson240193 opened this issue 2 years ago • 20 comments

Did you test the latest bugfix-2.1.x code?

Yes, and the problem still exists.

Bug Description

After flashing to version 2.1.1 or 2.1.x, there was a problem with resuming printing after a pause. ... When printing from an SD card, when you press pause, the print head parks as it should. But after pressing the resume print, the print head returns to the last print location and freezes. ... In this case, during the pause, a second problem arises. If you choose to clean the filament when printing is resumed, then after the extruder pushes the required amount of filament, the printer will also freeze. But this problem in firmware version 2.1.1 is treated by modifying the file:

dwin.cpp in /src/lcd/e3v2/jyersui/:

case PAUSE_MESSAGE_OPTION: pause_menu_response = PAUSE_RESPONSE_WAIT_FOR; CrealityDWIN.Popup_Handler(PurgeMore); break;

In version 2.1.x, this fix did not work. ... I'm using a stock Ender 3 S1 on STM32F4. There were no problems with the pause with the native firmware of this printer.

Bug Timeline

This is a new bug. Started after firmware version 2.1.1.

Expected behavior

After clicking on resume printing, I expected the print head to return to the last print location and, accordingly, continue printing.

Actual behavior

After pressing Resume Printing, the print head returns to the last print location and freezes. Printing does not continue.

Steps to Reproduce

  1. Flash the Ender 3 S1 printer to version 2.1.1.
  2. Start printing any model from the SD card.
  3. Pause.
  4. Resume printing.
  5. Get a frozen printer.

Version of Marlin Firmware

2.1.1 or 2.1.x

Printer model

Ender 3 S1 on STM32F4

Electronics

Stock electronics on STM32F4

Add-ons

No response

Bed Leveling

ABL Bilinear mesh

Your Slicer

Cura

Host Software

SD Card (headless)

Don't forget to include

  • [X] A ZIP file containing your Configuration.h and Configuration_adv.h.

Additional information & file uploads

Configuration.zip 1 2 3

Jackson240193 avatar Nov 18 '22 11:11 Jackson240193

UPD: The problem is precisely when executing the m600 command. ... If you write the m600 command in the gcode or simulate the situation with the end of the filament when the thread beat sensor is triggered, then the situation described above occurs: The print head parks, but when the LCD confirms the replacement of the filament, printing does not continue, the printer freezes. Only restarting the printer helps.

Jackson240193 avatar Nov 23 '22 13:11 Jackson240193

Do you see the same issue when using the other UI options, like ProUI ?

thinkyhead avatar Nov 24 '22 03:11 thinkyhead

Hello. Tell me please. To test this I have to uncomment it here?

Configuration.h

//============================================================================= //============================ Other Controllers ============================ //=============================================================================

// // Ender-3 v2 OEM display. A DWIN display with Rotary Encoder. // //#define DWIN_CREALITY_LCD // Creality UI //#define DWIN_LCD_PROUI // Pro UI by MRiscoC #define DWIN_CREALITY_LCD_JYERSUI // Jyers UI by Jacob Myers //#define DWIN_MARLINUI_PORTRAIT // MarlinUI (portrait orientation) //#define DWIN_MARLINUI_LANDSCAPE // MarlinUI (landscape orientation)

And finally check with this:

//#define DWIN_CREALITY_LCD // Creality UI #define DWIN_LCD_PROUI // Pro UI by MRiscoC //#define DWIN_CREALITY_LCD_JYERSUI // Jyers UI by Jacob Myers //#define DWIN_MARLINUI_PORTRAIT // MarlinUI (portrait orientation) //#define DWIN_MARLINUI_LANDSCAPE // MarlinUI (landscape orientation)

Jackson240193 avatar Nov 24 '22 13:11 Jackson240193

Observations (suddenly will help in solving the problem):

If you insert a pause command m25 or m125 in the gcode, then the process of pausing and resuming printing will work. The print head will park and after confirmation via the display, it will return and continue printing. At the same time, the function of cleaning the filament during a pause also works. Interestingly: When using the m25 command, printing resumes immediately. But if you use the m125 command, printing resumes with a delay of 10-15 seconds. I can’t understand what this is connected with, because the m25 command, according to the idea, calls the m125 command...

m24_m25.cpp:

void GcodeSuite::M25() { #if ENABLED(PARK_HEAD_ON_PAUSE) M125(); #else ...

At the same time, if the printer paused with the M25 command written in the Gcode, you cannot enter the settings menu and change the print settings: when you select Tune, a window pops up on the display with the choice of cleaning the filament or continuing printing. And it is not possible to change the print settings during the pause. And cleaning the filament and continuing to print under these conditions works. ... If, during the M25 pause, the filament is physically replaced, the filament replacement procedure will be called when the thread break sensor is triggered (I think that the M600 command is triggered at this moment). If after that you replace the filament and confirm on the display that the filament has been replaced, a window will pop up with the choice of cleaning the filament or continuing printing. And cleaning the filament and continuing to print under these conditions works.

Conclusion: problems arise when a pause is called from the LCD display during printing or when the thread beat sensor (M600 command) is triggered during printing.

Checked on firmware version 2.1.1 with the above correction of the dwin.cpp file in /src/lcd/e3v2/jyersui/

Jackson240193 avatar Nov 24 '22 16:11 Jackson240193

@Jackson240193 it's easy to fix it. I use this patch since one year wihtout issue:

Replace in Marlin/src/lcd/e3v2/common/encoder.cpp:

if (!ui.backlight) ui.refresh_brightness();
      const bool was_waiting = wait_for_user;
      wait_for_user = false;
      return was_waiting ? ENCODER_DIFF_NO : ENCODER_DIFF_ENTER;
    }
    else return ENCODER_DIFF_NO;

by:

if (!ui.backlight) ui.refresh_brightness();
      else {
        #if ENABLED(DWIN_CREALITY_LCD_JYERSUI)
          return ENCODER_DIFF_ENTER;
        #else
          const bool was_waiting = wait_for_user;
          wait_for_user = false;
          return was_waiting ? ENCODER_DIFF_NO : ENCODER_DIFF_ENTER;
        #endif
      }
    }
    else return ENCODER_DIFF_NO;

RV-from-be avatar Nov 29 '22 12:11 RV-from-be

@RV-from-be Thank you very much! Your patch really works. Pausing from the display while printing works as it should. At the same time, during the pause, it became possible to enter the "TUNE" menu and change the print settings. Resume printing works too!

But the problem with the printer freezing when the thread beat sensor was triggered remained unresolved (M600): The print head parks, a window pops up on the display to confirm the replacement of the filament. After confirming the filament replacement and choosing to continue printing, the printer freezes. The following message appears on the display: Resuming Print Please wait until done. Only restarting the printer helps.

Tested on version 2.1.1 with fixes for the following files:

Marlin/src/lcd/e3v2/jyersui/dwin.cpp Marlin/src/lcd/e3v2/common/encoder.cpp

Jackson240193 avatar Dec 03 '22 07:12 Jackson240193

@RV-from-be Thank you very much! Your patch really works. Pausing from the display while printing works as it should. At the same time, during the pause, it became possible to enter the "TUNE" menu and change the print settings. Resume printing works too!

But the problem with the printer freezing when the thread beat sensor was triggered remained unresolved (M600): The print head parks, a window pops up on the display to confirm the replacement of the filament. After confirming the filament replacement and choosing to continue printing, the printer freezes. The following message appears on the display: Resuming Print Please wait until done. Only restarting the printer helps.

Tested on version 2.1.1 with fixes for the following files:

Marlin/src/lcd/e3v2/jyersui/dwin.cpp Marlin/src/lcd/e3v2/common/encoder.cpp

I have the same problem. Any solutions yet?

6490dk avatar Dec 11 '22 19:12 6490dk

@Jackson240193

But the problem with the printer freezing when the thread beat sensor was triggered remained unresolved (M600): The print head parks, a window pops up on the display to confirm the replacement of the filament. After confirming the filament replacement and choosing to continue printing, the printer freezes. The following message appears on the display: Resuming Print Please wait until done. Only restarting the printer helps

I have tried either by adding an M600 in a gcodes file, or by generating a runout. The printer (ender3v2) correctly resumes printing and returns to the Print page as expected. Not having an ender3 S1, I cannot confirm or refute the proper functioning.

RV-from-be avatar Dec 14 '22 17:12 RV-from-be

@Jackson240193

But the problem with the printer freezing when the thread beat sensor was triggered remained unresolved (M600): The print head parks, a window pops up on the display to confirm the replacement of the filament. After confirming the filament replacement and choosing to continue printing, the printer freezes. The following message appears on the display: Resuming Print Please wait until done. Only restarting the printer helps

I have tried either by adding an M600 in a gcodes file, or by generating a runout. The printer (ender3v2) correctly resumes printing and returns to the Print page as expected. Not having an ender3 S1, I cannot confirm or refute the proper functioning.

I also have the Ender 3v2, but I have the problem... Maybe it's because of the yjearsui?

6490dk avatar Dec 14 '22 18:12 6490dk

@Jackson240193 I am too with JyersUI.

RV-from-be avatar Dec 14 '22 18:12 RV-from-be

@Jackson240193 I also forgot this change in \src\feature\pause.cpp:

#if ENABLED(EXTENSIBLE_UI)
  #include "../lcd/extui/ui_api.h"
#elif ENABLED(DWIN_LCD_PROUI)
  #include "../lcd/e3v2/proui/dwin.h"
#endif

by:

#if ENABLED(EXTENSIBLE_UI)
  #include "../lcd/extui/ui_api.h"
#elif ENABLED(DWIN_LCD_PROUI)
  #include "../lcd/e3v2/proui/dwin.h"
#elif ENABLED(DWIN_CREALITY_LCD_JYERSUI)
  #include "../lcd/e3v2/jyersui/dwin.h"
#endif

and:

#if M600_PURGE_MORE_RESUMABLE
        if (show_lcd) {
          // Show "Purge More" / "Resume" menu and wait for reply
          KEEPALIVE_STATE(PAUSED_FOR_USER);
          wait_for_user = false;
          #if EITHER(HAS_MARLINUI_MENU, DWIN_LCD_PROUI)
            ui.pause_show_message(PAUSE_MESSAGE_OPTION); // Also sets PAUSE_RESPONSE_WAIT_FOR
          #else
            pause_menu_response = PAUSE_RESPONSE_WAIT_FOR;
          #endif
          while (pause_menu_response == PAUSE_RESPONSE_WAIT_FOR) idle_no_sleep();
        }
      #endif

by:

#if M600_PURGE_MORE_RESUMABLE
        if (show_lcd) {
          // Show "Purge More" / "Resume" menu and wait for reply
          KEEPALIVE_STATE(PAUSED_FOR_USER);
          wait_for_user = false;
          #if ANY(HAS_MARLINUI_MENU, DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI)
            ui.pause_show_message(PAUSE_MESSAGE_OPTION); // Also sets PAUSE_RESPONSE_WAIT_FOR
          #else
            pause_menu_response = PAUSE_RESPONSE_WAIT_FOR;
          #endif
          while (pause_menu_response == PAUSE_RESPONSE_WAIT_FOR) idle_no_sleep();
        }
      #endif

and: TERN_(DWIN_LCD_PROUI, LCD_MESSAGE(MSG_REHEATING)); by:

TERN_(DWIN_LCD_PROUI, LCD_MESSAGE(MSG_REHEATING));
TERN_(DWIN_CREALITY_LCD_JYERSUI, LCD_MESSAGE(MSG_REHEATING));

and: TERN_(DWIN_LCD_PROUI, LCD_MESSAGE(MSG_REHEATDONE)); by:

TERN_(DWIN_LCD_PROUI, LCD_MESSAGE(MSG_REHEATDONE));
TERN_(DWIN_CREALITY_LCD_JYERSUI, LCD_MESSAGE(MSG_REHEATDONE));

RV-from-be avatar Dec 17 '22 16:12 RV-from-be

@Jackson240193 I also forgot this change in \src\feature\pause.cpp:

#if ENABLED(EXTENSIBLE_UI)
  #include "../lcd/extui/ui_api.h"
#elif ENABLED(DWIN_LCD_PROUI)
  #include "../lcd/e3v2/proui/dwin.h"
#endif

by:

#if ENABLED(EXTENSIBLE_UI)
  #include "../lcd/extui/ui_api.h"
#elif ENABLED(DWIN_LCD_PROUI)
  #include "../lcd/e3v2/proui/dwin.h"
#elif ENABLED(DWIN_CREALITY_LCD_JYERSUI)
  #include "../lcd/e3v2/jyersui/dwin.h"
#endif

and:

#if M600_PURGE_MORE_RESUMABLE
        if (show_lcd) {
          // Show "Purge More" / "Resume" menu and wait for reply
          KEEPALIVE_STATE(PAUSED_FOR_USER);
          wait_for_user = false;
          #if EITHER(HAS_MARLINUI_MENU, DWIN_LCD_PROUI)
            ui.pause_show_message(PAUSE_MESSAGE_OPTION); // Also sets PAUSE_RESPONSE_WAIT_FOR
          #else
            pause_menu_response = PAUSE_RESPONSE_WAIT_FOR;
          #endif
          while (pause_menu_response == PAUSE_RESPONSE_WAIT_FOR) idle_no_sleep();
        }
      #endif

by:

#if M600_PURGE_MORE_RESUMABLE
        if (show_lcd) {
          // Show "Purge More" / "Resume" menu and wait for reply
          KEEPALIVE_STATE(PAUSED_FOR_USER);
          wait_for_user = false;
          #if ANY(HAS_MARLINUI_MENU, DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI)
            ui.pause_show_message(PAUSE_MESSAGE_OPTION); // Also sets PAUSE_RESPONSE_WAIT_FOR
          #else
            pause_menu_response = PAUSE_RESPONSE_WAIT_FOR;
          #endif
          while (pause_menu_response == PAUSE_RESPONSE_WAIT_FOR) idle_no_sleep();
        }
      #endif

and: TERN_(DWIN_LCD_PROUI, LCD_MESSAGE(MSG_REHEATING)); by:

TERN_(DWIN_LCD_PROUI, LCD_MESSAGE(MSG_REHEATING));
TERN_(DWIN_CREALITY_LCD_JYERSUI, LCD_MESSAGE(MSG_REHEATING));

and: TERN_(DWIN_LCD_PROUI, LCD_MESSAGE(MSG_REHEATDONE)); by:

TERN_(DWIN_LCD_PROUI, LCD_MESSAGE(MSG_REHEATDONE));
TERN_(DWIN_CREALITY_LCD_JYERSUI, LCD_MESSAGE(MSG_REHEATDONE));

Yay, it's working again. Thanks a lot for your help!!!

6490dk avatar Dec 20 '22 12:12 6490dk

@RV-from-be Yes, it works!!! Thank you very much!!! Now, when the M600 command is called or when the thread beat sensor is triggered, printing resumes without problems!!!

I ask the developers, if possible, to add these fixes to the firmware.

Tested on firmware version 2.1.1 with fixes for the following files:

  • Marlin/src/lcd/e3v2/jyersui/dwin.cpp
  • Marlin/src/lcd/e3v2/common/encoder.cpp
  • Marlin/src/feature/pause.cpp

Jackson240193 avatar Dec 25 '22 08:12 Jackson240193

@RV-from-be where is the fix for my problem? i see only fixes for freezes by M600 and no fix for not working Bed Leveling with Z Probe.

silentpain711 avatar Jan 16 '23 17:01 silentpain711

Is there a workaround for the resume without having to rebuild your firmware? (e.g. some custom gcodes / settings before the printing tries to start again)

sammcj avatar Jan 20 '23 05:01 sammcj

Also - confirming this bug impacts the Ender 3 v2 Neo (4.2.2).

sammcj avatar Jan 20 '23 05:01 sammcj

@sammcj No, sorry! You must rebuild the firmware with these fix.

RV-from-be avatar Jan 21 '23 17:01 RV-from-be

I'm running with the code changes provided by @6490dk and the Filament Resume seems to work now. However, I'm seeing a few things and I'm not sure if they are due to these changes or not:

  1. The prompt to continue extruding filament or resume the print appears before the extruder motor has finished. I was previously using this pre-built binary from Jyers' branch and it waited until the filament stopped extruding before the dialog appeared.
  2. After several prints, the messages to the LCD screen from the M117 gcode stopped working. That area of the screen was blank while printing.

Thanks for your guys' work on this!

gunderbolt avatar Mar 15 '23 22:03 gunderbolt

Hi,

with ender 5 plus and last firmware, the same problem there too. How can we fix it there?

leseaw avatar Oct 05 '23 15:10 leseaw

I got the same issue with ender 5 plus. Pause/Resume and filament change M600 is not possible.

Ender 5 plus Marlin Bugfix 2.1.x from today Stock LCD Screen BIGTREETECH Skr mini v3

JoJos1220 avatar Feb 17 '24 23:02 JoJos1220