Hello Guest it is April 19, 2024, 09:03:49 AM

Author Topic: Cycle Start to check input  (Read 2388 times)

0 Members and 1 Guest are viewing this topic.

Cycle Start to check input
« 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

Offline ftec

*
  •  88 88
    • View Profile
Re: Cycle Start to check input
« Reply #1 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
« Last Edit: May 04, 2011, 02:18:03 AM by ftec »