Thursday, August 2, 2018

CNC Programming Examples - Advanced Level

  Thanh A Tran       Thursday, August 2, 2018

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

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.2 Linear 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.

Programming

G72.2 P... L... I... J...

Parameters

ParameterDescription
PSubprogram number
LNumber of times the operation is repeated
IShift along X-axis
JShift along Y-axis
G-Code Data
Modal/Non-ModalG-Code Group
Non-Modal00

Programming Notes

Notes

  1. In the G72.2 block, addresses other than P, L, I and J are ignored.
  2. P, I and J must always be specified.
  3. If L is not specified, the figure is copied once.
  4. For shifts (I, J), specify increments. The n-th geometric shift is equal to the specified shift times (n – 1).

First block of the subprogram

Always specify a move command in the first block of a subprogram that performs a linear copy. If the first block contains only the program number such as O00001234; and does not have a move command, movement may stop at the start point of the figure made by the n-th (n = 1,2, 3, …) copying.
Example of an incorrect program
O00001234 ;
            G00 G90 X100.0 Y200.0 ;
                ;
                ;
            M99 ;
Example of a correct program
O00001000 G00 G90 X100.0 Y200.0 ;
                ;
                ;
            M99 ;

Limitation

Specifying two or more commands to copy a figure
G72.2 cannot be specified more than once in a subprogram for making a linear copy (If this is attempted, alarm PS0901will occur).
In a subprogram that specifies linear copy, however, rotational copy (G72.1) can be specified. Similarly, in a subprogram that specifies rotational copy, linear copy can be specified.
Commands that must not be specified
Within a program that performs a linear copy, the following must not be specified:
Command for changing the selected plane (G17 to G19)
Command for specifying polar coordinates (G16)
Reference position return command(G28)
Axis switching
Coordinate system rotation (G68)
scaling (G51)
programmable mirror image (G51.1)
Single block
Single-block stops are not performed in a block with G721.1 or G72.2.

G72.2 Programming Example


Main program
O3000 ;
            N10 G90 G00 X-30. Y0 ;
            N20 X0 ;
            N30 G01 G17 G41 X30. D01 F100 ; (P0)
            N40 Y20. ;                      (P1)
            N50 X40. ;                      (P2)
            N60 G72.2 P3100 L3 I90.0 J0 ;
            N70 G90 X310. Y0 ;              (P8)
            N80 X0 ;
            N90 G40 G00 X-30.0 ;
            N100 M30 ;
Sub program
O3100 G91 G01 X20. ; (P3)
            N100 Y30. ;          (P4)
            N200 G02 X40. I20. ; (P5)
            N300 G01 Y-30. ;     (P6)
            N400 X30. ;          (P7)
            N500 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.

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 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


logoblog

Thanks for reading CNC Programming Examples - Advanced Level

Previous
« Prev Post

No comments:

Post a Comment