Bug Canceling (annoying)


#1

Clicking cancel wont stop the printer until it finishes its current task.

How to reproduce:
Click Load print
Print bed starts heating up
Click cancel
Wont cancel until bed reaches temp

This results in waiting minutes for cancel.
Restarting PI is only way to cancel faster.


#2

#3

If OctoPrint sends an M112, does Marlin ignore what's still in the queue?

I know that I've been bitten at least once when some rogue code drilled a hotend into my plastic bed and I'm begging the printer to... just... stop... already.


#4

That depends entirely on your specific flavor of Marlin.


#5

I just sent a print, started it, and cancelled it

Then I went to terminal command window, and typed "M112" and hit enter, and I didn't see an M112 command float dutifully up my screen as was my intention

So I typed "M112" again, only this time, I hit the "send" button, thinking that it might pay more attention that way

I still failed to notice an M112 float up my screen

Then, when it got to .5 degrees of the set temp, this happened

Recv: T:21.11 /0 B:84.50 /85 B@:255 @:0
Recv: ok 5
Send: M112
Send: N6 M11239
Send: N7 M104 T0 S0
38
Send: N8 M140 S0*109
Closing serial port due to emergency stop M112.
Changing monitoring state from "Cancelling" to "Offline (Error: Closing serial port due to emergency stop M112.)"
Connection closed, closing down monitor

It was like watching a movie where the hero is trying to defuse the bomb, then finally getting it at the last half second

I didn't try disconnecting the Raspi from the printer (which I didn't think would work, but I should have tried anyway), nor did I try unplugging the printer itself (which I knew would work, but, that wasn't part of the experiment)


#6

Have you considered using the power switch on the printer itself? Stops mine dead in a matter of seconds.


#7

Yes. Of course. But this was an experiment to see if I could manually send an emergency cancel via Octoprint's Terminal screen


#8

Well, "blocking commands are blocking", as they say.

But most of the time during the print job, it's not under the fiat of an M109, for example.

If an M112 shuts down the connection then that's problematic; the GCODE Cancel script then can't do the other things it needs to do like lift the hotend, X/Y home it and anything else it might do to take care of business.


#9

COOL !

All I had up til now was a little cheat sheet of M commands, and M108 wasn't in it

This gives me an idea... If all we want to do is cancel the heater, since the print itself has already been cancelled, how about if a command gets issued that sets the new target temp as the current temp, thereby fooling the thing into thinking that it's achieved its goal, and can now move on to its next command, which is to shut down the heater ?

Could that work ?


#10

That's a slice of brilliance if it works. I'd have to test it though after this part is finished.


#11

Most 3d printer boards are based on Arduino's and will reset on serial connection. Just cycle the printer's connection (press the disconnect button, then reconnect) and that should reset your printer's controller board. I used that trick a few times.

That or in my early days, I just had a physical button that cuts power to the printer and I'd smash that when stuff went wrong, much faster and more reliable than a software solution (assuming you're right next to said button)