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

    3.01RC12 on Ethernet + Duex5, M291 S2 nonblocking inside IF loop

    Scheduled Pinned Locked Moved Solved
    Gcode meta commands
    3
    5
    291
    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.
    • techildundefined
      techild
      last edited by

      Potential bug: M291 S2 option is blocking and working correctly in Duet Ethernet + Duex5 as long as it is outside of a conditional IF statement. Once it is used inside an IF statement, S2 option is no longer blocking.

      RRF3 notes only states only nonblocking M291 options are available in Duet3+SBC.

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

        Thanks, added to my list to investigate.

        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
        • OwenDundefined
          OwenD
          last edited by

          Can you post the macro?
          Board: Duet 2 WiFi (2WiFi)
          Firmware: RepRapFirmware for Duet 2 WiFi/Ethernet 3.01-RC12 (2020-05-06b1)
          Duet WiFi Server Version: 1.23
          Duet Web Control 2.1.7

          M291 S2 is definitely blocking inside macro when run from DWC or called with M98
          Haven't tried running withing a print file.

          while iterations < 6
          	if mod(iterations+1,2)!=0
          		echo "odd number"
          		M291 P{iterations+1 ^ " is an odd number"} R"Odd number" S2
          	else
          		echo "even number"
          		M291 P{iterations+1 ^ " is an even number"}  R"Even number" S2
          	G4 S0.5
          if !move.axes[0].homed
          	M291 P"axis is not homed (IF)" R"check" S2
          elif move.axes[1].homed
          	M291 P"axis 1 is homed, but not 0 (ELIF)" R"check" S2
          else
          	M291 P"axis is not homed (ELSE)" R"check" S2
          
          techildundefined 1 Reply Last reply Reply Quote 0
          • techildundefined
            techild @OwenD
            last edited by techild

            @OwenD said in 3.01RC12 on Ethernet + Duex5, M291 S2 nonblocking inside IF loop:

            Can you post the macro?
            Board: Duet 2 WiFi (2WiFi)
            Firmware: RepRapFirmware for Duet 2 WiFi/Ethernet 3.01-RC12 (2020-05-06b1)
            Duet WiFi Server Version: 1.23
            Duet Web Control 2.1.7

            M291 S2 is definitely blocking inside macro when run from DWC or called with M98
            Haven't tried running withing a print file.

            while iterations < 6
            	if mod(iterations+1,2)!=0
            		echo "odd number"
            		M291 P{iterations+1 ^ " is an odd number"} R"Odd number" S2
            	else
            		echo "even number"
            		M291 P{iterations+1 ^ " is an even number"}  R"Even number" S2
            	G4 S0.5
            if !move.axes[0].homed
            	M291 P"axis is not homed (IF)" R"check" S2
            elif move.axes[1].homed
            	M291 P"axis 1 is homed, but not 0 (ELIF)" R"check" S2
            else
            	M291 P"axis is not homed (ELSE)" R"check" S2
            

            Uhm, odd, its working for me now as well. Could have sworn it wasn't behaving correctly yesterday. Thanks for the confirmation! Will have to go back and see what i did wrong.

            Edit:

            This is what was tripping me up. I wasn't seeing the M117 message pop up on the PanelDue after M291, so I thought it was running ahead.

            elif state.currentTool = 1
            	; SOME CODE HERE
            	M300							; beep
            	M83 							; set extruder to relative moves
            	G1 E-250 F2000					; unload fast
            	M300 							; beep
            	M291 P"Please clear filament guide tube of old material!" S2
            	G4 S1							; Wait 1 second
            	M117 "Start feeding filament into LT Tool!"
            	G4 S2							; Wait 2 seconds
            	; SOME OTHER CODE
            
            1 Reply Last reply Reply Quote 0
            • OwenDundefined
              OwenD
              last edited by

              @techild
              Glad you're sorted.
              Might be best to mark thread as solved.

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