Machsupport Forum

Mach Discussion => VB and the development of wizards => Topic started by: Duc748 on April 13, 2011, 07:39:10 PM

Title: Cycle Start to check input
Post by: Duc748 on April 13, 2011, 07:39:10 PM
Hi,
I need to have the cycle start button check if spindle is activated before a program can be run.
Is this the correct code to insert into cycle button?

If IsActive(InPut10)
DoOemButton(1000)
Else
DoOemButton(1003)
MsgBox("Enable Spindle")
End


Rick
Title: Re: Cycle Start to check input
Post by: ftec on May 04, 2011, 02:16:26 AM
Just a sidenote, if you really want to be on the safe side you need to have some sort of circuitry to check that the spindle truly is running. Some versions back there was a bug in Mach preventing the spindle from starting and if I remember right the spindle led was lit. I had a couple of really serious collisions because of that. So I ended up adding an optional program stop M1 in my post processor after tool changes so that  if the spindle is not running the operator is able to abort the program before the tool penetrates into the material or manually start the spindle. A couple of crashes have been avoided even with the later Mach versions.

/Risto