Proven Tips and Tactics: Understanding Canned Cycles

A young parent was getting very frustrated. Every time he told his teenager do something, she would do what she was asked, but never took initiative to do the task on her own. Again and again the parent would have to say “clean your room and don’t just throw your clothes under the bed.”

CNC machines are like stubborn teenagers, they have to be told everything and they never remember so you have to tell them again. Well, canned cycles are like little to-do lists for CNC controls that remind them what to do so you don’t have to reprogram every detail every time. Using canned cycles saves a lot of time and effort when programming a CNC machine.

As useful as canned cycles are, many CAD/CAM programmers refuse to use them. The reason for this varies and is beyond the scope of this article, but if you are running a machine programmed by someone else using CAD/CAM software, don’t be surprised if you rarely see canned cycles.

Interestingly, canned cycles were not developed to assist programmers. They were originally developed to save memory. Early CNC machines had very limited and very expensive memory and canned cycles provided a very efficient way to do complex repetitive actions with the least amount of memory.

The Power Of Canned Cycles

A powerful and common option available on most CNC machines is the ability to perform canned cycles. Canned cycles give the programmer the option to do some routine functions with a simple G-code instead of writing many lines of information.

For example, if the programmer wanted to drill a hole 3″ deep and clear the chip every .300. Without using a canned cycle drill, there would be more than 20 or 30 lines of program information per hole. With a canned drill cycle, the programmer need only specify the correct G-code for the operation to be performed, add a couple of variables, then call out coordinate points for the holes. The machine will drill the desired hole at every program point.

Canned cycles are very flexible. Any of the variables/parameters that follow the original G-code can be changed at any time. If you have ten holes to drill all at different depths, feedrates or conditions you can change the data at any time in the canned cycle.

Just One Example, the G81

The G81 canned cycle for mills and routers is a very simple drilling cycle and has just a couple variables that need to be set. G81 commands the machine to drill a hole at every subsequent X/Y location, to a depth (Z), rapid traverse to a point R), and feed to depth at the feedrate (F).

There are many canned cycles available for both lathes and mills. A complete discussion of the cycles and how to use them will be the subject of future articles.

Warning

When using canned cycles, it is necessary to cancel the canned cycle when you no longer need to use it. If you fail to cancel the canned cycle, the program will continue to perform the cycle when you make the next positioning move.

G80 is the code for canceling canned cycles.

When should you use a G81?

The G81 is best used when you want to drill a hole in one pass with no pecking to remove chips. It is also very useful for plunge milling, particularly if you want to plunge mill to remove a lot of stock quickly prior to rough and finish countour milling.

Summary

While just one example of G81 drilling was shown here, there are dozens of time saving canned cycles used for drilling, taping, boring, counter boring etc. on milling machines and routers. Lathes have their own set of canned cycles that make possible to very quickly rough and finish turn, thread, bore and contour parts.

Canned cycles are tremendous time savers when manual programming and when you need to edit the program at the machine.

Watch for future articles discussing the various mill and lathe canned cycles.

Very simple and clear explanation.
May be one of you can help me with an answer for a CNC drilling issue I have been facing for a long time.

I need to drill 200 holes of Diameter 4.0mm to a depth of 50mm (Z-50.0) and then continue Diameter 3.0mm to a depth of 110.0mm (Z-110.0).

There is no problem for drilling Dia 4.0 upto Z-50.0 wirh a G83 code. But the Diameter 3.0mm hole, I want to go rapid upto Z-50.0 (because already drilled Dia 4.0 upto this depth) and then peck 2mm and clear the chip at Z3.0 and continue 2mm peck and clear chips at Z3.0 until Z-110. reaches. Is there any way I can do this in Fanuc or Sinumerik? If I give the R value 3.0, The drilling cycle starts from Z3 and lot of time wastage. If I give the R value -50.0, The chip is clearing at z-50 and not Z3. Any solution for this?