I have also a request for a macro for the Emco Toolchanger.
This is what I have, 1(one) output and
1 (one) input free for this purpose (only one printerport possible in the box)
My code so far M6start.m1s
'ToolChange Macro For Emco PC Tun 50 tool changer 2008-05-19 Bengt
Sub Main()
OldTool = GetOEMDRO (1200) '
?Tool #1 as turret is always left in this position ( T0101 as a last line in any program )??tool = GetSelectedTool()
NewTool = tool
MaxToolNum = 6 'Max number off tools for the changer
If NewTool = OldTool Then
Exit Sub
End If
While NewTool > MaxToolNum
NewTool = Question ("Enter New Tool Number up to " & MaxToolNum)
Wend
Call SetUserDRO (1200,NewTool)
SetCurrentTool( NewTool )
Code "G28"
ActivateSignal(Output2) 'Turn On Turret motor
SystemWaitFor (OEMtrig7) 'Wait for signal
HOW is counting done?, I have one pulse for each tool
Call CheckTool
HOW is the new requested tool set?While IsMoving()
Wend
DeActivateSignal(Output2) 'Turn Off tool turret
While IsMoving()
Wend
End Sub
Main
Sub CheckTool
count=(NewTool)
If IsActive(OEMtrig7) Then
?>>>> Fill in the blanks
End If
End Sub