6.2.7 Example


1. G65 example


The macro 9010 simulates the G81 drilling cycle.


Main program:

G90G54G17G40G49G80

G10.65

G91G28Z

G90

G00XY

G00Z20.


#50=10.          ; X position

#51=10.          ; Y position

#52=-20.         ; Z Lower tool position

#53=3.           ; Z reference point position

#54=200.         ;  feed speed

#55=3.           ; Spindle forward rotation (M3)

#56=2000.        ; Spindle S code


G65 P9010 X#50 Y#51 Z#52 R#53 F#54 M#55 S#56


G11.65

M5

M30


Macro program 9010.CNC

O9010

;THE SUBPROGRAM SIMULATES G81


G90G54G17G40G49G80


S#19

M#13

G00 X#24 Y#25

G00 Z#18

G01 Z#52 F#9

G00 Z#18


M99


2. G66 example


Main program:

;G66 USED SAMPLE

G90G54G17G40G49G80

G10.65

G91G28Z0.

G90

G00 X0.Y0.

G00 Z20.


#52=-20.                           ; A hole depth

#53=3.                             ; Z reference point position

#54=200.                           ; Feed rate

#55=3.                             ; M3 spindle forward rotation

#56=2000.                          ; Spindle speed

G66 P9011 Z#52 R#53 F#54 M#55 S#56 ; Given subroutine

G00 X0. Y0.

G00 X10.

G00 Y10.

G00 X0.

G67


G11.65

M5


Macro program 9011.CNC

O9011

G90G54G17G40G49G80

S#19

M#13

G00Z#18

G01Z#52F#9

G00Z#18

M99