I'm writing my tool changer macro and I need a little help. I need to make my tool magazine move and stop when it triggers a position switch. This is what I have so far (Note this is to make the mag go CCW):
If IsActive(OUTPUT5) = True Then
DeactivateSignal(OUTPUT5) 'Mag CW
End If
ActivateSignal(OUTPUT6) ' Mag CCW
While IsActive(OEMTRIG12) = False Then
Sleep 10
Wend
DeactivateSignal(OUTPUT6)
Note:
OUTPUT5 = Mag CW
OUTPUT6 = Mag CCW
OEMTRIG12 = Pocket position switch
When I run this the mag just keeps spinning.
Any help would be great!!
Thanks,
Aero