Posted by: davidhayden | September 18, 2010

Proven Tips and Tactics: How to Cancel Canned Cycles


This will be short. I received a question the other day basically saying “Canned cycles are great, but how do you tun them off, change them or stop them?”
 
Code Data
Code: G81 G82 and G80
(brief examples used in this article, applies to all canned cycle command)
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
Conflicting G Codes G00, G02, G03, G04, G80 Any other G code in Groups 00, 01 or 09  

Canceling 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. But like anything else, no one thing is good all the time. So stopping NC / CNC canned cycles is very easy.  

You have a couple of options for stopping canned cycles.
  • Probably the best and most reliable way to stop a canned cycle is to program a G80 code. The only function of the G80 g code is to cancel canned cycles. Here is an example:

    G00 X1.0 Y1.0 Z.1
    G81 G91 Z-.6 F3.5
    X2.0
    Y3.1
    G80

    From above you can see 3 holes were drilled to .6 deep at a feedrate of 3.5 The hole locations are X1.0,Y1.0 X2.0, Y1.0 X2.0, Y3.1. The G80 at the end cancels the CNC canned cycle and returns the machine to “normal” mode.
     

  • Another way to stop a canned cycle is to program any code from groups 0, 01 or 09 . These codes could be G0 / G00 G1 / G01 G2 / G02 G3 / G03 G4 / G04. Here is an example: G00 X1.0 Y1.0 Z.1
    G81 G91 Z-.6 F3.5
    X2.0
    Y3.1
    G00 Y5
    Again, 3 holes were drilled to .6 deep at a feedrate of 3.5 The hole locations are X1.0,Y1.0 X2.0, Y1.0 X2.0, Y3.1. The G00 move to Y.5 effectively cancels the CNC canned cycle and returns the machine to “normal” mode. This action may depend on your particular machine code. So, it may be possible that the canned cycle would restart after the G00 command.   It is unlikely, but probably possible. That is why G80 is a preferred method.

     Also, when using canned cycles on a Mill or Router, they are for hole making and would involve a drill, boring bar. Therefore it is unlikely you would ever go straight from a canned cycle into a circular interpolation move with a G02 or G03.
     

  • Another possibility is to switch to a different CNC canned cycle . For example suppose, for what ever reason, you wanted to drill one of the holes and have the tool stop or dwell at the bottom of the hole for a second. That code would look like this. G00 X1.0 Y1.0 Z.1
    G81 G91 Z-.6 F3.5
    G82 X2.0 P1000
    G81 Y3.1
    G00 Y5
    Again, 3 holes were drilled to .6 deep at a feedrate of 3.5 The hole locations are X1.0,Y1.0 X2.0, Y1.0 X2.0, Y3.1.  The G82 cancels the G81 and puts the machine in G82 mode. The P1000 tells the machine to dwell at the bottom of the hole for 1 second. The Z depth, and feed rate are modal and do not need re entered.
     
    The G81 returns the machine to the normal CNC G81 drill cycle and the G80 cancels the canned cycle for normal operations.

If you have any topics you would like to be discussed regarding CNC programming, Shop Supervision or Shop Management, simply post a comment.  


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
 

Advertisements

Responses

  1. Thanks for the information I am new at cnc programing and coulldnt find this code anywhere


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

%d bloggers like this: