How to stop OctoPrint from LCD?

What is the problem?
User is by the printer (Marlin), and see that something is wrong.
Stopping the print, would enable user to clean the bed, prepare for next print.
There is no way to tell OctoPrint to stop the job unless by a computer.

What is the best solution here ?
Maybe Marlin should have a menu item that causes an "Error: cancelled by user" ?

  • or is there another "correct" way ?

Wrong. The firmware just has to send a cancel action command.

1 Like

Sometimes it is great to be wrong.
your clue made me realize it was possible, and modify Marlin to have an option for this.
Thanks.

2 Likes

Where in the marlin build does one add the "m118 a1 action:cancel" command? I cant find it in config.h or config.av.h. I've also looked in the marlin knowledge base and it just says to use the above mentioned string but not where it might go.

In case you didn't figure this out, I ended up here while trying to resolve this myself and stumbled across EVENT_GCODE_SD_STOP in Configuration_adv.h in the marlin firmware...

#define EVENT_GCODE_SD_STOP "M118 A1 action:cancel"
2 Likes

Just to add, as of now, Marlin uses EVENT_GCODE_SD_ABORT instead of EVENT_GCODE_SD_STOP

Also, is there a way to not execute OctoPrint GCODE script for "After print job is cancelled"?

My Marlin EVENT_GCODE_SD_ABORT script already includes the GCODE needed for a cancelled print so when I stop the print from the printer, OctoPrint actually makes it run again