Posted by: davidhayden | June 13, 2010

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.

Code Data

Code: G81 (brief example used in this article, others to be discussed in future article)
Modal: YES
Group: 01
Action: Drilling
ANSI Std: YES
Requirements: X, Y, location to drill, Z depth, Feed Rate
Options: R (rapid return plane, Feed rate, G98 / G99 Rapid plane selection, G17/G18/G19
Conflicting G Codes G00, G02, G03, G04, G80 Any other G code in Groups 00, 01 or 09

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

G81 Sample Code:

G81X3.Y1.5Z-2.R.1F3 (Drill at X3. Y1.5 Return to .1 Above the R Plane, At 3.0 IPM)
X2.Y1.5 (move to X2.Y1.5, drill another hole)
X1.Y7. F5 (move to X1.Y7., drill another hole at higher feed rate of 5.0 IPM)

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.


For a complete introduction to the fundamentals of CNC programming, take a look at 7 Easy Steps to CNC Programming . . . A Beginner’s Guide or 7 Easy Steps to CNC Programming . . . A Beginner’s Guide, the Ebook

About these ads

Responses

  1. [...] I saw a great article from this blog. Very good indeed. No comments yet Click here to cancel [...]

  2. Well, computers do exactly what their told by the programmers. A bad programmer and a bad parent are very similar!

  3. well writen makes it easy. Im sitting in a cnc night coarse listening to the teacher make canned cycles into rocket science. this cleared things up My teacher is a clown

    • Thanks Luke. If you have any questions, don’t hesitate to ask, I will try to answer them as best I can.

  4. Good, concise explanation of G81 Drilling cycle.

    • Thanks Joey . . . If you have any questions or know of topics you would like to see covered, please let me know. I will respond as time permits.

  5. 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?

    Gopal

  6. [...] Gopal posted a great question today about the limitations of the G83 canned cycle.  Here is what he had to say after reading Proven Tips and Tactics: Understanding Canned Cycles. [...]

  7. Gomar, your reply is posted at

    http://cnctips.wordpress.com/2011/08/20/sub-programming_to_make_canned_cycles/

  8. thanks a lot for these information

  9. im working in 4 axis milling machine
    my project will be about programming of milling cnc machine
    if you have any good desgin can be machining using 4 axis machine

    • 4 Axis can mean any number of things. What is your fourth axis A, B, C, Other. Is it a rotary table, a tilting head?


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

Follow

Get every new post delivered to your Inbox.

Join 377 other followers

%d bloggers like this: