Hello Guest it is March 28, 2024, 06:17:37 PM

Author Topic: G41 / G42 New guy needs some help  (Read 4260 times)

0 Members and 1 Guest are viewing this topic.

G41 / G42 New guy needs some help
« on: May 20, 2010, 02:49:25 PM »
Hiya all out there
I've been building a CNC and as i go I'm writing myself a set of subroutines to make life easier.
I've written a subroutine to cut circular pockets any size with any cutter with finishing cuts for depth and diameters.
Got it pretty much debugged now and it seems to work great until i try to incorporate G42 cutter compensation.
I believe there are problems with this, but reading the forums everyone seems to be able to work around them.
I've tried and fiddled and programmed till early in the mornings, to no avail, I'm pretty fed up now.
Any chance someone could give me a set of rules or some do's and don'ts so I can get this to work.
Or if anyone feels brave enough to have a go at adding G42's to my G-code, its quite complicated and I have a flow chart that makes understanding it a bit easier.
Cheers
John

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: G41 / G42 New guy needs some help
« Reply #1 on: May 20, 2010, 07:40:27 PM »
What I do is cut the pocket slightly smaller without G41/G42, then do a finishing pass using G41/G42.

The important thing is the lead in. Brian has a post here with comp rules that will apply in the next version of Mach3. I believe you need to apply comp during a straight move, not an arc.

I glanced at your code, and don't have the time to decipher it. :)

I use a VBA macro in AutoCAD to create my code, and this is how I do it. The example is a 1" circle centered at 0,0. I do a short move to apply the comp above the part, then ramp in along an arc that's 1.5 times the tool diameter. I ramp out along the arc, then turn off comp. This may not work if the circles too small with respect to the cutter, but it works for what I do.



G20 G40 G64 G90 G91.1
(1/4" bit)
M3
F100
G0 Z0.5
G0 X-0.25 Y-0.125 Z0.5
G42P0.125
G1 X-0.375 Y0.125 Z0.0
G2 X0.0 Y0.5 Z0.0 I0.375 J0.0
G2 X0.0 Y0.5 Z-0.1 I0.0 J-0.5
G2 X0.0 Y0.5 Z-0.1 I0.0 J-0.5
G2 X0.5 Y0.0 Z0.5 I0.0 J-0.5
G40
G1 X0.2 Y0.0 Z0.5 I0.0 J-0.5
G0 Z3
M5
M30
Gerry

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

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

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: G41 / G42 New guy needs some help
« Reply #2 on: May 20, 2010, 07:44:02 PM »
Gerry

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

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: G41 / G42 New guy needs some help
« Reply #3 on: May 23, 2010, 02:41:38 PM »
thanks a lot for that going to try following the rules
if that fails will modify to do it without comp
owe you a pint
cheers