beautypg.com

Smithy CNC Mills User Manual

Page 107

background image

canned cycle. With the first set of blocks, the programmer must turn motion-

back on with G0, as is done in the next line, or any other motion mode G word.

Example 1 - Use of a canned cycle as a modal motion code

If a canned cycle is not turned off with G80 or another motion word, the canned

cycle will attempt to repeat itself using the next block of code that contains an

X, Y, or Z word. The following file drills (G81) a set of eight holes as shown.

(note the z position change after the first four holes.)

N100 G90 G0 X0 Y0 Z0 (coordinate

home)

N110 G1 X0 G4 P0.1

N120 G81 X1 Y0 Z0 R1 (canned drill

cycle)

N130 X2

N140 X3

N150 X4

N160 Y1 Z0.5

N170 X3

N180 X2

N190 X1

N200 G80 (turn off canned cycle)

N210 G0 X0 (rapid home moves)

N220 Y0

N220 Z0
N220 M2 (program end)

The use of G80 in line n200 is option-

al because the G0 on the next line

will turn off the G81 cycle. But using the G80. as example 1 shows, will provide

for an easily readable canned cycle. Without it, it is not so obvious that all of

the blocks between N120 and N200 belong to the canned cycle.

If you use G80 and do not set another modal motion code soon after, you may

get one of the following error messages.

Cannot use axis commands with G80

Coordinate setting given with G80

These should serve as a reminder that you need to write in a new motion word.

SmithyCNC Programmer’s Reference Manual: Mill Canned Cycles

SmithyCNC Programmer’s Reference Manual: Mill Canned Cycle

10-4