Hello Guest it is April 18, 2024, 03:47:16 AM

Author Topic: G40, G41 and G42 have no effect.  (Read 18454 times)

0 Members and 1 Guest are viewing this topic.

G40, G41 and G42 have no effect.
« on: August 05, 2011, 02:11:48 AM »
I hope someone can help. I have tried every combination of G40, G41 and G42 (the 3 G's ) and it seems that the cutter follows the outline of the gear I'm trying to cut with no tool offset.

If I make an etching of the outline of the gear, it comes out perfectly. But I need to cut out the gear.

Remember that even though many of you feel this is an old subject, there are hundreds of newbee's every month or week. We new arrivals still need help which may be old to you.

I run G40 at the end of every program to clear offsetting. Does there need to be anything other than a line number, space, and then "G40" on the line?

How early in the program can G41 or G42 be placed (obviously before any cutter moves) and does there
need to be anything else on the line besides the line #, space and "G41 or G42"?

The gear is cut clockwise, so I would want to keep the tool to the left of the workpiece (correct?)
I have tried both right and left lead in moves, no difference.
I have tried both G41 and G42 in every configuration I could think of, no difference.
I always clear the offset with G40 first when changing.
I have entered one or the other, the diameter or the radius, on the "run" page, no difference.
The tool is definitely not too large for the gear.
The gear is involute, 8 teeth, .5 in. tooth to tooth, 20 degrees pressure, all the normal stuff.
Does the tool length need an entry to make the offset work?
I use a 25.4 multiplier for x,y and z on the "run" screen since that was the only way I found that let me work in inches with the cad software I am using.

By the way, the multipiers are not saved, what a bummer.

I've tried all combinations I can think of so there has to be something I don't know about.

I have tried it with no "G"'s at all, same effect (as expected).

Using any combination of the 3G's and diameter or radius seems to make no difference at all.

Any and all help would be greatly appreciated before I pull the remaining hair out of my head,

Thanks in advance,

Jim Gray

Offline Tweakie.CNC

*
  • *
  •  9,197 9,197
  • Super Kitty
    • View Profile
Re: G40, G41 and G42 have no effect.
« Reply #1 on: August 05, 2011, 02:51:16 AM »
Hi Jim,

I can only help with one thing because I apply the offsets prior to the GCode compilation.

Quote
I run G40 at the end of every program to clear offsetting. Does there need to be anything other than a line number, space, and then "G40" on the line?

You need a CR so it is usual to add  %  as the last line of any GCode. (not much but it's a start  ;) )

Tweakie.

PEACE

Offline RICH

*
  • *
  •  7,427 7,427
    • View Profile
Re: G40, G41 and G42 have no effect.
« Reply #2 on: August 05, 2011, 06:17:22 AM »
Are you hand coding this or using software to generate the code?
If software , what is the program?
RICH
Re: G40, G41 and G42 have no effect.
« Reply #3 on: August 05, 2011, 06:43:36 AM »
What cam program do you use? It may do it automatically if you give it a tool size.

Otherwise, the following may help:

I run G40 at the end of every program to clear offsetting. Does there need to be anything other than a line number, space, and then "G40" on the line?

Technically you don't need line numbers in your code at all. A G40 all by itself is fine, with or without a line number which is always optional.

How early in the program can G41 or G42 be placed (obviously before any cutter moves) and does there
need to be anything else on the line besides the line #, space and "G41 or G42"?

Basically it's up to when you want to call a G41 or G42. Normally you would put it after any initialization lines, such as setting the units, turning on the spindle, cancelling rotations, or whatever you need to setup the system before the run. There is no hard and fast rule, that I know of.
Along with G41 or G42 you normally add a D[tool#] and if you don't specify it should (haven't tried it) use the active tool in Mach's tool table. E.g. if you called a M6 T2 then after that point Mach would use the tool size specified in slot 2 of it's tool table if you don't specify a D parameter. You can also use P parameter to over-ride mach's tooltable and specify your own tool diameter.

The gear is cut clockwise, so I would want to keep the tool to the left of the workpiece (correct?)
Correct.

The gear is cut clockwise, so I would want to keep the tool to the left of the workpiece (correct?)

Does the tool length need an entry to make the offset work?
No.

I use a 25.4 multiplier for x,y and z on the "run" screen since that was the only way I found that let me work in inches with the cad software I am using.
I wouldn't recommend using scaling on a regular basis. Your cam program can and should do it. Simple is always better, in my experience. The more features you use the higher the chance of weird things happening! On the other hand it "should" be able to handle it, but I can't say I've used scaling with tool comp.

I've tried all combinations I can think of so there has to be something I don't know about.

I have tried it with no "G"'s at all, same effect (as expected).

Using any combination of the 3G's and diameter or radius seems to make no difference at all.
Try selecting a tool table number with D parameter when using G41/42. Make sure you first put some data into the tooltable. If you change tool numbers after putting values on the main screen it may be switching you from Tool 0 to whatever you specified on the toolchange (e.g. M6 T2) which is probably blank. Also try over-riding it with a diameter specified with a P parameter.

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: G40, G41 and G42 have no effect.
« Reply #4 on: August 05, 2011, 11:10:27 AM »
What most fail to realise is that Tool Comp is not an auto process that you set once and forget. It has a specific "SET" of proceedures to make it work. AND that includes leadins and leadouts to give it ROOM to cycle in and out before the next cut move.

WHy would you need to use Scale ?? Mach3 has both  metric and inperial modes. All cams that I know can do both as well. The basic tool comp works ok in basic Gcode mode. When you get out of that basic envelope and into scaling,SUBs,Macros it is not always known how it will react untill you run into THE problem.

(;-) TP



Re: G40, G41 and G42 have no effect.
« Reply #5 on: August 05, 2011, 05:21:34 PM »
Thanks to everyone who so generously gave help on this.

I now have lots of things, thanks to you, that I can test out to try to narrow the problem
to its simplest configuration. I will be busy tonight.

I will report what I find,
Thank you again,

Jim Gray
Re: G40, G41 and G42 have no effect.
« Reply #6 on: August 05, 2011, 05:33:31 PM »
Oh! P.S.
I use GearGenerator to create the gear,( which etches out perfectly when using LazyCam and Mach3, but offsetting for cutting is my problem).

For cutting, I use  GearGenerator, LazyCam and then feed LazyCam's file to Mach3.

Gear Generator is at;
http://woodgears.ca/gear/

Thanks

Offline RICH

*
  • *
  •  7,427 7,427
    • View Profile
Re: G40, G41 and G42 have no effect.
« Reply #7 on: August 06, 2011, 07:13:37 AM »
Jim,
I don't know the quality of the dxf file as generated by Gear Generator. Once you have a dxf of the gear, you should be able to
select it's profile and create an offset provided the tool is appropriate for the shape of the profile. You can add lead-in's and lead outs in LC
if you so desire. Post the dxf file.

PS: Art created a slick gear program called Gearotic Motion.

RICH

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: G40, G41 and G42 have no effect.
« Reply #8 on: August 06, 2011, 11:26:28 AM »
I have done many gear type parts (belt drive pulleys) in LC using tool comp. IF you do it correctly it works ok. It does cycle the tool comp for every pass which is anoying but the basic process  works fine.

You do have to make sure that the tool table in mach is set correctly with a proper offset value for the application. You have to have a smaller diam tool than the smallest radius your profile requires.

When testing it was min part radius X .625 to make SURE mach would not error on a gouge situation. That may have changed in mach and you can run same min radius. Check the Mach updates list.

Hope that helps. (;-) TP
Re: G40, G41 and G42 have no effect.
« Reply #9 on: August 07, 2011, 01:45:21 PM »
Thanks for everyone's help. But now I'm running out of time. If anyone has a gcode file which I could just plug into Mach3 with no modifications, and cut an involute spur gear, I would love to try it. (might even buy it). I think once I have my first valid sample, I can do the rest myself. But the gcode file must, please, have been run before and tested.

Because my time to continue learning is running out, I am willing to pay a nominal amount for someone to create and send me a gcode file tested and ready to run by loading right into Mach3.

I need a flat spur gear with 8 teeth, 0.5 inch tooth spacing, involute (so that two of them can mesh OK), a one quarter inch hole in the middle, 20 degree contact angle, and no spokes.

This seems to work out to a gear that is just about one and a half inches outside diameter, but no exact specifications are required. The distance between shafts is not available since there will be several different gears with which to mesh. Just match two of these gears if your software requires this figure.

You can contact me faster at jgray@fred.net.

Thanks, and HELP!

Jim Gray