Code G81 is for calling a standard drilling cycle. The following frame shows a typical format for this loop:
G81 Х10.0 Y15.3 Z-3.0 R0.5 F50.
X and Y determine the coordinates of the holes to be machined. Z indicates the final drilling depth, and R is used to establish the retraction plane.
G00X0Y0
M3 S6000
G00Z5
G81X10Y10Z-6R1
G01X20Y10
G01X30Y10
G81X40Y10Z-7R2
G01X50Y10
G80
M5
G00X0Y0