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

    Total hours of operation/printing feature.

    Scheduled Pinned Locked Moved
    Firmware wishlist
    20
    34
    3.6k
    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.
    • A Former User?
      A Former User
      last edited by

      As I have said before

      A simple "hour" meter would be easy to install, print time is already logged which anyone using a printer for making money can log those hours into their accounting software anything else is just "fluffing"

      1 Reply Last reply Reply Quote 0
      • timcurtis67undefined
        timcurtis67
        last edited by

        I vote for a simple hour meter.

        1 Reply Last reply Reply Quote 3
        • toskiumundefined
          toskium
          last edited by toskium

          I'd like a simple "Work Hours Meter", whenever gcode is processed it should log time.

          I can see how this can be a problem for initial setup where gcode is executed, as well on boot time, but from my point of view this can be neglected. Its not like it has any serious effect when it logs 65min additional time...

          For easier implementation the "start gcode" could hold some Mxxx gcode and "end gcode" as well. I don't have any special needs for additional calculation.

          However: only counting hours is too simple. My prints often start over night, I leave them in the morning, then I go to work, etc. After the print has finished the machine is idling happily for many hours which then would be counted as "work hours".

          IMHO it would also suffice to read the currently logged hours via some gcode command, no need for DWC integration or whatsoever. I solely need this for maintenance purposes. The counter can optionally be reset using some gcode parameter or so.

          My 2ct on this topic.

          1 Reply Last reply Reply Quote 1
          • jlipavsky79undefined
            jlipavsky79
            last edited by

            Has any progress been made on this subject?
            @dc42 ?

            1 Reply Last reply Reply Quote 2
            • Topherundefined
              Topher
              last edited by

              @dc42 The ideas in this thread are really good, has there been any implementation? I really like the idea of a total filament extruded, help to nip the clogged nozzles BEFORE they clog!

              1 Reply Last reply Reply Quote 0
              • cosmowaveundefined cosmowave referenced this topic
              • cosmowaveundefined cosmowave referenced this topic
              • iff7378undefined
                iff7378
                last edited by

                I'd love to see this implemented. I have a Modix printer that uses Duet hardware and prints are regularly 24 hours or longer. Being able to set up preventive maintenance based on clocked print hours would be extremely useful. All of our other printers have this feature! (Craftbot, Flashforge, Stratasys)

                1 Reply Last reply Reply Quote 0
                • chrisqwertzundefined
                  chrisqwertz
                  last edited by chrisqwertz

                  Hi!

                  I think I have a solution to the problem:

                  create sys/runtime.g and add

                  global runtime = 0
                  

                  in sys/config.g add

                  ; init print time logging
                  if !exists(global.runtime)
                    M98 P"runtime.g"
                  

                  create sys/daemon.g if it doesn't already exist and add

                  if state.status == "processing"
                    if exists(global.runtime)
                      set global.runtime = {global.runtime + 10}
                      echo > "runtime.g" "global runtime = " ^ {global.runtime} ^ " ; AUTO GENERATED by daemon.g"
                  

                  This will increment the global variable "runtime" every time daemon.g is called by 10 and write the new value into runtime.g. This should be correct as daemon.g is called every 10 secs as of RRF 3.3

                  Let me know if it doesn't work for you.

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

                    @chrisqwertz

                    I like this solution, however its not good practice to use deamon.g in that way:

                    https://docs.duet3d.com/en/User_manual/Reference/Gcode_meta_commands#daemong

                    It is recommended to use a while loop inside the daemon.g file if you are using it to prevent the firmware having to open it every 10 seconds.

                    Better to put the loop inside daemon.g itself

                    while true
                        if state.status == "processing"
                            if exists(global.runtime)
                                set global.runtime = {global.runtime + 10}
                                echo > "runtime.g" "global runtime = " ^ {global.runtime} ^ " ; AUTO GENERATED by daemon.g"
                        G4 S10 ;wait 10 seconds.
                    

                    This will provide approximately 10 second increments to the run time log file.

                    You may be able to get a more accurate log by exploiting the object model "state.time" value.

                    www.duet3d.com

                    chrisqwertzundefined 1 Reply Last reply Reply Quote 1
                    • chrisqwertzundefined
                      chrisqwertz @T3P3Tony
                      last edited by chrisqwertz

                      @t3p3tony Ah i see, that makes sense. Thank you, your feedback is very much appreciated!

                      1 Reply Last reply Reply Quote 0
                      • RogerPodacterundefined
                        RogerPodacter
                        last edited by RogerPodacter

                        when i try to implement this function and add a daemon.g file, i get the following error. using RRF 3.4.2 and DWC 3.4.2.

                        Error: in file macro line 5 column 19: meta command: expected string expression
                        

                        My daemon file is:

                        while true
                            if state.status == "processing"
                                if exists(global.runtime)
                                    set global.runtime = {global.runtime + 10}
                                    echo > "runtime.g" "global runtime = " ^ {global.runtime} ^ " ; AUTO GENERATED by daemon.g"
                            G4 S10 ;wait 10 seconds.
                        

                        also, i dont understand why its calling it a macro.

                        RogerPodacterundefined 1 Reply Last reply Reply Quote 0
                        • RogerPodacterundefined
                          RogerPodacter @RogerPodacter
                          last edited by RogerPodacter

                          @RogerPodacter nevermind, i solved the issue by looking at the latest documentation: Gcode Meta

                          the echo command cannot have a space after the >.

                          Fixed code:

                          while true
                              if state.status == "processing"
                                  if exists(global.runtime)
                                      set global.runtime = {global.runtime + 10}
                                      echo >"runtime.g" "global runtime = " ^ {global.runtime} ^ " ; AUTO GENERATED by daemon.g"
                              G4 S10 ;wait 10 seconds.
                          
                          1 Reply Last reply Reply Quote 3
                          • justus2342undefined
                            justus2342
                            last edited by

                            I like the idea of using the daemon.g. But what about the wear of the sd card? How smart can the controller of the sd card expected to be? Is it writing the exact same blocks over and over again? How bad is it for the card?

                            Tevo Little Monster (Duet2, Smart Effector, lin Rails, Magb. Arms)
                            Anycubic Delta Linear Plus (Duet2, Smart Effector, Magb. Arms)
                            Two Trees Sapphire Pro (MKS Robin, Marlin 2.x, D. Extruder)

                            RogerPodacterundefined 1 Reply Last reply Reply Quote 0
                            • RogerPodacterundefined
                              RogerPodacter @justus2342
                              last edited by

                              @justus2342 i dont know the answer, but i am not worried about it since 8gb SD cards are so cheap and common now, even if it accelerates the shelf life, i can live with replacing the SD card once every 2 years.

                              but its a good question. @dc42 may know.

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