Machsupport Forum
Mach Discussion => General Mach Discussion => Topic started by: tomi on November 25, 2011, 04:48:25 PM
-
Hi!
Is there any method/trick to use tool radius compensation to different plane than xy?
Thanks. tomi
-
You may want to give the manual a try it covers the subject nicely.
(;-) TP
-
You may want to give the manual a try it covers the subject nicely.
(;-) TP
From the manual:
"Cutter radius compensation may be performed only if the XY-plane is active. "
-
Thank's TP your answer. I found one trick is use the axis scale if I drive symmetrical shapes. Not using G41 or G42 just putting some calculations to script.
-
YOu may want to look into G43 dealing with the Z (;-).
(;-) TP
-
I answer my self ;)
If you have machine with same parameters in Y and Z axis then you can do that.
use VB Script SwapAxis( 1,2 ) and after that swap current coordinates (Y and Z) macro 800.m1s attached.
after using remember to ResetAxisSwap() and swap coordinates back.
M218 (Macro to swap axis to simulate xz plane SwapAxis(1,2))
M800
( run your code here )
M800
M217 (Macro to reset axis to back xy plane ResetAxisSwap())
Note! Movements is made XY axis where Y is realy Z and vise versa.
DISCLAIMER: Your own risk!
M800.m1s
REM SwapAxis macro
REM Macro swaps Y and Z axis coordinates
X = GetDRO( 0 )
Y = GetDRO( 1 )
Z = GetDRO( 2 )
XMachine = GetOEMDRO( 83 )
YMachine = GetOEMDRO( 84 )
ZMachine = GetOEMDRO( 85 )
XOffset = GetDRO( 30 )
YOffset = GetDRO( 31 )
ZOffset = GetDRO( 32 )
XG92 = GetOEMDRO( 16 )
YG92 = GetOEMDRO( 17 )
ZG92 = GetOEMDRO( 18 )
XTool = GetOEMDRO( 204 )
ZTool = GetOEMDRO( 32 )
g92valueToY = ( YMachine - YOffset ) - ( ZMachine - ZOffset - ZG92 - ZTool )
g92valueToZ = ( ZMachine - ZOffset - ZTool ) - ( YMachine - YOffset - YG92 )
Code "G92 X" & X & "Y" & g92ValueToY & "Z" & g92valueToZ
REM Wait For data update
sleep(500)
REM Move current To g92
y = ( GetOEMDRO( 84 ) - GetDRO( 31 ) - GetDRO( 1 ) )
z = ( GetOEMDRO( 85 ) - GetDRO( 32 ) - GetOEMDRO( 32 ) - GetDRO( 2 ) )
Code "G92X" & x & "Y" & y & "Z" & z