Welcome, Guest. Please login or register.
Did you miss your activation email?
May 27, 2012, 11:51:42 PM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  General Mach Discussion
| | |-+  Need help with collet closer macro
Pages: 1   Go Down
Print
Author Topic: Need help with collet closer macro  (Read 191 times)
0 Members and 2 Guests are viewing this topic.
GytarrMann19
Active Member

Offline Offline

Posts: 65


View Profile
« on: June 28, 2011, 02: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
Logged
Hood
Active Member

Offline Offline

Posts: 17,366


Carnoustie, Scotland


View Profile
« Reply #1 on: June 28, 2011, 03: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
Logged
GytarrMann19
Active Member

Offline Offline

Posts: 65


View Profile
« Reply #2 on: June 29, 2011, 01:00:46 PM »

Thanks, Hood.

Worked perfectly.

Kevin
Logged
Hood
Active Member

Offline Offline

Posts: 17,366


Carnoustie, Scotland


View Profile
« Reply #3 on: June 29, 2011, 01:02:42 PM »

No problem Smiley
Hood
Logged
Pages: 1   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!