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

    Modify job.filePosition value

    Scheduled Pinned Locked Moved
    Gcode meta commands
    3
    8
    211
    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.
    • amimafeundefined
      amimafe
      last edited by amimafe

      Hi,

      Is it possible to assign a value to job.filePosition if a gcode is not running? I would like to take advantage of the value in the GcodeViewer (scrubPosition), to restart a print from that point.

      Thank you!

      chrishammundefined 1 Reply Last reply Reply Quote 0
      • chrishammundefined
        chrishamm administrators @amimafe
        last edited by

        @amimafe See M26.

        Duet software engineer

        amimafeundefined 2 Replies Last reply Reply Quote 1
        • amimafeundefined
          amimafe @chrishamm
          last edited by

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • amimafeundefined
            amimafe @chrishamm
            last edited by amimafe

            @chrishamm

            M26 works perfectly.
            What I want to achieve is that when I press a button in gcodeviewer it stores the scrubPosition value directly in a variable that I can use in M26 and I don't have to enter it manually.
            Unfortunately I have not found any variable in the source code that I can work with later in duet.
            I thought about using job.filePosition, but it does not allow me to modify its value, only to read it.

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

              @amimafe so read it using job.filePosition and set it when you need to using M26.

              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

              amimafeundefined 1 Reply Last reply Reply Quote 0
              • amimafeundefined
                amimafe @dc42
                last edited by

                @dc42

                I have been able to add a button in the Gcodeviewer Plugin and what I would like is to be able to save the value of ScrubPosition (the position of the gcode where the mouse points), in a variable that I can read in duet, when I press this button. I thought I could do it in the job.filePosition object, but I can't do it.
                I have added the following function but it doesn't work. I apologize because I don't have a lot of programming knowledge and I'm trying to learn little by little:

                e1ce9975-af94-4603-95ed-df9cb7b9a71b-image.png

                On the other hand I have a problem when resuming a printout with the command M26 S{job.filePosition}. I must enter before G92 Ennn with the corresponding extrusion value of the code line where it is going to start or it is not strictly necessary?

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

                  @amimafe regarding entering G92 Ennn, if you slice the file in relative extrusion mode (which is what we recommend) then that's not necessary.

                  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

                  amimafeundefined 1 Reply Last reply Reply Quote 0
                  • amimafeundefined
                    amimafe @dc42
                    last edited by

                    @dc42
                    Ok, thanks a lot for your help. If I get it working, I'll post it on the forum for anyone who might be interested.

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