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

    Add 'pre-retract' and 'post-retract'

    Scheduled Pinned Locked Moved Solved
    Firmware wishlist
    3
    4
    312
    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.
    • nikschaundefined
      nikscha
      last edited by nikscha

      I'm working on a new extruder setup which requires a certain action to be executed before and after a retraction. Currently I'm solving this by running a postprocessor on the gcode which inserts M98 P"/sys/pre-retract.g" before and M98 P"/sys/post-retract.g" after a G10 (firmware retraction).

      This works fine, but it might be nice to have it natively supported.
      The same could be done for a G11 in pre-unretract.g and post-unrectract.g

      Maybe also allow us to specify what happens during the actual retract in "retract.g" instead of configuring it with M207? (hmm but then the zhop and the retraction move can't be executed simultaneously...)

      Edit: It would also be very cool if firmware retracts would support "wipe while retracting" 😇

      Stay in school

      o_lampeundefined 1 Reply Last reply Reply Quote 1
      • o_lampeundefined
        o_lampe @nikscha
        last edited by

        @nikscha I like the idea. It's like the tool-change macros.
        But there is also a problem when you retract / unretract within a toolchange.
        Maybe you can solve your problem by renaming G10/G11 to G10.1 and G11.1 via postprocessing. Then you need only one macro for retraction (which also contains the real G10 move)

        nikschaundefined 1 Reply Last reply Reply Quote 2
        • nikschaundefined
          nikscha @o_lampe
          last edited by

          @o_lampe said in Add 'pre-retract' and 'post-retract':

          Maybe you can solve your problem by renaming G10/G11 to G10.1 and G11.1 via postprocessing.

          I had no idea that you could implement your own custom gcodes like that. That is a really good idea, thank you! Messing around with the PP-script was a pain in the ass...

          Stay in school

          droftartsundefined 1 Reply Last reply Reply Quote 0
          • droftartsundefined
            droftarts administrators @nikscha
            last edited by

            @nikscha See https://docs.duet3d.com/en/User_manual/Reference/Gcodes#custom-gcodes

            Ian

            Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

            1 Reply Last reply Reply Quote 1
            • droftartsundefined droftarts marked this topic as a question
            • droftartsundefined droftarts has marked this topic as solved
            • First post
              Last post
            Unless otherwise noted, all forum content is licensed under CC-BY-SA