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

    M291 messages ignored by PanelDue

    Scheduled Pinned Locked Moved Solved
    PanelDue
    7
    44
    2.4k
    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.
    • floblerundefined
      flobler
      last edited by flobler

      @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.

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

        @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

        RailCore II - Duet Mini + 1LC, Voron V0.1 - Duet Mini
        Voron 2.4 disassembled..... Waiting for the RailCore Mini....

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

          @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"
          

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

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

            @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.

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

            1 Reply Last reply Reply Quote 0
            • floblerundefined
              flobler @mfs12
              last edited by

              @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).

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

                @flobler, "S1 message" is missed. This happens due to paneldue's polling interval of 500ms. If it's reduced to 250ms the "S1 message" is more likely seen. But same issue applies to DWC if a state update of the OM is missed then the message is lost.

                @dc42 can this be improved on RRF side somehow so message are always catched?

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

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

                  @flobler all messages which don't require any confirmation may be overwritten by any following message.

                  So if you want to be sure to see a S1 or S0 message which may be followed by another message you best add a timeout after the message, i.e. "G4 S20".

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

                  floblerundefined 1 Reply Last reply Reply Quote 0
                  • floblerundefined
                    flobler @mfs12
                    last edited by flobler

                    @mfs12 I tried that previously in this thread and it did not solve the problem but just caused a 20 second wait with the S1 message still not displaying on the PanelDue.

                    @flobler said in M291 messages ignored by PanelDue:

                    @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).

                    I just re-tried and saw the same behavior. This is what I did:

                    1. Test
                    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
                    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
                    

                    The initial S3 messages pops-up on the PanelDue, I press OK and the following S1 message is being ignored. Instead both PanelDue and DWC direclty jump to the next S3 message.

                    1. Test
                    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
                    G4 S30
                    M400
                    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
                    

                    The initial S3 message pops-up on the PanelDue, I press OK and then the following S1 message is only displayed in DWC and not on PanelDue, after 30 seconds the next S3 message pops-up on both PanelDue and DWC.

                    Any other ideas? I am setting this back to "unresolved".

                    Thank you for your help 🙂

                    1 Reply Last reply Reply Quote 0
                    • floblerundefined flobler has marked this topic as unsolved
                    • mfs12undefined
                      mfs12
                      last edited by mfs12

                      @flobler, i ran the following test

                      If macro is launched from dwc the s1 message is displayed on paneldue.
                      If macro is launched from paneldue the s1 message is not displayed on paneldue.

                      M291 S3 P"S3 message"
                      M291 S1 P"S1 message"
                      G4 S5
                      M400
                      M291 S3 P"S3 message 2"
                      

                      Log from paneldue when launched from DWC

                      ;dbg   19 FindSeqByKey(555): key
                      ;dbg   19 UpdateSeq(577): state 70 -> 71
                      ;dbg   19 UpdateSeq(577): volumes 73 -> 74
                      ;dbg   19 main(2375): requesting state
                      N44 M409 K"state" F"vn"*124
                      ;dbg   19 ProcessReceivedValue(1563): message S3 message
                      ;dbg   19 main(2248): message updated last action time
                      ;dbg   20 EndReceivedMessage(973): seq state 1 DONE
                      ;dbg   20 main(2375): requesting volumes
                      N45 M409 K"volumes" F"v"*31
                      ;dbg   20 EndReceivedMessage(973): seq volumes 1 DONE
                      N46 M409 F"d99f"*120
                      ;dbg   20 FindSeqByKey(555): key
                      ;dbg   21 UpdateSeq(577): state 71 -> 73
                      ;dbg   21 main(2375): requesting state
                      N47 M409 K"state" F"vn"*127
                      ;dbg   21 ProcessReceivedValue(1563): message S1 message
                      ;dbg   21 main(2248): message updated last action time
                      ;dbg   21 EndReceivedMessage(973): seq state 1 DONE
                      N48 M409 F"d99f"*118
                      ;dbg   21 FindSeqByKey(555): key
                      N49 M409 F"d99f"*119
                      ;dbg   22 FindSeqByKey(555): key
                      N50 M409 F"d99f"*127
                      ;dbg   22 FindSeqByKey(555): key
                      N51 M409 F"d99f"*126
                      ;dbg   23 FindSeqByKey(555): key
                      N52 M409 F"d99f"*125
                      ;dbg   23 FindSeqByKey(555): key
                      N53 M409 F"d99f"*124
                      ;dbg   24 FindSeqByKey(555): key
                      N54 M409 F"d99f"*123
                      ;dbg   24 FindSeqByKey(555): key
                      N55 M409 F"d99f"*122
                      ;dbg   25 FindSeqByKey(555): key
                      N56 M409 F"d99f"*121
                      ;dbg   25 FindSeqByKey(555): key
                      ;dbg   26 UpdateSeq(577): state 73 -> 74
                      ;dbg   26 main(2375): requesting state
                      N57 M409 K"state" F"vn"*126
                      ;dbg   26 ProcessReceivedValue(1563): message S3 message 2
                      ;dbg   26 main(2248): message updated last action time
                      ;dbg   26 EndReceivedMessage(973): seq state 1 DONE
                      

                      Log from paneldue when launched from PanelDue

                      N239 M98 P"0:/macros/test-m291-s3s1-sleep.g"*41
                      N240 M409 F"d99f"*76
                      ;dbg  117 FindSeqByKey(555): key
                      ;dbg  118 UpdateSeq(577): state 75 -> 76
                      ;dbg  118 UpdateSeq(577): volumes 75 -> 76
                      ;dbg  118 main(2375): requesting state
                      N241 M409 K"state" F"vn"*75
                      ;dbg  118 ProcessReceivedValue(1563): message S3 message
                      ;dbg  118 main(2248): message updated last action time
                      ;dbg  118 EndReceivedMessage(973): seq state 1 DONE
                      ;dbg  118 main(2375): requesting volumes
                      N242 M409 K"volumes" F"v"*42
                      ;dbg  119 EndReceivedMessage(973): seq volumes 1 DONE
                      N243 M409 F"d99f"*79
                      ;dbg  119 FindSeqByKey(555): key
                      N244 M409 F"d99f"*72
                      ;dbg  120 FindSeqByKey(555): key
                      N245 M409 F"d99f"*73
                      ;dbg  120 FindSeqByKey(555): key
                      N246 M409 F"d99f"*74
                      ;dbg  121 FindSeqByKey(555): key
                      N247 M409 F"d99f"*75
                      ;dbg  121 FindSeqByKey(555): key
                      N248 M409 F"d99f"*68
                      ;dbg  122 FindSeqByKey(555): key
                      N249 M409 F"d99f"*69
                      ;dbg  122 FindSeqByKey(555): key
                      ;dbg  122 main(2229): delta 4703 state 1
                      ;dbg  122 main(2231): pressed
                      N250 M292 P0*109
                      N251 M409 F"d99f"*76
                      ;dbg  123 FindSeqByKey(555): key
                      ;dbg  123 UpdateSeq(577): state 76 -> 78
                      ;dbg  123 main(2375): requesting state
                      N252 M409 K"state" F"vn"*73
                      ;dbg  124 FindSeqByKey(555): key
                      ;dbg  124 main(2375): requesting state
                      N253 M409 K"state" F"vn"*72
                      ;dbg  125 FindSeqByKey(555): key
                      ;dbg  125 main(2375): requesting state
                      N254 M409 K"state" F"vn"*79
                      ;dbg  126 FindSeqByKey(555): key
                      ;dbg  126 main(2375): requesting state
                      N255 M409 K"state" F"vn"*78
                      ;dbg  127 FindSeqByKey(555): key
                      ;dbg  127 main(2375): requesting state
                      N256 M409 K"state" F"vn"*77
                      ;dbg  127 FindSeqByKey(555): key
                      ;dbg  128 UpdateSeq(577): state 78 -> 79
                      ;dbg  128 ProcessReceivedValue(1563): message S3 message 2
                      ;dbg  128 main(2248): message updated last action time
                      ;dbg  128 EndReceivedMessage(973): seq state 1 DONE
                      ;dbg  128 ProcessReceivedValue(1563): message S3 message 2
                      

                      To conclude, the sequence number on RRF side increment and when the state seq request is executed the S1 message is not delivered from RRF. To me it looks like an issue on RRF side.

                      I have to talk to @dc42 about this.

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

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

                        @flobler, good news. It looks like we understood the problem so there might be a solution in reach.

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

                        floblerundefined 1 Reply Last reply Reply Quote 2
                        • floblerundefined
                          flobler @mfs12
                          last edited by

                          @mfs12 awesome, thank you very much for investigating!

                          1 Reply Last reply Reply Quote 0
                          • floblerundefined
                            flobler @mfs12
                            last edited by

                            @mfs12 Is this the issue we are talking about here?
                            https://github.com/Duet3D/PanelDueFirmware/issues/239

                            dc42 created this issue in Duet3D/PanelDueFirmware

                            closed M291 S3 message not cleared #239

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

                              @flobler said in M291 messages ignored by PanelDue:

                              https://github.com/Duet3D/PanelDueFirmware/issues/239

                              no, this is another issue. 😉

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

                              1 Reply Last reply Reply Quote 0
                              • floblerundefined
                                flobler
                                last edited by

                                @mfs12 it looks like upgrading everything to 3.4.0 fixed this for me and all messages are now displayed as they should 🙂 thank you very much for your help along the way!!!

                                1 Reply Last reply Reply Quote 1
                                • floblerundefined flobler has marked this topic as solved
                                • First post
                                  Last post
                                Unless otherwise noted, all forum content is licensed under CC-BY-SA