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

      Hello everyone,

      I have an issue where messages that are issued via M291 are being displayed in DWC but not the PanelDue. It worked fine with the same macro before but somehow stopped working (I really cannot recall having changed anything about the macro).

      Some information on my setup:

      PanelDue 5i: v3.2.11
      DWC: 3.3.0-b2
      Mini 5+: 3.3beta2
      Printer: MK3S Bear
      Wiring: Ribbon cable (re-used from the original Prusa LCD), ca 60cm long

      Here is the initial snipped of macro I am referencing:

      M291 P"Do you want to start the SELF TEST? Press OK to start or CANCEL to abort!" S3 R"SELF TEST" ; requires user input to start or abort the self test
      
      ; motor test
      ; verifies the correct motor moving direction
      
      M291 P"We are now testing if all MOTORS are turning in the right direction. Press OK to start or CANCEL to abort!" S3 R"MOTOR TEST" ; requires user input to start or abort the motor test
      
      G91                                                                                  ; relative positioning
      G1 X20 F500                                                                          ; moves X slowly to the right
      M400                                                                                 ; wait for current moves to finish
      M291 P"Did the X AXIS move to the right? Press OK to confirm or CANCEL to abort!" S3 ; requires user input to confirm if test was successful, confirm or abort
      
      G1 Y20 F500                                                                          ; moves Y slowly forward
      M400                                                                                 ; wait for current moves to finish
      M291 P"Did the Y AXIS move forward? Press OK to confirm or CANCEL to abort!" S3      ; requires user input to confirm if test was successful, confirm or abort
      
      G1 Z20 F500                                                                          ; moves Z slowly upwards
      M400                                                                                 ; wait for current moves to finish
      M291 P"Did the Z AXIS move upwards? Press OK to confirm or CANCEL to abort!" S3      ; requires user input to confirm if test was successful, confirm or abort
      G90                                                                                  ; absolute positioning
      
      M291 P"MOTOR TEST successful!" R"MOTOR TEST" S1 T3 ; message to confirm succesful motor test
      M400                                               ; wait for current moves to finish
      

      My problem is that the last M291 (P"MOTOR TEST successful!" R"MOTOR TEST" S1 T3) is not being displayed on the PanelDue, the other messages are.

      The macro itself provides a self-test for a user before starting to use the machine, after wiring everything etc. The snippet I am sharing is the first part of it. Further things that are being checked:

      • SuperPinda
      • Homing
      • Fans
      • Heaters + thermistors

      Each of those has their own section with a M291 that confirms the test being successful at the end, like in the example shared above. Once the message disappears, the next step of the test starts. This all happens in a single macro.

      For each section, only the confirmation message at the end is not displayed on PanelDue, other messages are. All are displayed in DWC.

      Thanks in advance!

      wilrikerundefined 1 Reply Last reply Reply Quote 0
      • wilrikerundefined
        wilriker @flobler
        last edited by

        @flobler For all other messages you have M400 before M291 but the last one the order is reversed. Try to put M400 before M291 there also. That should fix it.

        Manuel
        Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
        with probably always latest firmware/DWC (incl. betas or self-compiled)
        My Tool Collection

        cosmowaveundefined floblerundefined mfs12undefined 3 Replies Last reply Reply Quote 1
        • cosmowaveundefined
          cosmowave @wilriker
          last edited by

          i have a general question for learning more about conditional code:
          what does the "{1}" below the m291 message mean?

          Mankati FSXT+, DeltaTowerV2, E3D MS/TC

          engikeneerundefined 1 Reply Last reply Reply Quote 0
          • engikeneerundefined
            engikeneer @cosmowave
            last edited by

            @cosmowave think that might be an issue with the forum rather than the actual code. Sometimes people get {1} appearing on line breaks when copying code over. I know the moderators have had a look at it but not managed to track down why the forum does it....

            E3D TC with D3Mini and Toolboards.
            Home-built CoreXY, Duet Wifi, Chimera direct drive, 2x BMG, 300x300x300 build volume
            i3 clone with a bunch of mods

            cosmowaveundefined 1 Reply Last reply Reply Quote 1
            • cosmowaveundefined
              cosmowave @engikeneer
              last edited by

              @engikeneer ah ok. Thanks for the explanation.
              I'm asking me, what happens with this code:

              M291 P"Do you want to start the SELF TEST? Press OK to start or CANCEL to abort!" S3 R"SELF TEST"
              

              It's clear, when the user press ok, the macro will go on.
              But when the user press cancel? Is it like a return command from the macro?

              Mankati FSXT+, DeltaTowerV2, E3D MS/TC

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

                @wilriker thank you, I will try that!

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

                  @cosmowave yeah, the {1} somehow is added when I copy/paste on the forum here. I figured out that it goes away is I make a "space" at the start of the empty line.

                  If you press "CANCEL" the whole macro will be aborted.

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

                    @wilriker said in M291 messages ignored by PanelDue:

                    @flobler For all other messages you have M400 before M291 but the last one the order is reversed. Try to put M400 before M291 there also. That should fix it.

                    @fobler can you confirm this suggestion solved your issue and if so can you post an example? This would be helpful.

                    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 @wilriker apologies it took me a while to get back to it. It does not really seem to solve this, no. I just tried it with a different macro where I had the same issue:

                      ; 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
                      M292                ; clear messages
                                                                          
                      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
                          M292                               ; clear messages
                      
                      

                      The messages that ask the user to confirm are properly displayed on the PanelDue. But the M291 "Loading FILAMENT..." S1 T60 messages are only displayed in DWC, not on the PanelDue. I tried both with or without M400 right before the message.

                      Am I doing something wrong?

                      Thank you!

                      EDIT: I should add that I changed from ribbon cable to the included 4-pin wire to connect the PanelDue with the Mini 5+; this also did not seem to change the behavior

                      I also am on the most recent firmwares for the Mini, DWC and the PanelDue

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

                        Since updating to 3.3.0 and the latest DWC, I am experiencing this also.

                        I have a simple macro to shutdown my Pi nicely.
                        If I initiate it from the PanelDue, I have to walk to my computer to confirm or cancel if I want to shutdown my Pi!

                        Meant to mention this the other day when I saw it...

                        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 @PaulHew
                          last edited by

                          @paulhew can you share the macro you are using?

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

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

                            @mfs12 As requested

                            M291 R"** SHUTDOWN **" P" Are you sure you want to SHUTDOWN the printer and Pi?" S3
                            
                            
                            M106 P10 S0
                            
                            M7722
                            

                            Also the cancel does not cancel, carries on and shutsdown!

                            P.

                            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 @PaulHew
                              last edited by

                              @paulhew thanks for providing your script.

                              I tried to reproduce you issue. Unfortunately I didn't manage to get the error.

                              I checked it with following versions:

                              • RepRapFirmware 3.3
                              • PanelDueFirmware 3.2.11 and 3.3-rc2

                              in "normal" and "sbc" mode. I was also using slight modifed macros.

                              Although what i could experience is that sometimes the messages are delayed on the PanelDue by 1 to 3s compared to the web interface. But they always showed up.

                              Could you test if you problem persists with the current releases:

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

                              Macros i used:

                              • test-m291-s0.g
                              • test-m291-s1.g
                              • test-m291-s2.g
                              • test-m291-s3.g
                              • test-m291-confirm.g
                              • test-m291-loop.g
                              • test-m291-move-confirm.g

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

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

                                @mfs12

                                I also just tried the macros you shared on the recent releases (RRF 3.3 and PanelDue 3.3.0-rc2).

                                Your test macros all worked fine but the macro I shared above is still not displaying all messages on PanelDue, some are only displayed on DWC.

                                This is the 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
                                M292                ; clear messages
                                                                                    
                                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
                                    M292                               ; clear messages
                                
                                

                                The second M291 message "Loading FILAMENT...." is not being displayed on the PanelDue in both cases. I tried to put a M400 between the messages which also does not seem to help. It is being displayed in DWC correctly though.

                                Additionally when flashing the new PanelDue firmware (I was upgrading from 3.2.11) on my PanelDue 5i, the auto "erase and reset" does not work and I have to physically push the buttons. Is that expected? Should I open another thread on this?

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

                                  hey @flobler, sorry, but i have to tell that the usage of M292 is not allowed. This leads to the described "faulty" behavior.

                                  For more details please refer to

                                  • https://forum.duet3d.com/post/240796
                                  • https://github.com/Duet3D/PanelDueFirmware/issues/146
                                  mfs12 created this issue in Duet3D/PanelDueFirmware

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

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

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

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

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

                                      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.

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

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

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

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

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

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

                                            @mfs12 Thank you! If you need anything from me, please do not hesitate to reach out 🙂

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