Created and Maintained by the Real World Software Developers and Machinists at www.KentechInc.com ... click here to check it out !!

Wednesday, April 24, 2013

Multi-Part Machining Series - Part #1

Work Coordinate Systems

Most production shops will rarely utilize a one-vise or one-fixture setup on a VMC or HMC when running a multiple piece production run. The most efficient production will have the cutting tool performing it's function on as many parts as possible while it is in the spindle. That normally means adding as many multiple vises or fixtures as the room on the table will permit.

We will be devoting the next couple of Making Chips posts to set-up and programming tips and tricks dealing with multi-part machining.

What does that multi-part machining mean for programming? As with anything in life ... first we want to reduce the amount of work ... in this case, the amount of programming. The use of sub-programming to cut down on the amount of typing or data entry or whatever work ... is one. ( We dealt with sub programming in a previous post here : http://kipware.blogspot.com/2013/02/the-hows-and-whys-of-sub-programming.html ). The other is a little feature on most machines called WORK OFFSETS. In our post here we will be explaining the Fanuc style and codes of Work Offsets ... since about 95% of machines out there are what we refer to as "fanuc compatible." And that includes the popular Haas machines as well.

Why Work Offsets?

Let's take a simpler example of placing two vises on the VMC table ... both will hold identical pieces of stock ... and we want to machine two identical workpieces using the same identical tools.

Hole dimensions are identical for both workpieces.

We could always do something like use the top left corner on the part on the left as X0/Y0 and then add the 12.300 + 3.100 to program the two holes on the part on the right ... sure, simple in this case. But even this scenario is fraught with potential problems. 

  1. What if we "bump" the vise ... and the 12.300 is no longer the case. We now have to go back into the program and adjust the X and Y coordinates to reflect the new distance. 
  2. What if one vice is a different height / thickness than the other ... the parts Z0 is different.
  3. Next time we run the job ... we have to get the vises exactly 12.300 apart ... or alter the program again.
  4. .... it goes on and on ... none of the scenarios are nice to imagine.

This type of situation ... and this is a simple one ... begs for the use of Work Offsets.

What are Work Offsets?

The Work Offsets allow the user to designate distances from the fixed Zero Return position on the machine to a certain location on the machine through an offset table. The Work Offsets are recorded distances from a fixed position on the machine ... usually the Zero Return or Reference Return position on the machine. This position is the only position that can be repeated on the machine without fail ... because it is defined from a physical limit switch. Once the electronics on the machine are powered off ... most internally recorded positions are lost ... no power to keep the computer running, it loses it's memory. When the machine is powered back on ... we can find our Zero Return by utilizing that function on the machines panel because it searches for that physical limit switch ... it doesn't rely on any memorized position ... it is dependent on the physical limit switch. For that reason ... all Work Offset positions are recorded from that Zero Return position for all axis.

The number of Work Offsets available on a machine tool can vary ... some have as little as one or two and others have 300-500 ... on Fanuc controlled machines the standard number is six ... although options to add  more are available. They are designated by G code calls ... G54, G55, G56, G57. G58 and G59.

If you were to look in the Work Offset table ... you would see something similar to :

So the user measures the distance from the fixed Zero Return position to ... let's use our example ... to the top left corner of the left hand vice as that parts X0/Y0 location. The measured distance is then entered in the Work Offset table ... both X and Y ... under one of the Work Offset designations ... we'll use G54. The steps are repeated for the left hand vice ... and the X and Y distances are entered in the G55 offset locations.

In our example, let's imagine that the vises and the stock are the same height in the Z axis ... just for simplicity ... but the Z axis could have a value similar to X and Y if required.

How to use Work Offsets in the G Code Program?

Let's say we have the scenario below .... the machines Zero Return position is the point on the top right designated with the purple circle :

Our Work Offset Table would look like :

Now for the programming part. Whenever the G code calls out a Work Coordinate System .... G54 thru G59 ... that Work Coordinate System becomes the default and any X / Y / Z coordinates called out for in the G code will reflect the X/Y/Z coordinates from the offset table. So the programming line ...
G00 G90 G54 X0 Y0
 ... would move the tool to the top left corner of the left hand vise. If we were to then command ...
X3.100 Y-2.125
.... we would position to the top left hole of the left hand vise ... because the G54 Work Coordinate System is the default. Similarly ... the command lines :
G00 G90 G55 X0 Y0
X3.100 Y-2.125 
... would position the tool to first the top left corner of the right hand vise ... then the top left hole of the right hand vise using the G55 Work Coordinate System.

So using the Work Coordinate Offsets and Work Coordinate System calls ... it is very easy to switch between the left hand and right hand vise by simply commanding G54 or G55.

The Advantages of Work Offsets

As we outlined above ... we are asking for problems when we don't use the Work Offsets. How did we fix them?

  1. If we "bump" the vise ... only the values in the Work Offset table will change ... the G code program will not need any editing.
  2. If the vises were different heights .... we could easily use the Z value in the Offset Table to make that adjustment ... again, no program editing.
  3. Next time we run the job ... we only need to adjust the G54 and G55 Offset Table values ... no program editing is required.
  4. and on and on and on. I'm sure you will see many more advantages on the shop floor.
As we progress through our Multi-Part Machining Series over the next posts ... we'll try to highlight some of the other programming Tips and Tricks that can be employed.

Stay Tuned .... and 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, 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 !!!