[Closed] Pause print in gcode  

Page 2 / 2
  RSS
gnat
 gnat
(@gnat)
Prominent Member


What exactly is the bug in the M601/M602 process proposed earlier? I would prefer to have the nozzle cool down during the pause, so as not to cook the filament if I'm not there to respond immediately (overnight prints!).

For me it just went into a loop where I would unpause it, it would act like it would re-heat and move back to the part, then it would re-run the pause logic.

MMU tips and troubleshooting...
Posted : 26/02/2019 4:12 pm
josh.w3
(@josh-w3)
Estimable Member


What exactly is the bug in the M601/M602 process proposed earlier? I would prefer to have the nozzle cool down during the pause, so as not to cook the filament if I'm not there to respond immediately (overnight prints!).

Yes, I could obviously insert the temp codes manually into the gcode file, but it's another step and a possible source of mistakes (just lazily copy+pasting from a previous print could, for example, result in a PETG print resuming at PLA temperature). Having the printer store the "temperature of the day" is safer.

/Torsten

I would also like to know a solution for having the printer cool down and successfully heat back up when resumed (for long overnight prints when I'm not awake to immediately insert the objects and un-pause). I too have experienced the M601 issue where the MK3 does not successfully resume. Has anyone figured out working gcode for a "long pause -- cool down -- heat back up -- resume " with the MK3? (using the current 'temp of the day' as Torsten suggests above, not hard-coded temps) Would be very grateful for additional suggestions to try.

It looks like this is the FW issue we are talking about? https://github.com/prusa3d/Prusa-Firmware/issues/1378
Does anyone know how to bring more visibility to this issue (aka - Nudge Prusa to fix it sooner rather than later) ?

Lastly, thanks to Joan and everyone else who's already contributed to this thread. Super helpful.

- My MK3 Power Supply and Pwr Mgmt Upgrade
- My MK3 Camera Bed Mount Arm...
Posted : 07/03/2019 5:05 pm
gnat
 gnat
(@gnat)
Prominent Member



What exactly is the bug in the M601/M602 process proposed earlier? I would prefer to have the nozzle cool down during the pause, so as not to cook the filament if I'm not there to respond immediately (overnight prints!).

Yes, I could obviously insert the temp codes manually into the gcode file, but it's another step and a possible source of mistakes (just lazily copy+pasting from a previous print could, for example, result in a PETG print resuming at PLA temperature). Having the printer store the "temperature of the day" is safer.

/Torsten

I would also like to know a solution for having the printer cool down and successfully heat back up when resumed (for long overnight prints when I'm not awake to immediately insert the objects and un-pause). I too have experienced the M601 issue where the MK3 does not successfully resume.

Has anyone figured out working gcode for a "long pause -- cool down -- heat back up -- resume " with the MK3? (using the current 'temp of the day' as Torsten suggests above, not hard-coded temps) Would be very grateful for additional suggestions to try.

Also, thanks to Joan and everyone else who's already contributed to this thread. Super helpful.

https://github.com/prusa3d/Prusa-Firmware/wiki/Supported-G-codes

After moving to the parked position you could add "M104 S0" to turn the extruder heat off. Then on resume use "M104 SXXX" (where XXX is the temp you need for printing) and "M109 SXXX" (XXX = same value as the M104 command) which should wait for it to reach that temp before continuing.

Looking at the list again, you may only need the M109 at restart, but I'm not sure. All the examples I've seen had both.

MMU tips and troubleshooting...
Posted : 07/03/2019 5:25 pm
josh.w3
(@josh-w3)
Estimable Member


After moving to the parked position you could add "M104 S0" to turn the extruder heat off. Then on resume use "M104 SXXX" (where XXX is the temp you need for printing) and "M109 SXXX" (XXX = same value as the M104 command) which should wait for it to reach that temp before continuing.

Looking at the list again, you may only need the M109 at restart, but I'm not sure. All the examples I've seen had both.

Thanks, I will try this tonight and report back. Having a workaround will be great while Prusa (hopefully) fixes the M601/602 bug.

- My MK3 Power Supply and Pwr Mgmt Upgrade
- My MK3 Camera Bed Mount Arm...
Posted : 07/03/2019 5:36 pm
josh.w3
(@josh-w3)
Estimable Member

Having some success with the suggested workaround. Currently using this with my MK3:

G1 X10.000 Y200.000 E0; parking position
M17; turn on steppers*
M104 S0; set temp to 0
M300 S2500 P1000; beep
M1 PAUSED; stop and print message
M109 S195; set and wait for temp
G28 X Y; home X and Y*

I'm using the M17 and G28 alternately. When I know I'll be around for the pause, I'll do the M17 because I like that the bed can't accidentally move. But if I'm away or it's overnight I'm instead using G28 to rehome after, as I don't like the idea of the steppers being statically engaged for 10+ hours. Is that being overly cautious?

Unfortunately the G28 method has messed up a couple of prints, as it seems the X-axis shifted ~5mm in the process of rehoming (I definitely didn't bump the extruder during the pause). Is there an alternate method of re-homing that might not be susceptible to that issue?

Thanks again for the solutions above. Happy to have this mostly solved for now.

- My MK3 Power Supply and Pwr Mgmt Upgrade
- My MK3 Camera Bed Mount Arm...
Posted : 13/03/2019 1:03 am
Tim
(@tim-m30)
Illustrious Member
Posted by: torsten.l

What exactly is the bug in the M601/M602 process proposed earlier? I would prefer to have the nozzle cool down during the pause, so as not to cook the filament if I'm not there to respond immediately (overnight prints!).

Yes, I could obviously insert the temp codes manually into the gcode file, but it's another step and a possible source of mistakes (just lazily copy+pasting from a previous print could, for example, result in a PETG print resuming at PLA temperature). Having the printer store the "temperature of the day" is safer.

/Torsten

Use the placeholders ... they include the filament profile temps...

 

M109 S[first_layer_temperature] ; set & wait 1st layer extruder temp

or 

M109 S[temperature] ; set & wait other layer extruder temp

 

It is always wise to get more than one opinion......
Posted : 05/09/2019 10:23 pm
captclearleft
(@captclearleft)
Active Member

This worked for me on my Mk2S.  

;Pause Print Here 
G1 X10.000 Y200.000 Z100.000 E0; parking position GET THE PRUSA TO STICK IT'S TONGUE OUT! (edited to revise Y coordinate)
M1; user stop
M105; return to current temp
;Resume Print Here (with Octoprint resume)

I added a Z100 so that I can clean the PETG goop off the nozzle.  

 

 

Posted : 09/09/2019 5:31 pm
Tim
(@tim-m30)
Illustrious Member
Posted by: captclearleft

G1 X10.000 Y200.000 Z100.000 E0; parking position GET THE PRUSA TO STICK IT'S TONGUE OUT! (edited to revise Y coordinate)

I added a Z100 so that I can clean the PETG goop off the nozzle.  

The absolute Z100 will come back to haunt you; any Z move should take into account current Z position (aka - current print height).

This post was modified 11 months ago 2 times by Tim
It is always wise to get more than one opinion......
Posted : 10/09/2019 12:29 am
bobstro liked
Sembazuru
(@sembazuru)
Prominent Member

This is what I use, I keep the link to Joan's first post in this thread about this because I'm using her comment (and so I can find this thread again). I hadn't really realized how much I've added to it since first seeing her post...

{if layer_z=4.74}; Pause to insert objects
M400 ; wait for movement buffer to empty
M300 ; beep
M104 S0; Turn off extruder heater to avoid too much oozing
; code snippet originally Prusa forums joantabb here: https://forum.prusaprinters.org/forum/original-prusa-i3-mk2-s-others-archive/pause-print-in-gcode/#post-125758
G1 X10.000 Y200.000 E0; parking position GET THE PRUSA TO STICK IT'S TONGUE OUT! (edited to revise Y coordinate)
M400; wait for bed to stop moving
M300; beep again
M84; disable motors (may not be necessary)
M0; user stop
G28 X Y; Home X and Y (only) to correct for accidentally moved bed or extruder (it is assumed Z didn't move because that is a harder axis to manually move).
M109 S[temperature]; return nozzle to printing temperature
{endif}

Change the layer_z value to what is required for your print, copy the full if...endif statement as many times as you need to pause and enter the proper layer_z value for each copy.

An error above earlier in this thread is using M105 to turn the hot end heater back on. (May originally have been a typeo that never got caught.) M105 only returns the temperatures to the console and M0 doesn't seem to turn off either the hot end nor the bed heaters. Turning off the hot end reduces oozing while paused but the bed stays hot so the part doesn't pop off of a cooling bed.

I haven't had any problem with the re-homing causing any layer shifts... Maybe I'm lucky? I like the idea above about moving the z axis up, but I wasn't sure if this would be executed before or after the generated gcode to move to the correct z height. If I put a z axis up command in, I'll use what I modified the original end gcode Z-height lift to after I decided 3cm above a low print doesn't get the z height high enough to clean the nozzle after a low print:

{if layer_z < max_print_height}G1 Z{z_offset+min((layer_z/max_print_height)*(max_print_height-100)+100, max_print_height)}{endif} ; Move print head up proportionally of print height to max 

This formula basically moves the Z to a height in the upper 10cm of the print volume proportionate to where the current z height is to the full print volume. I'm not sure how the z_offset works into this formula, but it was in the original code from Prusa. I figured if I didn't know what it was for I would leave well enough alone.

This post was modified 11 months ago by Sembazuru
See my (limited) designs on:
PrusaPrinters - https://www.prusaprinters.org/social/1448-sembazuru/prints
Thingiverse - https://www.thingiverse.com/Sembazuru/designs...
Posted : 19/09/2019 5:13 am
captclearleft
(@captclearleft)
Active Member

@sembazuru

Fantastic code!  Thanks for taking the time to post this.  I kinda see what you are saying with the Z axis.  Thanks.

Posted : 23/09/2019 2:54 pm
jahudka
(@jahudka)
Active Member

Hi everyone,

I'd like to use some of the ideas you've compiled here to achieve something you should (imo) be able to do in PrusaSlic3r with the ColorPrint feature (but currently can't): change filament mid-print to a different kind of filament. The ColorPrint solution (which uses M600) won't allow you to change parameters such as extruder temperature between ejecting the old filament and loading the new. Personally I need this because I'd like to experiment with adding one or two layers of something like FLEX on top of an object printed with ABS or PLA in order to get a less slippery surface.

From what I gather, this might be the best way to do it:

M400 ; wait for movement buffer to empty
G1 Znnn ; move up a bit
G1 X10.000 Y200.000 E0 ; move aside
M400 ; wait for movement buffer to empty
M702 ; unload filament
M109 Snnn ; set extruder temperature for new filament and wait until reached
M300 ; beep
M1 Press any key to continue... ; wait for user to press button
M701 ; load new filament
G28 X Y ; re-home X and Y axes, just to be sure
G1 Xnnn Ynnn E0 ; return back to where we were on the XY plane
G1 Znnn ; restore Z

The idea is to slice the model two times with (mostly) the same settings except the filament preset and to use the ColorPrint feature to have the M600 code inserted in both files at the same layer; then split the files by the M600 lines and re-join the appropriate parts with this piece of Gcode in-between (obviously filling in the nnn's using values from the appropriate file). Does that make sense? 😀 Or is there another approach you'd recommend?

This post was modified 11 months ago 2 times by jahudka
...
Posted : 24/09/2019 2:20 am
Frank-The-Rock
(@frank-the-rock)
Eminent Member
Posted by: @sembazuru

This is what I use, I keep the link to Joan's first post in this thread about this because I'm using her comment (and so I can find this thread again). I hadn't really realized how much I've added to it since first seeing her post...

{if layer_z=4.74}; Pause to insert objects
M400 ; wait for movement buffer to empty
M300 ; beep
M104 S0; Turn off extruder heater to avoid too much oozing
; code snippet originally Prusa forums joantabb here: https://forum.prusaprinters.org/forum/original-prusa-i3-mk2-s-others-archive/pause-print-in-gcode/#post-125758
G1 X10.000 Y200.000 E0; parking position GET THE PRUSA TO STICK IT'S TONGUE OUT! (edited to revise Y coordinate)
M400; wait for bed to stop moving
M300; beep again
M84; disable motors (may not be necessary)
M0; user stop
G28 X Y; Home X and Y (only) to correct for accidentally moved bed or extruder (it is assumed Z didn't move because that is a harder axis to manually move).
M109 S[temperature]; return nozzle to printing temperature
{endif}

Change the layer_z value to what is required for your print, copy the full if...endif statement as many times as you need to pause and enter the proper layer_z value for each copy.

An error above earlier in this thread is using M105 to turn the hot end heater back on. (May originally have been a typeo that never got caught.) M105 only returns the temperatures to the console and M0 doesn't seem to turn off either the hot end nor the bed heaters. Turning off the hot end reduces oozing while paused but the bed stays hot so the part doesn't pop off of a cooling bed.

I haven't had any problem with the re-homing causing any layer shifts... Maybe I'm lucky? I like the idea above about moving the z axis up, but I wasn't sure if this would be executed before or after the generated gcode to move to the correct z height. If I put a z axis up command in, I'll use what I modified the original end gcode Z-height lift to after I decided 3cm above a low print doesn't get the z height high enough to clean the nozzle after a low print:

{if layer_z < max_print_height}G1 Z{z_offset+min((layer_z/max_print_height)*(max_print_height-100)+100, max_print_height)}{endif} ; Move print head up proportionally of print height to max 

This formula basically moves the Z to a height in the upper 10cm of the print volume proportionate to where the current z height is to the full print volume. I'm not sure how the z_offset works into this formula, but it was in the original code from Prusa. I figured if I didn't know what it was for I would leave well enough alone.

@sembazuru If i am not mistaken to add a pause now with the new custom g-code insert I don't need to add the {if layer_z=x.xx}...{End if } and just paste the rest of your code ?  

Ho wait... the Pause option is there to I completely forgot I used the custom g-code to configure a temp tower and have not register there a pause option in there now 😆  But its only a pause no move  So  your code is still better.  Have you experience with the M17 instead of homing? 

Here what pause seems to add:

;AFTER_LAYER_CHANGE
;94.8
M117 Place the "bolt" in slots and resume printing
M601

I have been referring to this thread many time so thanks for all that guide us to be better maker!!! 👍 🍻 🥂 

 

This post was modified 4 months ago by Frank-The-Rock
Posted : 19/04/2020 10:34 pm
Page 2 / 2
Share:

Please Login or Register