Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: ewlsey on October 22, 2010, 11:57:05 PM

Title: Spindle at speed signal
Post by: ewlsey on October 22, 2010, 11:57:05 PM
I am trying to find a way to have mach3 read that the spindle is at the commanded speed before making a cutting move.

Currently I am using the timed pause feature (wait 5 second so you are sure that the spindle is up to speed). What I want is for the machine to proceed with rapid moves while the spindle is accelerating, then wait for the "spindle at speed" signal from the VFD before begining any feed moves. I had this working in EMC2. The current method is very slow. I have to wait the same amount of time whether I choose 200RPM or 8000RPM.

This is a very common feature on VMCs. I have never seen a "real" control that did not have this feature.

I cannot find an example online.

-Wes
Title: Re: Spindle at speed signal
Post by: BR549 on October 23, 2010, 12:07:06 AM
Create a brain to monitor true spindle speed vs programmed speed. then trun on an led when it is within a span.Then monitor the led from a macropump.

Seems we did this a while back. HUM?????

(;-)TP
Title: Re: Spindle at speed signal
Post by: ewlsey on October 23, 2010, 12:31:59 AM
I don't really need to monitor true spindle speed. Most VFDs can output a signal when they are at the commanded speed. I want to use that signal to tell mach to proceed. I coud probably rig that up in a script some way.

The real trick would be to get mach3 to execute G0 moves while the spindle is accelerating. Then wait to do G1, G2, G3, et al. until it sees the "at speed" signal.
Title: Re: Spindle at speed signal
Post by: BR549 on October 23, 2010, 02:46:23 PM
YES we did it using a VFD speed good signal. We did it ALL in the M3 macro.JUST make sure you put in an EXSCAPE route in the event the loop gets stuck (;-)

Suedo code:

Dospin(cw)                        Start Spindle

While Inoput1 >< 1 OR  GetUserLed() = 1      Look for Input siignal ,run loop until it is seen, use the LED as the exscape route out of the loop
Loop

end                                   End macro releasing the M3

You can do it with a tach signal as well

DoSpin(cw)                                                      StartSpindle

While  (GetOemDro() / GetOemdro()) < .95  OR GetUserLed() = 1       Divide dro /dro does it equal at least the % spindle speed to start
Loop
End                                                                 End Macro Release M3

AS FAR as the G0 /G1 thing that will not be possible that I am aware of.

Hope that helps,(;-) TP
 
Title: Re: Spindle at speed signal
Post by: Hood on October 23, 2010, 02:52:45 PM
I had a macropump a while back that looked at True spindle and Requested spindle speeds over a 5 second or so period and if it was out by a certain % it would fault Mach. Problem I had was it worked fine as long as ModBUS was not enabled but just wouldnt work if it was, because I needed Modbus it was no use to me and Brian never fixed the problem as far as I know.
Not sure if I still have it but if you think it would be of use I can do some searching of the old hard drives I have here.
Hood
Title: Re: Spindle at speed signal
Post by: DaOne on October 23, 2010, 07:43:28 PM
I had a macropump a while back that looked at True spindle and Requested spindle speeds over a 5 second or so period and if it was out by a certain % it would fault Mach. Problem I had was it worked fine as long as ModBUS was not enabled but just wouldnt work if it was, because I needed Modbus it was no use to me and Brian never fixed the problem as far as I know.
Not sure if I still have it but if you think it would be of use I can do some searching of the old hard drives I have here.
Hood

Hood I would like to get that from you if you don't mind. :)  As of now i just have it wait a few seconds before driving the axises allowing time for spin up of the spindle. I would love to have mach notice true spindle speed vs the commanded speed and if its out by a set % then it will estop. I am not using ModBUS.

Thanks,

Wes
Title: Re: Spindle at speed signal
Post by: Hood on October 23, 2010, 08:02:20 PM
Will hook up some of the old drives and see if I can find it.
Hood
Title: Re: Spindle at speed signal
Post by: Hood on October 23, 2010, 08:32:08 PM
I had a macropump a while back that looked at True spindle and Requested spindle speeds over a 5 second or so period and if it was out by a certain % it would fault Mach. Problem I had was it worked fine as long as ModBUS was not enabled but just wouldnt work if it was, because I needed Modbus it was no use to me and Brian never fixed the problem as far as I know.
Not sure if I still have it but if you think it would be of use I can do some searching of the old hard drives I have here.
Hood

Hood I would like to get that from you if you don't mind. :)  As of now i just have it wait a few seconds before driving the axises allowing time for spin up of the spindle. I would love to have mach notice true spindle speed vs the commanded speed and if its out by a set % then it will estop. I am not using ModBUS.

Thanks,

Wes

Give this a go and see if it works for you

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 
Title: Re: Spindle at speed signal
Post by: ewlsey on October 23, 2010, 10:02:17 PM
AS FAR as the G0 /G1 thing that will not be possible that I am aware of.

Hope that helps,(;-) TP
 

That is dissapointing. Most CNC controls have had this ability for 25 years. Is there any hope of it being intergrated? It really would be a time saver if you had a lot of tool changes.
Title: Re: Spindle at speed signal
Post by: BR549 on October 23, 2010, 10:29:44 PM
HOOD that is a nice looking macro. Don't forget to drop a copy off in the Mach ToolBox section.

(;-) TP
Title: Re: Spindle at speed signal
Post by: Hood on October 24, 2010, 04:29:29 AM
HOOD that is a nice looking macro. Don't forget to drop a copy off in the Mach ToolBox section.

(;-) TP

Brian did most if not all of that. My first effort worked fine but Brian took a look at it and rewrote it for me and made it much nicer and tidier :)
Hood
Title: Re: Spindle at speed signal
Post by: zmajmr on June 06, 2016, 02:53:59 PM
https://www.youtube.com/watch?v=TTFXF2W0lUs

spindle at speed in Mach3 - my way
Title: Re: Spindle at speed signal
Post by: zmajmr on November 30, 2017, 01:13:28 AM
https://www.youtube.com/watch?v=_h4sASnWLOY

 spindle at speed in Mach3 universal best version
Title: Re: Spindle at speed signal
Post by: zmajmr on December 01, 2017, 02:31:15 AM
part 2

https://www.youtube.com/watch?v=l1ysKRV8gDA