Machsupport Forum
Mach Discussion => VB and the development of wizards => Topic started by: coopengco on March 27, 2008, 06:22:32 PM
-
Does anyone know the location of a macro to control the emco turret simply through a relay. ie relay energised one way for set number of seconds then de-energised for set number of seconds then continue to machine.
-
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
-
Now there is a solution to this 'problem'
http://www.machsupport.com/forum/index.php?topic=970.new
Please leave your comments as how this works for you
/edit
new download is available with a complete M6Start macro
-
New file for the macro, some details added. Use link in above message....