Hello Guest it is August 21, 2019, 10:28:22 AM

Author Topic: Need help with collet closer macro  (Read 1920 times)

0 Members and 1 Guest are viewing this topic.

Need help with collet closer macro
« 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

Offline Hood

*
  •  25,849 25,849
  • Carnoustie, Scotland
    • View Profile
Re: Need help with collet closer macro
« Reply #1 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
Re: Need help with collet closer macro
« Reply #2 on: June 29, 2011, 02:00:46 PM »
Thanks, Hood.

Worked perfectly.

Kevin

Offline Hood

*
  •  25,849 25,849
  • Carnoustie, Scotland
    • View Profile
Re: Need help with collet closer macro
« Reply #3 on: June 29, 2011, 02:02:42 PM »
No problem :)
Hood