Hello Guest it is March 29, 2024, 03:46:37 AM

Author Topic: Mentor2 Spindle Drive - Using 'Speed Achieved'  (Read 6060 times)

0 Members and 1 Guest are viewing this topic.

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Mentor2 Spindle Drive - Using 'Speed Achieved'
« Reply #10 on: July 11, 2010, 05:24:42 PM »
This may help when you get to that part in your project. It is a simple routine to test conditions and either continue or stop and message user. I would test your spindle to time it from stop to full RPM to establish a wait time

Sub Main()

Line# = GetDro(16)               'GetCurrent line#
DoSpinCW()                'Start Spindle
Sleep(3000)               'Wait for spindle to spool

If GetOemDro(11) = 1 And Isactive(input2) Then  GoTo 2   'Check inputs if good then else

 Message" Spindle Failed To SPOOL UP"
 GoTo 3

2:
 Message"Spindle Good for M3 start"
   GoTo 4

 3:
 DOButton(1)               'Feedhold
 DoButton(3)               'Stop
 DoButton(2)                 'Rewind
MSGBOX ("Spindle Failed To Spool Up On Line#") &  Line#     'Message to
Goto 4                                                                                                                                                                                                                 

4:           
 End Sub
 End

Offline SimonRafferty

*
  •  46 46
  • Movie SFX Design Engineer
    • View Profile
Re: Mentor2 Spindle Drive - Using 'Speed Achieved'
« Reply #11 on: July 12, 2010, 09:01:57 AM »
Thanks - that's great.  I'll give it a go in a few days once the mill + PC is a bit more together!

Si

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Mentor2 Spindle Drive - Using 'Speed Achieved'
« Reply #12 on: July 13, 2010, 04:19:16 AM »
Not great with VB but thinking you may need a few
While IsMoving()
Wend
In there.
Hood

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Mentor2 Spindle Drive - Using 'Speed Achieved'
« Reply #13 on: July 13, 2010, 09:38:24 PM »
Sub Main()
Line# = GetDro(16)               'GetCurrent line#
DoSpinCW()                'Start Spindle
Sleep(3000)               'Wait for spindle to spool
If GetOemDro(11) = 1 And Isactive(input2) Then  GoTo 2   'Check inputs if good then else
 Message" Spindle Failed To SPOOL UP"
 GoTo 3
2:
 Message"Spindle Good for M3 start"
   GoTo 4
 3:
 DOButton(1)               'Feedhold
While Ismoving()
Sleep(1000)
Wend
 DoButton(3)               'Stop
 DoButton(2)                 'Rewind
MSGBOX ("Spindle Failed To Spool Up On Line#") &  Line#     'Message to
Goto4                                                                                                                                                                                                         
4:           
 End Sub
 End


(;-) GOOD catch Hood , yep need to WAIT until the feedhold stops motion.