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

Does RRF have maintenance counters/timers?

Scheduled Pinned Locked Moved
General Discussion
11
23
1.5k
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.
  • undefined
    zapta
    last edited by 29 Aug 2021, 15:53

    Does RRF has configurable counters/timers that provides a reminder at predefine machine or world time intervals?

    I plan to use a Neveragain filter for a Voron and it requires carbon change every 4 months. Would be nice if the machine would track the time and remind me. Same for any other periodic maintenance operation.

    undefined 1 Reply Last reply 29 Aug 2021, 16:50 Reply Quote 0
    • undefined
      jay_s_uk @zapta
      last edited by 29 Aug 2021, 16:50

      @zapta no, but you could use a global variable and increment it whenever the printer is printing. And then when you get to your predetermined value it sends a message

      Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

      undefined 1 Reply Last reply 29 Aug 2021, 17:06 Reply Quote 0
      • undefined
        pixelpieper @jay_s_uk
        last edited by 29 Aug 2021, 17:06

        @jay_s_uk global variables aren't persistent...

        Voron V2.434 / Duet 3 Mini5+, Duet 3 Expansion Mini 2+, Duet 1LC V1.1 Toolboard
        Voron V0.250 / Duet 2 Maestro

        undefined 1 Reply Last reply 29 Aug 2021, 17:38 Reply Quote 0
        • undefined
          jay_s_uk @pixelpieper
          last edited by 29 Aug 2021, 17:38

          @pixelpieper you should be able to append the. To a file on change

          Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

          1 Reply Last reply Reply Quote 0
          • undefined
            OwenD
            last edited by 29 Aug 2021, 22:13

            As jay has suggested you could use a global variable to track uptime , print time or whatever
            This is untested but something like this. You may change the places it's called depending on if you want print time or uptime

            In config.g

            global CumulativeTime = 0
            M98 P"0:/macros/myUpTime.g" ; this could be in start.g if doing print time
            if global.CumulativeTime > 40000 ; or whatever
                echo "change filter"
            

            In myUpTime.g (when created)

            set global.CumulativeTime=0
            

            In say stop.g you call a macro to update the time.

            ;updateTime.g
            M28 "0:/macros/myUpTime.g"
            set global.CumulativeTime = {global.CumulativeTime + state.UpTime}  ; or add print time 
            M29
            

            This all may need other work (what if upTime rolls over etc), but you should get the idea

            undefined 1 Reply Last reply 30 Aug 2021, 15:52 Reply Quote 2
            • undefined
              zapta @OwenD
              last edited by 30 Aug 2021, 15:52

              Thanks everybody for the suggestion. I will give it a try. A few of questions:

              1. Can the current counter value be made visible in DWC?

              2. Where the counter value is stored when the printer is off?

              3. I couldn't figure in the code examples here where the counter value is read/stored on disk. Are global variables automatically persisted by default? If so, why CommulativeTime is set to zero in config.g (each time the printer starts).

              undefined undefined 2 Replies Last reply 30 Aug 2021, 20:04 Reply Quote 0
              • undefined
                oliof @zapta
                last edited by 30 Aug 2021, 20:04

                @zapta said in Does RRF have maintenance counters/timers?:

                Thanks everybody for the suggestion. I will give it a try. A few of questions:

                1. Can the current counter value be made visible in DWC?

                Not by default, but with the btncmd plugin

                1. Where the counter value is stored when the printer is off?

                A recent change allows macros to echo into a file ... so if you're okay with the occassional glitch from an emergency shutoff, that's gonna be something you will be able to do. I don't remember if it's already in 3.4b3.

                1. I couldn't figure in the code examples here where the counter value is read/stored on disk. Are global variables automatically persisted by default? If so, why CommulativeTime is set to zero in config.g (each time the printer starts).

                No global variables aren't persisted by default. You'd need to find a way to write them to a file and read from that (see above for writing, I am not sure about reading).

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

                1 Reply Last reply Reply Quote 0
                • undefined
                  OwenD @zapta
                  last edited by 30 Aug 2021, 20:39

                  @zapta said in Does RRF have maintenance counters/timers?:

                  Thanks everybody for the suggestion. I will give it a try. A few of questions:

                  1. Can the current counter value be made visible in DWC?

                  Only in the object model viewer or BitCmd plugin

                  1. Where the counter value is stored when the printer is off?

                  The counter is stored in the macro which is over written at the end of each session.
                  By adding the session time to the previous value, you store the running total.

                  1. I couldn't figure in the code examples here where the counter value is read/stored on disk. Are global variables automatically persisted by default? If so, why CommulativeTime is set to zero in config.g (each time the printer starts).

                  You have to recreate and assign a value to the global variables each time the printer starts.
                  It's easiest to just give it a value of zero.
                  Once the global has been created, you run the macro which does nothing more than update the value of the global variables.

                  If you wanted to, you could overwrite the file in daemon.g
                  That would give you less chance of missing sessions if an estop was used etc, but it would dramatically increase disk writes which would shorten the SD card life.

                  undefined 1 Reply Last reply 1 Sept 2021, 00:03 Reply Quote 0
                  • undefined
                    zapta @OwenD
                    last edited by 1 Sept 2021, 00:03

                    Thanks @owend. I still fail to understand.

                    Let's say that some file has the value of 10 hours and I turn on the printer and prints for 2 hours, what is the sequence of events that will end up with the file having the value of 12 hours? (e.g. where the reading is done?, where the addition is done?, where the writing back is done?)

                    undefined undefined 2 Replies Last reply 1 Sept 2021, 06:08 Reply Quote 0
                    • undefined
                      o_lampe @zapta
                      last edited by o_lampe 9 Jan 2021, 06:13 1 Sept 2021, 06:08

                      @zapta said in Does RRF have maintenance counters/timers?:

                      what is the sequence of events that will end up with the file having the value of 12 hours?

                      With M28 you open the file that stores uptime, then you calculate the new cumulative uptime and close the file with M29.

                      @owend said in Does RRF have maintenance counters/timers?:

                      In say stop.g you call a macro to update the time.

                      ;updateTime.g
                      M28 "0:/macros/myUpTime.g"
                      set global.CumulativeTime = {global.CumulativeTime + state.UpTime}  ; or add print time 
                      M29
                      

                      If it's just a single event you want to track (eg. a fixed 4 month intervall), you could as well write a message in your slicers startcode. It will repeat the same text everytime a print starts:" next filter change in january 2022"

                      1 Reply Last reply Reply Quote 0
                      • undefined
                        OwenD @zapta
                        last edited by OwenD 9 Jan 2021, 06:33 1 Sept 2021, 06:31

                        @zapta
                        It's all done in the macro myUpTime.g
                        Whenever you create the new file using M28 it processes this line.

                        set global.CumulativeTime = {global.CumulativeTime + state.UpTime}

                        What would actually appear in the file would be something like
                        set global.CumulativeTime = 547436446 ; in seconds
                        Because everything in the {} would be converted to a number.

                        You're probably better off converting to hours as the number may exceed the maximum relatively quickly if left in seconds
                        So maybe
                        set global.CumulativeTime = {global.CumulativeTime + (state.UpTime/60/60)}; in hours

                        undefined NeueKlasseundefined 2 Replies Last reply 1 Sept 2021, 06:48 Reply Quote 1
                        • undefined
                          zapta @OwenD
                          last edited by zapta 9 Jan 2021, 06:52 1 Sept 2021, 06:48

                          @owend, I get it now, thanks. We don't write data but we write a script that when executed later sets the in-memory variable to the desired value.

                          That's clever.

                          Going back to my original question, the answer is yes but not very user friendly (e.g. no UI support, having to managing the counter's persistence, etc).

                          I will set one such counter up and see how it works. Another alternative is to install something like this https://www.amazon.com/AC100-250V-Electromechanical-Hour-Meter-Counter/dp/B008MM0CV0

                          deckingmanundefined 1 Reply Last reply 1 Sept 2021, 09:57 Reply Quote 0
                          • deckingmanundefined
                            deckingman @zapta
                            last edited by 1 Sept 2021, 09:57

                            @zapta Something like this might be better https://www.amazon.co.uk/Jayron-Maintenance-Accumulated-Waterproof-Generator/dp/B08H1H9S9X/ref=sr_1_3?dchild=1&keywords=5V+DC+hour+meter&qid=1630489831&sr=8-3

                            It's claimed to be suitable for 5 to 60 volts so one could connect it to a spare io pin and use M42 in one's start gcode (or elsewhere) to keep a count of print time, rather than "on time". Or one could use M571 to keep track of hours spent extruding.

                            Ian
                            https://somei3deas.wordpress.com/
                            https://www.youtube.com/@deckingman

                            undefined 1 Reply Last reply 1 Sept 2021, 16:51 Reply Quote 2
                            • undefined
                              zapta @deckingman
                              last edited by zapta 9 Jan 2021, 16:55 1 Sept 2021, 16:51

                              Thanks @deckingman, it definitely looks nicer.

                              I thought about using the heatsink fan signal ('nozzle is hot') to enable counting but will it show the count when the printer is idle?

                              Also, finding one that doesn't need a battery would be nice.

                              1 Reply Last reply Reply Quote 0
                              • NeueKlasseundefined
                                NeueKlasse @OwenD
                                last edited by 6 Sept 2021, 10:45

                                @owend i Wrote Following File:

                                Config.g

                                ; Variables
                                global ZAxisPos = 0
                                M98 P"0:/macros/VariableBuffer.g" ; Update Axis Value from Z
                                

                                that's the main macro: Possibly called every 5 Seconds from daemon.g

                                ;WritePosition.g
                                set global.ZAxisPos = {move.axes[2].userPosition}
                                
                                M28 "0:/macros/VariableBuffer.g"
                                G92 Z{global.ZAxisPos}
                                M29
                                

                                in the VariableBuffer.g it's:

                                G92 Z{global.ZAxisPos}
                                

                                You Mentioned everything in the {} will be converted into Numbers but not in my Case?
                                what have i done wrong?

                                Prusa Mini, Chiron @ BMG X2
                                Metal SLS Printer Development

                                cosmowaveundefined 1 Reply Last reply 6 Sept 2021, 11:36 Reply Quote 0
                                • cosmowaveundefined
                                  cosmowave @NeueKlasse
                                  last edited by 6 Sept 2021, 11:36

                                  @neueklasse said in Does RRF have maintenance counters/timers?:

                                  G92 Z{global.ZAxisPos}

                                  Perhaps it helps to make some math? e.g.

                                  G92 Z{global.ZAxisPos + 0}
                                  

                                  Mankati FSXT+, DeltaTowerV2, E3D MS/TC

                                  NeueKlasseundefined 1 Reply Last reply 6 Sept 2021, 15:28 Reply Quote 0
                                  • undefined
                                    Aussiephil
                                    last edited by 6 Sept 2021, 12:27

                                    I find it bizarre that in 2021 RRF still doesn't have basic statistically information available in a log file for uptime, print time, filament usage....
                                    I read that when filament types were first provided that filament usage would be logged "in the future" seems the future is still waiting.

                                    I know this sounds like a rant and you know what maybe it is..... I'd be happy with any of this to end up in a log file and i'll bet the people pleading for counters would be happy with the caveat that on a power interruption/loss that x minutes of data would not be available.

                                    Cheers
                                    Phil

                                    1 Reply Last reply Reply Quote 0
                                    • NeueKlasseundefined
                                      NeueKlasse @cosmowave
                                      last edited by NeueKlasse 9 Jul 2021, 04:27 6 Sept 2021, 15:28

                                      @cosmowave Sorry it doesn't work either... 😕
                                      M28 Writes the exact code into my VariableBuffer, but no the Value!..

                                      Prusa Mini, Chiron @ BMG X2
                                      Metal SLS Printer Development

                                      NeueKlasseundefined 1 Reply Last reply 7 Sept 2021, 18:44 Reply Quote 0
                                      • NeueKlasseundefined
                                        NeueKlasse @NeueKlasse
                                        last edited by 7 Sept 2021, 18:44

                                        @dc42 Thank you for the Post in the Thread "M28 + object models"

                                        finally i Managed it to get it working how it should.

                                        echo >"0:/macros/VariableBuffer.g" "G92 Z"^{global.ZAxisPos}^" "
                                        

                                        M28/M29 doesn't work (at least in my Case..)

                                        with the echo command i finally have a Variable buffer that's persistent!

                                        Prusa Mini, Chiron @ BMG X2
                                        Metal SLS Printer Development

                                        undefined 1 Reply Last reply 8 Oct 2021, 07:47 Reply Quote 0
                                        • CNCModellerundefined
                                          CNCModeller
                                          last edited by CNCModeller 28 Sept 2021, 15:46

                                          Hi All,
                                          Along a similar vein I'd like to track how many times the y axis stepper has rotated, as a proxy for y axis drive belt life. I think I can use this method but I don't know if there is a related variable I could interrogate.

                                          Given it's a polar machine perhaps cumulative bed rotation might do it.

                                          My printer tends to break belts, but insidiously such that the belt reinforcement breaks but the rubber holds and stretches causing print artefacts.

                                          IMG_20210928_165127.jpg

                                          I'd like to track usage to define a preventative maintenance schedule.

                                          I'm also fitting a heavier duty blet during this next round of upgrades 🙂

                                          Any constructive thoughts would be much appreciated.

                                          Cheers
                                          Barry M

                                          Polar Duet3 Mini + 1HCL
                                          https://youtube.com/playlist?list=PLWjZVEdMv1BY82izahK45qKh-hp3NFkix
                                          Wanhao D4S: Duet2
                                          https://forum.duet3d.com/post/296755
                                          K40 Laser, Duet2
                                          https://forum.duet3d.com/post/312082
                                          Wanhao D5S
                                          https://www.youtube.com/CNCModellerUK

                                          undefined 1 Reply Last reply 8 Oct 2021, 07:45 Reply Quote 0
                                          • First post
                                            Last post
                                          Unless otherwise noted, all forum content is licensed under CC-BY-SA