Hello Guest it is October 19, 2019, 04:08:19 AM

Author Topic: Maintenance - box "Spindle On Time" is alway 0  (Read 7160 times)

0 Members and 1 Guest are viewing this topic.

Maintenance - box "Spindle On Time" is alway 0
« on: February 22, 2013, 04:15:21 PM »
Hello,

In the maintenance windows, "Spindle On Time" never show other than 0  >:(

My spindle is a simple Kress on output#1 ... if I can get this counter to work, it would by very useful to manage the brush replacement  :)

Somebody know how to activate this counter ?

Sorry for my bad English  :-[
++
David

Offline BR549

*
  •  6,902 6,902
    • View Profile
Re: Maintenance - box "Spindle On Time" is alway 0
« Reply #1 on: February 22, 2013, 04:36:04 PM »
It does not work, never has.

(;-) TP
Re: Maintenance - box "Spindle On Time" is alway 0
« Reply #2 on: February 22, 2013, 04:47:22 PM »
Hello,

Ah OK ! ...  I thought I had forgotten to check a "box" somewhere ...

I'll look if there is a way to do something with the "brain" ... that I just discover  :-[ .. like a pop up alert ...

(on the Kress my brushes are "out" every ~ 200 hr if max RPM used)

++
David
Re: Maintenance - box "Spindle On Time" is alway 0
« Reply #3 on: April 01, 2013, 04:01:04 PM »
I would LOVE to know if anyone has gotten this working, I really want to start tracking my spindle on time.  One suggestion I read was to wire up a simple clock that starts timing when M3 turns the spindle on, might be tricky since the spindle is 230v, but there's probably something out there.  Or use another output to turn on the clock along with the spindle.

Offline BR549

*
  •  6,902 6,902
    • View Profile
Re: Maintenance - box "Spindle On Time" is alway 0
« Reply #4 on: April 01, 2013, 06:20:34 PM »
IF you are running the LPT version it is possible. we use it to track torch on time .

(;-) TP
Re: Maintenance - box "Spindle On Time" is alway 0
« Reply #5 on: April 01, 2013, 10:09:53 PM »
Doesn't LPT stand for the printer port?  So I don't get it. I've got a Tormach and am using the Tormach version of Mach3, but am not afraid to mess with it if I can get this to work.  Very cool that you can track your torch time.  Or is LPT a fancy screenset?

Offline BR549

*
  •  6,902 6,902
    • View Profile
Re: Maintenance - box "Spindle On Time" is alway 0
« Reply #6 on: April 02, 2013, 09:54:56 AM »
It is the printer port version. We can access the internal timer in mach3 that runs the printer port driver and use it to track time.

You can do this several ways one version uses a dro and a button ON SCREEN. The dro to veiw the time and a button to reset.

Another version uses button scripts to show the time when requested .

Another version uses macros that you can call from the MDI so no mods to Mach3 screens are required.

Basically it works this way. In the M3 macro you put in code to start the timer.  Then in the M5 macro you put in code to check the timeer and add the time to the running total.  So now you have a spindle run timer that can tell you how long the spindle has ran in HOURS or minutes or secs(;-).

If you tell me which way you need it I can lay out the code for you.

Just a thought, (;-) TP
Re: Maintenance - box "Spindle On Time" is alway 0
« Reply #7 on: April 02, 2013, 02:38:10 PM »
Well aren't you just full of awesome today.  If it's not too much of a burden it would be very helpful if you could lay out the code.  I'm sure this could help a lot of people.  I did a bunch of googling and the only answer is basically your original one "It does not work, never has." ;-).

I think an on screen DRO/button would be slick, something small and simple enough that people can drop it anywhere using one of the mach editors.  Although I can see the appeal of an unobtrusive macro.  I want to set my e-mail calendar to notify me once a month and tell me to write down the spindle hours, so either way works for me.  

If possible set it to output "**** hours ** minutes", that should satisfy everybody.  Or just seconds and people can do their own math.  I'm easy, any help you can give would be awesome.  I've tweaked buttons and macros before but I'm not comfortable writing them from scratch yet.  

Cheers!
John

Offline BR549

*
  •  6,902 6,902
    • View Profile
Re: Maintenance - box "Spindle On Time" is alway 0
« Reply #8 on: April 02, 2013, 10:04:19 PM »
OK add this in your M3 macro

SetTimer(10)


Add this to your M5 Macro

SetUSerDro(2000, (GetUserDro(2000) + ((GetTimer(10) /60) /60)))


Place a USERDRO(2000) on your screen

Place a button on your screen next to the dro and add this to the button.

SetUserDro(2000,0) With a format of *********x.xx   


NOW as you work when the M3 is called it starts a timer, when the M5 is called it gets the time from the timer(10) and converts it to HOURS then adds it to the UserDro(2000) value.

When you need to zero the hours just press the button that reset the DRO to Zero.

That is all there is.

(;-) TP
« Last Edit: April 02, 2013, 10:06:18 PM by BR549 »
Re: Maintenance - box "Spindle On Time" is alway 0
« Reply #9 on: April 04, 2013, 12:02:50 AM »
Looks like it's working great, thank you!  Not too difficult to implement, I used Mach3Screen.exe to edit the .SET file.  Leaving the format as the default %+.4f works great and shows 4 zeros.

One slightly weird thing is that if you enter M5 multiple times it'll keep adding the timer to the DRO, whatever the time has been since you started it with M3.  I assume that "SetTimer(10)" is an arbitrary 10th timer available, is there a way to turn it off with M5?  Like a code that does the opposite of SetTime(10).  Google tells me KillTime(10) but that produces an error.  This is sort of a pointless bug because when are you going to enter M5 more than once, but it got me curious.  Also, I want to edit the reset button, escape key, and e-stop button to do the same thing that M5 does, that way the timer isn't counting for hours or days after a crash.  

Otherwise it does work fantastically well.  Humm, to make it even slicker I wonder if we can add a date field.  As in, XX hours since MM/DD/YY, hitting the reset button triggers the date field to update.

Thanks for the help, this is fun.
John