Very interesting. First off, I haven’t yet looked at your code.
But looking at the screen data you posted - unless the units are all different I would have expected spindlehours to be significantly less than totalhours - the opposite of what your data shows. I have Mach4 running for hours at a time, even if I am doing sporadic cutting.
Do you have insight into the units for the stats you are showing ?
Take the actual numbers I have with a grain of salt. My machine gets used more as a test platform for goofing around with lasers, tools, and software…and sometimes I actually make something. The distances and hours on my machine got modified a lot when I was debugging the screen, so they are fairly bogus.
Also, totalhours is a funny one. Even though its written to the Machine.ini file, its master source is the **C:\Mach4Hobby\Profiles\AvidCNC\sysvars.dat file, which is binary, so the only way to reset that variable is to delete that file and let mach4 start over.
Thank you for that .set file, I was looking for the same thing to reveal the distance traveled for maintenance purposes.
Curiously I also noticed spindle hours on my machine are about 3x the total hours, which really is strange given the way we use our machine. The only thing I can really think of would be spindle warmups but that seems like a high ratio to explain by just that.
About the maint hours in your file, does that increment when Mach4 is open, when the machine is turned on, when the machine is moving, or some other combination of factors?
Maint hours is just keeping track of accumulated hours that Mach4 is running, which would typically be close to the amount of powered on time of the machine. But it doesn’t take into account any actual activity, thats what the axis distance and spindle hours are for.
I’m not sure why your spindle hours would be adding up faster than expected.