I did get the tool changer working on a 1984 Kitamura but only in clockwise direction. When I tried to go cw and ccw it would miss count the tool because when the motor on the changer stopped sometimes the led signal will be on and sometimes off and this would mess up the tool count.
If any one can add some code to correct the position to check if the led signal is on when it finishes the tool change rotation this would correct the cw cww problem.
'Find shortest route to next tool
ChgTool = (NewTool - SpinTool)
If ChgTool < 0 Then
ChgTool = (16 + ChgTool)
End If
If ChgTool > 0 And ChgTool <= 16 Then 'in my code here I changed the 8 to 16 so it only goes CW
Call CW(ChgTool)
Exit Sub
End If
If ChgTool > 0 And ChgTool > 8 Then
ChgTool = (-16 + ChgTool) * -1
Call CCW(ChgTool)
Exit Sub
End If