Hello Guest it is March 28, 2024, 01:38:06 PM

Author Topic: Tool compensation xz or zy plane (G41 G42 G18)  (Read 3492 times)

0 Members and 1 Guest are viewing this topic.

Offline tomi

*
  •  11 11
    • View Profile
Tool compensation xz or zy plane (G41 G42 G18)
« 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

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Tool compensation xz or zy plane (G41 G42 G18)
« Reply #1 on: November 25, 2011, 06:20:56 PM »
You may want to give the manual a try it covers the subject nicely.

(;-) TP

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: Tool compensation xz or zy plane (G41 G42 G18)
« Reply #2 on: November 25, 2011, 08:54:00 PM »
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. "
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html

Offline tomi

*
  •  11 11
    • View Profile
Re: Tool compensation xz or zy plane (G41 G42 G18)
« Reply #3 on: November 26, 2011, 01:06:05 AM »
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.

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Tool compensation xz or zy plane (G41 G42 G18)
« Reply #4 on: November 26, 2011, 10:47:51 AM »
YOu may want to look into G43 dealing with the Z (;-).

(;-) TP

Offline tomi

*
  •  11 11
    • View Profile
Re: Tool compensation xz or zy plane (G41 G42 G18)
« Reply #5 on: November 30, 2011, 08:26:26 AM »
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
Code: [Select]
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