I use a PLC to work my turret and tool post, most of the routine is in the ladder within the PLC and I simply call the tool change by the normal T101, T202,T301 etc etc.
Both the turret and toolpost are worked via hydraulics, there is an unclamp then a rack to move the turret/post to the next position then clamp, this continues until the correct tool is reached as signalled by the combination of limit switches active.
The M6 macro has the info in it for this to happen, heres a snippet of the first part
Old_Tool=GetCurrentTool()
New_Tool=GetSelectedTool()
If GetSelectedTool<1 Then
MsgBox("Tool Number Out Of Range")
End
End If
If GetSelectedTool>10 Then
MsgBox("Tool Number Out Of Range")
End
End If
If GetSelectedTool=GetCurrentTool Then
End
End If
If getselectedtool=1 Then
Do
Call setmodoutput (9,1)
If GetInPut (0)Then Exit Do
Loop
End If
Call SetModOutput (9,0)
If getselectedtool=2 Then
Do
Call setmodoutput (9,1)
If GetInPut(1)Then Exit Do
Loop
End If
Call SetModOutput (9,0)
and so on for all ten tools.
Hood