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

    Possible bug in object model

    Scheduled Pinned Locked Moved Solved
    Gcode meta commands
    3
    5
    246
    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.
    • OwenDundefined
      OwenD
      last edited by

      While trying to do a macro to append the print time to a file, I came across an oddity.

      I wanted to check that

      • A file had been printed (job.lastFileName!=null)
      • The last file had not been cancelled (job.lastFileCancelled=false)
      • The last file had not been aborted (job.lastFileAborted=false)
      if (job.lastFileName != null) && (job.lastFileCancelled = false) && (job.lastFileAborted = false)
        echo >>{job.lastFileName} ""
        echo >>{job.lastFileName} ";Last printed:", state.time
        echo >>{job.lastFileName} ";Print time = " ^ floor({job.lastDuration}/3600) ^ "hrs " ^ floor(({job.lastDuration}-floor({job.lastDuration}/3600)*3600)/60) ^ "min " ^ mod({job.lastDuration},60) ^ "secs"
      

      However whilst the latter two values are visible in the object model I can't seem to access them.
      Screenshot 2022-06-18 at 11-07-15 3Dprinter.png

      T3P3Tonyundefined 1 Reply Last reply Reply Quote 0
      • OwenDundefined OwenD referenced this topic
      • OwenDundefined OwenD referenced this topic
      • T3P3Tonyundefined
        T3P3Tony administrators @OwenD
        last edited by

        @owend are you running in stand alone or SBC mode?
        in the OM documentation here it shows these are only available from DSF in SBC mode:
        https://github.com/Duet3D/RepRapFirmware/wiki/Object-Model-Documentation#joblastfileaborted

        www.duet3d.com

        OwenDundefined 1 Reply Last reply Reply Quote 0
        • OwenDundefined
          OwenD @T3P3Tony
          last edited by

          @t3p3tony
          Hi Tony,
          I am using stand alone mode, so that will be the reason.
          The item appears in the object model browser, but apparently isn't actually accessible.
          I'll mark as solved.

          1 Reply Last reply Reply Quote 0
          • OwenDundefined OwenD has marked this topic as solved
          • oliofundefined
            oliof
            last edited by

            I'll add a feature request to make these available in standalone mode, pretty please @T3P3Tony (-:

            <>RatRig V-Minion Fly Super5Pro RRF<> V-Core 3.1 IDEX k*****r <> RatRig V-Minion SKR 2 Marlin<>

            T3P3Tonyundefined 1 Reply Last reply Reply Quote 1
            • T3P3Tonyundefined
              T3P3Tony administrators @oliof
              last edited by

              @oliof sure feel free to rasie a feature request thread and pint to this.

              www.duet3d.com

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