Hello Guest it is March 28, 2024, 06:39:35 AM

Author Topic: VB and spindle  (Read 3105 times)

0 Members and 1 Guest are viewing this topic.

VB and spindle
« 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!

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
Re: VB and spindle
« 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
fun times
Re: VB and spindle
« 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)?