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 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 : ). 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

Conversational CAD/CAM
Quoting & Estimating
G Code Conversion
CNC Training
…. and MORE !!!

CNC Machine Maintenance – For The Not So Ordinary

cnc machine maintenance

Personnel who perform routine maintenance on their CNC equipment usually perform the same common checks and perform the same common tasks … those that I refer to as the “no-brainers”. Filling the way lube tank … greasing the hydraulic chuck … checking the spindle oil level … the common checks and tasks. Unfortunately they are usually the ones where the machine will generate an alarm to remind you … like when the way lube tank runs out.

In this post we wanted to spend a post and remind you of the not-so-common checks and tasks that also need to be performed … “stuff” you might either not be aware of or “stuff” you never really even think about. So we encourage all to jot these down on your CNC maintenance TO-DO LIST. What !!! What do you mean you don’t have a TO-DO LIST !!

One really good thing to do in regards to CNC maintenance and insuring your CNC machine is accurate and running at it’s top condition is to at least post a note on the machine that lists checks and tasks to be performed and at what interval they should be performed. Every day … once a week … once a month … etc, etc. The best method is to supply a log book at the machine that makes your personnel responsible for these tasks by requiring them to sign-in and confirm which tasks were completed and when. This will insure that the tasks are completed … handing responsibility off to either the operator or the programmer.


Here is our list of the not-so-common tasks and checks that should also be included in your routine maintenance :

  • Check the hydraulic pressure to make sure it is at the manufacturers recommended setting.
  • Check the hydraulic oil to make sure it is filled to the manufacturers recommended level.
  • If your spindle to machine tool has a cooling system … check the cooling oil to make sure it is filled to the manufacturers recommended level.
  • Clean the chips out of the chip pan on a daily basis … not just when it’s overfilled. Oftentimes an overflowing chip bin will push the chips into areas such as the ball screw cavity and cause those chips to be forced into the ball screw covers. So while you think there is still room left in the chip bin … actually the chips are being forced into areas you do not want them to go.
  • If your machine has a chip conveyor … grease the chain at least once a month.
  • Clean the glass on the window of the door and the light inside the machine every morning. Waiting till you can’t see only makes the job that much tougher … and causes excessive downtime because the job takes twice as long.
  • Wipe down the stainless steel way covers at the end of the shift … and lubricate them with hydraulic oil. In the long run … this is a huge maintenance cost avoided.
  • Check the electrical cabinet fans and filters … these should be cleaned at least once a month.

These are a few of the checks and tasks that should be performed frequently. They’re not always the “glory” items but are essential none the less.

 Check out our Real World World machine shop software at

Conversational CAD/CAM
Quoting & Estimating
G Code Conversion
CNC Training
…. and MORE !!!

Way Lube System – Friend or Foe?

Your CNC machine is equipped with an automatic oiler system. Great ! You won’t have to think about oiling the machine and an alarm will tell you when the tank is dry. What a great device ? Right ?

Well, that is the design. Unfortunately, along with the “automatic” description of the system comes the “out of sight, out of mind” aspect of the system. Because many people know it is an automatic system, many people put it out of their minds and simply wait for the alarm to come up showing that the tank is empty and needs to be filled. But what if that alarm never comes on because the tank isn’t empty ? Why wouldn’t the tank be empty ?

As your machine gets older, the way lube system will require service just like any other mechanism. The main problem, which often gets overlooked, is that the “tank empty” alarm never comes on because the tank never drains and nobody ever notices it. Now your machine runs for months on end with no lubrication on the ways and when you finally notice a problem, it’s too late. Here is the “Rest of the Story …”

PROBLEM :  The machine’s ways are not receiving any way lube oil.


  • Positioning / Repeatability Problems
  • Axis makes noise when moving
  • Axis Drive motor overload alarm coming when the axis is moving


  • Way Lube Pump burned out.
  • Way Lube Pump distribution flow set too low.
  • Way Lube Pump filter CLOGGED
  • Way Lube line BROKEN
  • Metering Units are CLOGGED


(1) Way Lube Pump Burned Out : If the way lube pump is burned out, obviously there will not be any lube getting into the system. These pumps are usually set using a timer system. There is basically two types of timer systems used :

  • The pump is on a cam and the way it works is that the pump is always running. One gear turns another which acts like a step-down system and the second gear raises a “primer” lever. When the lever reaches the top of the stroke, the “primer” lever is released and the oil is pushed into the lines. This whole cycle can take 5-20 minutes meaning that even though the pump is always running, the lines get lube only every 5-20 minutes.
  • How to Check It : Take a flashlight and look in the tank or remove the oil tank. Once looking inside, you can see the main gear that should be constantly moving. It may be at a very slow pace, but you will see it moving.
  • The pump is set to an electrical timer set in the controls PC (programmable controller) or an actual physical electrical timer in the cabinet. This type of timer only supplies power to start the pump for every cycle.
  • How to Check It : On some pumps there is no primer lever but a light comes on on the tank when the pump is activated. Make sure this light comes on every 5-20 minutes or some other sign comes on to show the pump is activated every 5-20 minutes.

(2) Way Lube Pump distribution flow set too low : As stated above, the way lube pump usually is set using a timer system. The flow amount that gets distributed into the lines during every cycle is usually set and adjusted at the pump with a manual setting mechanism. This type of adjusting mechanism is usually a knob that can be turned higher or lower to set more or less flow. Also, just look at the primer lever. During the mentioned 5-20 minute cycle, you should see the primer lever raise slowly and then start to drop after reaching the top of the cycle. Check the stroke of the lever – short stroke, less flow.

  • How to Check It : The normal pump usage is in an 8 hour shift, you should fill the tank every 2-3 days. Also, you should see way lube flowing onto the ways. Always remember, the more flow the better. Yes, it may contaminate the coolant but that is better than ruining the ways and thus the machine just to save a couple of bucks.

 The photo above shows a way lube pump unit which includes a manual flow control device. Adjusting the white knob adjusts the amount of lube being distributed per one cycle of the lube pump. When this type of pump is working correctly, you can see the white knob rising slowly then retracting, pushing the lube into the lines. The amount of rise and fall, and therefore the amount of lube distributed, is determined by the flow adjustment.

(3) Way Lube Pump filter CLOGGED : The way lube tank usually has a filter between the tank itself and the oil line that starts the distribution. This filter is usually in the tank itself at the bottom of the primer lever or in-line right after the main distribution line leaves the tank. It will get clogged over time, especially if there is no filter at the oil fill hole or if someone takes off the filter when filling the tank.

  • How to Check It : Disconnect the main lube line where it exits the tank to feed the system or after the in-line filter if so equipped. When the cycle reaches the pump stage as outlined above, oil should flow through this connection. The flow should be strong at this point. If not, remove the oil tank and search out the filter or remove the in-line filter. They can often be cleaned with a cleaner but the best remedy is to replace it.

(4) Way Lube line BROKEN : Oftentimes a lube line in the system gets crimped or broken during machining or during service. These way lube systems are usually “pressurized” so to speak and if the pressure is released at one point, say at the broken line, the oil will flow all to that point, depriving all the other lines of fluid.

  • How to Check It : When the pump is in the pumping stage, the primer lever should fall slowly. This is due to the fact that it is pushing the oil into the system. If a line is broken, the primer lever will fall quickly as all oil is funneled to the broken line area only. On systems without a primer lever, the pump may have a pressure gauge on the pump. During the pumping cycle, the pressure should register for a couple of seconds as the oil is pumped into the lines. If the pressure is low or does not come up at all during the pumping cycle, a line in the system may be broken.

(5) Metering Units are CLOGGED : In order to create the “pressure” of the system needed for even distribution, each oil line leads to a “metering unit” where the flow is lowered and the oil is discharged. When the pump forces oil into the lines, they all fill and flow to the metering units where the flow is stopped. Each metering unit is set to discharge the desired amount or “drops” of oil and perform their individual duties. Since some areas require more lube, the metering units can be different for each line or area. Since these metering units have actual valve type components in their very small bodies, over time these units can be become clogged or the inner workings can become stuck.

  • How to Check It : This is a much harder area to check. The best remedy and prevention is to change these units every year as part of a yearly maintenance program. Because these units allow only drops to flow through, they are harder to see when troubleshooting. These metering units are usually located in “clumps” around the machine. Several lines lead to these central areas and lube lines are branched out from here to the various areas of the machine. Replacement metering valves should be obtained from the machine tool builder or dealer to insure that you are getting the correct replacement part. When changing these units, pay close attention to the flow arrow that is commonly marked on the units themselves. This arrow shows the direction of installation and flow. Check the original unit before removal and replace accordingly.

 The photo above shows an example of some metering units. These individual fittings are usually located in one or two main terminal blocks that feed certain areas of the machine such as the axis and ball screws. As the system fills with pressure and lube, these fittings discharge the lube at their pre-set flow rate into their lube lines. Over time, like cholesterol in the arteries, these units become clogged and no longer allow lube to exit and thus deny vital areas of the machine the way lube they require. As part of a yearly maintenance program, metering units in the machine should be replaced as a precautionary measure.

Due diligence and a little tracking will insure your Happy ( and ACCURATE ) Chip Making for years to come !!


 Check out our Real World World machine shop software at

Conversational CAD/CAM
Quoting & Estimating
G Code Conversion
CNC Training
…. and MORE !!!

CNC Machine Warm-Up — How? Why? When?

As former field service engineers … one of the items we always stressed to our CNC customers was the importance of performing a machine warm-up routine. Below are answers to some of their most frequently asked questions … which pretty much tell the whole tale about this activity.


A machine warm-up routine benefits both the machine and the machining in a number of areas :

  • Running the spindle and moving the axis give the oils in the machine … spindle oil and way lube … an opportunity to distribute and do their jobs. Especially in a colder environment … start of the day when perhaps the heat in the shop was reduced for the night … running the spindle and moving the axis gives the oils a chance to warm up to their appropriate temperature and “work” the way they were intended. The end result is improved machine life, operation and reduced down time due to break downs.
  • It stands to reason also that when the oils are working as they were intended … the accuracy of the machine can more easily be maintained. It is an unreal expectation to assume that you can walk in in the morning and start the machining and hold a tolerance of .0005″ … perhaps when the machine is brand new … but not in the “real world”. Starting your day like this will most likely result in offset adjustments being made due to the machine’s “cold” condition … and will begin the process of “chasing” size for quite a while. I heard countless times from customers how they spend 1-2 hours in the morning “chasing” size. Hello? Did you warm up the machine?


A lot of people assume that performing a machine warm-up routine is only appropriate after an extended “vacation” period … either by the personnel or by lack of work flowing to the machine. While a longer warm-up period is recommended after an extended break … an everyday warm-up routine is still recommended for the reasons listed above. Here are a couple of options for when to perform a machine warm-up routine :

  • Start of the Day … whether that’s at the shop opening or the start of the 1st shift.
  • After the machine has been idle for a time period of over 4 hours.
  • After an extended vacation period.
  • If the shop temperature is cold during the winter months … a short warm-up should be performed even after lunch  / dinner breaks.
  • If the machining requires holding a tight tolerance … a warm-up routine should be left executing during ANY breaks in the machining … inspection time, bathroom break, at machine deburring process, etc..



Matching the situations above requires an assortment of warm-up routines. No matter what the length of time … the warm-up routine should always include the following :

  • Spindle running
  • Axis moving along the full stroke of each axis.

The beauty part is that the various warm-up programs can be left in the CNC control and called up anytime as needed. Or in the case of just keeping the spindle warm … it may be a case of just manually starting the spindle and leaving it running while you walk away and attend to something else.

Spindle Warm-Up

After an extended break the spindle should be run through all the speed ranges with substantial dwell times in between speed changes. Start slow and work your way up with at least 15-30 minutes between increases. An example of a Fanuc style program might be :

  • G97 S100 M03
  • G04 X1200.0 ( dwell for 1200 seconds or 20 minutes )
  • S300
  • G04 X1200.0 ( dwell for 1200 seconds or 20 minutes )
  • S500
  • G04 X1200.0 ( dwell for 1200 seconds or 20 minutes )
  • etc. etc. etc. until a speed of at least 3500 RPM is obtained.

You can create a program like the above to be run after extended breaks … and a program with less dwell time to be run after shorter breaks.

As mentioned above … to maintain the spindle temperature during the course of the workday … manually starting the spindle at say 2500 RPM and leaving it running while you leave the machine can also be quite beneficial in maintaining machining accuracy.

Axis Warm-Up

After an extended break  ALL the machine axis should be made traverse the complete length of each axis … or if fixturing / workpieces are in the way the maximum length of the stroke that is possible … using various speeds. You don’t want to start the movement under full rapid traverse speeds … but rather work your way up during the warm-up cycle. The easiest way to accomplish this is to utilize the RAPID OVERRIDE feature on the machine. The G code warm-up program will call for G00 / rapid … but start the program with the RAPID OVERRIDE switch at it’s lowest percentage …. then work it up manually as the routine runs. A sample Fanuc style axis warm-up program might look like this :

  • G00G91G28Z0
  • G00G91G28X0Y0
  • G00G91Z- ***** …. incrementally move the Z axis as close to the table as possible.
  • G00G91G28Z0
  • G00G91X ***** …. incrementally move the X axis to the opposite end of it’s stroke
  • G00G91Y ***** …. incrementally move the Y axis to the opposite end of it’s stroke
  • G00G91G28X0 …… move the X axis back to the zero return / home position
  • G00G91G28Y0 …… move the Y axis back to the zero return / home position
  • G00G91X ***** Y ***** …. incrementally move both axis at the same time to their stroke end
  • G00G91G28X0Y0 …. move X and Y back to their zero return / home position.

The above routine gives you an idea … and feel free to make additions as you see fit. The main idea is to move ALL the axis along as much of their stroke as possible. Not just a “square” pattern … try to make “fancy” moves that can move all the axis through as much of the strokes as possible.

 If you don’t like or don’t have a RAPID OVERRIDE option … you can simple make a longer program using FAST feedrates … such as :
  • G00G91X ***** F100.00
  • etc.
  • etc.
  • G00G91 X**** F200.00

You can get the idea … repeat the program and alter the feedrates as the program progresses. Again … the good part is that once it is written, you can maintain the program in the machines memory and recall it as needed. No need to re-create it each time.

 Spending some time creating these warm-up routine programs … and instituting a policy of when and how they are to be run … can go a long way to improving your machine’s life … as well as your machining efficiency and accuracy.

Please visit our website to investigate our
Real World Machine Shop Software

Happy Chip Making … and may you Make Chips and Prosper !!

Cutter Compensation – A Programmers Best Friend

In this 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. Ifadditional 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
Conversational CAD/CAM
Quoting & Estimating
G Code Conversion
CNC Training
…. and MORE !!!

Canned Cycle Drilling & R Plane Tricks

Wasting time drilling air when “drilling” holes in a part with multiple levels is not uncommon for the novice programmer. In this post … we would like to discuss the always important R plane and how you can easily control it in your G code program.

First … the FACTS :

There are two planes that the programmer needs to be concerned with :

INITIAL PLANE … this is the plane used for rapiding around the workpiece. This plane should always be set high enough to avoid the workpiece as well as any clamps or other fixture related objects that can be struck by the tool as it moves around the part.

  • On  Fanuc controlled or Haas machine … the initial plane is defined as the last Z position before the canned cycle is called. So in the sample code below :

G00 G90 Z1.000
G98 G81 Z-.500 R.050 F1.0

  • Z1.00 would be considered the INITIAL PLANE … because it is the last Z position prior to the the G81 canned cycle command.
  • In an Okuma machine … the user can set the INITIAL PLANE by commanding a G71 Z— line prior to the canned cycle command line. So … imitating the above Fanuc line … we would program :

G71 Z1.000
G81 Z-.500 R.050 F1.0

R PLANE : The R plane is defined as the plane at which the drilling operation begins. So basically the tool rapids from the Initial Plane to the R plane … and then starts the drilling operation. The R plane is defined in the canned cycle command line. So in the above examples … R.050 is defined as the R plane … the point where the drilling operation would begin. In the above programs … the tool would rapid from the Z1.00 initial plane to the Z.050 R plane.

After drilling … we can tell the tool where to return by using the G98 ( initial plane return ) or G99 ( R plane return ) … for Fanuc / Haas … in the canned cycle command line. Once commanded … G98 / G99 becomes modal … which means the machine will remember where it is supposed to return … until told differently. When programming for Okuma … we can use the M53 ( like G98 ) / M54  ( like G99 ) commands.


Did you know that you can very easily change the R plane when drilling on uneven surfaces?

Did you know that you can very easily change the return point between the INITIAL and R planes?

As mentioned above … once G98 or G99 is set … the control remembers where to go. Also … once the R plane is set in the canned cycle command … it remembers where the R plane is. But you can change either very easy … just command it !! Like this :

(1)G00 G90 Z1.000
(2)G98 G81 Z-.500 R.050 F1.0
(3)X1.00 Y1.00
(4)G99 X2.00 Y2.00
(5)X3.00 Y3.00 R-.100
(6)G98 X4.00 Y4.00 R.050

(1) – Sets the Initial Plane as Z1.00
(2) – Sets the R plane as Z.050 … return to the Z1.00 after drilling this hole
(3) – Drill this hole … R plane is .050 and return to Z1.00 … these were modal from (2)
(4) – After drilling this hole … return to R plane … still set to Z.050
(5) – Drill this hole but start at the new R plane of Z-.100 … return to Z-.100 after drilling … G99 is modal.
(6) – Drill this hole but start at the new R plane of Z.050 … return to Z1.00 after drilling this hole G99.
(7) – Cancel the canned cycle … all modal canned cycle information is cleared.


On an Okuma machine … users can set and re-set the Initial Plane through the G71 command. For example, the command :
… would set the Z plane of 1.00 as the Initial Plane … and this can be changed at any time but just commanding a new G71 line.

On a Fanuc / Haas control … this is not so easy. You would have to cancel the current canned cycle with a G80 … move the Z axis to the desired Initial Plane … then re-command a new canned cycle to set a new Initial Plane.

So … as we illustrated here … it’s fairly easy to efficiently and effectively machine holes on uneven surfaces using a combination of the return plane commands G98 / G99 / M53 / M54 and R plane settings and through the Initial Plane selection.

Happy Chip Making !!

Check out our Real World World machine shop software at

Conversational CAD/CAM
Quoting & Estimating
G Code Conversion
CNC Training
…. and MORE !!!

A Major Hidden Cost When Estimating

We developed our KipwareQTE® quoting and estimating software from our real world experiences on the shop floor and running a variety of different machine shops. Over the years, one main category when quoting that is often misunderstood, under quoted and even completely ignored is perishable tooling.

Do you include perishable tooling in your costing and quoting?

If your quoting a part that needs 100 holes drilled … do you include the cost of the drills and center drills?

Our experience from talking with potential clients shows that 80% of estimators DO NOT include perishable tooling in their costs and estimates. A major mistake … that is directly effecting their bottom line … negatively !!

KipwareQTE makes it easy to include perishable tooling into your estimating process. How?
Two ways.

ONE – users can create a database of perishable tools and their associated costs. Then adding tools costs to the quote and estimate is simply a matter of pulling down a drop-down list and selecting the tools that will be used in manufacturing.

TWO – Using an estimated tool life … KipwareQTE® will perform all the calculations to include the complete cost for each of the tools and also calculate the number of each tools required for inclusion in the Bill of Material creation. That way the shop will be prepared when the job hits the floor.

Beyond the feature.

We like to think that thoughtful and important features like this illustrate what sets Kipware® and Kentech Inc. apart from our competition. A simple design, a meaningful feature … that can make the difference between making and losing money … and isn’t that what it’s all about.

We invite you to explore our Kipware® Business Software titles … and discover the difference that REAL WORLD MACHINE SHOP SOFTWARE can make.

Kenney Skonieczny – President
Kentech Inc.

The HOW’s and WHY’s of CNC Sub Programming

If you have done any manual G code program creation, you know you are always looking for some shortcuts  that can not only help cut down the data input … but would also help eliminate errors. Whether they be typing errors or movement errors … the less chance to create one the better.

One of the more powerful tools available to a programmer is the use of SUB PROGRAMMING. In this Making Chips post … we would like to touch on some of the basic ideas, concepts and uses for sub programming. This post will illustrate the Fanuc / Haas coding format … but check out the end of the post for Okuma explanations as well.

What is a Sub Program?

Basically, a sub program is a G code program that is called from another G code program. The contents of the sub program is not limited and can contain tool calls, spindle calls … just about anything any other G code program can contain. The sub program itself resides in memory under it’s own program number … and is separate from the “main program”.


Why Would I Use a Sub Program?

As mentioned above … the less data entry means less chance for a mistake. let’s take this example scenario where we have to let’s say spot drilling then drill then chamfer then tap a series of holes. The less times we have to re-type those hole locations, the less chance we will have a typo and / or put a hole in the wrong place. If we can store the X / Y coordinates of the hole locations in one location and call them out as needed … that saves data input and reduces our chances for errors. This is a good example of how a sub program ( in this case it would be the program that stores the hole locations ) can be a big help.

How Do I Program and Call a Sub Program?

A sub program scenario consists of a main program and the sub program. The main program consists of all the code that doesn’t repeat itself … the sub program consists of all the data that will be repeated. In our above example … the tool calls, spindle calls, drilling cycles will all be different for each hole … so we will store that in the main program … but the hole locations will be the same so we will store them in the sub program.

When you create a sub program … it is done just like you would create any other program. On Fanuc / Hass controls you start out with an O number … and type the program as normal. Let’s take our above example of hole locations … the sub program might look like this :

X1.1 Y1.1
X2.2 Y2.2
X3.3 Y3.3
X4.4 Y5.5

Notice that we have an M99 at the end … not an M30 or M02 like a normal program. This indicates that this is a sub program … we’ll explain the M99 command a little later.

This program is entered in the control as any other program … and resides in it’s own memory space.

When a Fanuc / Haas control wants to call a sub program to run … the programmer issues an M98 command in the Main Program. The M98 command is also followed by a P address … which is the “O” number of the external program to run. Our above sample sub program would be called with the command :

M98 P1234

When the main program reads the M98 command … it jumps out of the main program and starts to execute the sub program … in this case program O1234. When it reads the M99 command at the end of the sub program … it jumps back to the main program to the line after the one through which it left. In other words, it jumps back to the line after the M98 command.

The Complete Story

Let’s take a look at the full program and the sub program calls … see if you can follow the path.

Main Program

ETC.    ETC.    ETC.

Sub Program

X1.1 Y1.1
X2.2 Y2.2
X3.3 Y3.3
X4.4 Y5.5

Can you follow the path as the program jumps to the sub program?
Here is an in-depth explanation.

G00X1.100Y1.100 ——————— Position to our first hole.
G43Z.500H01M08 ——————— Bring the Z axis to the clearance plane.
G99G81Z-.130R.050F20.0L0 ———- Call our canned cycle … but use L0 which means the control will hold the data … but will not execute the cycle.
M98P1234 —————————– Jump to our sub program O1234 which will cause a hole to be spotted at each X / Y location in the sub.
G80 ————————————- When the M99 is read … the program will jump back to here.
N0002 ———————————- This sequence basically does the same thing …except we are establishing a different canned cycle before we jump to the sub program.

Another Example …

Once you are able to follow the above … here is another scenario.

You can also call a sub program and have it executed a set number of times. Let’s take the example where we want to execute a program on our lathe to make a washer (3) times. We will enter the main program and sub program as below.

Main Program :
M98 P1234 L3

Sub Program :
between here is the complete machining program that includes
tool calls … spindle calls
the feeding of the stock
the machining of the part
the cut-off of the part

The cycle start is executed with program O0001 … which calls the sub program O1234 and executes that program (3) times … the L in the M98 line. This feature is different for the various Fanuc controls but is usually commanded either :

M98 P —- L
M98 P****$$$$ where **** is the program number and $$$$ is the number of times to repeat.

Differences Between Fanuc / Haas and Okuma OSP

The basic ideas of calling and executing a sub program is the same between these controls … the G code commands are a bit different. Those differences are outlined below.

Sub Program Call
Fanuc / Haas : M98
Okuma : CALL
Example : CALL O1234 will call sub program O1234

 Sub Program End

Fanuc / Haas : M99
Okuma : RTS

Sub Program Call with Repeat
Fanuc / Haas : M98 P1234 L5 or M98 P12345
Okuma : CALL O1234 Q5 with the Q value being the number of repeats.

That’s basically it … just some G code differences but the basic idea and execution is the same.


Sub programming is a powerful tool … even if you are not trying to avoid re-typing and repeated data entry. Hopefully this Making Chips post will get you thinking and exploring all the ways sub programs can make you a better programmer.

Happy Chip Making !!

Check out our Real World World machine shop software at

Conversational CAD/CAM

Quoting & Estimating

G Code Conversion

CNC Training

…. and MORE !!!

Move That Vise !!

MOVE THAT VISE !!! … It could mean more years for your machine tool.

It seems the simpler, often overlooked things can be the downfall of most shop equipment. Focusing on a few simple ideas can avoid those big repair bills and keep machine tools running like new much longer.

When most setups are done on a VMC, the workholding fixture is neatly mounted right in the middle of the table. Although it looks good, this is actually one of the worst “habits” for the machine. Locating the vise or fixture in the same place has the following harmful effects on the life of the machine:

  • Table wear, resulting in dip or sag in one spot.
  • Boxway or guideway wear on or around the spot, causing loose surface and gib contact, and shuck in the ways.
  • Ball screw wear, resulting in excessive backlash in that one area of the screw, which cannot be repaired through CNC compensation.

Of course you’re going to clean the table completely before installing the vise.

Then are you going to place the vise so it looks nice and neat in the center of the table?

NO !!!

Placing the vise or fixture in or around the same area of the machine table will cause all of the above, with the most common symptom over time being backlash of the screw. When trying to compensate and set the backlash, the person making the repair will often find different backlash values when checking along the length of the axis stroke. This most often results in the need to replace the whole ball screw. Because most CNC machine controls only permit one backlash compensation value to be set in the parameters, compensating for the backlash cannot be effectively performed through the control.


You also may find that the gibs need to be adjusted in that area of the boxway, because the axis has some side-toside movement to it when moving. Squareness in that area will disintegrate; and, in the worst case, this shucking can be heard when the axis changes direction. The most common remedy of adjusting the gib in that area causes the axis to bind when it reveals to the other areas, because the boxway wear is different along the stroke. In this repair, the machine’s boxways may need to be reground, rescraped or both. In either of these cases, the repair bill will be huge.

The remedy is to make sure to move the vise or fixture location around on the tabletop whenever possible. You will see a more consistent wear pattern for the machine, and any backlash that occurs can be taken up correctly through the control. You will not be able to stop machine wear, but you can distribute it more evenly along the machine, which provides a longer life for all the components involved.

 Happy Chip Making !!

Check out our Real World World machine shop software at

At Kentech Inc. … We’re MAKERS and DIY’ers Too

There is no doubt that a lot of folks are letting their creative juices flow today and becoming members of what is touted as the “maker community”. It is so great to see … and to see that great American ingenuity in play in so many ways.

Being a machinist for almost 30 years now … I like to think I have a little of the MAKER in me as well … and not only in metalworking. Here at Kentech Inc. … our various Kipware® machine shop software software titles are used by thousands of professional machinists and machine shops around the world … and also by thousands of MAKERS as well. People doing everything from woodworking to metalworking in garage shops and professional machine shops around the world. We like to think that if a product is good … it finds it’s way into many places. And we are proud of the fact that our Kipware® conversational CNC programming software has made parts for SpaceX as well as that coat rack for Average Joe or Jane.

Kipware® software is also running our sister woodworking company — KÄRV. From quoting and estimating to CNC programming … Kipware® software gives us THE EDGE. Check it out at

With that MAKER and DIY spirit bubbling inside ( watching Yard Crashers on the DIY network with some java certainly HELPS ) me and my wife decided that this summer would be the summer of our personal YARD CRASH. And so it began.

The Vision

Looking aerially at the yard … I laid out my vision to see if the wife approved. First … a curved walkway leading from the house to a brand new firepit. Not one of those metal, cheap firepits … I mean a new brick firepit with a metal inner ring and nice stone cap. Halfway down the walkway … a detour to our own designed and constructed water feature … waterfall or fountain.  And here’s where the wife chimed in. “How about this” she says later in the evening. She shows me a pic on Pinterest of a bamboo themed waterfall. “I like it” I reply … we’ll think about the design in more detail as we get closer. But there it is … our vision.

The START of Construction


The next day we begin the layout in the space where we decided to work … marking the area with string … and removing all the sod. Big job … but we get it done in a couple of days … and start the remodel.

Aerial view #1 of the “construction site”
Aerial view #2 of the “construction site”

PHASE 1 – Privacy Panels


The first item in the rebuild was to install some privacy panels to insure our nights spent by the firepit were nice and cozy and private. My wife had a “bamboo theme” in mind … which carried over from the waterfall idea … so we got to designing. We came up with a wooden frame clad on both sides with bamboo fencing. Came out and looked great … just the right amount of light coming through and bamboo effect was very elegant.

PHASE 2 – The Fire Pit 


We purchased a stone firepit kit from a local stoneware vendor and during the week I got the area prepped and the firepit installed. Leveling and preparing for the first layer was quite a job … but it came out great and the feeling of accomplishment was fantastic. If you’re a MAKER … you know what I’m talking about. Friends always say “We just have someone build it” … but there is nothing like that feeling of accomplishment that lasts for years as every time you look at it .. you can proudly say “I built that !!”.

With the fire pit installed … I lay out the artistic walkway … line the outer edge with cobblestones … and fill the inside with stone dust. I was a little apprehensive about using the stone dust as a bottom … it was quite dusty to start with … but it turned out fabulous. Once a good rain shower did it’s thing … it hardened up nicely and makes for a great walkway.

The completed fire pit.
The completed fire pit and walkway area around the pit. The right hand side leads to our nature trail through the woods behind the property.

PHASE 3 – The Water Feature


The more I viewed my wife’s idea for the water feature … and the more we discussed the details … the more confidence I gained that I could do it. I don’t think my wife was quite as confident though … a lot of probing questions like “How you gonna do this?”

First … we needed to bring electricity from the house to the waterfall area. Following the local code … we dug our trench ( what a b*&%$ ) … layed our cable inside our PVC piping … and presto. 4 new plugs … an outdoor switch … and plenty of juice for our pump. Tough job but very professionally done … and all to code. The wife was the hardest worker through it all. Chipping in with the ditch digging … and keeping me straight and focused through all the aggravation and  at times frustration and hard work.

Next … I bought some reclaimed wooden beams … 6x6x10 … that were once used in the old railroad yard in our city. They became the perfect uprights to support our bamboo “waterfall”.

Reclaimed railroad ties in cement and in position.

After the ties had set in their concrete moorings for a week … and another trip to Home Depot ( it became our Saturday morning breakfast trip ) … I began the plumbing work. Again … with the constant nudging from the wife to keep me on the straight and narrow … we got it all in and we’re ready for the big reveal. Remember this was only a vision and a theory … we had never really tried the design. Judge for yourself with the video below :

You can see it all in the video … the bamboo privacy panels and the working waterfall feature. Below is a closer look at the design “behind the scenes”.

Behind the scenes of the waterfall.
Behind the scenes of the waterfall.


And that was that. After the wife lent her gardening touches … the big reveal :

The big reveal
The big reveal


As I mentioned above … I’m a big fan of YARD CRASHERS on the DIY network. A lot of great memories of sitting and binge watching the show on rainy days … getting stoked to start projects of my own around the house … fueling the MAKER spirit if you will.

So when the project was completed … I couldn’t resist tweeting a pic to the host of the show, Matt Blashaw. And low and behold … it got his attention and he replied … AND APPROVED !! WoooHooo !!

Matt Blashaw approves !!
Matt Blashaw approves !!

As the summer nights and weekends go by … we are enjoying the fruits of our work with fabulous fires in the pit with friends and family … accompanied by the zen like sounds of the waterfall. In fact … we have christened the garden with the name the KenZenSue Garden.

Being a machinist I always took a ton of pride in my work … but a lot of it was “business”. It was great to unleash my MAKER side and work on a “for fun” project … and to enjoy the results. To all the fellow MAKERS out there … be proud and go get’em.

Kenney Skonieczny – President

Kentech Inc.

For all things Machinist … Metalworking … Machine Shop … and Machine Shop Software