3580
« on: November 14, 2012, 10:16:43 AM »
When You get a chance see IF this Button code can see the index signal . Notice that we did NOT jump out to the GCode anywhere so should be stable.
It sets the spindle speed to 20 then turns ON the spindle and watches for the index signal. IF it does not see it in about 5 secs it errors out and stops spindle with message.
If it sees it then it stops the spindle with message .
SetOemDro(817,20)
SetUserDRO(2001,0)
DoSpinCW()
Do While Not Isactive(index) And GetUserDro(2001)<6
SetUserDro(2001,(GetUSerDro(2001)+1))
Sleep(1000)
If GetUSerDro(2001) >5 Then
DoSpinStop()
Message"Spindle Detect Timeout"
End
End If
Loop
SetUserLEd(2000,1)
While Ismoving()
Wend
DoSpinStop()
Message"Ready For Tool Change"
End