Created and Maintained by the Real World Software Developers and Machinists at www.KentechInc.com ... click here to check it out !!
Showing posts with label G41. Show all posts
Showing posts with label G41. Show all posts

Tuesday, August 12, 2014

Why Use Cutter Compensation - Follow the Crowd ??

The story has been circulating here about a support issue that was raised recently where a Kipware® conversational customer inquired about how to have KipwareT® output program coordinates using the tool center vs. using G41/G42 cutter compensation and the imaginary tool tip on the control. The conversation went something like this :

Support Staff : "Why would you want to do that? That's really not a good programming practice."

Client : "Well all our programs are written like that."

Support Staff : "OK ... but that's not a good programming practice. When we created Kipware® conversational we wanted to include best programming practice so KipwareT® outputs G41 / G42 and does all the calculations and automatically includes all start-up and cancel blocks and code ... so it creates a better program. No worries ... even if you don't know how to program it KipwareT® does it all for you."

Client : "Yes but nobody programs like that."

Really? Nobody out there programs like that? We find that hard to believe.

So ... we decided to post some of our main reasoning for considering the use of cutter compensation on the control as "Best Programming Practice". If you agree with our points ... we hope that you will consider making the change ... getting educated ... and to start creating your G code programs using G41 / G42 cutter compensation.

  1. Program Coordinates ... programming to the tool tip center means that coordinates in the program do not reflect actual part print coordinates. Coordinates are based on the tool tip center rather than on the part dimensions. You can imagine the trouble and confusion that happens when edits need to be made.
  2. Tool Interchange - Turning ... since the G code was written for a specific tool radius ... the program will only function correctly for that tool radius. Decide to use a 1/64 radius for finish when the program was written for a 1/32 radius ... re-program or re-generate the toolpath. 
  3. Tool Interchange - Milling ... I think this point probably comes into play more for milling G code than turning G code. Does your shop always have perfect .500 end mills? If so ... WHY ???? Re-grinding end mills is quite a cost saver ... but it means your end mills might be .485 or something odd. If you use G41 / G42 ... who cares? Just enter the correct offset value.
  4. Dimensional Adjustments ... Come on, this is the real world. There is no reason to keep running back and forth to the CAD/CAM guy or programming office when dimensional adjustments need to be made during production ... and they will be because cutting conditions are not theoretical, they're real !!. Cutter compensation and part / tool offsets can handle probably 99.99% of all dimensional adjustments. Use the power of the control !!
Some of the main reasons we hear for why clients don't use cutter compensation ( and none of them are valid by the way ) ...
  1. Nobody taught me. Come on ... grab a hold of your future and do some "playing" at the machine ... or read for yourself. This is a truly important programming tool ... you need to know hoe to use it if you want to go anywhere.
  2. Nobody uses it. Like our scenario above ... just keeping following the crowd ... over the cliff. If I ran that shop ... the guy that comes to me and says "I think we need to change the way we think about cutter compensation" would have more of my respect than the guy who gives me the excuse "That's the way we always did it."
"I'm not stubborn ... 
it's just that doing things your way is stupid."

After having spent more than 30+ years creating ... editing ... teaching ... G code and running shops on a day-to-day basis ... cutter compensation is one of the most mis-understood and mis-used programming feature. And also the most important tool a programmer and operator and shop foreman has at his/her disposal.

If you agree ... want to learn more ... or just want some additional reading ... below is a link to one of our previous posts that dealt with this issue also :
http://kipware.blogspot.com/2013/03/cutter-compensation-programmers-best.html

Unfortunately CAD/CAM systems have made it o easy to program with tool tip radius ... but in the real world, on the shop floor, it can be a real detriment to productivity and efficiency. We urge any CNC programmer out there who is not using cutter compensation on the control to step up and take control of your future ... get educated on cutter compensation ... and use cutter compensation in your G code. Your future will be a lot brighter ... and profitable.

Until Next Time ... Happy Chip Making ... with G41 / G42 !!

Please visit our website for the best in Real World Machine Shop Software ... 
just CLICK the pic below !!

Wednesday, April 10, 2013

Circle Milling Like a Professional


Milling a counterbore or doing other circle cutting using an end mill or similar tool can be a powerful and creative machining process. Most times replacing the need for a reamer, boring bar or other sizing tool. This type of cutting, when combined with cutter compensation gives the operator much more flexibility in adjusting the size of the finished hole.

However, the main drawback is usually created using simple programs and is usually found at the entry and exit points where a small tool mark can be created due to the tool pressure caused at the entry of the cut. With a little creative programming technique and some simple calculations, a much more efficient and "professional" program can be created.

In this post, we're going to take you step by step through a program creation to mill a circle using the "loop in - loop out" method which takes the cutter from the center into the side of the hole using an arc move - then cuts completely around the hole - then loops back to the center using another arc move. This type of cutting gives a real nice finish in the hole, helps maintain size a little better and leaves no tool mark at entry or exit points.

In our example, finish milling an inside round pocket using G02 or G03, a cutter mark will remain from tool pressure at the entrance and exit point of the arc. In order to create a smooth entrance and exit, some “tricky” machining technique must be employed because most machines do not have a “canned cycle” for the type of cutting explained here. Although this employs nothing more than simple G02 or G03 commands, the manner in which the codes are used and the type of process that results, makes efficient use of the simple codes and makes a more attractive and accurate workpiece.

The objective with the example below is to create a smooth transition into and out of the cut. In the example below, we are attempting to machine a 2 in. radius circle with a 1 in. radius cutter.

STEP #1 : We calculate the arc needed to move the cutter from the center of the pocket to the finish wall edge. In the example below, we use the following formula :

2.00 (pocket radius) - 1.00 (cutter radius) = 1.00

This is the distance needed to move from the pocket center to the wall edge, allowing for the cutter radius.

STEP #2 : Next divide the total distance in half to obtain the radius needed to swing an arc from the center to the outer edge as calculated above.

1.00 / 2 = .500


If you like this concept ...
we invite you to take a look at our
it auto-creates G code from fill-in-the-blank forms ...
NO CAD experience required !!!

Cutter  Compensation  Note : 
Some controls will allow for the activation of CUTTER COMPENSATION on the example program block #1. In that case, you can calculate the same as above but do not compensate for the cutter radius, instead call the cutter compensation G Code and compensation offset number on the program block. In our example, the program block would be :

G02 G91 G42 X2.00 Y0 R.500 D12 

In this block, we are using G42 (cutter compensation right) and storing the radius of the cutter in offset #12. Using cutter comp as above will allow for the easy adjustment of the pocket size by adjusting the value in offset #12. Don't forget to cancel the cutter comp with G40 after the tools cutting is complete.


Creating a "CYCLE" : 
Using a simple combination of sub-programming, you can take the example above a step further and create a simple Z axis step-down cycle resulting in the roughing of the above example with little effort.

In the program example below, we are taking the circle cutting routine created above and storing it in a sub program. The main program will step the Z axis down - call the sub-program to machine the hole at that depth, then return to the main program which will in turn move the Z axis to another depth and start the process again. This "cycle" repeats until the total depth is achieved.

Main Program : 
{ start and position the tool to the hole center as normal }
G01 G90 Z-.100 F15.0 ; --- move to the depth of the first cut
M98 P1111 ---------------- call Sub Program O1111 which does the cutting as above
G01 G90 Z-.200 F15.0 ; --- move to the next depth of cut
M98 P1111 ---------------- call Sub Program O1111 again at the new depth
G01 G90 Z-.300 F15.0 ; --- move to the next depth of cut
M98 P1111 ---------------- call Sub Program O1111 again
G01 G90 Z-.400 F15.0 ; --- move to the next depth of cut
.... etc. till the desired depth is realized

Sub Program : 
O1111;
G02 G91 X1.00 Y0 R.500 F10.0 ; -- circle to the hole edge
G02 I-1.00 ; --------------------- cut the complete circle
G02 X-1.00 Y0 R.500 ; ------------ circle back to the center
M99 ; ---------------------------- return to the main program

This is just one example of the combination use of the sub-programming feature and "simple" programming codes to create a user cycle. You can always use your initiative and create some other ideas. Maybe think about these  : 
How can you put the Z axis move in the sub-program as well ?
Call the sub program and repeat a set number of times ?
... any others ?

Happy Chip Making !!

Check out our Real World World machine shop software at www.KentechInc.com
Conversational CAD/CAM
Quoting & Estimating
G Code Conversion
CNC Training
.... and MORE !!!




Wednesday, March 13, 2013

Cutter Compensation - A Programmers Best Friend


In this Making Chips post ... we would like to touch on some of the points regarding cutter compensation ... when turning ... angles and radii ... on Fanuc based CNC controls.

Many programmers shy away from cutter compensation ... primarily because they have never taken the time to fully understand both it's power nor how to use it properly. But the reality is that cutter comp is one of a programmers best friends. The most common reason goes something like this "It's just as easy to have the CAD/CAM system compensate for the TNR ( tool nose radius ) and out put the hard numbers." That is true ... but life on the shop floor makes this a bad practice. A couple of reasons why :

  1. The "numbers" in the G code don't match the "numbers" on the part ... because they are taking into account the TNR. If manual edits need to be made ... even simple edits ... this makes it much harder because the part dimensions don't match the G code numbers.
  2. Say after cutting ... the conditions warrant either a bigger or smaller TNR for better cutting conditions. If cutter comp is used ... it's a simple offset change. If not ... it's a trudge back to the CAD/CAM guy or system to re-post and make a new G code program for the revised tool and it's TNR.
  3. In milling ... let's say I broke my last perfect .250R end mill ... but I have a re-ground one that is .245R.. Again, if cutter comp is used ... it's a simple offset change. If not ... it's another trudge back to the CAD/CAM guy or system to re-post and make a new G code program for the revised tool radius.

But here we are going to stick with turning here ... and here are a couple of simple rules for when to use and when not to use cutter compensation.

  • Whenever angles or radii are involved ... you must use TNR compensation or the angles and radii will be off. Because the programmed point of the cutting tool, an imaginary sharp point, does not coincide with the actual point of the cutting tool which always has some corner radius. For this reason, when machining close tolerance angle or radius cuts, inaccurate workpieces will be produced. The amount of error is proportional to the amount of the tool nose radius.
  • Only worry about using it for finishing ... It's really not worth the effort to use it roughing ... the amount you leave for finish allowance will probably "hide" the mismatch due to the TNR.
  • You must start cutter comp with a "start up block". This block is usually the move as you approach the part ... the move distance must be greater than the radius in the TNR offset. So if your tool has a radius of .032 ... make a move at least .035 ... preferably more. 
  • Make sure that your TNR is less than any radius on the part ... don't try to jam an .032 tool into a .020 radius ... alarms will greet you somewhere along the way.
  • We'll cover some additional thoughts at the end of the post.


The Details :
The CNC control has the capability to automatically compensate for the tool nose radius thru the CUTTER COMPENSATION codes of G41 and G42. G41 is called cutter compensation left. The left side is explained as the side of the workpiece the cutting tool is on when viewed in the direction of cutter movement or the cutter is moving on the left side of the programmed path. Once commanded, G41 or G42 are modal commands and remain active until the G40 or cancel condition is obtained.

In Fanuc controls, in addition to commanding G41 or G42 direction, the programmer must also tell the control two other aspects of the cutting tool which are : (a) the amount of the tool nose radius and (b) the imaginary tool tip location. Both these values are entered in the tools geometry or wear offset table. In the offset table, the R value is the amount of the tools nose radius. If the program called T0101 in the tool command, in offset table #1, under the R column, the nose radius of the tool would be entered. The T column in the offset tables holds the imaginary tool tip location.



Cutter compensation must be programmed using what is commonly referred to as a start up block. This block, which must be a G01 type block, is used to activate the cutter compensation before the cutting tool actual contacts the workpiece. The movement amount in the start up block must always be greater than the nose radius of the tool stored in the R column of the offset table. Circular commands using G02 or G03 are not allowed on start up blocks.

G40 is used to cancel the automatic compensation of the tool nose radius. G40 should always be commanded on a G00 block as the tool moves away from the workpiece with the tool in a clearance position.

More Rules and Thoughts :
Many rules apply in the use of cutter compensation as the control is always checking the tool position so it can calculate for the tool nose radius. Three rules of thumb apply and should keep you free of the controls cutter compensation alarms :

(1) Always command a start up block before contacting the workpiece and move in the
G01 mode with a move greater than the nose radius of the tool.

(2) Use cutter compensation primarily in the finishing cut and try to eliminate it in the roughing
passes. The more moves made with G41 or G42 modal, the more likely for a
problem. To finish the part, use the start up block, finish cut the part and
command G40 when done. If additional cuts are required, use another start
up block and cancel the cutter comp each time as soon as the profile cut is
finished.

(3) Always cancel G41 or G42 using the G40 command. The best place to command G40 is
on a G00 block, at a clearance point or moving to a clearance point.

Because cutter compensation causes the control to perform some powerful calculations and is a complex command, you should also consult your controls instruction manual for further info on G41 or G42.

Happy Chip Making !!

Check out our Real World World machine shop software at www.KentechInc.com
Conversational CAD/CAM
Quoting & Estimating
G Code Conversion
CNC Training
.... and MORE !!!