# Fanuc G72.1 G72.2 Figure Copy Program Example (Bolt Hole Circle)

* Best ebooks for CNC programming:
+ CNC Programming Basics
+ G-Code and M-Code
+ CNC programming
+ G-Code Reference
+ CNC Machine Tutorial
+ CNC M-Code Tutoria

This CNC program example shows how both G72.1 and G72.2 figure copy functions can call one-another in one part program, read Programming Notes below carefully.

## Programming

### Fanuc G72.1 Rotational Copy

Using G72.1 Rotational Copy G-code a figure specified by a subprogram can be repeatedly produced with Rotational movement.
Read G72.1 definition with program example Fanuc G72.1 Rotational Copy (Figure Copy Function CNC Mill)

### Fanuc G72.2 Linear Copy

Using G72.2 Linear Copy G-code a figure specified by a subprogram can be repeatedly produced with Linear movement.
Read G72.2 definition with program example Fanuc G72.2 Linear Copy (Figure Copy Function CNC Mill)

### Fanuc G81 Drilling Cycle

G81 drilling cycle is used for simple drilling/spot drilling operations.
Read G81 drilling cycle definition with program examples Fanuc G81 Drilling Cycle

### Programming Notes

Specifying two or more commands to copy a figure
1. G72.1 cannot be specified more than once in a subprogram for making a rotational copy (If this is attempted, alarm PS0900 will occur).
2. G72.2 cannot be specified more than once in a subprogram for making a linear copy (If this is attempted, alarm PS0901 will occur).
3. In a subprogram that specifies rotational copy, however, linear copy can be specified. Similarly, in a subprogram that specifies linear copy, rotational copy can be specified.

## Fanuc G71.2 G72.2 Program Example

Main program
```O4000 ;
N10 G90 G00 G17 X240. Y230. Z100. ; (P0)
N20 G72.1 P4100 X120. Y120. L8 R45. ;
N30 G80 G00 X240. Y230. ; (P0)
N40 M30 ;```
Sub program Rotation copy (G72.1)
```O4100 N100 G72.2 P4200 I0 J20. L3 ;
N200 M99 ;```
Sub program Linear copy (G72.2 )
```O4200 N110 G90 G81 X120. Y180. R60. Z10. F200. ; (P1)
N210 M99 ;
-------------
```

# Fanuc G72.1 Rotational Copy Program Example

Fanuc G72.1 Rotational copy programming example, G72.1 G-code is used to repeatedly produce a figure with rotational movement.
Contents
• Fanuc G72.1 Rotational Copy
• Fanuc G81 Drilling Cycle
• Fanuc G72.1 Program Example

### Fanuc G72.1 Rotational Copy

Using G72.1 Rotational Copy G-code a figure specified by a subprogram can be repeatedly produced with Rotational movement.
Read more Fanuc G72.1 Rotational Copy (Figure Copy Function CNC Mill)

### Fanuc G81 Drilling Cycle

G81 drilling cycle is used for simple drilling/spot drilling operations.
Read complete article with program examples Fanuc G81 Drilling Cycle

## Fanuc G72.1 Program Example

Main program
```O2000 ;
N10 G90 G00 G17 X250. Y100. Z100. ; (P0)
N20 G72.1 P2100 L6 X100. Y50. R60. ;
N30 G80 G00 X250. Y100. ; (P0)
N40 M30 ;```
Sub program
```O2100 N100 G90 G81 X100. Y150. R60. Z10. F200. ; (P1)
N200 M99 ;
---------------
```

# Fanuc G81 Drilling Cycle

G81 drilling cycle is used for simple drilling/spot drilling operations.
Contents
• Syntax
• Usage
• Working
• G98 G99 Modes
• Example
• Repeat Drilling
• Working Examples
• G98 G99 Example
• Repeat Drilling Example

## Syntax

`G81 X... Y... Z... R... K... F...`
Parameter Description
X Hole position in x-axis.
Y Hole position in y-axis.
Z Depth, tool will travel with feed to Z-depth starting from R plane.
R Position of the R plane.
K Number of cycle repetitions (if required) .
F Feedrate.
Once G81 drilling cycle is defined, the canned cycle is repeated at every X-Y position in sequential blocks. So G81 drilling cycle must be cancelled with G80.

## Usage

```N30 G81 X10 Y30 Z-17 R2 F75
N40 Y10
N50 X30
N60 Y30
N70 X90
N80 Y10
N90 G80```
In the above example drilling will start with G81 drilling cycle at X10 Y30, so first drill will be at X10 Y30, then second at Y10, third at X30, fourth at Y30, fifth at X90 and the last one at Y10, because next block have G80 code, so drilling cycle will no more be repeated.

## Working

Here is briefly described how G81 drilling cycle operates,
1- Rapid traverse to the specified x,y axis position (drilling position).
2- Rapid traverse to the R plane position.
3- Drilling with specified Feed from R-plane position to Z-depth position.
4- Rapid traverse to Initial level or R-plane depends on G98, G99 modes.

G81 drilling cycle working

## G98 G99 Modes

After completing drilling depth the return is made with Rapid feed, the return height can be controlled through using G98 or G99.
G98, G99 can be used multiple times during G81 drilling cycle.

### Example

```N30 G81 X10 Y30 Z-17 R2 F75
N40 Y10
N50 G98 X30
N60 G99 Y30
N70 X90
N80 Y10
N90 G80```

## Repeat Drilling

With G81 drilling cycle drilling operation can be repeated multiple times. The drilling is repeated K times when that parameter is given with G81 drilling cycle.
Repeat drilling is normally used with G91 Incremental mode, and a good example of repeated drilling is Grid-plate drilling. the example for repeat drilling  is given below.

## Working Examples

G81 Drilling Cycle Example
```N10 T1 M06
N20 G90 G54 G00 X30 Y25
N30 S1200 M03
N40 G43 H01 Z5 M08
N50 G81 Z-10 R2 F75
N60 X80 Y50
N70 G80 G00 Z100 M09
N80 M30```

## G98 G99 Example

G81 drilling cycle usage with G98 G99
```N10 M06 T1
N20 G90 G00 X12.5 Y10 Z12 S1000 M03
N30 G99 G81 X12.5 Y10 Z-17 R2 F75
N40 Y30
N50 G98 X57.5
N60 G99 Y10
N70 G91 G80 G28 X0 Y0 Z0 M05
N80 M30```

## Repeat Drilling Example

Repeat drilling with G81 Drilling Cycle
```T1 M6
G00 G90 G40 G21 G17 G94
G54 X0 Y0 S1000 M03
G43 H1 Z100
Z3
G81 G99 G91 X20 Y20 R3 Z-20 K3 F100 M08
G80
G00 G90 Z100
M30```
OR
```T1 M6
G00 G90 G40 G21 G17 G94
G54 X20 Y20 S1000 M03
G43 H1 Z100
Z3
G81 G99 R3 Z-20 F100 M08
G91 X20 Y20 K2
G80
G00 G90 Z100
M30
----------------
```

# Drilling a Two Step Block with G81 Drilling Cycle

G81 drilling cycle program example which shows how a step block can be drilled economically.
The cnc program code is self explanatory, no complex technique is used.

## G81 Drilling Two Step Block

G81 Drilling Two Step Block
```N10 T4 M6   (TWIST DRILL 8”)
N15 G90 G54 G00 X15 Y15
N20 S1000 M3 F100
N25 G43 H01 Z2 M8
N30 G81 R2 Z-42
N35 X65
N40 Y85 R-13
N45 X15
N50 G80 Z50 M5
N55 M30

-------------
```

# Fanuc G68 Coordinate Rotation Program Example

Fanuc G68 Coordinate Rotation G-Code makes it easy for cnc machinist to run a pattern of operations in a rotated angle.
Here is a basic cnc programming Example which helps to understand the actual working of G68 coordinate rotation.

## Fanuc G68 Program Example

```T1 M6
G0 G90 G40 G21 G17 G94 G80
G54 X20 Y0 S1500 M3
G43 Z100 H1
Z5
G81 R3 Z-20 F? M8
X30
X45
G68 X0 Y0 R120
X20 Y0
X30
X45
G68 X0 Y0 R240
X20 Y0
X30
X45
G69 G80
G0 G90 Z100 M30

```