12811
General Mach Discussion / Re: Denford starturn
« on: February 09, 2011, 03:34:57 PM »
Well I reckon similar to I use in my macro would work fine if you could get the inputs to Mach and have the relay worked via an output. Here is what the first two tools would look like according to that pdf.
If GetSelectedTool=1 Then
Do
ActivateSignal(OutPut1)
If IsActive(Input1) And IsActive(Input2) And IsActive(Input3) Then Exit Do
Loop
DeActivateSignal(OutPut1)
End If
If GetSelectedTool=2 Then
Do
ActivateSignal(OutPut1)
If IsActive(Input1) And IsActive(Input2) And Not IsActive(Input3) Then Exit Do
Loop
DeActivateSignal(OutPut1)
End If
Hood
If GetSelectedTool=1 Then
Do
ActivateSignal(OutPut1)
If IsActive(Input1) And IsActive(Input2) And IsActive(Input3) Then Exit Do
Loop
DeActivateSignal(OutPut1)
End If
If GetSelectedTool=2 Then
Do
ActivateSignal(OutPut1)
If IsActive(Input1) And IsActive(Input2) And Not IsActive(Input3) Then Exit Do
Loop
DeActivateSignal(OutPut1)
End If
Hood