SMW Autoblok Stationary and Automation Products
Published

What Don’t you Like About that Canned Cycle?

Almost all CNC users take advantage of control-based canned cycles. Even CAM systems commonly output G-code programs that contain canned cycle commands. This includes hole machining canned cycles, such as drilling, tapping, boring and more, and whatever milling cycles the machine may have. For turning centers, it includes roughing and finishing multiple repetitive cycles.

Share

 

If you use canned cycles on a regular basis, you’ve probably come up with something about one or more of them that you don’t like. The more of these you use, the more likely there’s something you wish one of them would do differently.
 
Consider the G83 deep-hole, peck-drilling cycle. Will your control enable you to vary the depth of each peck so that it gets progressively shallower as the hole gets deeper? If you specify a total depth that is not evenly divisible by the peck depth, what happens? Can you control the rate at which the drill reenters the hole after each retract motion? 
 
When you think about it, you can surely come up with other canned cycle limitations you’d like to overcome. Maybe you wish your drilling cycle would begin the hole at one feed rate—possibly just enough to engage the drill—then machine the balance of the hole at a faster feed rate. Or, maybe you’d like a drilling cycle that would feed through one surface, then rapid to another and feed through it as well.
 
Does your control provide a canned cycle for the machining operation you need to perform? Maybe you’d like a grooving cycle for turning centers, a pocket milling cycle, a thread milling cycle or a face milling cycle. The potential list of improvements to canned cycles is lengthy.
 
With custom macro B, you can modify the function of canned cycles or create new ones. You can even make them behave in a modal manner and cancel them with a G80 word.
 
To achieve this, the custom macro must first be written in the normal manner to perform the machining operation in the fashion you want. The only consideration here will be the program number. If you want the custom macro to be activated by a G code, possibly the same G-code number that is currently being used for the canned cycle you don’t like, you must use a program number that will enable you to do so. Program number O9010 is the first in a series of ten program numbers that enable you to create a user-defined G code.
 
Once the custom macro is written and verified, it can be called with the standard custom macro calling G code, G65. However, to keep from modifying your current programs, you should call the custom macro using the same G code used to call the canned cycle your custom macro is replacing. To accomplish this, a parameter must be changed.
 
To find the parameters related to user-defined G codes (they vary from one control model to the next), you must reference the custom macro section of the control’s programming manual. Pick the first available one (currently set to zero), and change it to the G-code number you wish to use to call your custom macro. If you wish the calling G code to be modal, as hole machining canned cycles are, the value must be negative. For example, if parameter number 5061 is the parameter related to the first available user-defined G code program, and you want to change the way G83 behaves, change parameter number 5061 to -83. Again, be sure the program number for your program matches the one used by the parameter (such as O9010). The next time the control sees a G83, it will execute your custom macro instead of performing the normal function of G83.
 
To cancel your user-created canned cycle with G80, you must also modify the function of G80. Pick another user-defined G-code parameter, and place a value of 80 in it. Finally, match this program number with the program related to the parameter number. This will cancel normal canned cycles as well as your user-defined G code. If choosing the second-available, user-defined G code, the program number will be O9011 — and here it is:
 

O9011 G80 G67 M99

 
This program will cancel canned cycles as well as modal custom macro calls.

 

SMW Autoblok Stationary and Automation Products
OASIS Inspection Systems
An ad for Formnext Chicago on April 8-10, 2025.
Techspex
JTEKT
The Automated Shop Conference
paperlessPARTS
DNS Financial Services America
Koma Precision
Universal Homepage Package W4900 Indicator
DN Solutions
BIMU 2024

Related Content

Holemaking

New Machining Technology Works With Old to Restore WWII Submarine

A set of donated boring bars that can be used in a 1954 boring head will enable volunteer machinists to recreate a pair of binoculars for the USS Pampanito.

Read More
Holemaking

10 Ways Additive Manufacturing and Machining Go Together and Affect One Another

Forget “additive versus subtractive.” Machining and metal additive manufacturing are interconnected, and enhance the possibilities for one another. Here is a look at just some of the ways additive and machining interrelate right now.

Read More
Holemaking

Custom PCD Tools Extend Shop’s Tool Life Upward of Ten Times

Adopting PCD tooling has extended FT Precision’s tool life from days to months — and the test drill is still going strong.

Read More
Holemaking

Kay Engineering's Gundrilling Machine Performs Range of Operations

Kay Engineering’s DeHoff 20144 is used to perform gundrilling, pull boring, roller burnishing and thread tapping.

Read More

Read Next

Basics

Obscure CNC Features That Can Help (or Hurt) You

You cannot begin to take advantage of an available feature if you do not know it exists. Conversely, you will not know how to avoid CNC features that may be detrimental to your process.

Read More
Micromachining

A History of Precision: The Invention and Evolution of Swiss-Style Machining

In the late 1800s, a new technology — Swiss-type machines — emerged to serve Switzerland’s growing watchmaking industry. Today, Swiss-machined parts are ubiquitous, and there’s a good reason for that: No other machining technology can produce tiny, complex components more efficiently or at higher quality.

Read More

3 Mistakes That Cause CNC Programs to Fail

Despite enhancements to manufacturing technology, there are still issues today that can cause programs to fail. These failures can cause lost time, scrapped parts, damaged machines and even injured operators.

Read More
SMW Autoblok Stationary and Automation Products