M291 messages ignored by PanelDue
-
@mfs12 thanks for the tip but I just removed M292 and the behavior remains the same. Only the first M291 message is being displayed on both DWC and PanelDue. The following message ("Loading FILAMENT...") is only displayed in DWC.
Here is the updated macro:
; filament_load.g ; called to load filament if !move.axes[0].homed || !move.axes[1].homed || !move.axes[2].homed ; not all axes are homed G28 ; home all G90 ; absolute positioning if move.axes[2].machinePosition < 100 G1 Z120 F1500 ; lift Z axis to 120mm else G91 ; relative positioning G1 Z10 F1500 H2 ; lift Z axis by 10mm G90 ; absolute positioning M116 ; wait for the temperatures to be reached M300 S300 P1000 ; beep sound when temperature is reached M291 P"Do you want to load FILAMENT now? Press OK to continue or CANCEL to abort!" S3 ; requires user input to start the filament loading procedure M291 P"Loading FILAMENT..." S1 T60 ; message confirming that filament is being loaded M83 ; set extruder to relative mode G1 E80 F400 ; feed 80mm of filament fast G1 E50 F100 ; feed 50mm of filament slow M400 ; wait for current moves to finish while true if iterations = 10 break M291 P"Do you want to load more FILAMENT? Press OK to continue loading or CANCEL to abort!" S3 ; requires user input to start the filament loading procedure M291 P"Loading FILAMENT..." S1 T60 ; message confirming that filament is being loaded G1 E50 F100 ; feed 50mm of filament slow M400 ; wait for current moves to finish
Am I missing something still?
-
Actually after looking closer at this thread: https://forum.duet3d.com/topic/23189/m291-messages-are-not-always-displayed-in-macros/22
I can say that my machines are behaving similar, if I load filament from DWC, everything is working as expected and both messages are shown on DWC and PanelDie. The second messages on PanelDue are only missing if loading the filament via macro from PanelDue.
-
@mfs12 @wilriker I am still seeing very inconsistent behaviour when using M291, especially with messages not being displayed on the PanelDue. Often for information type messages via S0 or S1, that indicate the printer is currently heating or loading or similar.
I upgraded to PanelDue Firmware 3.3 before I did the following tests (I am on 3.3 for both RRF and DWC on my Duet 3 Mini 5+ in standalone mode):
Note: All macros are initiated from the PanelDue
1. M291 S3, followed by M291 S0
M291 P"BED and EXTRUDER will be heated before the procedure starts! Press OK to start or CANCEL to abort!" S3 R"Z OFFSET CALIBRATION" M291 P"Heating..." S0 R"Z OFFSET CALIBRATION"
Both messages show on DWC and PanelDue.
2. M291 S3, followed by M291 S1
M291 P"BED and EXTRUDER will be heated before the procedure starts! Press OK to start or CANCEL to abort!" M291 P"Heating..." S1 R"Z OFFSET CALIBRATION"
Only the second message shows on both PanelDue and DWC, the first message is completely ignored.
3. M291 S3, followed by M291 S2
M291 P"BED and EXTRUDER will be heated before the procedure starts! Press OK to start or CANCEL to abort!" M291 P"Heating..." S2 R"Z OFFSET CALIBRATION"
Only the second message shows on both PanelDue and DWC, the first message is completely ignored.
4. M291 S3, followed by some additional steps, followed by M291 S0
M291 P"BED and EXTRUDER will be heated before the procedure starts! Press OK to start or CANCEL to abort!" S3 R"Z OFFSET CALIBRATION" ; requires user input to continue ; preparation M104 S230 ; set extruder temperature to 230C M140 S70 ; set bed temperature to 70C if !move.axes[0].homed || !move.axes[1].homed || !move.axes[2].homed ; if not all axes are homed G28 ; home all axes else ; if all axes are homed G1 Z{sensors.probes[0].diveHeight} F360 ; move Z axis to probe dive height M561 ; clear any bed transform M290 R0 S0 ; clear babystepping G90 ; absolute positioning G1 X{(move.axes[0].min + move.axes[0].max)/2} Y{(move.axes[1].min + move.axes[1].max)/2} ; move X and Y axis to their center G1 Z5 ; move Z axis 5mm above the bed M564 S0 H0 ; allow movement beyond axis limits defined in config.g M291 P"Heating..." S0 R"Z OFFSET CALIBRATION" ; message to confirm heating G10 P0 S230 ; wait for extruder temperature to reach 230C M190 S70 ; wait for bed temperature to reach 70C M400 ; wait for current moves to finish
The first message shows on both PanelDue and DWC, the second message only in DWC.
5. M291 S3, followed by some additional steps, followed by M291 S1
M291 P"BED and EXTRUDER will be heated before the procedure starts! Press OK to start or CANCEL to abort!" S3 R"Z OFFSET CALIBRATION" ; requires user input to continue ; preparation M104 S230 ; set extruder temperature to 230C M140 S70 ; set bed temperature to 70C if !move.axes[0].homed || !move.axes[1].homed || !move.axes[2].homed ; if not all axes are homed G28 ; home all axes else ; if all axes are homed G1 Z{sensors.probes[0].diveHeight} F360 ; move Z axis to probe dive height M561 ; clear any bed transform M290 R0 S0 ; clear babystepping G90 ; absolute positioning G1 X{(move.axes[0].min + move.axes[0].max)/2} Y{(move.axes[1].min + move.axes[1].max)/2} ; move X and Y axis to their center G1 Z5 ; move Z axis 5mm above the bed M564 S0 H0 ; allow movement beyond axis limits defined in config.g M291 P"Heating..." S1 R"Z OFFSET CALIBRATION" ; message to confirm heating G10 P0 S230 ; wait for extruder temperature to reach 230C M190 S70 ; wait for bed temperature to reach 70C M400 ; wait for current moves to finish
The first message shows on both PanelDue and DWC, the second message only in DWC.
6. M291 S3, followed by some additional steps, followed by M291 S2
M291 P"BED and EXTRUDER will be heated before the procedure starts! Press OK to start or CANCEL to abort!" S3 R"Z OFFSET CALIBRATION" ; requires user input to continue ; preparation M104 S230 ; set extruder temperature to 230C M140 S70 ; set bed temperature to 70C if !move.axes[0].homed || !move.axes[1].homed || !move.axes[2].homed ; if not all axes are homed G28 ; home all axes else ; if all axes are homed G1 Z{sensors.probes[0].diveHeight} F360 ; move Z axis to probe dive height M561 ; clear any bed transform M290 R0 S0 ; clear babystepping G90 ; absolute positioning G1 X{(move.axes[0].min + move.axes[0].max)/2} Y{(move.axes[1].min + move.axes[1].max)/2} ; move X and Y axis to their center G1 Z5 ; move Z axis 5mm above the bed M564 S0 H0 ; allow movement beyond axis limits defined in config.g M291 P"Heating..." S2 R"Z OFFSET CALIBRATION" ; message to confirm heating G10 P0 S230 ; wait for extruder temperature to reach 230C M190 S70 ; wait for bed temperature to reach 70C M400 ; wait for current moves to finish
The first message only shows in DWC, the second message shows on PanelDue and DWC.
This makes it really difficult to create self-explanatory macros for our users as we aim for them to be able to navigate the printer completely from the display on the printer. Without consistent messages I am not sure how to do that though.
Am I still missing an aspect of M291?
-
@flobler thanks for the detailed report. It will help to examine this problem. It is on my agenda for paneldue-3.4. We also want clarify behavior. Although i can give an exact timeline yet.
-
@mfs12 Thank you! If you need anything from me, please do not hesitate to reach out
-
@mfs12 @dc42 - We are also seeing this in certain scenarios. I've just thrown together a debug version of the PanelDue firmware with an additional debug message. Using the examples provided in this thread, the PanelDue is not receiving the messaging for the missing M291 calls, leading us to believe this is likely an issue in the firmware.
To elaborate on the debug code, I REM'ed out all the existing debug calls in PanelDue.cpp to quiet the noise and added in a debug call within case rcvStateMessageBoxMessage of ProcessReceivedValue.
-
@oozeBot I can confirm this behavior. After debugging into it briefly it appears RRF doesn't inform PanelDue about new messages. But this needs better investigation.
-
Hey @flobler, @oozeBot and @PaulHew,
I was working on the M291 issue. I think I found the solution. It can be previewed and tested in paneldue-3.4.0-pre1.
Check https://forum.duet3d.com/topic/24889/paneldue-3-4-0-pre1-released
Feedback from you would be very helpful.
-
@mfs12 thank you very much. I will try to test it tonight or tomorrow and then report back to you.
Would it be helpful to re-test what I had posted on the 24th?
-
@mfs12 I will try and test tonight also.
-
@paulhew 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 the Web Console and canceled it and it carries on and shuts down.
I think mine is either a firmware or DWC issue.Thanks anyway.
-
@mfs12, I just re-ran the 6 test macros I shared above with "paneldue-3.4.0-pre1" and the behavior remains the same for me
-
@flobler @PaulHew strange, then i don't seem to understand what you are doing...
I have here a couple of tests and I am satisfied with the behavior.
https://github.com/mfs12/endocrine/tree/config-m291-test/macros
@PaulHew I tested m291-s3 ok and cancel behavior with this script.
https://github.com/mfs12/endocrine/blob/config-m291-test/macros/test-m291-s3-cancel.g
It works for me fine with active screensaver and without. The only thing I don't like so much is when the screensaver is active the polling time get's reduced which leads to delays before the message is actually displayed. So keep in mind such a reaction might take up to 10s... ;(
I am considering not to reduce the polling time so things are going to happen more quickly. Let's see.
What would be helpful is simplify your test process so I can better understand your usecase and what mechanic actually fails.
-
@flobler said in M291 messages ignored by PanelDue:
@mfs12 @wilriker I am still seeing very inconsistent behaviour when using M291, especially with messages not being displayed on the PanelDue. Often for information type messages via S0 or S1, that indicate the printer is currently heating or loading or similar.
I upgraded to PanelDue Firmware 3.3 before I did the following tests (I am on 3.3 for both RRF and DWC on my Duet 3 Mini 5+ in standalone mode):
Note: All macros are initiated from the PanelDue
1. M291 S3, followed by M291 S0
M291 P"BED and EXTRUDER will be heated before the procedure starts! Press OK to start or CANCEL to abort!" S3 R"Z OFFSET CALIBRATION" M291 P"Heating..." S0 R"Z OFFSET CALIBRATION"
Both messages show on DWC and PanelDue.
2. M291 S3, followed by M291 S1
M291 P"BED and EXTRUDER will be heated before the procedure starts! Press OK to start or CANCEL to abort!" M291 P"Heating..." S1 R"Z OFFSET CALIBRATION"
Only the second message shows on both PanelDue and DWC, the first message is completely ignored.
3. M291 S3, followed by M291 S2
M291 P"BED and EXTRUDER will be heated before the procedure starts! Press OK to start or CANCEL to abort!" M291 P"Heating..." S2 R"Z OFFSET CALIBRATION"
Only the second message shows on both PanelDue and DWC, the first message is completely ignored.
4. M291 S3, followed by some additional steps, followed by M291 S0
M291 P"BED and EXTRUDER will be heated before the procedure starts! Press OK to start or CANCEL to abort!" S3 R"Z OFFSET CALIBRATION" ; requires user input to continue ; preparation M104 S230 ; set extruder temperature to 230C M140 S70 ; set bed temperature to 70C if !move.axes[0].homed || !move.axes[1].homed || !move.axes[2].homed ; if not all axes are homed G28 ; home all axes else ; if all axes are homed G1 Z{sensors.probes[0].diveHeight} F360 ; move Z axis to probe dive height M561 ; clear any bed transform M290 R0 S0 ; clear babystepping G90 ; absolute positioning G1 X{(move.axes[0].min + move.axes[0].max)/2} Y{(move.axes[1].min + move.axes[1].max)/2} ; move X and Y axis to their center G1 Z5 ; move Z axis 5mm above the bed M564 S0 H0 ; allow movement beyond axis limits defined in config.g M291 P"Heating..." S0 R"Z OFFSET CALIBRATION" ; message to confirm heating G10 P0 S230 ; wait for extruder temperature to reach 230C M190 S70 ; wait for bed temperature to reach 70C M400 ; wait for current moves to finish
The first message shows on both PanelDue and DWC, the second message only in DWC.
5. M291 S3, followed by some additional steps, followed by M291 S1
M291 P"BED and EXTRUDER will be heated before the procedure starts! Press OK to start or CANCEL to abort!" S3 R"Z OFFSET CALIBRATION" ; requires user input to continue ; preparation M104 S230 ; set extruder temperature to 230C M140 S70 ; set bed temperature to 70C if !move.axes[0].homed || !move.axes[1].homed || !move.axes[2].homed ; if not all axes are homed G28 ; home all axes else ; if all axes are homed G1 Z{sensors.probes[0].diveHeight} F360 ; move Z axis to probe dive height M561 ; clear any bed transform M290 R0 S0 ; clear babystepping G90 ; absolute positioning G1 X{(move.axes[0].min + move.axes[0].max)/2} Y{(move.axes[1].min + move.axes[1].max)/2} ; move X and Y axis to their center G1 Z5 ; move Z axis 5mm above the bed M564 S0 H0 ; allow movement beyond axis limits defined in config.g M291 P"Heating..." S1 R"Z OFFSET CALIBRATION" ; message to confirm heating G10 P0 S230 ; wait for extruder temperature to reach 230C M190 S70 ; wait for bed temperature to reach 70C M400 ; wait for current moves to finish
The first message shows on both PanelDue and DWC, the second message only in DWC.
6. M291 S3, followed by some additional steps, followed by M291 S2
M291 P"BED and EXTRUDER will be heated before the procedure starts! Press OK to start or CANCEL to abort!" S3 R"Z OFFSET CALIBRATION" ; requires user input to continue ; preparation M104 S230 ; set extruder temperature to 230C M140 S70 ; set bed temperature to 70C if !move.axes[0].homed || !move.axes[1].homed || !move.axes[2].homed ; if not all axes are homed G28 ; home all axes else ; if all axes are homed G1 Z{sensors.probes[0].diveHeight} F360 ; move Z axis to probe dive height M561 ; clear any bed transform M290 R0 S0 ; clear babystepping G90 ; absolute positioning G1 X{(move.axes[0].min + move.axes[0].max)/2} Y{(move.axes[1].min + move.axes[1].max)/2} ; move X and Y axis to their center G1 Z5 ; move Z axis 5mm above the bed M564 S0 H0 ; allow movement beyond axis limits defined in config.g M291 P"Heating..." S2 R"Z OFFSET CALIBRATION" ; message to confirm heating G10 P0 S230 ; wait for extruder temperature to reach 230C M190 S70 ; wait for bed temperature to reach 70C M400 ; wait for current moves to finish
The first message only shows in DWC, the second message shows on PanelDue and DWC.
This makes it really difficult to create self-explanatory macros for our users as we aim for them to be able to navigate the printer completely from the display on the printer. Without consistent messages I am not sure how to do that though.
Am I still missing an aspect of M291?
@mfs12 these are the tests I have been running with v3.3 and paneldue-3.4.0-pre. The behavior is the same for both.
I will run the test you have linked to and report what happens.
-
Actually looking at it again I have failed to include "S3" in macro 2) and 3) for the initial message. This would totally explain the issues I have been seeing for those two tests.
So the problem seems to be more with what I am doing in the macros 4), 5) and 6) between both messages.
Let me fix this and re-test.
-
@mfs12 ok, so macro 1), 2) and 3) I shared above do work fine now that I fixed them. Apologies for that!
The simplified test macro "test-m291-flobler.g" you shared also seems to work fine.
But if I look at my non-simplified version of it there still seems to be an issue with displaying either of the two "S1" messages that are following the initial "S3" messages.
; filament_load.g ; system file, called to load filament if move.axes[0].homed & move.axes[1].homed & move.axes[2].homed ; if all axes are homed if move.axes[2].machinePosition < 100 ; if Z axis < 100mm G90 ; absolute positioning G1 Z120 F1500 ; lift Z axis to 120mm else ; if Z axis => 100mm G91 ; relative positioning G1 Z10 F1500 H2 ; lift Z axis by 10mm else G1 Z10 F1500 H2 ; lift Z axis by 10mm G90 ; absolute positioning M116 ; wait for hotend temperature to be reached M300 S300 P1000 ; beep sound when temperature is reached M291 P"Do you want to load FILAMENT now? Press OK to continue or CANCEL to abort!" S3 ; requires user input to start the filament loading procedure M291 P"Loading FILAMENT..." S1 T60 ; message confirming that filament is being loaded M83 ; set extruder to relative mode G1 E80 F400 ; quickly feed 80mm of filament G1 E50 F100 ; slowly feed 50mm of filament M400 ; wait for current moves to finish while true ; below 10 iterations repeat the procedure until cancelled if iterations = 10 ; after 10 iterations break the procedure break M291 P"Do you want to load more FILAMENT? Press OK to continue loading or CANCEL to abort!" S3 ; requires user input to start the filament loading procedure M291 P"Loading FILAMENT..." S1 T60 ; message confirming that filament is being loaded G1 E50 F100 ; slowly feed 50mm of filament M400 ; wait for current moves to finish
Both times M291 P"Loading FILAMENT..." S1 T60 are ignored by the PanelDue. They do show on DWC.
-
@mfs12
Thanks for your hard work.I tested your script as is and it does as we expect.
Changed mine to look like yours and it still shutsdown the Pi after hitting cancel.
G4 P500 M291 R"** SHUTDOWN **" P" Are you sure you want to SHUTDOWN the printer and Pi?" S3 G4 S3 M400 M106 P10 S0 M7722 ;G4 P500 ;M291 P"S3 message" S3 ;G4 S3 ;M400 ;M291 P"ok pressed" S1
I honestly do not think it is a PanelDue issue but RRF or DWC.
I re-opened my previous issue because something this simple should just work!Regards,
Paul -
@flobler I think i understand what is happening.
PD has only one popup to display at a time. This means M291 S1 messages are directly overwritten by the following M291 S3 message. And as PD is polling quite slowly it doesn't see the other message.
You could make sleep command of 30s (i think it's G4 S30) followed by M400 after M291 S1 call and see what happens.
M291 S3 P"S3 message" M291 S1 P"S1 message" G4 S30 M400 M291 S3 P"S3 message 2"
-
@paulhew sorry, i have no idea why this is failing... but i agree with you paneldue itself doesn't fail here. At least it looks like it.
-
@mfs12 sorry again for my late reply, I am currently moving and it is difficult to manage work, the move and these topics at the same time.
I tried what you suggested, but all it does is delaying whatever comes after the messages by 30 seconds and still does not display the second message (M291 S1) on the PanelDue (only on DWC).