Pausing and Resuming via M601

I use PruserSlicer and I am trying to do some embedding of magnets. PruserSlicer adds an M117 message and then M601 in the code. I added M601 to the pause commands in Octoprint so it pauses.

The challenge I have is that when Octoprint pauses it turns off the filament heating. However when it resumes it does not turn it back on. Which means that the printer is trying to print with the filament cold and that does not go well!

Currently I have nothing in the GCode scripts for pause and resume. I could hard code a temperature command into there however I would then have to change that for different types of material. Is there a way to get it to resume the temperature it had previously? I think Octoprint probably stores these values somewhere but I do not know how to use them.

Also the M117 command does not seem to actually display the message. Is it filtered out by octoprint some how?

No, it doesn't. This is M601 doing this and confirmed firmware bug:

https://docs.octoprint.org/en/master/features/gcode_scripts.html#context

Well that is annoying. They are not right either, I updated from 3.93 because I hoped that going to 3.10 would resolve the issue! I guess my only way out for now then is to manually change the M601 for an M0 or something in the gcode file.

Thanks for the pointer Foosel.

Perhaps post processing in your slicer, there's a few examples around for Prusaslicer.

You can tell PrusaSlicer to use whatever GCode you want instead of M601:
image

1 Like

Bumping this because it's the top forum result for M601 and this behavior still exists with octoprint and default generated gcode from prusaslicer today, so it continues to be an annoyance

For prusa printers, M601 pauses the print, and when it does this, it saves the current position and temperature, disables the hotend, parks the print head, and waits for you to continue.

When printing from SD, the UI of the printer will block when it encounters a 601, and will wait for you to press OK, before automatically continuing.

But when printing from a serial connection (e.g. octoprint) it will not do this - the UI will remain enabled, as though the print is still ongoing. However, the head park and the cooldown will still occur. The printer's UI for some reason doesn't "understand" that it is paused and cannot initiate a resume, possibly because there has not in the past been a reliable way to backfeed to the controller that a "resume" event has occurred.

But crucially, gcode prusaslicer generates by default only includes a G601 command, so there is an indefinite pause. You need to manually issue a G602 (resume) command on the terminal, which will unpark the head and reheat the hotend. Prusaslicer does not include this command in generated gcode, and octoprint is not clever enough to determine which type of pause was issued, and issue the corresponding unpause when the user resumes from the UI.

I think this is the cause of this odd, annoying behavior, and the solution would be for octoprint to explicitly issue an M602 unpause after a print interrupted by M601 is resumed by the user, regardless of whether it occurs in the gcode file octoprint is processing.

Also of note: There is a G603 command to stop the print - this would be useful for cancelling a print in the paused state, as otherwise octoprint will think the print job is over, but the pause state will persist on the printer-side, which will retain the stored head unpark coordinates and hotend temperature, causing them to potentially be restored unexpectedly during future prints, and also causing it to ignore additional pause commands completely (this is I believe the cause of the common "octoprint isn't pausing on 601, so use a color change command instead" issue)

Curious if PrusaResearch has all these custom gcodes documented anywhere? our bible of truth is on the rep rap forum here: https://reprap.org/wiki/G-code and these G601, G602, and G603 commands don't seem to exist there. So not sure if you just messed up which command was which and those are supposed to be M commands instead.

They did:

Yeah, so probably a mistake because G601,G602,G603 aren't listed for either variants of their firmware.

grafik

From that link

For the record, there seems to be a bit of a mixup here between M60{1,2,3} and G60{1,2,3}. From my understanding, the right commands are those with M and are actually documented on the reprap wiki. G as rightly pointed out by jneilliii is not.

They have a very limited support however across firmware variants and thus aren't something that should be sent by OctoPrint in all cases. That's what the configurable gcode scripts are for.

1 Like

I just ask myself, where these G60{1,2,3} came from.