beautypg.com

Smithy CNC Mills User Manual

Page 30

background image

SmithyCNC Programmer’s Reference Manual: G Codes

2-15

1. Preliminary motion, as described above.

2. Move the Z-axis only at the current feed rate to the Z position.

3. Retract the Z-axis at traverse rate to clear Z.

Example 1. Suppose the current position is (1, 2, 3) and the XY-plane has been select-

ed, and the following line of NC code is interpreted.

G90 G81 G98 X4 Y5 Z1.5 R2.8

This calls for absolute distance mode (G90) and OLD_Z retract mode (G98) and calls for

the G81 drilling cycle to be performed once. The X number and X position are 4. The Y

number and Y position are 5. The Z number and Z position are 1.5. The R number and

clear Z are 2.8. Old Z is 3. The following moves take place.

1. a traverse parallel to the XY-plane to (4,5,3)

2. a traverse parallel to the Z-axis to (4,5,2.8)

3. a feed parallel to the Z-axis to (4,5,1.5)

4. a traverse parallel to the Z-axis to (4,5,3)

Example 2. Suppose the current position is (1, 2, 3) and the XY-plane has been select-

ed, and the following line of NC code is interpreted.

G91 G81 G98 X4 Y5 Z-0.6 R1.8 L3

This calls for incremental distance mode (G91) and OLD_Z retract mode (G98) and calls

for the G81 drilling cycle to be repeated three times. The X number is 4,

the Y number is 5, the Z number is -0.6 and the R number is 1.8. The initial X position

is 5 (=1+4), the initial Y position is 7 (=2+5), the clear Z position is 4.8 (=1.8+3), and

the Z position is 4.2 (=4.8-0.6). Old Z is 3.

The first move is a traverse along the Z-axis to (1,2,4.8), since old Z < clear Z.

The first repeat consists of 3 moves.

1. a traverse parallel to the XY-plane to (5,7,4.8)

2. a feed parallel to the Z-axis to (5,7, 4.2)

3. a traverse parallel to the Z-axis to (5,7,4.8)