Cerco aiuto per modificare la routine che segue (M6start) per il cambio utensile. Ho un pantografo stepcraft con mandrino HF500 e relativo accessorio per il cambio utensile. Questo pantografo per il cambio utensili adotta una soluzione ad incastro dei conetti porta utensili, in pratica il mandrino dovrebbe arrivare ad una certa posizione X,Y e Z a motore spento, e successivamente arretrare la Y di 25 mm in senso negativo e successivamente a conetto incastrato sganciarlo per poi agganciarne un altro sempre con lo stesso metodo di avvicinamento alla zona utensili.
Lo script che vi riporto invece funziona che deposita dall'alto il conetto ed inoltre non attiva mai la routine dell'azzeramento dell'asse Z mediante tastatore ubicato in un punto ben preciso
potete aiutarmi??
maurizio
OldTool = GetOEMDRO (1200) 'Tool In spindle DRO You must add this to your settings screen
x = GetToolChangeStart( 0 )
y = GetToolChangeStart( 1 )
z = GetToolChangeStart( 2 )
a = GetToolChangeStart( 3 )
b = GetToolChangeStart( 4 )
c = GetToolChangeStart( 5 )
tool = GetSelectedTool()
NewTool = tool
'Tool Changer Macro (Bed Type)
MaxToolNum = 5 'Max number off tools for the changer
ToolDown = -83.00 'Z Pos to Get or drop a tool
ToolUp = 0.0 'Z Hieght to Rapid from tool to tool
If NewTool = OldTool Then
Exit Sub
End If
While NewTool > MaxToolNum
NewTool = Question ("Enter New Tool Number up to " & MaxToolNum)
Wend
Code "G00 G53 Z" & ToolUp
While IsMoving()
Wend
Call MovePos(OldTool)
While IsMoving()
Wend
Code "G53 Z" & ToolDown
Code "G4 P.75"
While IsMoving()
Wend
ActivateSignal(Output2) 'Turn On Draw bar to release the tool
Code "G4 P1.0" 'Wait for the tool to release
'SystemWaitFor (7) 'Wait for the tool Release Limit switch
Code "G53 Z-2.5" & ToolUp
Call MovePos(NewTool)
While IsMoving()
Wend
Code "G53 Z" & ToolDown
Code "G4 P.75"
While IsMoving()
Wend
DeActivateSignal(Output2) 'Turn Off Draw bar to Clamp the tool
Code "G4 P1.0" 'Wait for the tool to Clamp
While IsMoving()
Wend
Code "G53 Z" & ToolUp
Call SetUserDRO (1200,NewTool)
SetCurrentTool( NewTool )
Code "G00 X" & x & " Y" & y 'Move back to where the tool change was prompted
Sub MovePos(ByVal ToolNumber As Integer)
Select Case ToolNumber
Case Is = 1
Xpos = 408.09
YPos = 575.59
Case Is = 2
Xpos = 383.09
YPos = 575.59
Case Is = 3
Xpos = 358.09
YPos = 575.59
Case Is = 4
Xpos = 333.09
YPos = 575.59
Case Is = 5
Xpos = 308.09
YPos = 575.59
End Select
Code "G53 X" & XPos & " Y" & YPos
End Sub