Machsupport Forum
Mach Discussion => General Mach Discussion => Topic started by: GytarrMann19 on June 28, 2011, 03:11:33 PM
-
Hello all,
I'm getting the air-operated collet closer working on my lathe. I have written the following macro, and it is working:
M101 (open collet) DeActivateSignal(Output5)
ActivateSignal(Output4)
M102 (close collet) DeActivateSignal(Output4)
ActivateSignal(Output5)
I would like to add something to the open macro to prevent the collet opening when M3/M4 are active. Just as a safety precaution I guess.
How do I do this?
Thanks,
Kevin
-
Something like this would maybe suit.
If GetOEMLED(11) Then
End
Else
DeActivateSignal(OutPut5)
ActivateSignal(OutPut4)
End If
That should look at the spindle LED and if its on will end the macro, if not it will do your outputs.
Hood
-
Thanks, Hood.
Worked perfectly.
Kevin
-
No problem :)
Hood