## Search

Showing posts with label CNC Programming Examples. Show all posts
Showing posts with label CNC Programming Examples. Show all posts

# 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 Drill will return to the Initial level
G99 Drill will return to R-plane.
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

```

# A CNC mill program for cnc machinists programmers, who have started to learning basic cnc programming techniques.

CNC Mill Example Program

### CNC Program

```        N40 G90 G00 X0 Y0
N50 G01 X-10 Y-20 R8         (P1)
N60 G01 X-50 R10             (P2)
N70 Y10                      (P3)
N80 X-19.97 Y25.01           (P4)
N90 G03 X7.97 Y38.99 R18     (P5)
N100 G01 X30 Y50             (P6)
N110 G91 X10.1 Y-10.1        (P7)
N120 G90 G02 X59.9 Y20.1 R14 (P8)
N130 G01 X70 Y10             (P9)
N140 Y-20 R10                (P10)
N150 X50                     (P11)
N160 G03 X30 R10             (P12)
N170 G01 X10 R8              (P13)
N180 X0 Y0```

### G M S T Codes Explanation

Code Description
G00 Rapid traverse
G01 Linear interpolation
G02 Circular interpolation CW
G03 Circular interpolation CCW
G90 Absolute command
G91 Increment command

# Haas Corner Rounding and Chamfering Example G01 C R

## Haas Corner Rounding and Chamfering

Haas CNC program example to show how Chamfer and Corner Radius can be programmed.

### Haas Chamfering

To program Chamfer
`N10 G01 X20 Y30 ,C3`

### Haas Corner Rounding

To program Radius
`N10 G01 X20 Y30 ,R3`

## Haas Corner Rounding and Chamfering Example

### Haas CNC Program

```            O1234 (Corner Rounding and Chamfering Example);
T1 M6;
G00 G90 G54 X0. Y0. S3000 M3; (P1)
G43 H01 Z0.1 M08;
G01 Z-0.5 F20.;
Y40. ,R10.;            (P2)
X50. ,C5.;             (P3)
Y0.;                   (P4)
G00 Z0.1 M09;
G53 G49 Z0.;
G53 Y0.;
M30;```

### Haas G M S T Codes

Code Description
G00 Rapid Motion
G01 Linear Interpolation Motion
G43 Tool Length Compensation +
G49 G43/G44 Cancel
G53 Non-Modal Machine Coordinate Selection
G54 Select Work Coordinate System l
G90 Incremental Programming
M3 Spindle On, Clockwise (S)
M6 Tool Change (T)
M08 Coolant On
M09 Coolant Off
M30 Program End and Reset
S Spindle speed
T Tool

-----------------------------------------------------------------

I Will Make A Manufacturable 3d Model And A Cnc Program For It
I Will Do Cnc Program For Molding, Laser Cutting Fusion 360 Cam
I Will Cnc Programming On Mastercam
I Will Make G Code Or Cnc Program For Your Design
I Will Create CNC Programs For You

# Chamfer and Radius Program Example with G01

CNC programming example code to demonstrate, how to program a Chamfer and Radius (Corner Rounding) with G01 G-code.
Easy to program and understand that even a beginner level CNC machinist can understand and program such sample codes.
Mostly works on Fanuc and similar CNC controls.
No extra G-code or technique is required. Just have to put a “C” for chamfer and an “R” for Radius in a cnc program block with G01 G-code. Chamfer is at 45° (45 degrees).
For a brief description of how Chamfer and Corner Radius are programmed with G01 G code read following cnc programming article Chamfer and Radius Programming with G01 G code.
Another such program example is here G01 Chamfer and Corner Rounding a CNC Program Example

## Chamfer and Radius with G01 G-Code

Chamfer and Radius Program Example with G01
```                N40 G01 X26 Z53
N50 G01 X26 Z27 R6
N60 G01 X86 Z27 C3
N70 G01 X86 Z0
---------------------------------------------------------
```

# G01 Chamfer and Corner Rounding a CNC Program Example

For a brief description of how Chamfer and Corner Radius are programmed with G01 G code read following cnc programming article
Chamfer and Radius Programming with G01 G code.
You might read other cnc example program articles, these cnc programming articles are a good cnc programming reference for cnc programmers/cnc machinists working on the shop floor.
• CNC Programming for Beginners a Simple CNC Programming Example
• CNC Programming Example in Inch Simple CNC Lathe Program
• Lathe CNC Programming Example
• CNC Milling Machine Programming Example for Beginners
• CNC G02 Circular Interpolation Clockwise CNC Milling Sample Program
The following cnc program example shows how actually Chamfer and Radius are programmed with G01 in a cnc lathe program.

## G01 Chamfer and Corner Rounding

CNC Programming Example of Chamfer and Corner Rounding with G01 G Code
```                    N5 ……
N6 G00 X0 Z3
N7 G01 Z0 F0.2
N8 X35 C2
N9 Z-40 R4
N10 X55 Z-52 F0.1
N11 X75 C2
N12 Z-76
N13 G00 X100 Z50
N14 ……

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

# Haas G71 Example Program

Haas cnc lathe uses one-line syntax of G71 roughing canned cycle.
This cnc program example shows the use of G71 turning cycle for ID roughing (Inside roughing).
You might like
• G71 Rough Turning Cycle One-line Format
• CNC Fanuc G71 Turning Cycle or Stock Removal Canned Cycle (Two-line format)
• Fanuc G70 G71 Rough and Finish Turning Cycle Program Example
• CNC Programming Example with Fanuc G71 Rough Turning Cycle and G70
In the below cnc programming example
1 – A boring bar is used for the whole the roughing operation with G71 Rough Turning Cycle.
2 – Same boring bar is used for finish cut with G70 Finishing Cycle.
Example of using a Haas G71 for I.D. Roughing and Finishing.

## Haas CNC Program Example

Haas G71 Example Program
```                        O1136
N1 T101
N2 G97 S2000 M03
N3 G54 G00 X0.7 Z0.1 M08
N4 G71 P5 Q12 U-0.01 W0.005 D0.08 F0.01
N5 G00 X4.5
N6 G01 X3. R.25 F.005
N7 Z-1.75 R.5
N8 X1.5 R.125
N9 Z-2.25 R.125
N10 X.75 R.125
N11 Z-3.
N12 X0.73
N13 G70 P5 Q12
N14 M09
N15 G53 X0
G53 Z0
M30```

## Haas CNC Program Explanation

N1 – Tool 1 Offset 1
N3 – Rapid to start position
N4 – U is a minus for G71 I.D. Roughing
N5 – N5 is start of part path geometry defined by P6 in G71 line
N12 – N12 is end of part path geometry defined by Q12 in G71 line
N13 – G70 Defines a finish pass for lines P5 through Q12
N15 – To send machine home for a tool change

-------------------------------------------------------------------------

# Fanuc CNC Program Example

Here is a cnc program example for Fanuc cnc control. This is a very simple and easy cnc program example also shows
• Use of G02 Arc/Radius in Fanuc cnc program
• Use of Chamfer in Fanuc cnc program
• Use of G42/G40 Tool Nose Compensation
• Use of G92 Maximum Spindle Speed
• Use of G96 Constant Cutting Speed

Fanuc CNC Program Example

## Fanuc CNC Program Code

```                            N10 T2
N20 G92 S1200 M42
N30 G96 S150 M04
N40 G00 X-1 Z5 M08
N50 G01 Z0 G42 F0.2
N60 G01 X24 C2
N70 G01 Z-28
N80 G01 X32 Z-50
N90 G01 Z-56
N100 G02 X40 Z-60 R4
N110 G01 Z-75
N120 G01 X60 G40
N130 G00 X150 Z100
N140 M30
----------------------------------------------------------------
```

# CNC Lathe Programming Example

A simple cnc lathe programming example. This cnc programming example will show how to program contours like chamfer taper grooves and arc.
This cnc program will use two tools for machining. The first tool used in this cnc programming example is a turning tooland the second one is a grooving tool.

### CNC Machining

The turning tool will first face the component then it will make a chamfer, after that there is straight turning and then there is arc machining the arc may be machined with R (Radius of arc) or arc can be machined with I and K values of the arc, at the top of arc there is a chamfer, then again straight turning, now there comes the groove but we can’t make grooves with turning tools because of their shape so we will machine the groove with our next tool which is solely made for grooving operations, but at the time we are machining with turning tool so we will just skip this groove and will just machine in straight line, after that there is a taper and again a straight line to be machined.
Now with our grooving tool the groove machining task is just easy.
if the grooving insert is of the same size as the dimension of the groove then grooving is even more easy, we will make the groove in one go, but if the grooving insert is of smaller width than we have to take depth more than one time.

### CNC Program

CNC lathe program example
```                                N1 T01 D01 M491
N2 G00 X0 Z1
N3 G01 G96 G41 Z0 F2 S140
N4 G01 X2 CHF=0.125 F0.2
N5 G01 Z-1.125
N6 G02 X3.5 Z-1.875 CR=0.75
N7 G01 X3.75 CHF=0.125
N8 G01 Z-3.575
N9 G01 X5 Z-3.875
N10 G01 Z-4.6
N11 G00 X20 Z20 G40
N12 T02 D02 M491
N13 G00 G97 S500 X4 Z-2.825
N14 G01 X3.85 F1
N15 G01 X3.35 F0.15
N16 G01 X3.85 F0.5
N17 G00 X4
N18 G00 X20 Z20
N19 M30```
--------------------------------------------------------------------------------------

# Internal Threading on Fanuc 21i 18i 16i with G76 Threading Cycle

* Best ebooks for CNC programming:

CNC program for the internal threading with G76 threading cycle on fanuc controls 21i/18i/16i.
For an example of external threading with G76 threading cycle read External Thread Cutting with G76 Threading Cycle on Fanuc 21i 18i 16i CNC
Fanuc 21i/18i/16i use two block format of G76 threading cycle.
Related: G76 Threading Cycle One Line Format for Fanuc 10/11/15T
Fanuc G76 threading cycle has multiple parameters making it difficult to remember, but at the same time those multiple parameters of G76 thread cycle give the cnc programmer/cnc machinist multiple options to control thread cutting, some are listed below.
G76 thread cutting cycle allow cnc machinist to control number of idle cuts, thread run-out, infeed angle.

## CNC Program of Internal Threading with G76 Threading Cycle

Internal Threading on Fanuc 21i 18i 16i with G76 Threading Cycle
```N17 T101
N18 G54
N19 G97 S800 M3
N20 G0 X25 Z6 M8
N21 G76 P010060 Q100 R0.02
N22 G76 X30 Z-40 P919 Q250 F1.5
N23 G0 X150 Z100

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

# G76 Thread Cycle a CNC Programming Example

G-code G76 is a cnc cycle which is used for thread cutting on cnc machines.
Threading cycle G76 is explained here G76 Thread Cycle.
Taper thread cutting with G76 thread cycle is explained here G76 Tapered Threading
For Multi-start thread cutting with G76 see G76 Multi-Start Threading
For G76 threading cycle one line see G76 One-Line Format.
G76 threading cycle can be used for internal threading on cnc lathe machines.
This G76 threading example actually cuts external threads on two different diameters.

## G76 Thread Cycle Example

G76 Thread Cycle a CNC Programming Example
```N10 T3
N20 G97 S800 M03
N30 G00 X30 Z5 T0303
N40 G76 P021060 QI00 R100
N50 G76 X18.2 Z-20 P900 Q200 FI.5
N60 G00 X50 Z-20
N70 G76 P021060 Ql00 R100
N80 G76 X38.2 Z-52 P900 Q200 FI .5
N90 G00 X200 Z200
N100 M30```