Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: GytarrMann19 on June 28, 2011, 03:11:33 PM

Title: Need help with collet closer macro
Post 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
Title: Re: Need help with collet closer macro
Post by: Hood on June 28, 2011, 04:16:06 PM
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
Title: Re: Need help with collet closer macro
Post by: GytarrMann19 on June 29, 2011, 02:00:46 PM
Thanks, Hood.

Worked perfectly.

Kevin
Title: Re: Need help with collet closer macro
Post by: Hood on June 29, 2011, 02:02:42 PM
No problem :)
Hood