You can program canned cycle X and Y positions in either absolute (G90) or incremental (G91).
There are (3) possible ways for a canned cycle to behave in the block in which you command it:
- If you command an X/Y position in the same block as the canned cycle G-code, the canned cycle executes. If Setting 28 is OFF, the canned cycle executes in the same block only if you command an X/Y position in that block.
- If Setting 28 is ON, and you command a canned cycle G-code with or without an X/Y position in the same block, the canned cycle executes in that block—either at the position where you commanded the canned cycle, or at the new X/Y position.
- If you include a loop count of zero (L0) in the same block as the canned cycle G-code, the canned cycle does not execute in that block. The canned cycle does not execute regardless of Setting 28 and whether or not the block also contains an X/Y position.
When a canned cycle is active, it repeats at every new X/Y position in the program. In the example above, with each incremental move of -0.5625 in the X axis, the canned cycle (G81) drills a 0.5" deep hole. The L address code in the incremental position command (G91) repeats this operation (9) times.
Canned cycles operate differently depending on whether incremental (G91) or absolute (G90) positioning is active. Incremental motion in a canned cycle is often useful, because it lets you use a loop (L) count to repeat the operation with an incremental X or Y move between cycles.
The R plane value and the Z depth value are important canned cycle address codes. If you specify these addresses in a block with XY commands, the control does the XY move, and it does all of the subsequent canned cycles with the new R or Z value.
The X and Y positioning in a canned cycle is done with rapid moves.
G98 and G99 change the way the canned cycles operate. When G98 is active, the Z-Axis will return to the initial start plane at the completion of each hole in the canned cycle. This allows for positioning up and around areas of the part and/or clamps and fixtures.
When G99 is active, the Z-Axis returns to the R (rapid) plane after each hole in the canned cycle for clearance to the next XY location. Changes to the G98/G99 selection can also be made after the canned cycle is commanded, which will affect all later canned cycles.
A P address is an optional command for some canned cycles. This is a programmed pause at the bottom of the hole to help break chips, provide a smoother finish, and relieve any tool pressure to hold closer tolerance.
You must define an S (spindle speed) command in or before the canned cycle G-code block.
Tapping in a canned cycle needs a feed rate calculated. The feed formula is:
Spindle speed divided by threads per inch of the tap = feedrate in inches per minute
The metric version of the feed formula is:
RPM times metric pitch = feedrate in mm per minute
Canned cycles also benefit from the use of Setting 57. If this setting is ON, the machine stops after the X/Y rapids before it moves the Z Axis. This is useful to avoid nicking the part when the tool exits the hole, especially if the R plane is close to the part surface.
Modal canned cycles stay in effect after you define them, and they execute in the Z-axis for each position of the X, Y, and C-Axes.
Canned cycles operate differently, depending on whether you use incremental (U,W) or absolute (X, Y, or C) positions.
If you define a loop count (Lnn code number) in the canned cycle block, the canned cycle repeats that many times with an incremental (U or W) move between each cycle.
Enter the number of repeats (L) each time you want to repeat a canned cycle. The control does not remember the number of repeats (L) for the next canned cycle.
You should not use spindle control M-codes while a canned cycle is active.