821
General Mach Discussion / Re: Using The Knee For Tool Length Comp....
« on: December 17, 2009, 01:54:25 AM »
Unless I'm missing something, the following two trivial macros are all that's required to make this work - four whole lines of code. In simulation, it seems to work fine. I'll try it on the machine tomorrow AM.
''
' Bogus G43 Macro
'
' Usage:
' M143 P<OffsetNumber>
''
''========================================================================================
ToolParam_ZOffset = 2
''========================================================================================
''========================================================================================
'' Start of Macro Code
''========================================================================================
' Get the offset number to use
ToolOffsetNum = Param1()
' Lookup the offset
ToolOffset = GetToolParam(ToolOffsetNum, ToolParam_ZOffset)
' Apply it
Code "G0 A" & 0 - ToolOffset
''
' Bogus G49 Macro
'
' Usage:
' M149
''
''========================================================================================
'' Start of Macro Code
''========================================================================================
Code "G0 A0.000"
Regards,
Ray L.
''
' Bogus G43 Macro
'
' Usage:
' M143 P<OffsetNumber>
''
''========================================================================================
ToolParam_ZOffset = 2
''========================================================================================
''========================================================================================
'' Start of Macro Code
''========================================================================================
' Get the offset number to use
ToolOffsetNum = Param1()
' Lookup the offset
ToolOffset = GetToolParam(ToolOffsetNum, ToolParam_ZOffset)
' Apply it
Code "G0 A" & 0 - ToolOffset
''
' Bogus G49 Macro
'
' Usage:
' M149
''
''========================================================================================
'' Start of Macro Code
''========================================================================================
Code "G0 A0.000"
Regards,
Ray L.