Single G-Code instruction not cancelable

Hi all,

I noticed that you cannot instantaneously stop the printing process - the current G-Code instruction will finish before aborting.

This is…

  1. … annoying because e. g. the bed heating process must finish before starting another print
  2. … a safety risk as linear modules will also continue moving until the instruction has finished

I run the most recent firmware (V1.12.0).

Do you have a emergency stop button? It could do so.
This is a normal 3d printer behaviour, because you tell the machine to wait for the heatbed, so it waits, same with go to position, it wants to…

Power cycle is the way to go. Even with the emergency stop you will have to power cycle after.
You could send following code to set the emergency state but i am not sure if it works correct (just in time) if you are connected two ways to the controller (touchscreen and console): M112

Don’t use M190 if you don’t want it to wait. That’s literally the purpose of that command. Just use M109. Or you could M190 to some minimum temp and then M109 to a final temp later? If you don’t want it to cool down for back to back printing don’t M109 S0 at the end, just keep it hot. Luban does not allow changes to the start and end gcode sections, use Cura.

Agreed with @xchrisd, at the moment the only way to interrupt is with the emergency stop button. The standard M112 emergency stop gcode is not properly implemented now.

If you want to make a suggestion for improvement of Luban, the developers take issues over at Issues · Snapmaker/Luban · GitHub

I don’t have such a button, but it would be frustrating if this was the only way to achive an immediate stop.

If I use M109 instead, the printing would be started without reaching the target temperature on the bed or am I wrong?

Anyways, from a technical point of view, it must be possible to interrupt the linear modules by e. g. just cutting down the voltage. It would also be possible to tell the microcontroller to skip the current instruction, but maybe this goes too deep into hardware hacks. I don’t know how communication with the microcontroller and touch controller works to be onest.

I will test M112 and let you know.

Thanks for you reply, maybe I will open an issue soon as this is really frustrating. If the button is labeled “Stop”, I want the machine to stop when pressing it.

This emergency stop button option, is it actually a hard wired disconnect then? It should be, but i had a feeling it was going to do something digitally to stop things instead.

It’s a CAN channel that’s handled by a ‘watchdog’ process outside of Marlin, on a separate freeRTOS task.

Honestly that’s how modern substation control systems are designed, that doesn’t cause me grief to have the snapmaker ‘emergency’ controls handled over comms. Though the processors are more rigorously tested for reliability, the stakes are higher. Seems fine for this application.

1 Like

Thank you for the insight