Machsupport Forum
Mach Discussion => VB and the development of wizards => Topic started by: Bit79 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!
-
'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
-
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)?