Hello Guest it is March 28, 2024, 09:47:43 PM

Author Topic: Radius compensation within a subroutine  (Read 5454 times)

0 Members and 1 Guest are viewing this topic.

Radius compensation within a subroutine
« on: February 22, 2012, 03:15:36 PM »
I cannot make G41/42 work within a subroutine.  Is this a known problem?  Is there a fix?

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Radius compensation within a subroutine
« Reply #1 on: February 22, 2012, 04:12:10 PM »
Can you post an example program?

(;-) TP
Re: Radius compensation within a subroutine
« Reply #2 on: February 23, 2012, 05:39:07 PM »
Thank you.  After experiencing trouble, I wrote this simple program to draw two squares.  The tool path display and the machine wander all over when drawing the second square.



g92.1 g17 g20
g0 x0 y0
f10
(first square)
m98 p100
x2.000 (position of second square)
g92 x0
g0 x0 y0
m98 p100
g92 x2.0000
g0 x0
m30

o100
G00 x0 y-.3000
G41 d1 g1 x0 y0 (entry move)
(draw square)
G1 y1.0000
x1.0000
y0
x0
g40
g1 x-.3000 y0 (exit move)
g00 x0 y0
m99

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Radius compensation within a subroutine
« Reply #3 on: February 23, 2012, 07:16:12 PM »
You code seems to work here V .043.022.   BUT I have seen  it fail as you describe works fine the first loop then just wnaders around starting the second loop.

What ver are you running?

(;-) TP
Re: Radius compensation within a subroutine
« Reply #4 on: February 24, 2012, 10:30:15 AM »
The only version number I can find is R2.63.

Concerning the program above, if I remove the g41 it works fine.  Also, if I add a second subroutine identical to the first one and call the first subroutine for the first square and the second subroutine for the second square, all is fine.
Thanks for your interest.

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: Radius compensation within a subroutine
« Reply #5 on: February 24, 2012, 11:51:19 AM »
You're version of mach3 is 4-1/2 years old. There have probably been more than 1000 changes to mach3 since then. You might want to update.
Gerry

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

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

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Radius compensation within a subroutine
« Reply #6 on: February 24, 2012, 12:19:11 PM »
IF you want to see MACH3 get lost try this file. ALl goes well UNTIL mach3 has to leave the first sub and go to the second nested sub. WHICH IS the exact same program code just as a second tier nest.

g92.1 g17 g20
g0 x0 y0
f10
(first square)
m98 p100 L1
g0 x0
m30

o100
G00 x0 y-.3000
G41 d1 g1 x0 y0 (entry move)
(draw square)
G1 y1.0000
x1.0000
y0
x0
g40
g1 x-.3000 y0 (exit move)
g00 x0 y0
G91
x2.000 (position of second square)
g92 x0
G90
g0 x0 y0
M98 P200 L1
m99


o200
G00 x0 y-.3000
G41 d1 g1 x0 y0 (entry move)
(draw square)
G1 y1.0000
x1.0000
y0
x0
g40
g1 x-.3000 y0 (exit move)
g00 x0 y0
G91
x2.000 (position of second square)
g92 x0
G90
g0 x0 y0
m99


(;-) TP
« Last Edit: February 24, 2012, 12:20:52 PM by BR549 »
Re: Radius compensation within a subroutine
« Reply #7 on: February 24, 2012, 12:43:19 PM »
I just downloaded a few months ago!  I will look into the most current version.  Thanks.
Re: Radius compensation within a subroutine
« Reply #8 on: February 27, 2012, 05:46:23 PM »
I belive I downloaded 043.022 so I don't think the version is an issue.
Re: Radius compensation within a subroutine
« Reply #9 on: February 27, 2012, 06:09:33 PM »
So, is this a Mach3 issue (BR549 response seems to indicate this) and if so, how does it get attention?