Machsupport Forum
Mach Discussion => General Mach Discussion => Topic started by: CharliePatten on April 04, 2010, 12:11:36 PM
-
I have a toggle clamp (manually closed and air actuated (cylinder) to open) with a prox switch on it that activates when clamp goes to open position. How do I use the input from the prox switch to prevent the program from continuing unless the clamp is open? I am using M8 with a 1 sec. delay and M9 to energize the solenoid that opens the clamp. The program (simpilfied) is something like this:
G0G90 G54 X1Y1
X1.5Y1.5F10
M8M9
X2Y2
M30
-
In your macro you can check the input with something like this
If IsActive(Input1) Then
msg("Clamped")
Else
Code "M30"
End If
Or if this is something that needs to happen all the time then you can add it to the Cycle Start button script.
If IsActive(Input1) Then DoButton (0)
Graham
-
Thanks Graham for your help. I am somewhat new at this and have no idea how to work with a macro. Can you give me some direction ?
Thanks,
Charlie