Instruction manual

46 HyTechWorks©2013 – V3.1
The tool setting script can further adapted to the machine. For example, if the
tool setter is fixed at a location, i.e. machine coordinate (100, 50) and new tool
length is always used after tool setting, the script can be update as the following.
Declare Sub AutoToolSetting Lib "HyCNC_4P"(ByVal ctool As Integer)
code("G53 G0 X100 Y50")
While IsMoving()
Sleep(100)
Wend
AutoToolSetting(GetOEMDRO(824))
While IsMoving()
Sleep(100)
Wend
code("G43 ")
G53 G0 X100 Y50 moves quickly to the center of the tool setter. When
movement is done, auto tool setting is executed. When setting process is finished,
G43 force the new tool length to be used.
If a manual tool change followed by auto tool setting is required from the GCode
file, save the following script to a mxxx.m1s file, i.e. m900.m1s, in
Mach3/Macros/Mach3Mill directory.
Declare Sub AutoToolSetting Lib "HyCNC_4P"(ByVal ctool As Integer)
code("G53 G0 Z200" )
While IsMoving()
Sleep(100)
Wend
DoSpinStop()
code("G53 G0 X500 Y500" )
MsgBox ("Press OK after tool change.", 0)
code("G53 G0 X100 Y50")
While IsMoving()
Sleep(100)