Duet3D Logo

    Duet3D

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Documentation
    • Order

    What's wrong with my script

    General Discussion
    4
    6
    152
    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.
    • zapta
      zapta last edited by zapta

      I have a macro file with the script below. When I run it I expect a slow extruder movement over 24 seconds but instead the extruder moves fast for a second or less and the two messages are printed almost at the same time.

      What am I missing?

      Board: Duet 3 Mini 5+ (Mini5plus)
      Firmware: RepRapFirmware for Duet 3 Mini 5+ 3.4.0beta5 (2021-10-12)

      M302 P1      ; allow  cold extrusion.
      M83          ; set extruder to relative mode
      echo "Start"
      G1 E60 F150  ; Extrude 60mm at 2.5mm/sec
      echo "Done"
      M82          ; set extruder to abs mode
      

      799e2ff6-d620-4dc3-a0e9-42d2aade89fd-image.png

      deckingman 1 Reply Last reply Reply Quote 0
      • deckingman
        deckingman @zapta last edited by

        @zapta Try putting M400 after the G1 command.

        Ian
        https://somei3deas.wordpress.com/
        https://www.youtube.com/@deckingman

        zapta 1 Reply Last reply Reply Quote 0
        • zapta
          zapta @deckingman last edited by

          Thanks. M400 after G1 didn't make a change.

          M302 P1      ; allow  cold extrusion.
          
          M83          ; set extruder to relative mode
          echo "Start"
          G1 E60 F150  ; Extrude 60mm at 2.5mm/sec
          M400
          echo "Done"
          M82          ; set extruder to abs mode
          
          fcwilt 1 Reply Last reply Reply Quote 0
          • mikeabuilder
            mikeabuilder last edited by mikeabuilder

            @zapta, I think inserting a wait before the done message - P400 (or a G4 P0) doing nothing makes sense because your description is that the extrude is happening too fast, not that the message is printed before the extrude completes.

            Normally, the F parameter is used to describe the speed of movement between two points, while extruding E (mm) of filament along the path. I'm not sure how F works if there is only an E parameter. Based on your description of what you saw, maybe F with only E is interpreted as mm/sec, not mm/min. If that were the case, your 60mm of filament would extrude in 2.5seconds.

            1 Reply Last reply Reply Quote 0
            • fcwilt
              fcwilt @zapta last edited by

              @zapta

              As a test insert a G1 Xaaa Ybbb command to move to some start point.

              Then modify your existing G1 to include Xccc Yddd where ccc and ddd will move to some end point.

              See how that changes the extruder behavior.

              Frederick

              Printers: A FT-5 with the 713 upgrade bits. A custom MarkForged style. A small Utilmaker style and a CoreXY from kits. Various hotends. Using Duets (2 and 3) running 3.4.1

              zapta 1 Reply Last reply Reply Quote 0
              • zapta
                zapta @fcwilt last edited by

                Thank you everybody for the suggestion. The script works now. The trick was to separate the speed and the extrusion to two G1 commands. Not sure if this is intended or a bug in the version I am using.

                M302 P1      ; allow  cold extrusion.
                
                M83          ; set extruder to relative mode
                echo "Start"
                G1 F150      ; Set extrusion speed to 2.5mm/sec
                G1 E60       ; Extrude 60mm.
                M400         ; Wait for motion to end.
                echo "Done"
                M82          ; set extruder to abs mode
                
                1 Reply Last reply Reply Quote 1
                • First post
                  Last post
                Unless otherwise noted, all forum content is licensed under CC-BY-SA