Found this in search, entered 'Emco turret' there are several
on: March 04, 2008, 01:06:52 PM
Started by ToadSprockett, Message by tom_emagRelevance: 3.5%
Thanks, that works great. Now that I got that going I find that I can't seem to update the current tool number.
probably wrong format for the command.
Other then that it works fine...
This is on a little EMCO TurnPC lathe with a 6 position tool changer that returns an index and a pulse per tool with
a single drive signal that causes forward rotation and when dropped reverses rotation to index the tool.
My M6 program is:
---------------------------------------------------------------------------------------------------------------
current = GetCurrentTool()
newtool = GetSelectedTool()
If current=0 Then 'syncs tool turret
ActivateSignal(OUTPUT4) 'start turret moving
While IsActive(INPUT2)=false 'wait for tool index
Wend
DeactivateSignal(OUTPUT4) 'reverse tool turret to index
SetCurrentTool(1) '<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< is SetCurrentTool(x) the correct format?
current=1 'this initiallizes the tool changer on startup
End If
If current = newtool Then
Exit Sub
End If
If newtool>6 Or newtool<1 Then
Message("Next Tool out of range")
Code "M30"
End
End If
Code "G53 X-.1" 'position X to safe area
While IsMoving ()
Wend
'6 position turret - calc next tool count
movedist = (newtool - current) + 1
If movedist <1 Then movedist = movedist + 6
ActivateSignal(OUTPUT4) 'start turret moving
For I=1 To movedist
While IsActive(INPUT1)=false
Wend
While IsActive(INPUT1)=true
Wend
Next I
DeactivateSignal( OUTPUT4 ) 'stop and index turret
' While IsActive(INPUT1) = true
' Wend
SetCurrentTool(newtool) '<<<<<<<<<<<<<<<<< is SetCurrentTool(x) the correct format?
Mike