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

    Get current job file offset

    Scheduled Pinned Locked Moved
    Gcode meta commands
    3
    4
    265
    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.
    • jbjhjmundefined
      jbjhjm
      last edited by jbjhjm

      After digging a bit into the resurrect files, I learned that resuming is based on number storing at which byte of file the print should continue.
      I suffered some strange mid-print errors recently so I try to be prepared and extract data required to manually continue printing.

      Object model documentation says there's job.filePosition.

      But when I run a macro containing
      echo job.filePosition

      the response is
      says unsupported type code 5.

      Could not find any info about that response.
      Possibly I have to convert the type of value to something that can be stringified?

      T3P3Tonyundefined chrishammundefined 2 Replies Last reply Reply Quote 0
      • T3P3Tonyundefined
        T3P3Tony administrators @jbjhjm
        last edited by

        @jbjhjm I see this as well in SBC mode, I assume you are running in SBC mode so will report it to @chrishamm

        www.duet3d.com

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

          @jbjhjm Thanks for the report, it's indeed a problem with type conversions in RRF.

          You can use job.filePosition in your scripts without problems but echo fails to print it unless you convert it to an int or string first. These two examples do work:

          echo 0 + job.filePosition
          M118 S{job.filePosition}
          

          Duet software engineer

          jbjhjmundefined 1 Reply Last reply Reply Quote 1
          • jbjhjmundefined
            jbjhjm @chrishamm
            last edited by

            @chrishamm works perfectly fine thank you for helping me out!

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