Welcome, Guest. Please login or register.
Did you miss your activation email?
May 26, 2012, 11:47:36 AM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  General Mach Discussion
| | |-+  Mentor2 Spindle Drive - Using 'Speed Achieved'
Pages: « 1 2   Go Down
Print
Author Topic: Mentor2 Spindle Drive - Using 'Speed Achieved'  (Read 712 times)
0 Members and 3 Guests are viewing this topic.
BR549
Active Member

Online Online

Posts: 2,553


View Profile
« Reply #10 on: July 11, 2010, 04: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
Logged
SimonRafferty
Active Member

Offline Offline

Posts: 14


View Profile WWW
« Reply #11 on: July 12, 2010, 08: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
Logged
Hood
Active Member

Offline Offline

Posts: 17,347


Carnoustie, Scotland


View Profile
« Reply #12 on: July 13, 2010, 03:19:16 AM »

Not great with VB but thinking you may need a few
While IsMoving()
Wend
In there.
Hood
Logged
BR549
Active Member

Online Online

Posts: 2,553


View Profile
« Reply #13 on: July 13, 2010, 08: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.
Logged
Pages: « 1 2   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!