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

    Please let me know what's wrong with my Load filament macro

    Scheduled Pinned Locked Moved Unsolved
    Tuning and tweaking
    5
    10
    372
    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.
    • evomotorsundefined
      evomotors
      last edited by

      The issue is:
      After filament is loaded, it starts retracting whole filament back.

      M291 P"Please wait while the nozzle is being heated up" R"Loading Filament" T5 	; Display message
      G10 S235 																		; Set current tool temperature to 235C
      M116 																			; Wait for the temperatures to be reached
      
      M291 P"Feeding 10mm at 10mm/s" R"Loading filament..." T5 						; Display new message
      G1 E10 F600 																	; Feed 10mm of filament at 600mm/min
      M400 																			; Wait for moves to complete
      
      
      M291 P"Feeding 1800mm at 50mm/s" R"Loading filament..." T5 						; Display new message
      G1 E1800 F3000 																	; Feed 1800mm of filament at 3000mm/min
      M400 																			; Wait for moves to complete
      
      
      M291 P"Feeding 20mm at 5mm/s" R"Loading filament..." T5 						; Display new message
      G1 E20 F300 																	; Feed 20mm of filament at 300mm/min
      M400 																			; Wait for moves to complete
      
      
      M291 P"Retracting 1mm at 15mm/s" R"Loading filament..." T5 						; Display new message
      G4 P1000 																		; Wait one second
      G1 E-1 F900 																	; Retract 2mm of filament at 900mm/min
      M400 																			; Wait for moves to complete
      
      M292 																			; Hide the message
      G10 S0 																			; Turn off the heater
      M84 E0:1 																		; Turn off extruder drives 1 and 2
      
      1 Reply Last reply Reply Quote 0
      • jay_s_ukundefined
        jay_s_uk
        last edited by

        You've probably put it back in absolute and the G1 E-1 is unloading everything

        Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

        evomotorsundefined 1 Reply Last reply Reply Quote 0
        • evomotorsundefined
          evomotors @jay_s_uk
          last edited by

          @jay_s_uk said in Please let me know what's wrong with my Load filament macro:

          You've probably put it back in absolute and the G1 E-1 is unloading everything

          Nope, removed retraction, still doing it.
          I'm just executing load filament macro manually. No idea what's going on...

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

            Have you tried adding an M83 to start of the macro?

            Z-Bot CoreXY Build | Thingiverse Profile

            evomotorsundefined 1 Reply Last reply Reply Quote 0
            • fcwiltundefined
              fcwilt
              last edited by

              Interesting macro.

              Why are you feeding different filament amounts at different speeds?

              Thanks.

              Frederick

              Printers: a small Utilmaker style, a small CoreXY and a E3D MS/TC setup. Various hotends. Using Duet 3 hardware running 3.4.6

              evomotorsundefined 1 Reply Last reply Reply Quote 0
              • evomotorsundefined
                evomotors @Phaedrux
                last edited by

                @Phaedrux said in Please let me know what's wrong with my Load filament macro:

                Have you tried adding an M83 to start of the macro?

                I will try that

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

                  @fcwilt said in Please let me know what's wrong with my Load filament macro:

                  Interesting macro.
                  Why are you feeding different filament amounts at different speeds?

                  I guess I can simplify it a bit. But I still need 2 speeds. First fast to feed filament until i'ts reached the hotend and then slow to push old filament out of the nozzle.

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

                    @evomotors My best guess is that sometime before the macro runs, the firmware is "seeing" an M82 which tells it to expect absolute extruder moves. If so, as @Phaedrux suggested adding M83 at the start should fix it.

                    Assuming there is an M82 somewhere (most likely coming from a sliced gcode) and assuming that the extruder position has been set to zero, then G1 E0 will move the filament to 10mm from the zero position (rather than by 10mm in relative mode), then the G1 E1800 will move it to 1800 mm from the zero position (which is a relative move of 1790mm from the last move), then the next G1 E20 will move it back to 10mm from the zero position.

                    On the basis that it's always best not to assume anything, it would be best practice to have M83 at the start of the macro in any case. I would also add a "Tn" command because one day, you will run the macro with no tool selected and the G10 S235 will throw an error to that effect.

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

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

                      @deckingman said in Please let me know what's wrong with my Load filament macro:

                      @evomotors My best guess is that sometime before the macro runs, the firmware is "seeing" an M82 which tells it to expect absolute extruder moves. If so, as @Phaedrux suggested adding M83 at the start should fix it.
                      Assuming there is an M82 somewhere (most likely coming from a sliced gcode) and assuming that the extruder position has been set to zero, then G1 E0 will move the filament to 10mm from the zero position (rather than by 10mm in relative mode), then the G1 E1800 will move it to 1800 mm from the zero position (which is a relative move of 1790mm from the last move), then the next G1 E20 will move it back to 10mm from the zero position.
                      On the basis that it's always best not to assume anything, it would be best practice to have M83 at the start of the macro in any case. I would also add a "Tn" command because one day, you will run the macro with no tool selected and the G10 S235 will throw an error to that effect.

                      I'm not using it from slicer. I'm executing it manually from macros on DWC. Add Tn to what command?

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

                        @evomotors What I meant is that the firmware is getting an M82 command from somewhere. When you first apply power, the contents of config.g are read in and the the contents of config_override.g if you use it. Those values will persist until they are overridden by another command and that other command will persist until it too is overwritten or until power is cycled. Some people set there slicers to use absolute extruder values and so use M82 in their config.g. Others use relative extruder moves in the slicer and so use M83. And sometimes the slicer start gcode will add M82 or M83 values but not necessarily.

                        You are using relative moves in your macro, therefore you need to "tell" the firmware to expect relative moves by using M83 (just in case something has previously "told" the firmware to expect absolute value).

                        Add Tn to the start of the macro - but not literally. If you only have a single tool, use T0 (that's zero). If you have multiple tools with different heaters, use the tool number for which you want to load filament (and you'll need different macros for each tool).

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

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