Hello Guest it is March 28, 2024, 01:41:45 PM

Author Topic: Spindle at speed signal  (Read 9117 times)

0 Members and 1 Guest are viewing this topic.

Spindle at speed signal
« 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

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Spindle at speed signal
« Reply #1 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
Re: Spindle at speed signal
« Reply #2 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.

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Spindle at speed signal
« Reply #3 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
 
« Last Edit: October 23, 2010, 02:51:42 PM by BR549 »

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Spindle at speed signal
« Reply #4 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

Offline DaOne

*
  •  236 236
    • View Profile
Re: Spindle at speed signal
« Reply #5 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

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Spindle at speed signal
« Reply #6 on: October 23, 2010, 08:02:20 PM »
Will hook up some of the old drives and see if I can find it.
Hood

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Spindle at speed signal
« Reply #7 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 
Re: Spindle at speed signal
« Reply #8 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.

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Spindle at speed signal
« Reply #9 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