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.