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

    Macro for cleaning and purging nozzle

    Scheduled Pinned Locked Moved
    Gcode meta commands
    2
    54
    6.1k
    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.
    • fcwiltundefined
      fcwilt @Exerqtor
      last edited by

      @exerqtor

      Aren't you seeing warnings about mixed indentation (tabs and spaces)?

      I am seeing a lot of tab characters.

      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

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

        @fcwilt said in Macro for cleaning and purging nozzle:

        @exerqtor said in Macro for cleaning and purging nozzle:

        Ok so now i've messed around some more with the macro and everything should be working EXCEPT the brush "loop".

        Wanna have a look @fcwilt ?
        nozzle_scrub_v1.2.g

        Sure. Downloading it now.

        What is the problem with the "loop"?

        Well it just don't loop i guess? it just does one brush motion and stops.

        @fcwilt said in Macro for cleaning and purging nozzle:

        @exerqtor

        Aren't you seeing warnings about mixed indentation (tabs and spaces)?

        I am seeing a lot of tab characters.

        Haven't tried running it yet, but it shouldn't be many tabs? ( I forgot using spaces on those few lines i added after the last time you looked at it).
        This should be purged for any tabs (i think lol):
        nozzle_scrub_v1.3.g

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

          @exerqtor said in Macro for cleaning and purging nozzle:

          Haven't tried running it yet, but it should be many tabs? ( I forgot using spaces on those few lines i added after the last time you looked at it).
          This should be purged for any tabs (i think lol):

          I would be glad to buy you a proper editor - it would make my "proof reading" easier as I wouldn't have to try to work out what the indentation was supposed to be.

          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

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

            @fcwilt said in Macro for cleaning and purging nozzle:

            @exerqtor said in Macro for cleaning and purging nozzle:

            Haven't tried running it yet, but it should be many tabs? ( I forgot using spaces on those few lines i added after the last time you looked at it).
            This should be purged for any tabs (i think lol):

            I would be glad to buy you a proper editor - it would make my "proof reading" easier as I wouldn't have to try to work out what the indentation was supposed to be.

            Haha i THINK all the indentations should be spaces now, it was some left in the clear lines i didn't know about. Sorry for making it harder than it should😮

            fcwiltundefined 2 Replies Last reply Reply Quote 0
            • fcwiltundefined
              fcwilt @Exerqtor
              last edited by

              @exerqtor said in Macro for cleaning and purging nozzle:

              @fcwilt said in Macro for cleaning and purging nozzle:

              @exerqtor said in Macro for cleaning and purging nozzle:

              Haven't tried running it yet, but it should be many tabs? ( I forgot using spaces on those few lines i added after the last time you looked at it).
              This should be purged for any tabs (i think lol):

              I would be glad to buy you a proper editor - it would make my "proof reading" easier as I wouldn't have to try to work out what the indentation was supposed to be.

              Haha i THINK all the indentations should be spaces now, it was some left in the clear lines i didn't know about. Sorry for making it harder than it should😮

              I can buy a copy of EditPad online and license it to you. Then you can download it and start to use it today.

              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

              Exerqtorundefined 1 Reply Last reply Reply Quote 0
              • fcwiltundefined
                fcwilt @Exerqtor
                last edited by fcwilt

                @exerqtor

                I made a change to first test for non-homed axes. It eliminates that else all the way at the end of the file. It tests and if it fails it warns you and aborts.

                And I added a missing S parameter to a M118. Given the other times you used echo what was the reason for the M118?

                nozzle_scrub_v1.3_fcw.g

                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

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

                  @fcwilt said in Macro for cleaning and purging nozzle:

                  @exerqtor said in Macro for cleaning and purging nozzle:

                  @fcwilt said in Macro for cleaning and purging nozzle:

                  @exerqtor said in Macro for cleaning and purging nozzle:

                  Haven't tried running it yet, but it should be many tabs? ( I forgot using spaces on those few lines i added after the last time you looked at it).
                  This should be purged for any tabs (i think lol):

                  I would be glad to buy you a proper editor - it would make my "proof reading" easier as I wouldn't have to try to work out what the indentation was supposed to be.

                  Haha i THINK all the indentations should be spaces now, it was some left in the clear lines i didn't know about. Sorry for making it harder than it should😮

                  I can buy a copy of EditPad online and license it to you. Then you can download it and start to use it today.

                  I really appreciate the offer, but i think it's to much to ask of you to buy me a license. It's EditPad Pro you were vouching for right? I'll actually sit my ass down and take a good look at it now.

                  @fcwilt said in Macro for cleaning and purging nozzle:

                  @exerqtor

                  I made a change to first test for non-homed axes. It eliminates that else all the way at the end of the file. It tests and if it fails it warns you and aborts.

                  And I added a missing S parameter to a M118. Given the other times you used echo what was the reason for the M118?

                  nozzle_scrub_v1.3_fcw.g

                  Ah cool, much better way of doing it for sure!
                  To be honest the M118's was just some "garbage" i put in there while i started to retrofit the macro from Klipper to RRF, and since it wasn't mission critical i didn't care to do anything about it until i had other stuff fixed.

                  For reference the klipper macro i worked off is this one:
                  https://github.com/VoronDesign/VoronUsers/blob/master/abandoned_mods/printer_mods/edwardyeeks/Decontaminator_Purge_Bucket_%26_Nozzle_Scrubber/Macros/nozzle_scrub.cfg

                  I did one little itteration where i removed some of the uncommented code and fixed a bug where i had called for "var.brush_gap" instead of "var.bucket_gap" in line 151.

                  So now it works, loops and all. BUT i get Error: in file macro line 169 column 209: G1: expected ')' and i can't really understand what part of the equation it's refering to when i look at the code.
                  nozzle_scrub_v1.4.g

                  Exerqtorundefined 1 Reply Last reply Reply Quote 0
                  • Exerqtorundefined
                    Exerqtor @Exerqtor
                    last edited by

                    I figured out what was wrong with line 169 (as i'm sure you will the secound you have a look at it even though it took me like 20min lol).

                    I also streamlined the "var.brush_oh" calculation in line 153 and fixed the timeout for the message in line 137.

                    Lastly i added M400 at the end before M118 so that it would actually be finished with the moves before saying so.

                    nozzle_scrub_v1.5.g

                    fcwiltundefined 2 Replies Last reply Reply Quote 0
                    • fcwiltundefined
                      fcwilt @Exerqtor
                      last edited by

                      @exerqtor said in Macro for cleaning and purging nozzle:

                      I figured out what was wrong with line 169 (as i'm sure you will the secound you have a look at it even though it took me like 20min lol).

                      I also streamlined the "var.brush_oh" calculation in line 153 and fixed the timeout for the message in line 137.

                      Lastly i added M400 at the end before M118 so that it would actually be finished with the moves before saying so.

                      nozzle_scrub_v1.5.g

                      Glad to hear it is working for you.

                      I have to ask - what the heck is this code for? 🤔 🤔 🤔 🤔

                      G1 X{208.5 + ((23.5 - 12.5) / (2 - 1)) + (1 * 25) + (1 * ((12.5 + ((35.5 / 2) + (1 x 12.5))} ; code with overhang compensation

                      Everything there is a constant - why not just do the math and enter the result?

                      Back to perusing the file.

                      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

                      Exerqtorundefined 1 Reply Last reply Reply Quote 0
                      • fcwiltundefined
                        fcwilt @Exerqtor
                        last edited by fcwilt

                        @exerqtor

                        G4 with a S parameter is the time in seconds no need to do the math below:

                        G4 P{var.ooze_dwell * 1000}

                        As to the rest of your code - your math teachers must have loved you.

                        Clever but harder to understand than simple conditional code.

                        Do you have a video of this brushing thing?

                        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

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

                          @fcwilt

                          Hahaha it's the math for the code above, i needed to visualize what i tried to do and forgot to remove it. It's NOT meant to be in there and won't be once i get everything working 100%

                          Looks like i've got a bug or two to iron out, when the hotend is hot and it actually does a purge it purges outside the damned purge bin 🤣 But that will have to be a challenge for tomorrow.

                          @fcwilt said in Macro for cleaning and purging nozzle:

                          @exerqtor

                          G4 with a S parameter is the time in seconds no need to do the math below:

                          G4 P{var.ooze_dwell * 1000}

                          Good catch, i'll change that right away.

                          As to the rest of your code - your math teachers must have loved you.

                          Clever but harder to understand than simply conditional code.

                          I can't take the credit for the math in that code, i've done adjustments to make it suit what i want and added a variable here and there. But the bulk of it is made by a user/users from the Voron discord.

                          Tbh i think the next step here is to make the purge point selection etc. conditional so that that long ass equation can be emited.

                          Do you have a video of this brushing thing?

                          Thanks.

                          I'll take a video tomorrow and post here, want to get that damn purge position to work first😃

                          fcwiltundefined 1 Reply Last reply Reply Quote 1
                          • fcwiltundefined
                            fcwilt @Exerqtor
                            last edited by

                            @exerqtor

                            I will look at the intro more closely and see if I can fully understand what is the goal.

                            I'm retired but I was a programmer for 30+ years.

                            My gut tells me that code is more complicated than it needs to be.

                            But to be sure I have know what the intent of the processes are.

                            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

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

                              @fcwilt The over all goal with the random part is to split up what purge bucket (left/right) is used so that they don't fill up as fast.

                              And with that also make it "random" if the scrub starts right to left or left to right depending on where it did the purge.

                              I'm at work now so i can't look at the code to give an better explanation, but it's the main goal.

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

                                @exerqtor said in Macro for cleaning and purging nozzle:

                                @fcwilt The over all goal with the random part is to split up what purge bucket (left/right) is used so that they don't fill up as fast.

                                And with that also make it "random" if the scrub starts right to left or left to right depending on where it did the purge.

                                I'm at work now so i can't look at the code to give an better explenation, but it's the main goal.

                                I hope you will be able to make a quick video or some pictures. I would like to see what the brush and buckets are. I only know them from theory. Never actually seen any.

                                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

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

                                  @fcwilt I shot a short clip yesterday before i fixed the bug in line 169. But it shows what i'm trying to do, the clip was with the hotend off since i wanted to check that it didn't try to purge or flipped out while it was cold.

                                  As for the brush and bucket combo it's derived from this: https://github.com/VoronDesign/VoronUsers/tree/master/abandoned_mods/printer_mods/edwardyeeks/Decontaminator_Purge_Bucket_&_Nozzle_Scrubber

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

                                    @exerqtor said in Macro for cleaning and purging nozzle:

                                    @fcwilt I shot a short clip yesterday before i fixed the bug in line 169. But it shows what i'm trying to do, the clip was with the hotend off since i wanted to check that it didn't try to purge or flipped out while it was cold.

                                    As for the brush and bucket combo it's derived from this: https://github.com/VoronDesign/VoronUsers/tree/master/abandoned_mods/printer_mods/edwardyeeks/Decontaminator_Purge_Bucket_&_Nozzle_Scrubber

                                    Thanks.

                                    I see the brush, look like brass but I don't see any little buckets. 😉

                                    What did you use for the brush? Any concerns for damaging the nozzle?

                                    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

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

                                      Not a video, but it's at least the buckets! 🤣
                                      IMG_20220610_175124.jpg

                                      IMG_20220610_175134.jpg

                                      Not really too woried about nozzle wear to be honest, but if it turns out to be a problem other brush types is a posibility 😊

                                      fcwiltundefined 1 Reply Last reply Reply Quote 1
                                      • fcwiltundefined
                                        fcwilt @Exerqtor
                                        last edited by

                                        @exerqtor

                                        Thanks much.

                                        Now I understand the needs of the process.

                                        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

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

                                          @fcwilt
                                          Goodie!

                                          As a sidenote, i downloaded the EditPad Pro demo yesterday and it for sure has alot more to offer than what i've been using! BUT, have you made or dug up a syntax highlighting profile for RRF? 😬

                                          fcwiltundefined 2 Replies Last reply Reply Quote 0
                                          • fcwiltundefined
                                            fcwilt @Exerqtor
                                            last edited by

                                            @exerqtor said in Macro for cleaning and purging nozzle:

                                            @fcwilt
                                            Goodie!

                                            As a sidenote, i downloaded the EditPad Pro demo yesterday and it for sure has alot more to offer than what i've been using! BUT, have you made or dug up a syntax highlighting profile for RRF? 😬

                                            Yes - I have created one - it's not perfect - but anything missing is easy to fix.

                                            You ready to take me up on my offer?

                                            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

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