beautypg.com

Smithy CNC Mills User Manual

Page 28

background image

SmithyCNC Programmer’s Reference Manual: G Codes

2-13

Rotational axis words are allowed in canned cycles, but it is better to omit them. If rotational

axis words are used, the numbers must be the same as the current position numbers so that

the rotational axes do not move.

All canned cycles use X, Y, R, and Z numbers in the NC code. These numbers are used to

determine X, Y, R, and Z positions. The R (usually meaning retract) position is along the axis

perpendicular to the currently selected plane (Z-axis for XY-plane, X-axis for YZ-plane, Y-axis for

XZ-plane). Some canned cycles use additional arguments.

For canned cycles, we will call a number "sticky" if, when the same cycle is used on several

lines of code in a row, the number must be used the first time, but is optional on the rest of

the lines. Sticky numbers keep their value on the rest of the lines if they are not

explicitly programmed to be different. The R number is always sticky.

In incremental distance mode: when the XY-plane is selected, X, Y, and R numbers are treated

as increments to the current position and Z as an increment from the Z-axis position before the

move involving Z takes place; when the YZ or XZ-plane is selected, treatment of the axis words

is analogous. In absolute distance mode, the X, Y, R, and Z numbers are absolute positions in

the current coordinate system.

The L number is optional and represents the number of repeats. L=0 is not allowed. If the

repeat feature is used, it is normally used in incremental distance mode, so that the same

sequence of motions is repeated in several equally spaced places along a straight line. In

absolute distance mode, L>1 means "do the same cycle in the same place several times,"

Omitting the L word is equivalent to specifying L=1. The L number is not sticky.

When L>1 in incremental mode with the XY-plane selected, the X and Y positions are deter-

mined by adding the given X and Y numbers either to the current X and Y positions (on the

first go-around) or to the X and Y positions at the end of the previous go-around (on the

repetitions). The R and Z positions do not change during the repeats.

The height of the retract move at the end of each repeat (called "clear Z" in the descriptions

below) is determined by the setting of the retract mode: either to the original Z position (if that

is above the R position and the retract mode is G98, OLD_Z), or otherwise to the R position.

See Section [sub:G98,-G99:-Set]

It is an error if:

* X, Y, and Z words are all missing during a canned cycle,

* a P number is required and a negative P number is used,

* an L number is used that does not evaluate to a positive integer,

* rotational axis motion is used during a canned cycle,