Is there a way to break out of an M116?
-
As title - is there a way to break out of an M116 wait for heaters to reach their set point values? I note that we have M108 to break out of an M109/M190 but will this also work for a G10/M568 Sn Rn followed by an M116?
-
Not that I know of, other than changing the current set point to match the current temp.
If we did have a way to break out of the wait, what would be the next step? Abort? Or carry on even though the temp wasn't reached? What's the reason to want to break out?
-
@phaedrux said in Is there a way to break out of an M116?:
....................What's the reason to want to break out?
The reason is simply laziness and impatience on my part! I have some fairly extensive and complicated macros which might include G10 set tool temperatures followed by M116, but I want to test a change that I've made and which happens further on in the macro. There are probably some other use cases that I haven't thought of too. I was a looking for an easy way to jump out of that M116 wait loop and noticed that M108 would do the job if I was using M109/M190, and so wondered if it would also work if I used G10/M586 then M116.
The M108 command title is "Cancel Heating". So as things stand and from you say, it only cancels heating if that heating was instigated using M109/M190 and not if the heating was instigated using G10/M568. And of course M109 is deprecated.
It's no big deal but if we have a command that is entitled "Cancel Heating" and it only works for deprecated commands, then a "Devils Advocate" might think that it would be an idea to change the behaviour so that it worked with the commands which supersede those deprecated commands. But I'm not in Devil's advocate mode right now, so I won't say that.
-
@deckingman Perhaps you can write a macro which sets the target temp to the actual temp from OM.
-
@cosmowave said in Is there a way to break out of an M116?:
@deckingman Perhaps you can write a macro which sets the target temp to the actual temp from OM.
TBH, I'm actually moving away from using either M109 or M116. The main reason reason being that in most cases, I want the tool temperature to be at or above a threshold and not necessarily just at a threshold. This is mostly for homing where all I want to do is soften any plastic that might have oozed out of a nozzle (I use the actual nozzle tip as a Z probe). If the tool is already above a threshold and I use either M109 or G10/M568 followed by M116, then it waits for the tool to cool which can be a pain. So instead of M116, I use
while sensors.analog[1].lastReading < whatever set point I choose ..... G4 S5
So a means of breaking out of an M116 loop might not be much use to me, but it might be to others (and I always try to have consideration for other people)
-
@deckingman Have you tried using M108? Looking at the code for M116 it seems to test the state of a variable called "cancelWait" which is what gets set by M108, so it looks like it is supposed to work for M116.
-
@gloomyandy said in Is there a way to break out of an M116?:
@deckingman Have you tried using M108? Looking at the code for M116 it seems to test the state of a variable called "cancelWait" which is what gets set by M108, so it looks like it is supposed to work for M116.
No I haven't tried it - my printer is in bits (again). That's why I posed the question to start with. . If you think it'll work, then all well and good. Thanks.
-
@deckingman Can't be 100% sure as I'm just reading the code, but it certainly looks like it may work.
-
Yes please try it. If it does work, I'll have the wiki entry changed to reflect that. If it doesn't work, it probably ought to.
-
@phaedrux said in Is there a way to break out of an M116?:
Yes please try it. If it does work, I'll have the wiki entry changed to reflect that. If it doesn't work, it probably ought to.
If that was aimed at me, then I can't try it because my printer is in bits (otherwise I would have tried it before posing the question).
For anyone else who is in a position to try it, send G10 P0 S185 R0 (the S and R values are not important as long as the "S" is a reasonably high number), then send M116, then wait a while to ensure that the tool is starts to heat but before it reaches the set point (185deg C in this case), send M108. If it works, the tool will stop heating.
Edit. Actually it probably wont stop -it'll just cancel the wait. So try doing something else like start a fan while the tool is heating. This shouldn't work while M116 is looping but if M108 cancels the loop, then it should be possible to start that fan before the tool has reached 185.
-
@deckingman @Phaedrux I'll give this a go on mine tonight.
My use case would accidentally switching tools after setting the standby/active temps. I have M116 in my tool change files so DWC gets stick in 'Busy' until those finish. If M108 works, that's much better than having to either wait or reboot
-
I'll give it a test next print I start.
-
@engikeneer said in Is there a way to break out of an M116?:
@deckingman @Phaedrux I'll give this a go on mine tonight.
My use case would accidentally switching tools after setting the standby/active temps. I have M116 in my tool change files so DWC gets stick in 'Busy' until those finish. If M108 works, that's much better than having to either wait or reboot
Glad I'm not the only one who thinks a way of curtailing the M116 wait loop would be handy. Let us know how you get on.
-
@deckingman you can cancel a M116 wait by sending M108 from a different GCode channel.
-
@dc42 said in Is there a way to break out of an M116?:
@deckingman you can cancel a M116 wait by sending M108 from a different GCode channel.
Good to hear. But what do you mean by "from a different GCode channel" ? Does it mean if M116 is being run from a macro, then M108 would need to be sent from something other than that same macro (i.e. the console)? Or do you mean something else?
-
@deckingman said in Is there a way to break out of an M116?:
@dc42 said in Is there a way to break out of an M116?:
@deckingman you can cancel a M116 wait by sending M108 from a different GCode channel.
Good to hear. But what do you mean by "from a different GCode channel" ? Does it mean if M116 is being run from a macro, then M108 would need to be sent from something other than that same macro (i.e. the console)? Or do you mean something else?
Yes, exactly that (assuming that the macro wasn't invoked from the console).
-
@dc42 I tried this by initiating a tool change (I have an M116 in my tool change) by clicking the tool in DWC. With this, DWC stuck on 'changing tool' until the temperature had been reached. I tried sending M108 but it didn't actually send until after the tool change (and heating) had completely finished. Would I need to put the M108 in a macro and call that for this to work?
-
@engikeneer clicking on the tool in DWC will have sent the command from the DWC input channel, so M108 sent from that channel won't be acted on until the tool change is complete. Whereas if the tool change was commanded by a T command in the file being printed, then M108 sent from DWC should cancel the M116.