beautypg.com

Smithy CNC Mills User Manual

Page 119

background image

Example 7 - Eight Holes Revisited

n100 g90 g0 x0 y0 z0 (move coordinate home)

n110 g1 f10 x0 g4 p0.1

n120 g91 g81 x1 y0 z-1 r1

l4(canned drill cycle)

n130 g90 g0 x0 y1

n140 z0

n150 g91 g81 x1 y0 z-.5 r1

l4(canned drill cycle)

n160 g80 (turn off canned cycle)

n170 m2 (program end)

Example 8 - Twelve holes in a

square

This example demonstrates the

use of the L word to repeat a set

of incremental drill cycles for suc-

cessive blocks of code within the

same G81 motion mode. Here we

produce 12 holes using five lines

of code in the canned

motion mode.

N1000 G90 G0 X0 Y0 Z0 (move coor-

dinate home)

N1010 G1 F50 X0 G4 P0.1

N1020 G91 G81 X1 Y0 Z-0.5 R1 L4

(canned drill cycle)

N1030 X0 Y1 R0 L3 (repeat)

N1040 X-1 Y0 L3 (repeat)

N1050 X0 Y-1 L2 (repeat)

N1060 G80 (turn off canned cycle)

N1070 G90 G0 X0 (rapid home)

N1080 Y0

N1090 Z0

SmithyCNC Programmer’s Reference Manual: Mill Canned Cycles

SmithyCNC Programmer’s Reference Manual: Mill Canned Cycle

10-16