Welcome, Guest. Please login or register.
Did you miss your activation email?
May 28, 2012, 09:13:50 AM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  General Mach Discussion
| | |-+  Tool compensation xz or zy plane (G41 G42 G18)
Pages: 1   Go Down
Print
Author Topic: Tool compensation xz or zy plane (G41 G42 G18)  (Read 243 times)
0 Members and 1 Guest are viewing this topic.
tomi
Active Member

Offline Offline

Posts: 11


View Profile
« 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
Logged
BR549
Active Member

Offline Offline

Posts: 2,557


View Profile
« 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
Logged
ger21
Global Moderator
*
Online Online

Posts: 2,619



View Profile WWW
« 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. "
Logged

tomi
Active Member

Offline Offline

Posts: 11


View Profile
« 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.
Logged
BR549
Active Member

Offline Offline

Posts: 2,557


View Profile
« Reply #4 on: November 26, 2011, 10:47:51 AM »

YOu may want to look into G43 dealing with the Z (;-).

(;-) TP
Logged
tomi
Active Member

Offline Offline

Posts: 11


View Profile
« Reply #5 on: November 30, 2011, 08:26:26 AM »

I answer my self  Wink

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:
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 

Logged
Pages: 1   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!