Hello Guest it is September 20, 2020, 08:35:05 PM

Author Topic: VB and spindle  (Read 2559 times)

0 Members and 1 Guest are viewing this topic.

VB and spindle
« on: December 12, 2007, 07:27:06 AM »
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,233 2,233
  • Briceville, TN, USA
    • View Profile
    • S S Systems, LLC
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
****Put in the code for your macro here****
End If

End Sub 

Commercial Mach3 & Mach 4, Design/Build/Retrofit CNC and Industrial machines.
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)?