How to pause print job from g-code

Hi dears!

Is it possible to pause the print job from G-code instead of clicking pause buttom on OctoPrint? I would like to pause automatically the job at speccific layer without keep waiting for it and pausing it manually.

I tried (unsuccessfuly) writing this snippet on my g-code file:

G1 Z100 F200	

I'm printing on Ender 3 v2, slicing on PrusaSlicer.

Thx in advance!

Hello @esekorti !

Instead of M76, try this: M118 //action:pause

That should set OctoPrint into pause mode.

Also take care to have the appropriate scripts within OctoPrint to do the stuff you want to do.

This requires the firmware to have support for the M118 command - it is better to signal to OctoPrint directly using @pause, the pause @ command. More of the available Host @ commands


Darn, I was looking for that one... :man_facepalming:

Gorgeous @Charlie_Powell, that did the trick for me.

I replaced my snippet by @pause host command on g-code and configured OctoPrint as explained on this page adding M300 for beeping on pause.

Wonderful, thanks a lot!

1 Like