Hello Guest it is March 28, 2024, 05:04:18 PM

Author Topic: Spindle Index pulse and safty.  (Read 10013 times)

0 Members and 1 Guest are viewing this topic.

Spindle Index pulse and safty.
« on: May 16, 2009, 04:57:33 PM »
I have been wondering if there is a way to add an extra safety option in Mach in case the spindle does not turn on or does stop for one reason or the other using the spindle index pulse. If Mach has the spindle turned on but no index signals generated within a certain time interval an e-stop is raised stopping the system.

A "Spindle Inhibit" input signal could be beneficial as well, e.g. when using a probe one can have a 4 pin plug where 2 of the pins close the inhibit signal loop preventing the spindle to turn on and potentially damaging the probe, when plugged in.

Regards.
Erlendur.
« Last Edit: May 16, 2009, 05:12:02 PM by ellik »

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Spindle Index pulse and safty.
« Reply #1 on: May 16, 2009, 05:01:46 PM »
I had a macropump that would compare the commanded speed with the true speed and if not within 10% it would E-Stop, unfortunately it wouldnt run properly with the ModBUS I had for my PLC so I never used it. Now I dont need it anyway as I have a Servo on the spindle and if it faults then Mach faults.
Hood

Offline Vogavt

*
  •  260 260
    • View Profile
Re: Spindle Index pulse and safty.
« Reply #2 on: July 17, 2012, 09:03:35 PM »
I had a macropump that would compare the commanded speed with the true speed and if not within 10% it would E-Stop...
Hood

Now that would be a useful tidbit to have.

I don't have a ModBus so would you mind sharing it if you still have it squirreled away somewhere?

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Spindle Index pulse and safty.
« Reply #3 on: July 18, 2012, 05:20:31 PM »
Sorry just saw this, I have posted it before, will see if I can find the link, if not I am sure I still have it here somewhere.
Hood

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Spindle Index pulse and safty.
« Reply #4 on: July 18, 2012, 05:26:01 PM »
Here is the code

Sub Main()

If (GetLed(13)) Then
Call SetOemDro (1100,0)
Exit Sub
End If

CodeSpeed = GetOemDro (817)        'Requested speed
TrueSpeed = GetOemDro (39)           'Speed of Spindle
Count = GetUserDro (1100)            'Get the count

If (Count<4) Then
Call SetVar (70+Count,TrueSpeed)
  Count = Count+1
Call SetOemDro (1100,Count)

Else
Call SetOemDro(1100,0)

Avg=((GetVar(70)+GetVar(71)+GetVar(72)+GetVar(73))/4)      'Average  Speed
Low=CodeSpeed*.9                                         'Fault Speed (10% less than commanded)

Call SetOemDro(1113,Avg)
Call SetOemDro(1114,Low)

If Avg<Low Then
Call DoOemButton(1003)
MsgBox ("Spindle Fault")

End If
End If

End Sub

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Spindle Index pulse and safty.
« Reply #5 on: July 18, 2012, 06:15:19 PM »
NOW no one that I know has EVER turned on the spindle with a probe in it (;-)  That darn thing was like a weedeater on steroids AND no one wanted to go over and turn it off I had to shut off the breaker to the spindle drive (;-).

(;-) TP

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
Re: Spindle Index pulse and safty.
« Reply #6 on: October 08, 2012, 07:53:53 AM »
if there is enough interest in this, I could write a plugin that could:

1). Estop M3 if spindle index signal is not seen in some number of scans (or time frame), when a spindle run is issued.
2). Have an optional "Spindle Inhibit" input signal that if active the spindle will not run.

give me some feed back, on those who would like that.....

scott
fun times

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Spindle Index pulse and safty.
« Reply #7 on: October 08, 2012, 10:46:25 AM »
HIYA SCOTT, Would a brain not work for that ?? Not trying to knock you out of work(;-)

It has been done here if I remember correctly. SOMEWHERE in this forum I believe.

Just a thought, (;-) TP

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
Re: Spindle Index pulse and safty.
« Reply #8 on: October 08, 2012, 06:52:10 PM »
oh, ok, well no point in recreating the wheel
fun times