Hi all,
Over the weekend I found and installed this script to work as a semi automatic tool changer
for use with the Tormach style tools in my small mill.
I would like some help on updating this to work with the UserDRO's in the offset's page
under "tool change location".
I am not sure how to do this?
Here is the existing script that was written for Mach2:
-------------------------------------------------
The M6Start.m1s file should contain the following
SafeZ=GetSafeZ() 'Load Safe Z Value
Code"G53 G00 Z" & SafeZ 'Goto the safe Z Location
Code"M99999" 'Call Macro M99999
Then make a new file called M99999.m1s with the following:
tool=GetSelectedTool() 'Load the tool number
SetCurrentTool(tool) 'Set the tool
Code "g43 H" & tool 'Set the height
Complete=Question ("Change to tool number" & tool
---------------------------------------------------
Possible new script...
M6Start.m1s file:
x = GetUserDRO( 1200 )
y = GetUserDRO( 1201 )
z = GetUserDRO( 1202 )
Code' G53G0 Z' & Z
Code' G53G0 X' & x & 'Y' & y
Code"M99999" 'Call Macro M99999
M99999.m1s file:
tool=GetSelectedTool() 'Load the tool number
SetCurrentTool(tool) 'Set the tool
Code "g43 H" & tool 'Set the height
Complete=Question ("Change to tool number" & tool
------------------------------------------------------
I don't know what to add to rapid back to the starting location?
Totaly new to scripts so don't laugh to hard if it is way off. :idea: