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

    G-code reverse?

    Scheduled Pinned Locked Moved
    Firmware wishlist
    4
    7
    2.0k
    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.
    • Phaedruxundefined
      Phaedrux Moderator
      last edited by Phaedrux

      Would it be possible to run the gcode file backwards?

      For example, if running a CNC tool path, could you pause execution of the g-code, and and scroll backwards through g-code commands to replay movements, only in reverse?

      As described here: https://youtu.be/rpHYBz7ToII?t=194

      Z-Bot CoreXY Build | Thingiverse Profile

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

        To find the starting coordinates of the previous move, you might have to scroll back an arbitrary number of lines of GCode in the file. That wouldn't be easy to do on Duet 2, but easier on Duet 3.

        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 1
        • garlicbreadundefined
          garlicbread
          last edited by

          I think with edm (referenced in the link) you'd only need to slow or reverse the feedrate of the current g-code line instead of jumping back to previous lines in the g-code.

          So for example there would be a g-code to move downwards as a certain speed. The edm machine provides feedback to the duet board ether in the form of i2c or an analogue voltage to say your going too fast slow down, or you need to backup a bit then start going forward again within the current line of g-code.

          I put a bit of detail here

          • https://forum.duet3d.com/topic/9561/edm-reverse-feed-rate
          1 Reply Last reply Reply Quote 0
          • dc42undefined
            dc42 administrators
            last edited by

            If it's just the current line of GCode that needs to be reversed, or perhaps the last ~10 lines, then it would be possible. The firmware could keep track of the initial position and associated file offset for each of the previous 10 moves.

            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
            • nraynaudundefined
              nraynaud
              last edited by

              I would like to know if there is a way to control the feed rate from an external signal currently? even without reversing the sign.

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

                @nraynaud said in G-code reverse?:

                I would like to know if there is a way to control the feed rate from an external signal currently? even without reversing the sign.

                You can use the M220 command to change the speed factor, however it won't take effect until all moves already in the pipeline have been completed.

                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
                • nraynaudundefined
                  nraynaud
                  last edited by

                  I would prefer a real time thing, probably something that could slow down the step clock if the filament extrusion is getting a bit behind.

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