I am having a bit of an issue understanding M291.
This is what I have in my cancel.g file:
M291 P"Are you sure you want to cancel the print ?" S3
; need to turn off both hot end and bed if the print is cancelled
M104 S0 ; kill extruder heat
M140 S0 ; kill bed heat
When I cancel a print, this does exactly what I would expect (although it takes unreasonably long between hitting 'cancel' and the confirmation window to pop up (1-2 seconds). My problem arises when I hit 'cancel' for the text box (ie cancelling the cancel request). ... nothing happens. Temperatures stay up, printer does not resume print. I would like the printer to resume operation rather than sitting there waiting for me to push 'resume',
Based on the doc's, an M292 is sent by the message box with either a p0 or a p1 parameter but I don't understand how to interact with this in my cancel.g routine. Based on what happens, the code in cancel.g is executed if I say 'ok' to the message box but how do I interact when the user says 'cancel' to the message box?
I would like to correct myself - the unreasonably long wait time is because the printhead is being parked and that takes a while as it was set up for a very slow nozzle wipe operation. I think it can't throw up the message box until the parking operation is completed.
dc42 administrators last edited by
@jens55 once you press Cancel, you cannot resume the print, because DWC or PanelDue has already sent the M0 command. The canel.g file is provided so that you can control whether or not you turn off heaters, unload the tool, park the print head etc.
@dc42 thanks for that explanation.
IMHO this REALLY limits the functionality of M291. The user is given a choice to cancel the current operation but not really. It is very counter-intuitive. Given that the user is presented with a choice, M291 should result in an then/else branch.
Might this be something you would entertain for the 'wish list' ?
Is there any other way that you can think of to implement a confirmation to the 'cancel print' button ?
@dc42 thinking this over outside the context of the cancel print button, I can see all kinds of issues with presenting a choice but not really giving a choice. It is quite possible that I am unaware of the proper way to do things but let me run an example by you.
Suppose I am doing some light milling and before I start the operation I present the user with a choice of "Do you want to calibrate z zero?"
If the user selects 'ok' then everything works as planned and program execution carries on after the M291 line but let's say the user decided that z zero was already verified and chooses to hit the 'cancel' button in the M291 command ..... how would I skip the calibration routine but carry on in the same macro?
oozeBot last edited by
@jens55 see if this might help you?
@oozebot, THANK YOU ! I will give it a test run later today.