RRF 3.2.2 problem with M291 S3 and cancel
-
Summary: DWC acts in an unexpected manner to pressing the 'cancel' button of M291 S3
Versions: DWC/RRF 3.2.2 on a duet3 (standalone) (I don't know if this is a DWC specific issue, or a RRF issue. For now, I'm sticking it in the DWC category, but I understand and expect it would be moved if this isn't a bug with DWC.)
Detail (with steps that can be repeated):
I created a macro called "test" which contains only the following gcode:
m291 P"press ok or cancel" S3 echo "yes"
I then navigate to the DWC "Console" page and send:
M98 P"0:/macros/test"
from the console page
DWC, as expected, pops up a box with "OK" and "Cancel" buttons. During the time that the message is displayed, DWC acts as if it's still processing a command and the console's "send" button is disabled with a spinning circle.
If I click "OK", I see "yes" in DWC's console page and DWC no longer appears to be processing a command. The console's "Send" button is functional again.If I click "Cancel", however, DWC acts as if it's still processing a command (and I can't type any new command to the console because the console's "send" button is still disabled with the spinning circle.)
(On a side note, I can "recover" DWC by sending a M292 command from DWC's top bar even when the console specific send button is disabled.)
My expectation is that if I click "Cancel", that the macro would abort and DWC would recognize that.
This is easy to repeat. Just make a macro using the gcode above, run the macro, and click 'cancel'.
-
If you include the M291 R parameter does it act differently?
-
@garyd9 I suppose RRF doesn't increment seqs.reply when M98 has started the new macro so DWC will resolve it once another command from the inputs has been processed. If you send M105 instead of M292 from the top G-code input, I bet you'll get the same result.
This is one for @dc42. The message box dialog always sends
M292
when OK is pressed andM292 P1
when Cancel is pressed. -
This is on my list to look at.
-
For completeness, I wanted to add that running the above macro from PanelDue has no noticed irregularities regardless of if I press "OK" or "Cancel."
-
I think I stumbled into the same problem from a different angle: https://forum.duet3d.com/topic/22516/sbc-dsf-api-with-m291-s3
-
@resam said in RRF 3.2.2 problem with M291 S3 and cancel:
I think I stumbled into the same problem from a different angle: https://forum.duet3d.com/topic/22516/sbc-dsf-api-with-m291-s3
In my case, using the example I posted in the OP, the code after the M291 does not execute until after 'OK' is pressed. Perhaps this is SBC/standalone difference?
-
I also am having an issue with M291 S3 Cancel and misses a line of code.
Firmware: RepRapFirmware for Duet 3 Mini 5+ 3.3beta3 (2021-04-22)Simple script to shutdown the Printer and Pi.
M291 R"** SHUTDOWN **" P" Are you sure you want to SHUTDOWN the printer and Pi?" S3 M106 P10 S0 M7722
Pops up on DWC and the PanelDue.
If I press cancel, it clears the message on DWC not on the PanelDue, Spinning wheel next to macro, Misses the M106 command that turns off the Chamber lights and sends the M7722 anyway!Thought I was doing something wrong! (Not unusual for me )
-
@paulhew I suppose you're using ExecOnMCode for that last number. If you are, please upgrade that plugin to the latest versions because there was a bug in it that could cause codes to be executed in the wrong order (it was missing a flush call).
-
@chrishamm I do not know what ExecOnMCode is, I am afraid.
One part I missed, even if I hit cancel button it carries on and does not abort the macro.The only plugins I have enabled are HeightMap and Object Model Browser.
Regards,
Paul. -
@paulhew Then how is M7722 interpreted, do you have a custom macro file for that?
-
@chrishamm Sorry, Yes I do have ExecOnMCode.
I did not know the name... as it works and resides on the Pi.I will look at upgrading it.
Regards,
-
@paulhew So I updated to v5.2 for ExecOnMCode.
Cancel does not cancel the macro, it is as I pasted above. Still shutsdown.
Still misses the line which turns the lights off.
Not a show stopper, but might be for someone else.
Regards,
Paul.
-
I still have this issue and I do not know how to fix it still.
I thought it was to do with Touchpanel firmware, but it happens in DWC alsoHere are the details and the macro.
Duet Mini5 and 1LC - SBC mode. PanelDue 7i
m115 FIRMWARE_NAME: RepRapFirmware for Duet 3 Mini 5+ FIRMWARE_VERSION: 3.3 ELECTRONICS: Duet 3 Mini5plus Ethernet FIRMWARE_DATE: 2021-06-15 21:46:20
This is my macro
M291 R"** SHUTDOWN **" P" Are you sure you want to SHUTDOWN the printer and Pi?" S3 M106 P10 S0 M7722
Still ignores the cancel and informs me Linux is disconnected.
Just tried it from DWC and clicked cancel it and it carries on and shuts down.
I think mine is either a firmware or DWC issue.Hope someone can assist me and others that are struggling to cancel M291 commands.
Regards,
Paul.