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

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  VB and the development of wizards
| | |-+  VB and spindle
Pages: 1   Go Down
Print
Author Topic: VB and spindle  (Read 929 times)
0 Members and 1 Guest are viewing this topic.
Bit79
Active Member

Offline Offline

Posts: 7


View Profile
« on: December 12, 2007, 07:27:06 AM »

Hi,
I'm trying to realize some macros to manage better my cnc, but I find some difficult.
In particular in a VB macro I need to detect if the spindle is on or off, and execute the macro only if the spindle in off, or ignore it if the spindle is on, but I don't know which parameter I have to test. How can I do it?

Thank you!
Logged
poppabear
S S SYSTEMS, LLC
Global Moderator
*
Offline Offline

Posts: 1,707


Briceville, TN, USA


View Profile WWW
« Reply #1 on: December 12, 2007, 04:57:21 PM »

'spindle on check macro
Sub Main()

If GetOEMLED(116) then
Message("spindle is running cannot execute macro.")
Exit Sub
Else
****Put in the code for your macro here****
End If

End Sub 
Main

'Scott
Logged

Commercial Mach3: Screens (regular and flash), Wizards, Plug-ins, Brains, PLCs, Macros, ATC's, machine build, retrofit and Prototyping
http://sites.google.com/site/volunteerfablab/
Bit79
Active Member

Offline Offline

Posts: 7


View Profile
« Reply #2 on: December 13, 2007, 04:41:30 AM »

Thank you very much.
I tried and it work good.

I also tried with:

If GetOEMLED(11) then....

and It work likewise. What's the difference between GetOEMLED(11) and GetOEMLED(116)?
Logged
Pages: 1   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!