Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    M291 messages are not always displayed in macros

    Scheduled Pinned Locked Moved Solved
    PanelDue
    6
    24
    1.5k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Aitorundefined
      Aitor
      last edited by mfs12

      Good morning,

      I am on PanelDue version 3.2.11 some messages M291 S3 and M291 S4 are not displayed when running them from macros in PanelDue, but in the browser.

      I have tried to put in front and behind M400 but I have not achieved that they are shown.

      On the other hand, is there any command that I can send so that the LCD shows me the CONTROL window for example, as PRINT is shown when I give it to print, I have the feeling that this will solve it because if I run the M291 commands from the browser if they are displayed.

      thanks

      1 Reply Last reply Reply Quote 0
      • Phaedruxundefined
        Phaedrux Moderator
        last edited by

        What duet firmware and DWC version are you using?

        Z-Bot CoreXY Build | Thingiverse Profile

        Aitorundefined 1 Reply Last reply Reply Quote 0
        • Aitorundefined
          Aitor @Phaedrux
          last edited by

          Good morning @phaedrux ,

          I have tested with DWC 3.2.2 and 3.3RC1

          Anyway I got confused yesterday, it's the messages M291 S0 and M291 S1 that don't work the S2 and S3 take a while to come out but they end up coming out.

          mfs12undefined 1 Reply Last reply Reply Quote 0
          • mfs12undefined
            mfs12 @Aitor
            last edited by

            @aitor @Phaedrux

            Ok. The behavior is a little unexpected

            • running a script with only M291 S0 -> message is displayed
            • running a script with only M291 S1 -> message is displayed
            • running a script with only M291 S2 -> message is displayed
            • running a script with only M291 S3 -> message is displayed
            • running a script with multiple messages M291 S0, S1, S2, S3 -> only S2 and S3 messages are displayed.

            https://github.com/mfs12/GcodeMacros/tree/testing/tests

            Visit me on github at https://github.com/mfs12/

            dc42undefined 1 Reply Last reply Reply Quote 0
            • dc42undefined
              dc42 administrators @mfs12
              last edited by

              I think the reason is that PanelDue does not buffer messages, so only the latest message is shown. This means that if a message does not require acknowledgement, the script that generated it is not suspended; so if it goes on to generate a new message, that message will overwrite the previous one.

              Duet WiFi hardware designer and firmware engineer
              Please do not ask me for Duet support via PM or email, use the forum
              http://www.escher3d.com, https://miscsolutions.wordpress.com

              Aitorundefined 1 Reply Last reply Reply Quote 0
              • Aitorundefined
                Aitor @dc42
                last edited by

                Good morning @dc42 ,

                In panel due version 1.24 or 1.23 (I don't remember) it worked correctly.

                @mfs12 indeed I have two messages in the same script, with what you tell me I will do some more test, to see if I can leave it in a single message or run the messages from another script using M98, to see if this works.

                dc42undefined mfs12undefined 2 Replies Last reply Reply Quote 0
                • dc42undefined
                  dc42 administrators @Aitor
                  last edited by

                  @aitor there was a change to RepRapFirmware several versions ago. Several users complained that when the printer started up, the informational messages shown on PanelDue slowed down the startup sequence, because each message had to time out before the next one was shown. So we changed RRF to not buffer up messages, but instead allow later messages to overwrite earlier ones.

                  Duet WiFi hardware designer and firmware engineer
                  Please do not ask me for Duet support via PM or email, use the forum
                  http://www.escher3d.com, https://miscsolutions.wordpress.com

                  1 Reply Last reply Reply Quote 0
                  • mfs12undefined
                    mfs12 @Aitor
                    last edited by

                    @aitor said in PanelDue V3.2.11 M291 S3 and M291 S4 are not displayed:

                    Good morning @dc42 ,

                    In panel due version 1.24 or 1.23 (I don't remember) it worked correctly.

                    @Aitor I think it was 1.24. This was the version i did initial testing.

                    Visit me on github at https://github.com/mfs12/

                    1 Reply Last reply Reply Quote 0
                    • mfs12undefined
                      mfs12
                      last edited by

                      @Aitor would you be interested in testing if you issue persists with new versions of RepRapFirmware and PanelDueFirmware?

                      Check here for firmware files:

                      • https://github.com/Duet3D/RepRapFirmware/releases/tag/3.3
                      • https://github.com/Duet3D/PanelDueFirmware/releases/tag/3.3.0-rc2

                      Visit me on github at https://github.com/mfs12/

                      Aitorundefined 1 Reply Last reply Reply Quote 0
                      • Aitorundefined
                        Aitor @mfs12
                        last edited by

                        Good morning @mfs12,

                        Unfortunately the S0 and S1 messages are still not displayed when there is more than one, I have tried to launch this code, in several situations

                        If I run the macro from the web control, the messages are shown both in the panel due and in the web control.

                        If I run this macro from the due panel, only the messages S2 and S3 are shown in the panel due and all in the web control.

                        I have also been able to verify that if I run this macro from web control when the Screensaver is active, the messages are displayed (slow) but also when the Screensaver is finished it is blocked and does not let me control the panel due for a long time (more than 2 min), this also happened to me during a print when the filament detector jumped, in this message also shows a message M291 S3 and I think that is what blocked it, on that occasion I had no patience and restarted the printer.
                        Attached is a video to show the problem with Screensaver

                        The tests have been done on two machines both in these versions but different panel due

                        Board: Duet 2 WiFi (2WiFi)
                        Firmware: RepRapFirmware for Duet 2 WiFi/Ethernet 3.3 (2021-06-15)
                        Duet WiFi Server Version: 1.26
                        Duet Web Control 3.3.0
                        PanelDueFirmware-3.3.0-rc2-5.0i-7.0i-nologo.bin AND PanelDueFirmware-3.3.0-rc2-v3-5.0-nologo.bin

                        M291 R "0. No buttons" P "0. No buttons are displayed (non-blocking)" S0
                        M300 S300 P1000
                        G4 S5
                        M400
                        M291 R "1. Only Close" P "1. Only Close is displayed (non-blocking)" S1
                        M300 S300 P1000
                        G4 S5
                        M400
                        M291 R "2. Only OK" P "2. Only OK is displayed (blocking, send M292 to resume the execution)" S2
                        M300 S300 P1000
                        G4 S5
                        M400
                        M291 R "3. OK and Cancel" P "3. OK and Cancel are displayed (blocking, send M292 to resume the execution or M292 P1 to cancel the operation in progress)" S3
                        

                        I would be happy to carry out further tests, thank you.

                        Best regards

                        mfs12undefined 1 Reply Last reply Reply Quote 1
                        • mfs12undefined
                          mfs12 @Aitor
                          last edited by mfs12

                          @aitor thanks for the detailed description and the video.

                          About the S0 und S1. If multiple messages shall be displayed only the latest one is shown.

                          • https://forum.duet3d.com/post/230672
                          • https://forum.duet3d.com/post/230789

                          This was a design decision. So I can't do anything immediately about it. But if you want it blocking you could use S2 message, but with the downside the it will stop your script.

                          About the screensave issue. This looks like a bug, later today i will try to reproduce on my setup and will keep you updated.

                          Visit me on github at https://github.com/mfs12/

                          Aitorundefined 1 Reply Last reply Reply Quote 0
                          • Aitorundefined
                            Aitor @mfs12
                            last edited by Aitor

                            Good morning @mfs12,

                            Yes it was clear to me that this was not going to be shown, but as you mentioned to try it I couldn't avoid it, besides I still don't understand very well why this was done, I don't see any sense in it, as a solution I use M118 this way:

                            M118 P0 S"0. No buttons are displayed (non-blocking)" L0
                            M291 R"0. No buttons" P"0. No buttons are displayed (non-blocking)" S0
                            M300 S300 P1000
                            G4 S5
                            M400
                            M118 P0 S"1. Only Close is displayed (non-blocking)" L0
                            M291 R"1. Only Close" P"1. Only Close is displayed (non-blocking)" S1
                            M300 S300 P1000
                            G4 S5
                            M400
                            M291 R"2. Only OK" P"2. Only OK is displayed (blocking, send M292 to resume the execution)" S2
                            M291 R"3. OK and Cancel" P"3. OK and Cancel are displayed (blocking, send M292 to resume the execution or M292 P1 to cancel the operation in progress)" S3
                            

                            On the other hand this other code doesn't work for me, but I don't know if I'm using it right, I understand that when using M118 P2 only the message should be shown in the panel due right? but they are not shown and in case 1 if, I understood it right? or I'm using it wrong? (in version 3.2.11 it didn't work either):

                            M118 P2 S"0. No buttons are displayed (non-blocking)" L0
                            M291 R"0. No buttons" P"0. No buttons are displayed (non-blocking)" S0
                            M300 S300 P1000
                            G4 S5
                            M400
                            M118 P2 S"1. Only Close is displayed (non-blocking)" L0
                            M291 R"1. Only Close" P"1. Only Close is displayed (non-blocking)" S1
                            M300 S300 P1000
                            G4 S5
                            M400
                            M291 R"2. Only OK" P"2. Only OK is displayed (blocking, send M292 to resume the execution)" S2
                            M291 R"3. OK and Cancel" P"3. OK and Cancel are displayed (blocking, send M292 to resume the execution or M292 P1 to cancel the operation in progress)" S3
                            

                            I will be attentive to the updates that you make and I will comment you if I find something else.

                            Thanks and best regards

                            mfs12undefined 1 Reply Last reply Reply Quote 0
                            • mfs12undefined
                              mfs12 @Aitor
                              last edited by mfs12

                              Hey @aitor, well so i could reproduce your problem. I simplified your script to a bare test case. It would be nice when you could confirm that they reproduce the faulty behavior on your device.

                              If you check the attached macros

                              • without M292 command message is displayed test-m291-s1-ok.g
                              • with M292 command message is not displayed test-m291-s1-fail.g

                              Visit me on github at https://github.com/mfs12/

                              Aitorundefined 1 Reply Last reply Reply Quote 0
                              • Aitorundefined
                                Aitor @mfs12
                                last edited by

                                Good morning @mfs12,

                                I have already tested as follows

                                Running the macros from PanelDue:
                                test-m291-s1-ok.g
                                It shows (but takes a little while)
                                test-m291-s1-fail.g
                                Not shown (I assume that this is normal, as mentioned above)

                                Running the macros from ControlWeb without the Screensaver:
                                test-m291-s1-ok.g
                                The message was displayed (a bit faster)
                                test-m291-s1-fail.g
                                Not displayed (in my tests it did display because of giving it more time between messages, my Z-axis is quite fast)

                                Running the macros from ControlWeb with the Screensaver active:
                                test-m291-s1-ok.g
                                The message takes a while to display, and lasts less than a second on screen, then it is hidden behind Screensaver (clicking on Screensaver shows the message, but it is not automatically disabled as it was in previous versions), Screensaver is not blocked.
                                test-m291-s1-fail.g
                                Not shown at any time, Screensaver remained active but did not crash

                                These were my results, to replicate the Screensaver error, I don't think these macros will help you.

                                Best regards, thanks

                                mfs12undefined 1 Reply Last reply Reply Quote 0
                                • mfs12undefined
                                  mfs12 @Aitor
                                  last edited by

                                  Hey @aitor, also could reproduce the screensaver bug.

                                  Thanks for reporting both issues. I created to issues:

                                  • M291 S0 and S1 issue https://github.com/Duet3D/PanelDueFirmware/issues/146
                                  • M291 S3 and S4 screensaver issue https://github.com/Duet3D/PanelDueFirmware/issues/147

                                  Any update concerning this problems will be reflected in the gitlab issues.

                                  mfs12 created this issue in Duet3D/PanelDueFirmware

                                  closed M291 S0 and S1 are not displayed when M292 follows #146

                                  mfs12 created this issue in Duet3D/PanelDueFirmware

                                  closed M291 leads to unresponsiveness when screensaver is activated #147

                                  Visit me on github at https://github.com/mfs12/

                                  1 Reply Last reply Reply Quote 0
                                  • mfs12undefined
                                    mfs12
                                    last edited by mfs12

                                    Hey @Aitor, i think i found the issues. I build a test release. Would be cool if you could test them and provide feedback. If positive I am going to build another release candidate.

                                    Check the attached image file.

                                    PanelDueFirmware-3.3.0-rc2-m291-5.0i-7.0i-nologo.bin

                                    Visit me on github at https://github.com/mfs12/

                                    mfs12undefined 1 Reply Last reply Reply Quote 1
                                    • mfs12undefined
                                      mfs12 @mfs12
                                      last edited by

                                      @Aitor weird enough... so far this fixes only the screensaver bug. The other one persists. When i was testing it it appeared ok, but i was wrong!

                                      Visit me on github at https://github.com/mfs12/

                                      Aitorundefined 2 Replies Last reply Reply Quote 0
                                      • Aitorundefined
                                        Aitor @mfs12
                                        last edited by

                                        Good morning @mfs12

                                        Running the macros from PanelDue:

                                        M291 S0 and S1 messages are not shown, this is fine according to what we have discussed.
                                        M291 messages S2 and S3 are displayed normally.

                                        Running macros from ControlWeb without the guard:

                                        M291 S0 and S1 messages are displayed but very late, I had to switch from G4 S5 to G4 S10 to get the messages displayed

                                        M291 messages S2 and S3, displayed normally.

                                        Running the macros from ControlWeb with Screensaver active:

                                        The Screensaver is not blocked, so it works correctly, the message is not hidden and Screensaver is not deactivated, it behaves like "Running macros from ControlWeb without the screensaver" but with the Screensaver active at all times, I do not dislike this behaviour,but this is my opinion.

                                        The Screensaver bug is fixed, I will do more tests if I find something and let you know.

                                        I'll be happy to do more tests, let me know with anything, I'll be happy to help in any way I can.

                                        By the way, if something is not well understood tell me, it may be a bad translation.

                                        Best regards and thanks

                                        1 Reply Last reply Reply Quote 1
                                        • Aitorundefined
                                          Aitor @mfs12
                                          last edited by

                                          Good morning @mfs12

                                          I hadn't read your last message, as far as I've been able to check it's a timing thing, since version 3.2.9 which is the first one I tried since "3.1", I've noticed that the messages are a bit slower.

                                          As I don't know about programming I can't know why.

                                          Best regards

                                          1 Reply Last reply Reply Quote 0
                                          • mfs12undefined
                                            mfs12
                                            last edited by mfs12

                                            @Aitor thanks for testing.

                                            I had deeper look into M291 S0 and S1 issue and this seems to be more complex. So let's see how long i twill take to fix that. The only workaround so far is to avoid M292 gcodes in scripts.

                                            Visit me on github at https://github.com/mfs12/

                                            dc42undefined 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Unless otherwise noted, all forum content is licensed under CC-BY-SA