You are on page 1of 93

Fanuc Lathe Programming

Chapter 1 - Startup
Program Number / Program Name
Program Number
All Fanuc programs written or transferred into the control must begin with a four digit program
number. The format for the program number is as follows :

O_ _ _ _ ;

The program number can range from :

O 0001 ;

to :

O 9999 ;

Each block in the program including the program number block must end with an “end of block”
character / semi-colon ( ; ). The Fanuc control recognises this as the separation character between
successive program blocks.

Some program numbers can also be used to prevent the operator from editing that program. This is
achieved by setting certain parameters in the control. The following details the program numbers and
parameters that need to be set in order to achieve program edit protection :

O 0001 ;  O 7999 ; These program numbers are used for standard user programs and cannot be
protected by parameter changes.

O 7999 ;  O 8999 ; These program numbers can be protected from edit mode by setting
parameter 3202 bit 0 / NE8 (3202 # 0) to 1. These program numbers are
usually used for customer written macro programs.

O 8999 ;  O 9999 ; These program numbers can be protected from edit mode by setting
parameter 3202 bit 4 / NE9 (3202 # 4) to 1. These program numbers are
used for machine tool builder macro programs.

Program Name
Fanuc programs can also be given a program name. The program name must appear in the first
program block next to the program number e.g.

O 0001 (PROGRAM NAME) ;

The program name can have a maximum of 30 alpha / numeric characters, however only 17
characters can be displayed on the Fanuc control display screen as the program name when in Auto
and Edit mode.
The program name also appears next to the program number when in Edit mode with the program
directory (DIR) screen displayed.

Spindle Speed Control G97 (RPM) & G96 (Constant


Surface Speed) & G50 (Maximum Spindle Speed Clamp)
1 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup

The spindle speed is controlled using one of two modal G codes :


G97 S*** for direct revs per minute input (cancels G96).
G96 S*** for constant surface speed (cut speed).
Constant Surface Speed - G96
After a G96 command is specified, the program enters the constant surface speed (CSS) control mode
and specified S values are assumed as a surface speed (cut speed). When the system is in CSS mode,
the control continually updates the spindle speed based on the location of the tool point with reference
to the centre of rotation.
The spindle speed is not updated when in rapid traverse mode, as cutting should not occur in rapid
traverse mode. The spindle speed is only updated when in interpolation mode.
The control retains the programmed spindle speed and will only start revolving the spindle when the
required M-code for the spindle direction is programmed.
Maximum Spindle Speed Clamp (for C.S.S) - G50
When machining using constant surface speed it is sometimes necessary to limit the spindle speed of
the operation due to the work holding device or physical size of the component. This is achieved by
programming the maximum spindle speed clamp code G50 S_ _ _ _ ; prior to the G96 block. The G50
maximum spindle speed is retained by the control until the control is turned off or another G50 block
is programmed, thus only one G50 S _ _ _ _ ; block need be programmed in any one program.

e.g. G0 X100 Z1 (Rapid to start position) ;


G50 S4000 (Clamp maximum speed to 4000 rpm) ;
G96 S300 M4 (Input speed and direction) ;
G1 G99 F0.25 X-2.4 (Feed to position) ;
Spindle Direction M4 - Clockwise / M3 - Counter Clockwise

Cutting Feed Rate


Linear Interpolation - G1

2 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
A linear interpolation G1 block moves all programmed axes from the current position a long a straight
line vector to the commanded position at the programmed feed rate.

The G1 preparatory function is subject to the following programming rules :

1. The command position may be expressed in absolute (X & Z) or incremental (U & W) co-
ordinates.
2. The G1 code is modal and remains in effect until replaced by another interpolation G-code.
3. The feed rate command may be expressed in terms of feed distance per minute (G98), or feed
distance per spindle revolution (G99).

G1 - Linear Interpolation

Feed per Minute Feed Rate - G98


In this mode, the F-word specifies the velocity of the tool along the tool path in inches (G20) or
millimetres (G21). The feed rate specified by the F-word is the velocity along the tool path, either
along the straight line specified or along the tangent to a circle arc. In all motions, the control
automatically limits the feed rate such that no axis exceeds its maximum allowable feed rate.

G98 - Feed per Minute Feed Rate

Feed per Spindle Revolution feed rate - G99


In this mode, the F-word specifies the feed rate as a feed distance per spindle revolution. This is the
preferred feed mode for turning operations. G99 feed rate is useful when the cutting process requires
accurate chip load. At control power on the feed per spindle revolution is active.

G99 - Feed per Spindle Revolution Feed Rate

Rapid Traverse Positioning G0


Rapid Traverse G0
A rapid traverse G0 block moves each machine axis from the current position to the commanded
position at the machine’s maximum rate for each axis. In absolute mode (G0 X_ Z_) the co-ordinate
value of the end point is programmed, in incremental mode (G0 U_ W_) the distance the tool moves
is programmed.

3 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
Either of the following tool paths can be selected according to parameter 1401 (LRP).

Non-linear Interpolation Positioning


The tool is positioned with the rapid traverse rate for each axis separately. The tool path can be dog-
legged.

Linear Interpolation Positioning


The tool path is the same as in linear interpolation - G1. The tool is positioned within the shortest
possible time at a speed that is not more than the rapid traverse rate for each axis.
For G28 return to reference position and G53 machine co-ordinate programming the tool positions
along the non-linear interpolation path even if linear rapid traverse positioning has been specified.

4 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
Programming Abs / Inc Co-ordinates Exercise (No.1) Answer

Part Program (Start Point to End Point) Abs / Inc Co-ordinates


O1001 (ABS INC PROGRAM) ;
(START POINT TO END POINT) ;
G50 S3500 ;
N10 G21 G40 G99 ;
G0 G28 U0 W0 ;
T0101 ;
X40 Z2 ;
G96 S200 M4 ;
G1 Z-15 F0.5 ;
U39 ;
Z-30 ;
X95 ;
W-28 ;
U23 ;
Z-70 ;
U12 ;
W-10 ;
X164 ;
G0 X200 Z100 ;
G28 U0 W0 (RETURN TO REFERENCE POS) ;
M30 ;

5 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
Programming Abs / Inc Co-ordinates Exercise (No.1)

Part Program (Start Point to End Point) Abs / Inc Co-ordinates


O1001 (ABS INC PROGRAM) ;
(START POINT TO END POINT) ;
G50 S3500 ;
N10 G21 G40 G99 ;
G0 G28 U0 W0 ;
T0101 ;
X40 Z2 ;
G96 S200 M4 ;
G1 Z _ _ _ F0.5 ;
U___;
Z___;
X___;
W___;
U___;
Z___;
U___;
W___;
X___;
G0 X200 Z100 ;
G28 U0 W0 (RETURN TO REFERENCE POS) ;
M30 ;

6 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
Programming Absolute Co-ordinates

The Fanuc Oi control always assumes that :


1. X & Z part program co-ordinates are absolute program co-ordinates from the
program zero (datum) position.
2. X axis part program co-ordinates are always specified as diameter values.

Part Program (Start Point to End Point) Absolute Co-ordinates


O1001 (ABSOLUTE PROGRAM) ;
(START POINT TO END POINT) ;
G50 S3500 ;
N10 G21 G40 G99 ;
G0 G28 U0 W0 ;
T0101 ;
X60 Z2 ;
G96 S200 M4 ;
G1 Z-20 F0.5 ;
X95 ;
Z-30 ;
X115 ;
Z-50 ;
X140 ;
Z-80 ;
X164 ;
G0 X200 Z100 ;
G28 U0 W0 (RETURN TO REFERENCE POS) ;
M30 ;

Circular Interpolation
7 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
G2 - Clockwise circular arc interpolation word addresses
G2 X(U) Z(W) R(I K)
X = X-axis endpoint dimension (ABS).
or
U = Distance to the endpoint from the start point in diameter for the X-axis (with sign + / -).
Z = Z-axis endpoint dimension (ABS).
or
W = Distance to the endpoint from the start point for the Z-axis (with sign + / -).
R = Circular arc radius.
or
I = X-axis distance (radius) to the arc centre point from the arc start point (with sign + / -).
K = Z-axis distance to the arc centre point from the arc start point (with sign + / -).

Example Programs
G0 X65 Z5 ;
G1 G42 X60 Z0 ;
G2 X160 Z-55 R70 ;
or
G2 X160 Z-55 I68.89 K12.4 ;
or
G2 U100 W-55 R70 ;
or
G2 U100 W-55 I68.89 K12.4 ;

8 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
Circular Interpolation (cont)
G3 - Counter clockwise circular arc interpolation word addresses
G3 X(U) Z(W) R(I K)
X = X-axis endpoint dimension (ABS).
or
U = Distance to the arc endpoint from the start point in Diameter for the X-axis (with sign + / -).
Z = Z-axis endpoint dimension (ABS).
or
W = Distance to the endpoint from the start point for the Z-axis (with sign + / -).
R = Circular arc radius.
or
I = X-axis distance (radius) to the arc centre point from the arc start point (with sign + / -).
K = Z-axis distance to the arc centre point from the arc start point (with sign + / -).

Example Programs
G0 X65 Z5 ;
G1 G42 X60 Z0 ;
G3 X160 Z-55 R70 ;
or
G3 X160 Z-55 I-18.89 K-67.4 ;
or
G3 U100 W-55 R70 ;
or
G3 U100 W-55 I-18.89 K-67.4 ;

9 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
Circular Interpolation (cont)
General Guidelines

 Before programming G2 clockwise circular interpolation or G3 counter clockwise circular


interpolation the tool must be positioned at the start of the arc .

 The endpoint of the arc is specified in the G2 / G3 block.

 Either the radius of the arc (R word in G2 / G3 block) or the circle centre position (I & K words)
can be used to specify the arc.

 Any of the following can be used to specify the arc and its endpoint:

G - Code Endpoint X Endpoint Z Radius / CC


G2 / G3 X Z R
X Z I K
X W R
X W I K
U Z R
U Z I K
U W R
U W I K

 When either the I word or K word are equal to zero e.g. I0 or K0 they can be omitted from the
program block.

 If I, K and R address are specified simultaneously in the same block, the arc specified by the
address R takes precedence and the other arc is ignored.

Chamfering and Corner Radius with TNRC Example (No.1)

10 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup

Part Program (Start Point to End Point)


O1001 (CHAMFER RADIUS BLEND) ;
(START POINT TO END POINT) ;
G50 S2500 ;
N10 G21 G99 G40 ;
G0 G28 U0 W0 ;
T0101 ;
X60 Z2 ;
G96 S250 M4 ;
G1 G42 Z0 F0.35 ;
Z-25 R5 ;
X105 K-4 ;
Z-56.5 R3 ;
X113 ;
G40 X117 ;
G0 G28 U0 W0 ;
M30 ;

Chamfering and Corner Radius with TNRC Example (No.2)


11 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup

Part Program (Start Point to End Point)


O1002 (CHAMFER RADIUS BLEND) ;
(START POINT TO END POINT) ;
G50 S2500 ;
N10 G21 G99 G40 ;
G0 G28 U0 W0 ;
T0202 ;
X113 Z2 ;
G96 S250 M4 ;
G1 G41 Z0 F0.35 ;
Z-25 R-5 ;
X68 K-4 ;
Z-56.5 R-3 ;
X40 ;
G40 X36 ;
G0 Z2 ;
G28 U0 W0 ;
M30 ;

Chamfering and Corner Radius with TNRC Example (No.3)

12 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup

Part Program (Start Point to End Point)


O1001 (CHAMFER RADIUS BLEND) ;
(START POINT TO END POINT) ;
G50 S2500 ;
N10 G21 G99 G40 ;
G0 G28 U0 W0 ;
T0101 ;
X60 Z2 ;
G96 S250 M4 ;
G1 G42 Z0 F0.35 ;
Z-25 R5 ;
X105 R-4 ;
Z-56.5 R3 ;
X113 ;
G40 X117 ;
G0 G28 U0 W0 ;
M30 ;

Chamfering and Corner Radius with TNRC Example (No.4)

13 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup

Part Program (Start Point to End Point)


O1004 (CHAMFER RADIUS BLEND) ;
(START POINT TO END POINT) ;
G50 S2500 ;
N10 G21 G99 G40 ;
G0 G28 U0 W0 ;
T0202 ;
X113 Z2 ;
G96 S250 M4 ;
G1 G41 Z0 F0.35 ;
Z-25 R-5 ;
X68 R-4 ;
Z-56.5 R-3 ;
X40 ;
G40 X36 ;
G0 Z2 ;
G28 U0 W0 ;
M30 ;

Circular Clockwise G2 with TNRC Example (No.1)

14 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup

Part Program (Start Point to End Point)


O1001 (G2 INTERPOLATION) ;
(START POINT TO END POINT) ;
G50 S3000 ;
N10 G21 G99 G40 ;
G0 G28 U0 W0 ;
T0101 ;
X60 Z2 ;
G96 S300 M4 ;
G1 G42 Z0 F0.3 ;
Z-15 ;
G2 X140 Z-55 R40 ; OR G2 X140 Z-55 I40 K0 ;
G1 X160 ;
G40 X164 ;
G0 X200 Z150 ;
G28 U0 W0 ;
M30 ;

15 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
Circular Interpolation G3 - G2 Exercise (No.1) Answer

Part Program (Start Point to End Point)


O1001 (G3 G2 INTERPOLATION) ;
(START POINT TO END POINT) ;
G50 S3000 ;
N10 G21 G99 G40 ;
G0 G28 U0 W0 ;
T0101 ;
X60 Z2 ;
G96 S300 M4 ;
G1 G42 Z0 F0.3 ;
Z-20 ;
G2 X70 Z-25 R5 ;
G1 X90 ;
G3 X105 Z-32.5 R7.5 ;
G1 Z-47.5 ;
G2 X123 Z-56.5 I9 K0 ;
G1 X133 ;
G3 X160 Z-70 I0 K-13.5 ;
G1 Z-80 ;
X164 ;
G40 X168 ;
G0 X200 Z150 ;
G28 U0 W0 ;
M30 ;

16 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
Circular Interpolation G3 - G2 Exercise (No.1)

Part Program (Start Point to End Point)


O1001 (G3 G2 INTERPOLATION) ;
(START POINT TO END POINT) ;
G50 S3000 ;
N10 G21 G99 G40 ;
G0 G28 U0 W0 ;
T0101 ;
X60 Z2 ;
G96 S300 M4 ;
G_____ G_____ Z_____ F0.3 ;
Z_____ ;
G_____ X_____ Z_____ R_____ ;
G_____ X_____ ;
G_____ X_____ Z_____ R_____ ;
G_____ Z_____ ;
G_____ X_____ Z_____ I_____ K_____ ;
G_____ X_____ ;
G_____ X_____ Z_____ I_____ K_____ ;
G_____ Z_____ ;
X_____ ;
G40 X_____ ;
G0 X200 Z150 ;
G28 U0 W0 ;
M30 ;
Circular Counter Clockwise G3 with TNRC Example (No.1)
17 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup

Part Program (Start Point to End Point)


O1001 (G3 INTERPOLATION) ;
(START POINT TO END POINT) ;
G50 S3000 ;
N10 G21 G99 G40 ;
G0 G28 U0 W0 ;
T0101 ;
X20 Z2 ;
G96 S300 M4 ;
G1 G42 X40 Z0 F0.3 ;
X60 ;
G3 X120 Z-30 R30 ; OR G3 X120 Z-30 I0 K-30 ;
G1 Z-40 ;
X140 ;
G40 X144 ;
G0 X200 Z150 ;
G28 U0 W0 ;
M30 ;

18 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
Programming Incremental Co-ordinates

Programming incremental co-ordinates on the Fanuc Oi control is achieved by:


1. Specifying U _ _ for the distance to be moved in the X - axis.
2. Specifying W _ _ for the distance to be moved in the Z - axis.

Part Program (Start Point to End Point) Incremental Co-


ordinates
O1001 (INCREMENTAL PROGRAM) ;
(START POINT TO END POINT) ;
G50 S3500 ;
N10 G21 G40 G99 ;
G0 G28 U0 W0 ;
T0101 ;
X60 Z2 ;
G96 S200 M4 ;
G1 W-22 F0.5 ;
U35 ;
W-10 ;
U20 ;
W-20 ;
U25 ;
W-30 ;
U24 ;
G0 X200 Z100 ;
G28 U0 W0 (RETURN TO REFERENCE POS) ;
M30 ;

19 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
Tool Nose Radius Compensation Example (No.1)

Tool (Geometry) Table data for correct program execution.


T01 Tool Nose Vector = 3
T01 Tool Nose Radius = 0.8

Part Program (Start Point to End Point)


O1001 (TNRC EX1) ;
(START POINT TO END POINT) ;
G50 S3500 (MAX SPINDLE SPEED CLAMP) ;
N10 G21 G99 G40 ;
G0 G28 U0 W0 ;
T0101 ;
X64 Z2 (RAPID TO START UP ZONE) ;
G96 S200 M4 (CONSTANT SURFACE SPEED) ;
G1 G42 F0.3 X60 Z0 (START UP MOVE ON TO WORKPIECE) ;
Z-20 ;
X100.41 Z-55 ;
X120 ;
X160 Z-66.547 ;
Z-80 ;
X164 ;
G40 X168 (CANCEL COMPENSATION) ;
G0 X200 Z200 ;
G28 U0 W0 ;
M30 ;

20 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
Tool Nose Radius Compensation Example (No.2)

Tool (Geometry) Table data for correct program execution.


T02 Tool Nose Vector = 2
T02 Tool Nose Radius = 1.2

Part Program (Start Point to End Point)


O1001 (TNRC EX2) ;
(START POINT TO END POINT) ;
G50 S3000 (MAX SPEED CLAMP) ;
N10 G21 G99 G40 ;
G0 G28 U0 W0 ;
T0202 ;
X87 Z4.5 (RAPID TO START UP ZONE) ;
G96 S200 M4 (CONSTANT SURFACE SPEED) ;
G1 G41 F0.3 X83 Z0 (START UP MOVE ON TO WORKPIECE) ;
X80 Z-1.5 ;
Z-20 ;
X70 Z-35 ;
X60 ;
Z-55 ;
X50 Z-70 ;
X43 ;
X40 Z-71.5 ;
G40 X34 Z-72.5 (CANCEL COMPENSATION) ;
G0 Z100 ;
G28 U0 W0 ;
M30 ;

Tool Nose Radius Compensation


21 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
Turning tool inserts are constructed with a radius at the cutting tip. When part profiles contain radius
(circular cutting) or tapers (angular cutting) the tool nose radius of the cutting tool needs careful
consideration. See below.

The NC part program work surface co-ordinates can be altered (X & Z above) to account for this
radius at the cutting tip, or the tool nose radius compensation feature can used to automatically offset
the tool tip from the work surface co-ordinates.
Tool Nose Radius Compensation (TNRC) is activated by programming G41 if the tool is to the left of
the workpiece when viewed in the cut direction or G42 if the tool is to the right of the workpiece
in the cut direction. TNRC is cancelled by programming G40.

G42 - TNRC on the RIGHT in the cut direction.

G41 - TNRC on the LEFT in the cut direction.

G40 - TNRC off.

General Guidelines for using TNRC

 G40, G41 and G42 are modal.

 Don’t program G41 when in G41 mode else compensation will be affected.

 Don’t program G42 when in G42 mode else compensation will be affected.

22 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
Tool Nose Radius Compensation (cont)
General Guidelines for using TNRC (cont)
 The “actual tool nose radius” of the desired tool must be specified in the R register
of the tool geometry table. Only input positive values.

 TNRC should only be activated / programmed (in the start-up block) when in a
linear interpolation mode (G1- linear interpolation).

 TNRC can be cancelled (G40) when in linear interpolation mode or rapid mode.

 Before activating TNRC (G41 / G42) the imaginary tool point must be positioned
within the “Start-Up Zone” to ensure correct part geometry. Allow the tool to stand
off the workpiece by at least the tool nose radius. See below.

 Only one non-motion program block can be executed between axis moves when
TNRC is active.

 Always cancel TNRC (G40) after the tool has moved off the part profile.

23 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
Tool Nose Radius Compensation (cont)
General Guidelines for using TNRC (cont)
 The direction of the imaginery tool point (Tool Nose Vector) must be specified in
the T register of the tool geometry table. See below.

24 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
Setting X Axis Tool Offsets
To set the X axis geometry offset complete the following.
1. Manually index to the tool to be set.
2. Position the tool using JOG and the HANDWHEEL so that a trial cut can be taken in the Z axis.
3. In MDI mode start the spindle (e.g. G97 S1000 M4; INSERT; CYCLE START).
4. Using the HANDWHEEL take a trial cut in the Z axis. DO NOT MOVE THE X AXIS.

5. In MDI mode stop the spindle (e.g. M5 ; INSERT ; CYCLE START).


6. Measure the diameter of the trial cut.
7. Press the offset setting function key on the MDI keypad.
8. Press the [OFFSET] soft key.
9. Press the [GEOM] soft key.
10. Using the cursor keys, position the cursor to the X-axis geometry offset to be set (e.g. G 02).
11. Type in “X” followed by the measured diameter from the trial cut (e.g. X95.685).
12. Press the [MEASURE] soft key.

The new X axis geometry offset will over write the existing geometry offset and
reset the appropriate wear offset to zero.

Setting Z Axis Tool Offsets


25 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup

To set the Z axis geometry offset complete the following.


1. Manually index to the tool to be set.
2. Using JOG mode and the HANDWHEEL position the tool so that it is “feeler proof” on the slip
gauge (e.g. 10mm) against program zero. DO NOT MOVE THE Z AXIS.

3. Press the offset setting function key on the MDI keypad.


4. Press the [OFFSET] soft key.
5. Press the [GEOM] soft key.
6. Using the cursor keys, position the cursor to the Z axis geometry offset to be set (e.g. G 02).
7. Type in “Z10” if the slip gauge was 10mm wide.
8. Press the [MEASURE] soft key.

The new Z axis geometry offset will over write the existing geometry offset and
reset the appropriate wear offset to zero. The recorded tool length will be the
difference between the current tool and the zero tool.

G74 End Face Peck Drilling Cycle

26 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
End Face Peck Drilling Parameters (G74)
G74 R(e)
G74 Z(W) X(U) P(i) Q(k) R(d) F(f)
R(e) = Escape distance after each peck. Also specified by parameter No. 5139 (microns).
Z(W) = Z axis (abs) endpoint or incremental distance (W).
Q(k) = Peck increment in the Z axis specified in microns.
F(f) = Feedrate.
X(U) = X axis (abs) endpoint or incremental distance (U). NOT USED FOR DRILLING.
P(i) = Movement amont in X axis. NOT USED FOR DRILLING.
R(d) = Relief distance in the X axis at hole bottom. NOT USED FOR DRILLING.

General Guidelines
 Before programming a G74 end face peck drilling cycle the tool must be positioned at the
cycle start point (i.e. at the X axis centreline).
 For standard right hand cutting drills the spindle direction should be set to M3 or M13 (counter
clockwise rotation).
 The word addresses P, X, R are not to be programmed in the second G74 block. These addresses
are used for end face grooving only.
 After the G74 cycle the tool returns to the cycle start point.
 A peck distance Q must be specified else an alarm is displayed.

G74 End Face Peck Drilling Example (No.1)

27 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup

Part Program
O1001 (G74 EXAMPLE 1) ;
(END FACE PECK DRILLING CYCLE) ;
G50 S3500 ;
N10 G21 G99 G40 ;
G0 G28 U0 W0 ;
T1010 ;
G97 S3000 M3 ;
X0 Z3 (CYCLE START POINT) ;
G74 R1 ;
G74 Z-30 Q10000 F0.35 M8 ; Q10000 = 10mm Peck Distance
G0 G28 U0 W0 M9 ;
M30 ;

28 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
G74 End Face Peck Grooving Example (No.2)

Part Program
O1001 (G74 EXAMPLE 2) ;
(END FACE PECK GROOVING CYCLE) ;
G50 S3000 ;
N10 G21 G99 G40 ;
G0 G28 U0 W0 ;
T1212 ;
G96 S200 M4 ;
X40 Z1 (CYCLE START POINT) ;
G74 R1 ;
G74 X20 Z-12 Q2000 P3600 F0.2 M8 ;
G0 Z10 ;
G28 U0 W0 M9 ;
M30 ;

G74 End Face Peck Grooving Cycle


29 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
End Face Peck Grooving Parameters (G74)
G74 R(e)
G74 Z(W) X(U) P(i) Q(k) R(d) F(f)
R(e) = Escape distance after each peck. Also specified by parameter No. 5139 (microns).
Z(W) = Z axis (abs) endpoint or incremental distance (W).
Q(k) = Peck increment in the Z axis specified in microns.
F(f) = Feedrate.
X(U) = X axis (abs) endpoint or incremental distance (U).
P(i) = Movement amont in X axis specified in microns.
R(d) = Relief distance in the X axis at groove bottom. NOT USED FOR GROOVING.

General Guidelines
 Before programming a G74 end face peck grooving cycle the tool must be positioned at the
cycle start point.
 Due to restricted clearance around an end face grooving tool always start the end face grooving
cycle at the major diameter and work towards the minimum diameter.
 After the G74 cycle the tool returns to the cycle start point.
 A peck distance Q must be specified else an alarm is displayed.

G75 OD / ID Peck Grooving Cycle


30 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup

OD / ID Peck Grooving Parameters (G75)


G75 R(e)
G75 Z(W) X(U) P(i) Q(k) R(d) F(f)
R(e) = Escape distance after each peck. Also specified by parameter No. 5139 (microns).
Z(W) = Z axis (abs) endpoint or incremental distance (W).
Q(k) = Peck increment in the Z axis specified in microns.
F(f) = Feedrate.
X(U) = X axis (abs) endpoint or incremental distance (U).
P(i) = Peck increment in the X axis specified in microns.
R(d) = Relief distance in the Z axis at groove bottom. NOT USED.

General Guidelines
 Before programming a G75 OD / ID peck grooving cycle the tool must be positioned at the
cycle start point.
 After the G75 cycle the tool returns to the cycle start point.
 A peck distance P must be specified else an alarm is displayed.

31 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
G75 OD Peck Grooving Example (No.1)

Part Program
O1001 (G75 EXAMPLE 1) ;
(OD PECK GROOVING CYCLE) ;
G50 S3000 ;
N10 G21 G99 G40 ;
G0 G28 U0 W0 ;
T0404 ;
G96 S200 M4 ;
X52 Z-33 (CYCLE START POINT) ;
G75 R1 ;
G75 X28 Z-16 Q4500 P3000 F0.2 M8 ;
G0 X60 ;
G28 U0 W0 M9 ;
M30 ;

32 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
G75 ID Peck Grooving Example (No.2)

Part Program
O1001 (G75 EXAMPLE 2) ;
(ID PECK GROOVING CYCLE) ;
G50 S3000 ;
N10 G21 G99 G40 ;
G0 G28 U0 W0 ;
T0505 ;
G96 S200 M4 ;
Z2 ;
X26 ;
X28 Z-20 (CYCLE START POINT) ;
G75 R1 ;
G75 X41.5 Z-11 Q2700 P2000 F0.2 M8 ;
G0 X26 ;
Z2 ;
G28 U0 W0 M9 ;
M30 ;

33 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
Constant Lead Threading G32 Example (No.1)

Part Program
O1001 (G32 EXAMPLE 1) ;
(SINGLE PASS THREADING) ;
G50 S3500 ;
N10 G21 G99 G40 ;
G0 G28 U0 W0 ;
T0404 ;
G97 S1000 M3 ;
X19.2 Z7 ;
G32 Z-49 F2 M8 ;
G0 X21 ;
Z7 ;
X18.6 ;
G32 Z-49 ;
G0 X21 ;
Z7 ;
X18 ;
G32 Z-49 ;
G0 X21 ;
Z7 ;
X17.6 ;
G32 Z-49 ;
G0 X21 ;
Z7 ;
X17.55 ;
G32 Z-49 ;
G0 X21 ;
X100 Z100 M9 ;
G28 U0 W0 ;
M30 ;

34 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
Constant Lead Multi-Start Threading G32 Example (No.2)

Part Program
O1002 (G32 EXAMPLE 2) ; G0 X21 ;
(MULTI-START THREADING) ; Z18 ;
G50 S3500 ; X17.55 ;
N10 G21 G99 G40 ; G32 Z-49 Q120000 ;
G0 G28 U0 W0 ; G0 X21 ;
T0404 ; Z18 ;
G97 S1000 M3 ; X17.55 ;
X18.5 Z18 ; G32 Z-49 Q240000 ;
G32 Z-49 F6 M8 ; G0 X21 M9 ;
G0 X21 ; G28 X100 Z50 ;
Z18 ; M30 ;
X18.5 ;
G32 Z-49 Q120000 ;
G0 X21 ;
Z18 ;
X18.5 ;
G32 Z-49 Q240000 ;
G0 X21 ;
Z18 ;
X18 ;
G32 Z-49 ;
G0 X21 ;
Z18 ;
X18 ;
G32 Z-49 Q120000 ;
G0 X21 ;
Z18 ;
X18 ;
G32 Z-49 Q240000 ;
G0 X21 ;
Z18 ;
X17.55 ;
G32 Z-49 ;

35 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
Constant Lead Multi-Start Threading G32 Example (No.2)

Part Program
O1002 (G32 EXAMPLE 2) ; G0 X21 ;
(MULTI-START THREADING) ; Z18 ;
G50 S3500 ; X17.55 ;
N10 G21 G99 G40 ; G32 Z-49 Q120000 ;
G0 G28 U0 W0 ; G0 X21 ;
T0404 ; Z18 ;
G97 S1000 M3 ; X17.55 ;
X18.5 Z18 ; G32 Z-49 Q240000 ;
G32 Z-49 F6 M8 ; G0 X21 M9 ;
G0 X21 ; G28 X100 Z50 ;
Z18 ; M30 ;
X18.5 ;
G32 Z-49 Q120000 ;
G0 X21 ;
Z18 ;
X18.5 ;
G32 Z-49 Q240000 ;
G0 X21 ;
Z18 ;
X18 ;
G32 Z-49 ;
G0 X21 ;
Z18 ;
X18 ;
G32 Z-49 Q120000 ;
G0 X21 ;
Z18 ;
X18 ;
G32 Z-49 Q240000 ;
G0 X21 ;
Z18 ;
X17.55 ;
G32 Z-49 ;

36 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
Multiple Pass Threading G76 Example (No.1)

Part Program
O1001 (G76 EXAMPLE 1) ;
(MULTIPLE PASS THREADING CYCLE) ;
G50 S2000 ;
N10 G21 G99 G40 ;
G0 G28 U0 W0 ;
T0404 ;
G97 S1000 M3 ;
X22 Z7 (CYCLE START POINT) ;
G76 P020060 Q100 R0.05 M8 ;
G76 X17.55 Z-49 R0 P1225 Q400 F2 ;
G0 G28 U0 W0 M9 ;
M30 ;

37 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
Multiple Pass Threading G76 Example (No.2)

Part Program
O1002 (G76 EXAMPLE 2) ;
(MULTIPLE PASS THREADING CYCLE) ;
G50 S2000 ;
N10 G21 G99 G40 ;
G0 G28 U0 W0 ;
T0202 ;
G97 S1000 M3 ;
X23 Z8 (CYCLE START POINT) ;
G76 P021055 Q100 R0.05 M8 ;
G76 X28.04 Z-21 P1470 Q400 F2.309 R0.9 ;
G0 G28 U0 W0 M9 ;
M30 ;

38 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
Multiple Pass Threading G76
Multi-Start Thread Example (No.3)

Part Program
O1001 (G76 EXAMPLE 3) ;
(MULTIPLE PASS THREADING CYCLE) ;
G50 S2000 ;
N10 G21 G99 G40 ;
G0 G28 U0 W0 ;
T0404 ;
G97 S1000 M3 ;
X22 Z16 (1ST START POINT) ;
G76 P020060 Q100 R0.05 M8 ;
G76 X17.55 Z-49 R0 P1225 Q400 F2 ;
G0 Z14 (2ND START POINT) ;
G76 X17.55 Z-49 R0 P1225 Q400 F2 ;
G0 Z12 (3RD START POINT) ;
G76 X17.55 Z-49 R0 P1225 Q400 F2 ;
G0 G28 U0 W0 M9 ;
M30 ;

39 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
Multiple Pass Thread Cutting Cycle G76
Multiple Pass Thread Cutting Cycle Parameters (G76)
G76 P(m)(r)(a) Q(dmin) R(d)
G76 X(U) Z(W) R(i) P(k) Q(d1) F
(m) = 2 digit number of spring passes also specified by parameter 5142.
(r) = 2 digit value for calculating chamfer dist also specified by parameter 5130.
(a) = 2 digit angle of tool tip 80, 60, 55, 30, 29, 0, also specified by parameter 5143.
Q(dmin) = minimum radial cutting depth in microns also specified by parameter 5140.
R(d) = finish pass depth of cut for spring passes also specified by parameter 5141.
X(U) = X axis endpoint of thread.
Z(W) = Z axis endpoint of thread.
R(i) = X axis travel for taper threading (not programmed for straight threads).
F = thread lead Z axis.
Q(d1) = depth of 1st cut in microns.
P(k) = height of thread in microns.

The value of P(m)(r)(a) Q(dmin) R(d) are stored in parameter and are overwritten by part program. If
the parameter values are o.k. then the first G76 block can be omitted.

40 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup

41 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
Constant Lead Threading G92 Example (No.1)

Part Program
O1001 (G92 EXAMPLE 1) ;
(BASIC THREADING CYCLE) ;
G50 S3000 ;
N10 G21 G99 G40 ;
G0 G28 U0 W0 ;
T0404 ;
G97 S1000 M3 ;
X22 Z7 M8 (CYCLE START POINT) ;
G92 X19.4 Z-49 F2 ;
X19 ;
X18.6 ;
X18.2 ;
X17.8 ;
X17.6 ;
X17.55 ;
G0 X80 Z300 M9 ;
G28 U0 W0 ;
M30 ;

42 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
Constant Lead Threading G92 Example (No.2)

Part Program
O1002 (G92 EXAMPLE 2) ;
(BASIC THREADING CYCLE) ;
G50 S2000 ;
N10 G21 G99 G40 ;
G0 G28 U0 W0 ;
T0202 ;
G97 S1000 M3 ;
X23 Z8 M8 (CYCLE START POINT) ;
G92 X25.2 Z-21 F2.309 R0.9 ;
X25.6 ;
X26 ;
X26.4 ;
X26.8 ;
X27.2 ;
X27.6 ;
X28 ;
X28.03 ;
X28.04 ;
G0 X100 Z100 M9 ;
G28 U0 W0 ;
M30 ;

Constant Lead Basic Thread Cutting Cycle G92


43 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup

Constant Lead Basic Thread Cutting Cycle Parameters (G92)


G92 X(U) Z(W) R F
X (U) = X axis endpoint of thread.
Z (W) = Z axis endpoint of thread.
R = X axis travel for taper threading (Not programmed for straight threads).
F = Thread lead Z axis.

The automatic 45 Degree pullout at the end of the threading pass (chamfer distance) is calculated
from the value of parameter 5130. This value can range from 0 to 90. The chamfer distance is
calculated as follows e.g. when parameter 5130 = 1 chamfer distance = thread lead x 0.1
5130 = 10 chamfer distance = thread lead x 1.0
5130 = 50 chamfer distance = thread lead x 5.0
5130 = 90 chamfer distance = thread lead x 9.0
If parameter 5130 is set to zero the pullout will be perpendicular to the threaded axis.

EXT INT
Direction of the R address
for external (EXT) and
R- R+
internal (INT) threads.

R+ R-

Metric Thread Dimensions


I.S.O. Course

Tapp'g Cl'ance
O.Dia Core Pitch Depth Drill Drill
44 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
1.6 1.171 0.35 0.215 1.25 1.65
1.8 1.371 0.35 0.215 1.45 1.85
2.0 1.509 0.40 0.245 1.60 2.05
2.2 1.648 0.45 0.276 1.75 2.25
2.5 1.948 0.45 0.276 2.05 2.60
3.0 2.387 0.50 0.307 2.50 3.10
3.5 2.764 0.60 0.368 2.90 3.60
4.0 3.141 0.70 0.429 3.30 4.10
4.5 3.580 0.75 0.460 3.80 4.60
5.0 4.018 0.80 0.491 4.20 5.10
6.0 4.773 1.00 0.613 5.00 6.10
7.0 5.773 1.00 0.613 6.00 7.20
8.0 6.466 1.25 0.767 6.80 8.20
10.0 8.160 1.50 0.920 8.50 10.20
12.0 9.853 1.75 1.074 10.20 12.20
14.0 11.546 2.00 1.227 12.00 14.25
16.0 13.546 2.00 1.227 14.00 16.25
18.0 14.933 2.50 1.534 15.50 18.25
20.0 16.933 2.50 1.534 17.50 20.25
22.0 18.933 2.50 1.534 19.50 22.25
24.0 20.319 3.00 1.840 21.00 24.25
27.0 23.319 3.00 1.840 24.00 27.25
30.0 25.706 3.50 2.147 26.50 30.50
33.0 28.706 3.50 2.147 29.50 33.50
36.0 31.092 4.00 2.454 32.00 36.50
39.0 34.092 4.00 2.454 35.00 39.50
42.0 36.479 4.50 2.761 37.50 42.50
45.0 39.479 4.50 2.761 40.50 45.50
48.0 41.865 5.00 3.067 43.00 48.75
52.0 45.865 5.00 3.067 47.00 52.75
56.0 49.252 5.50 3.374 50.50 56.75
60.0 53.252 5.50 3.374 54.50 60.75
64.0 56.639 6.00 3.681 58.00 64.75
68.0 60.639 6.00 3.681 62.00 68.75

I.S.O. Fine Pitch

Tapp'g Cl'ance
O.Dia Core Pitch Depth Drill Drill
8.0 6.773 1.00 0.613 7.00 9.00
10.0 8.467 1.25 0.767 8.75 11.00
12.0 10.467 1.25 0.767 10.75 13.50
45 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
16.0 14.160 1.50 0.920 14.50 17.50
20.0 18.160 1.50 0.920 18.50 21.50
24.0 21.546 2.00 1.226 22.00 25.50
30.0 27.546 2.00 1.226 28.00 31.50
36.0 32.319 3.00 1.841 32.75 38.00
42.0 38.265 3.00 1.841 38.75 44.00
48.0 44.280 3.00 1.841 44.75 51.00
56.0 51.093 4.00 2.455 51.75 59.00
64.0 59.065 4.00 2.455 59.75 67.00

General Guidelines for Threading


The preparatory function codes used in threading are:
G32 - Constant lead single pass threading.
G92 - Constant lead, basic thread cutting cycle.
G76 - Multiple pass thread cutting cycle.
G34 - Variable lead single pass threading (control option).

During threading, spindle rotation and slide feed rate are synchronised to produce accurate thread
lead. Consequently, there are certain rules that must be followed when threading. These are :

 The spindle must be at the correct speed in G97 (RPM) mode and G99 (feed per rev) must be
active before programming a threading cycle.
 The tool must be positioned at the cycle start point of the thread in the blocks preceding the actual
thread cutting block. This block should not specify chamfer or corner radius.
 Clearance must be provided at the end of the thread to allow the slide to decelerate. This is called
the minimum stopping distance and can be calculated as follows :
MINIMUM STOPPING DISTANCE = RPM x LEAD
1800
 Before entering the threading cut, the tool must be positioned to a point far enough from the end of
the thread to allow the slide to accelerate to the programmed lead. This clearance is called the
minimum starting distance and for general threading applications can be calculated as follows :
MINIMUM STARTING DISTANCE = MIN STOP DIST x 3.605
 During thread cutting the spindle speed overide function is disabled (fixed 100%).

Number of Threading Passes Selection

Pitch : MM 1 1.5 2 2.5 3 3.5 4.0 6.0


TPI 48 24 16 12 10 8 6 4
No. of Passes 3-6 4-9 5-11 6-13 7-15 8-17 10-20 11-22

 For most standard applications , the middle of the range is a good starting point.

46 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
 For most materials, the tougher the material, the higher the number of cutting passes you
should select.
 As a general rule of thumb, less passes are better than more speed.
 Infeed per pass should ensure an even machine load.

Basic OD Turning Cycle G90 Example (No. 1)

Part Program (Stock Boundary - Part Profile)


O1005 (G90 EXAMPLE 1) ;
(BASIC OD TURNING CYCLE) ;
G50 S3000 ;
N10 G21 G40 G99 ;
G0 G28 U0 W0 ;
T0101 ;
G96 S250 M4 ;
X104 Z2 (CYCLE START POINT) ;
G90 X90 Z-60 F0.5 M8 ;
X80 ;
X70 ;
X60 ;
X50 ;
X40 ;
G0 X200 Z200 M9 ;
G28 U0 W0 ;
M30 ;

47 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
Basic OD Turning Cycle G90 Example (No.2)

Part Program (Stock Boundary - Part Profile)


O1005 (G90 EXAMPLE 2) ;
(BASIC OD TURNING CYCLE) ;
G50 S3000 ;
N10 G21 G40 G99 ;
G0 G28 U0 W0 ;
T0101 ;
G96 S250 M4 ;
X104 Z2 (CYCLE START POINT) ;
G90 X90 Z-70 F0.5 M8 ;
X80 ;
X70 ;
X60 Z-50 ;
X50 ;
X40 Z-20 ;
X30 ;
G0 X200 Z200 M9 ;
G28 U0 W0 ;
M30 ;

48 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
Basic OD Turning Cycle G90 Example (No.3)

Part Program (Stock Boundary - Part Profile)


O1005 (G90 EXAMPLE 3) ;
(BASIC OD TURNING CYCLE) ;
G50 S3000 ;
N10 G21 G40 G99 ;
G0 G28 U0 W0 ;
T0101 ;
G96 S250 M4 ;
X104 Z2 (CYCLE START POINT) ;
G90 X90 Z-70 F0.5 M8 ;
X80 Z-55 ;
X70 ;
X60 ;
X50 ;
X40 Z-30 ;
G0 X200 Z200 M9 ;
G28 U0 W0 ;
M30 ;

49 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
Basic ID Turning G90 Example (No.4)

Part Program (Stock Boundary - Part Profile)


O1005 (G90 EXAMPLE 4) ;
(BASIC ID TURNING CYCLE) ;
G50 S3000 ;
N10 G21 G40 G99 ;
G0 G28 U0 W0 ;
T0101 ;
G96 S250 M4 ;
X36 Z2 (CYCLE START POINT) ;
G90 X50 Z-60 F0.3 M8 ;
X60 Z-25 ;
X70 ;
G0 X200 Z200 M9 ;
G28 U0 W0 ;
M30 ;

50 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
Basic OD Taper Turning Cycle G90 Example (No.5)

Part Program (Stock Boundary - Part Profile)


O1005 (G90 EXAMPLE 5) ;
(BASIC OD TURNING CYCLE) ;
G50 S3000 ;
N10 G21 G40 G99 ;
G0 G28 U0 W0 ;
T0101 ;
G96 S250 M4 ;
X104 Z2 (CYCLE START POINT) ;
G90 X100 Z-60 R-5 F0.5 M8 ;
X90 ;
X80 ;
X70 ;
G0 X200 Z200 M9 ;
G28 U0 W0 ;
M30 ;
OR
O1005 (G90 EXAMPLE 5) ;
(BASIC OD TURNING CYCLE) ;
G50 S3000 ;
N10 G21 G40 G99 ;
G0 G28 U0 W0 ;
T0101 ;
G96 S250 M4 ;
X104 Z2 (CYCLE START POINT) ;
G90 X90 Z-60 F0.5 M8 ;
X80 ;
X70 ;
R-5 ;
G0 X200 Z200 M9 ;
G28 U0 W0 ;
M30 ;

Basic OD / ID Turning Cycle G90


51 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup

OD / ID Basic Turning Cycle Parameters (G90)


G90 X(U) Z(W) R F
X (U) = Modal X axis endpoint dimension of the turning move.
Z (W) = Modal Z axis endpoint dimension of the turning move.
R = Modal incremental radial move at the start of cut to machine a taper.
F = Feedrate.

General Guidelines

 Before programming a G90 turning cycle the tool must be positioned at the cycle start point.
 The G90 cycle can perform OD front, OD back, ID front, and ID back turning operations. The
type of turning is determined by the relative location of the programmed point specified by the X
and Z endpoints from the cycle start position.
 If the programmed Z endpoint is smaller than the Z location at the start of the cycle, a front
turning operation is performed. If the programmed Z endpoint is larger than the initial Z position
a back turning cycle is performed.
 If the X endpoint is smaller (closer to the spindle centreline) than the initial X axis location, the
cycle is OD turning. If the X axis endpoint is larger than the initial X axis location, the cycle is an
ID turning cycle.
 Programming an R word in or after the G90 block will force the cycle to cut a taper. A negative R
word will cut from a smaller to a larger diameter. A positive R word will cut from a larger to a
smaller diameter.

Basic OD Facing Cycle G94 Example (No.1)


52 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup

Part Program (Stock Boundary - Part Profile)


O1006 (G94 EXAMPLE 1) ;
(BASIC OD FACING CYCLE) ;
G50 S4000 ;
N10 G21 G99 G40 ;
G0 G28 U0 W0 ;
T0101 ;
G96 S250 M4 ;
X104 Z15.5 (CYCLE START POINT) ;
G94 X-2.4 Z15 F0.3 M8 ;
Z10 ;
Z5 ;
Z0 ;
G0 X200 Z200 M9 ;
G28 U0 W0 ;
M30 ;

Basic OD Facing Cycle G94 Example (No.2)

53 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup

Part Program (Stock Boundary - Part Profile)


O1006 (G94 EXAMPLE 2) ;
(BASIC OD FACING CYCLE) ;
G50 S4000 ;
N10 G21 G99 G40 ;
G0 G28 U0 W0 ;
T0101 ;
G96 S250 M4 ;
X104 Z0.5 (CYCLE START POINT) ;
G94 X-2.4 Z0 F0.3 M8 ;
X30 Z-5 ;
Z-10 ;
Z-15 ;
X50 Z-20 ;
Z-25 ;
G0 X200 Z200 M9 ;
G28 U0 W0 ;
M30 ;

Taper OD Facing Cycle G94 Example (No.3)

54 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup

Part Program (Stock Boundary - Part Profile)


O1006 (G94 EXAMPLE 3) ;
(BASIC OD FACING CYCLE) ;
G50 S4000 ;
N10 G21 G99 G40 ;
G0 G28 U0 W0 ;
T0101 ;
G96 S250 M4 ;
X104 Z0.5 (CYCLE START POINT) ;
G94 X-2.4 Z0 F0.3 M8 ;
X20 R-5 ;
Z-5 ;
Z-10 ;
G0 X200 Z200 M9 ;
G28 U0 W0 ;
M30 ;
OR
O1006 (G94 EXAMPLE 3) ;
(BASIC OD FACING CYCLE) ;
G50 S4000 ;
N10 G21 G99 G40 ;
G0 G28 U0 W0 ;
T0101 ;
G96 S250 M4 ;
X104 Z0.5 (CYCLE START POINT) ;
G94 X-2.4 Z0 F0.3 M8 ;
X20 Z-5 ;
Z-10 ;
R-5 ;
G0 X200 Z200 M9 ;
G28 U0 W0 ;
M30 ;
Basic OD / ID Facing Cycle G94
OD / ID Basic Facing Cycle Parameters (G94)
55 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
G94 X(U) Z(W) R F
X (U) = Modal X axis endpoint dimension of the facing move.
Z (W) = Modal Z axis endpoint dimension of the facing move.
R = Modal incremental face taper amount.
F = Feedrate.

General Guidelines

 Before programming a G94 facing cycle the tool must be positioned at the cycle start point.
 The G94 cycle can perform OD front, OD back, ID front, and ID back facing operations. The type
of facing operation is determined by the relative location of the programmed point specified by the
X and Z endpoints from the cycle start point.
 If the programmed Z endpoint is smaller than the Z location at the start of the cycle, a front facing
operation is performed. If the programmed Z endpoint is larger than the initial Z position a back
facing cycle is performed.
 If the X endpoint is smaller (closer to the spindle centreline) than the initial X axis location, the
cycle is OD facing. If the X axis endpoint is larger than the initial X axis location, the cycle is an
ID facing cycle.
 Programming an R word in or after the G94 block will force the cycle to cut a taper. A negative R
word will cut a taper towards increasing Z dimensions. A positive R word will cut a taper towards
decreasing Z dimensions.

G71 Stock Removal Turning Cycle


Stock Removal Turning Cycle (Parallel to Z axis) Parameters (G71)
56 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
G71 U(d) R(e)
G71 P(ns) Q (nf) U(u) W(w) F(f) S(s)
U(d) = Radial depth of cut for rough turning. Also specified by parameter No. 5132 (microns).
R(e) = Escape distance after each pass. Also specified by parameter No. 5133 (microns).
P(ns) = Sequence number ( _ _ _ ) for the first block of the program which defines the finish part
profile.
Q(nf) = Sequence number ( _ _ _ ) for the last block of the program which defines the finish part
profile.
U(u) = Distance and direction of finishing allowance in the X axis (diameter value).
W(w) = Distance and direction of finishing allowance in the Z axis.
F(f) = Feedrate for rough turning.
S(s) = Spindle speed / cut speed for rough turning.

General Guidelines

 Before programming a G71 turning cycle the tool must be positioned at the cycle start point.
 The program blocks that define the part profile to be rough turned must start with a sequence
number (1-99999) that corresponds to the P address in the G71 block.
 The program blocks that define the part profile to be rough turned must end with a sequence
number (1-9999) that corresponds to the Q address in the G71 block.
 The part profile to be rough turned (A - B) must show continual increase (OD turning) or
continual decrease (ID turning) along the Z axis, i.e. no undercuts or recesses may be programmed
in this cycle. The profile must be monotonic (not varied) in its form.
 The initial move in the X axis within the cycle can either be a rapid (G0) or linear (G1) move.
This is dependent on whether G0 or G1 is active in the start sequence number block (P address).
No movement of the Z axis is allowed within the start sequence number block.

57 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
G71 Stock Removal Turning Cycle (cont)
General Guidelines (cont)
 When a program contains two or more G71 stock removal turning cycles the start sequence
number (P address) and end sequence number (Q address) must not be duplicated, different
sequence numbers must be specified.
 If TNRC is used when specifying the part profile to be rough turned, this feature must be turned
on (G41 / G42) and off (G40) between the start sequence number (P address) and end sequence
number (Q address). The G71 stock removal cycle ignores tool nose radius compensation and
simply leaves more stock on the part for finish turning.
 The G71 cycle makes successive cuts along the Z axis at a depth specified by the U address (in the
first G71 block) until only the finish stock (U & W) allowance is left on the profile, the roughing
tool then makes one complete semi-finishing pass along the profile (A- B) leaving only the finish
stock allowance on the part.
 If the U address and R address are omitted from the first G71 block the values stored in parameters
5132 (U address) and 5133 (R address) are used. These parameters are changed by program
command. If these parameters are set to zero and the U and R addresses are omitted from the first
G71 block an alarm will be posted.
 A subprogram can not be called from a block between the start sequence number (P address) and
the end sequence number (Q address).
 Any feed, speed or tool changes that occur in the program blocks that define the profile to be
rough turned are ignored by the G71 stock removal cycle.
 Finish stock allowance U (X axis) and W (Z axis) must be specified with the correct direction, see
diagram below.

After rough cutting by G71, G72 (stock removal facing cycle) or G73 (stock removal pattern
repeating) the following command permits finishing.

Stock Removal Finishing Cycle Parameters (G70)


G70 P(ns) Q (nf) F(f) S(s)
P(ns) = Sequence number ( _ _ _ ) for the first block of the program which defines the finish part
profile.
Q(nf) = Sequence number ( _ _ _ ) for the last block of the program which defines the finish part
profile.
F(f) = Feedrate for finish turning.
S(s) = Spindle speed / cut speed for finish turning.

58 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
G71 OD Rough Turning Cycle Example (No.1)

Part Program (Stock Boundary - Part Profile) leaving Finishing Stock


O1001 (G71 EXAMPLE 1) ;
(STOCK REMOVAL TURNING CYCLE) ;
G50 S3000 ;
N10 G21 G99 G40 ;
G0 G28 U0 W0 ;
T0101 ;
G96 S220 M4 ;
X102 Z2 (CYCLE START POINT) ;
G71 U3 R1 ;
G71P100 Q200 U0.6 W0.1 F0.35 M8 ;
N100 G0 X30 ;
G1 Z-15 ;
X48 ;
Z-40 ;
X60 ;
Z-60 ;
N200 X101 ;
G0 X150 Z150 M9 (RAPID TO SAFE POSITION) ;
G28 U0 W0 ;
M30 ;

59 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
G71 ID Rough Turning Cycle Example (No.2)

Part Program (Stock Boundary - Part Profile) Leaving Finish Stock


O1002 (G71 EXAMPLE 2) ;
(STOCK REMOVAL TURNING CYCLE) ;
G50 S3000;
N10 G21 G99 G40 ;
G0 G28 U0 W0 ;
T0303 ;
G96 S220 M4 ;
X38 Z2 (CYCLE START POINT) ;
G71 U2 R1 ;
G71 P200 Q100 U-0.6 W0.1 F0.25 M8 ;
N200 G0 X70 ;
G1 Z-25 ;
X50 ;
Z-60 ;
N100 X39 ;
G0 Z50 M9 ;
G28 U0 W0 ;
M30 ;

If the first block in the profile is a G0 (rapid) block, the initial move in the roughing cycle is also
a rapid move. If the first block in the profile is a linear (G1) move the initial move in the
roughing cycle is also a linear move.

60 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
G71 OD Rough Turning Cycle Example (No.3)

Part Program (Stock Boundary - Part Profile) Leaving Finish Stock


O1003 (G71 EXAMPLE 3) ;
(STOCK REMOVAL TURNING CYCLE) ;
G50 S2000 ;
N10 G21 G99 G40 ;
G0 G28 U0 W0 ;
T0101 ;
G96 S200 M4 ;
X102 Z2 (CYCLE START POINT) ;
G71 U3 R1 ;
G71 P100 Q200 U0.6 W0.1 F0.5 M8 ;
N100 G0 X40 ;
G1 Z-30 ;
X50 ;
X90 W-20 ;
Z-70 ;
N200 X101 ;
G0 X150 Z50 M9 (RAPID TO SAFE POSITION) ;
G28 U0 W0 ;
M30 ;

61 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
G71 OD Rough Turning Cycle Exercise (No.4)
Answer

Part Program (Stock Boundary - Part Profile) Leaving Finishing Stock


O1004 (G71 EXERCISE 4) ;
(STOCK REMOVAL TURNING CYCLE) ;
G50 S2000 ;
N10 G21 G99 G40 ;
G0 G28 U0 W0 ;
T0101 ;
G96 S200 M4 ;
X102 Z2 (CYCLE START POINT) ;
G71 U5 R1 ;
G71 P100 Q200 U0.6 W0.1 F0.5 M8 ;
N100 G0 X34 ;
G1 Z-15 ;
X48 ;
X70 W-25 ;
W-15 ;
X80 ;
Z-65 ;
N200 X101 ;
G0 X150 Z150 M9 (RAPID TO SAFE POSITION) ;
G28 U0 W0 ;
M30 ;

62 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
G71 OD Rough Turning Cycle Exercise (No.4)

Use 5mm depth of cut, Fin Stk in X = 0.6, Fin Stk in Z = 0.1

Part Program (Stock Boundary - Part Profile) Leaving Finishing Stock


O1004 (G71 EXERCISE 4) ;
(STOCK REMOVAL TURNING CYCLE) ;
G50 S2000 ;
N10 G21 G99 G40 ;
G0 G28 U0 W0 ;
T0101 ;
G96 S200 M4 ;
X ____ Z ____ (CYCLE START POINT) ;
G71 U ____ R ____ ;
G71 P ____ Q ____ U ____ W ____ F ____ M8 ;
N ____ G0 X ____ ;
G1 Z ____ ;
X ____ ;
W ____ X ____ ;
W ____ ;
X ____ ;
Z ____ ;
N ____ X ____ ;
G0 X ____ Z ____ M9 (RAPID TO SAFE POSITION) ;
G28 U0 W0 ;
M30 ;

63 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
G71 OD Rough & G70 Finish Turning Cycle with TNRC
Example (No.5)

T02 Tool Nose Radius = 0.8 T02 Tool Nose Vector = 3

Part Program (Stock Boundary - Part Profile)


O1007 (G71 EXAMPLE 5) ;
(STOCK REMOVAL TURNING CYCLE) ;
G50 S2000 ;
N10 G21 G99 G40 ;
G0 G28 U0 W0 ;
T0101 ;
G96 S220 M4 ;
X102 Z2 (CYCLE START POSITION) ;
G71 U3 R1 ;
G71 P100 Q200 U0.6 W0.1 F0.5 M8 ;
N100 G0 X40 ;
G1 G42 Z0 ; Any feed or spindle speed changes that occur
Z-20 ; within the blocks that define the profile to be
X60 K-2 ; rough turned are ignored by the G71 stock
Z-50 ; removal cycle but executed by the G70 finish
G2 X80 Z-60 R10 ; turning cycle.
G1 X100 ;
N200 G40 X101 ;
G0 G28 U0 W0 M9 ;
M1 (OPTIONAL STOP) ;
N20 G21 G99 G40 ;
T0202 ;
G96 S300 M4 ;
G0 X102 Z2 (CYCLE START POSITION) ;
G70 P100 Q200 F0.15 M8 ;
G0 G28 U0 W0 M9 ;
M30 ;

64 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
G71 ID Rough & G70 Finish Turning Cycle with TNRC
Example (No.6)

T02 Tool Nose Vector = 2 T02 Tool Nose Radius = 0.8

Part Program (Stock Boundary - Part Profile)


O1007 (G71 EXAMPLE 6) ;
(STOCK REMOVAL TURNING CYCLE) ;
G50 S3000 ;
N10 G21 G99 G40 ;
G0 G28 U0 W0 ;
T0101 ;
G96 S220 M4 ;
X38 Z2 (CYCLE START POSITION) ;
G71 U2.5 R0.5 ;
G71 P100 Q200 U-0.6 W0.1 F0.3 M8 ;
N100 G0 X83.5 ;
G1 G41 X83 Z0 ;
X80 Z-1.5 ;
Z-20 ;
X70 W-15 ;
X60 ;
W-20 ;
X50 W-15 ;
X43 ;
X40 Z-71.5 ;
N200 G40 X39 Z-72.5 ;
G0 G28 U0 W50 M9 ;
M1 ;
N20 G21 G99 G40 ;
T0202 ;
G96 S300 M4 ;
G0 X38 Z2 (CYCLE START POSITION) ;
G70 P100 Q200 F0.15 M8 ;
G0 G28 U0 W0 M9 ;
M30 ;

65 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
G71 OD Rough & G70 Finish Turning Cycle with TNRC
Example (No.7)

T02 Tool Nose Vector = 3 T02 Tool Nose Radius = 0.8

Part Program (Stock Boundary - Part Profile)


O1007 (G71 EXAMPLE 7) ;
(STOCK REMOVAL TURNING CYCLE) ;
G50 S3000 ;
N10 G21 G99 G40 ;
G0 G28 U0 W0 ;
T0101 ;
G96 S220 M4 ;
X102 Z2 (CYCLE START POSITION) ;
G71 U3 R0.5 ;
G71 P100 Q200 U0.6 W0.1 F0.3 M8 ;
N100 G0 X27.5 ;
G1 G42 X28 Z0 ;
X30 Z-1 ;
Z-15 ;
X48 W-20 ;
X60 ;
G3 X80 W-10 I0 K-10 ;
G1 Z-60 ;
X96 ;
X100 Z-62 ;
N200 G40 X101.75 Z-63.5 ;
G0 G28 U0 W0 M9 ;
M1 ;
N20 G21 G99 G40 ;
T0202 ;
G96 S300 M4 ;
G0 X102 Z2 (CYCLE START POSITION) ;
G70 P100 Q200 F0.15 M8 ;
G0 G28 U0 W0 M9 ;
M30 ;

66 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
G71 OD Rough & G70 Finish Turning Cycle with TNRC
Exercise (No.8) Answer

T02 Tool Nose Vector = 3 T02 Tool Nose Radius = 0.8

Part Program (Stock Boundary - Part Profile)


O1008 (G71 EXERCISE 8) ;
(STOCK REMOVAL TURNING CYCLE) ;
G50 S3000 ;
N10 G21 G99 G40 ;
G0 G28 U0 W0 ;
T0101 ;
G96 S220 M4 ;
X102 Z2 (CYCLE START POSITION) ;
G71 U3 R0.5 ;
G71 P100 Q200 U0.6 W0.1 F0.3 M8 ;
N100 G0 X40 ;
G1 G42 Z0 ;
Z-30 ;
X46 ;
X50 W-2 ;
Z-40 ;
G2 X70 Z-50 I10 K0 ;
G1 X90 ;
Z-70 ;
X100 ;
N200 G40 X101.5 ;
G0 G28 U0 W0 M9 ;
M1 ;
(STOCK REMOVAL FINISHING CYCLE) ;
N20 G21 G99 G40 ;
T0202 ;
G96 S300 M4 ;
G0 X102 Z2 (CYCLE START POSITION) ;
G70 P100 Q200 F0.15 M8 ;
G0 G28 U0 W0 M9 ;
M30 ;

67 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
G71 OD Rough & G70 Finish Turning Cycle with TNRC
Exercise (No.8)

Use 3mm depth of cut, Fin Stk in X = 0.6, Fin Stk in Z = 0.1

T02 Tool Nose Vector = 3 T02 Tool Nose Radius = 0.8

68 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
G71 OD Rough & G70 Finish Turning Cycle with TNRC
Exercise (No.8) cont.
Part Program (Stock Boundary - Part Profile)
O1008 (G71 EXERCISE 8) ;
(STOCK REMOVAL TURNING CYCLE) ;
G50 S3000 ;
N10 G21 G99 G40 ;
G0 G28 U0 W0 ;
T0101 ;
G96 S220 M4 ;
X ____ Z ____ (CYCLE START POSITION) ;
G71 U ____ R ____ ;
G71 P ____ Q ____ U ____ W ____ F0.3 M8 ;
N100 G0 X ____ ;
G1 G ____ Z ____ ;
Z ____ ;
X ____ ;
X ____ W ____ ;
Z ____ ;
G2 X ____ Z ____ I ____ K ____ ;
G1 X ____ ;
Z ____ ;
X ____ ;
N200 G40 X ____ ;
G0 G28 U0 W0 M9 ;
M1 ;
(STOCK REMOVAL FINISHING CYCLE) ;
N20 G21 G99 G40 ;
T0202 ;
G96 S300 M4 ;
G0 X ____ Z ____ (CYCLE START POSITION) ;
G70 P ____ Q ____ F0.15 M8 ;
G0 G28 U0 W0 M9 ;
M30 ;

69 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
G71 OD Rough Turning Cycle & Finishing Program with
TNRC Example (No.9)
When a profile is non-monotonic or varied in its form (includes recesses) the G71, G72 and
G73 cycles cannot machine the profile totally. The program co-ordinates that define the
profile to be rough turned need to be modified to prevent the roughing tool plunging into
the recess on the semi-finish pass. Separate program blocks are required for the finish tool
to machine the profile including the recess thus the G70 finishing cycle is not used.

T02 Tool Nose Vector = 3 T02 Tool Nose Radius = 0.8

Part Program (Stock Boundary - Part Profile)


O1009 (G71 EXAMPLE 9) ;
(STOCK REMOVAL TURNING CYCLE) ;
G50 S3000 ;
N10 G21 G99 G40 ;
G0 G28 U0 W0 ;
T0101 ;
G96 S220 M4 ;
X102 Z2 (CYCLE START POSITION) ;
G71 U3 R0.5 ;
G71 P100 Q200 U0.6 W0.1 F0.3 M8 ;
N100 G0 X47.5 ;
G1 Z0 X48.08 ;
Z-5 X58.08 ;
Z-50 ; Program co-ordinates for the G71 cycle to
X86 ; rough turn stock excluding the recess.
X90 W-2 ;
Z-70 ;
N200 X101 ;
G0 G28 U0 W0 M9 (RAPID TO REF POSITION) ;
M1 (OPTIONAL STOP) ;

70 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
G71 OD Rough Turning Cycle & Finishing Program with
TNRC Example (No.9) cont.

T02 Tool Nose Vector = 3 T02 Tool Nose Radius = 0.8

Part Program (Stock Boundary - Part Profile)


N20 G21 G99 G40 ;
T0202 ;
G96 S300 M4 ;
G0 X102 Z2 ;
X47.5 M8 ;
G1 G42 X48.08 Z0 F0.15 ;
X58.08 Z-5 ;
Z-25 ;
X52 Z-30.27 ; Program co-ordinates for the finish
Z-50 ; profile including the recess.
X86 ;
X90 W-2 ;
Z-70 ;
X100 ;
G40 X101 ;
G0 X150 Z50 M9 ;
G28 U0 W0 ;
M30 ;

G72 Stock Removal Facing Cycle


71 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup

Stock Removal Facing Cycle (Parallel to X axis) Parameters (G72)


G72 W(d) R(e)
G72 P(ns) Q (nf) U(u) W(w) F(f) S(s)
W(d) = Depth of cut for rough facing. Also specified by parameter No. 5132 (microns).
R(e) = Escape distance after each pass. Also specified by parameter No. 5133 (microns).
P(ns) = Sequence number ( _ _ _ ) for the first block of the program which defines the finish part
profile.
Q(nf) = Sequence number ( _ _ _ ) for the last block of the program which defines the finish part
profile.
U(u) = Distance and direction of finishing allowance in the X axis (diameter value).
W(w) = Distance and direction of finishing allowance in the Z axis.
F(f) = Feedrate for rough facing.
S(s) = Spindle speed / cut speed for rough facing.

General Guidelines

 Before programming a G72 facing cycle the tool must be positioned at the cycle start point.
 The program blocks that define the part profile to be rough faced must start with a sequence
number (1-99999) that corresponds to the P address in the G72 block.
 The program blocks that define the part profile to be rough turned must end with a sequence
number (1-9999) that corresponds to the Q address in the G72 block.
 The part profile to be rough faced (A - B) must show continual decrease (OD facing) or continual
increase (ID facing) along the Z axis, i.e. no undercuts or recesses may be programmed in this
cycle. The profile must be monotonic (not varied) in its form.

72 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
G72 Stock Removal Facing Cycle (cont)
General Guidelines (cont)
 The initial move in the Z axis within the cycle can either be a rapid (G0) or linear (G1) move. This
is dependent on whether G0 or G1 is active in the start sequence number block (P address). No
movement of the X axis is allowed within the start sequence number block.
 When a program contains two or more G72 stock removal facing cycles the start sequence number
(P address) and end sequence number (Q address) must not be duplicated, different sequence
numbers must be specified.
 If TNRC is used when specifying the part profile to be rough faced, this feature must be turned on
(G41 / G42) and off (G40) between the start sequence number (P address) and end sequence
number (Q address). The G72 stock removal cycle ignores tool nose radius compensation and
simply leaves more stock on the part for finish turning.
 The G72 cycle makes successive cuts along the X axis at a depth specified by the W address (in the
first G72 block) until only the finish stock (U & W) allowance is left on the profile, the roughing
tool then makes one complete semi-finishing pass (A - B) along the profile leaving only the finish
stock allowance on the part.
 If the W address and R address are omitted from the first G72 block the values stored in
parameters 5132 (W address) and 5133 (R address) are used. These parameters are changed by
program command. If these parameters are set to zero and the W and R addresses are omitted from
the first G72 block an alarm will be posted.
 A subprogram can not be called from a block between the start sequence number (P address) and
the end sequence number (Q address).
 Any feed, speed or tool changes that occur in the program blocks that define the profile to be
rough faced are ignored by the G72 stock removal cycle but executed during the G70 finishing
cycle.
 Finish stock allowance U (X axis) and W (Z axis) must be specified with the correct direction, see
diagram below.

G72 OD Rough Facing Cycle Example (No.1)


73 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup

Part Program (Stock Boundary - Part Profile) leaving Finishing Stock


O1001 (G72 EXAMPLE 1) ;
(STOCK REMOVAL FACING CYCLE) ;
G50 S3000 ;
N10 G21 G99 G40 ;
G0 G28 U0 W0 ;
T0101 ;
G96 S220 M4 ;
X104 Z22 (CYCLE START POINT) ;
G72 W2 R1 ;
G72 P100 Q200 U0 W0.1 F0.25 M8 ;
N100 G0 Z0 ;
N200 G1 X-2.4 ;
G0 X150 Z150 M9 (RAPID TO SAFE POSITION) ;
G28 U0 W0 ;
M30 ;

74 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
G72 OD Rough & G70 Finish Facing Cycle with TNRC
Example (No.2)

T02 Tool Nose Radius = 0.8 T02 Tool Nose Vector = 3

Part Program (Stock Boundary - Part Profile)


O1002 (G72 EXAMPLE 2) ;
(STOCK REMOVAL FACING CYCLE) ;
G50 S3000 ;
N10 G21 G99 G40 ;
G0 G28 U0 W0 ;
T0101 ;
G96 S220 M4 ;
X104 Z7 (CYCLE START POINT) ;
G72 W2 R1 ;
G72 P100 Q200 U0.6 W0.1 F0.25 M8 ;
N100 G0 Z-16;
G1 G41 X100 Z-15 ;
Z-10 X90 ;
G2 X20 Z0 R60 ;
G1 X0 ;
N200 G40 X-1.6 ;
G0 G28 U0 W0 M9 ;
M1 ;
N20 G21 G99 G40 ;
T0202 ;
G96 S300 M4 ;
G0 X104 Z7 (CYCLE START POSITION) ;
G70 P100 Q200 F0.1 M8 ;
G0 X150 Z150 M9 (RAPID TO SAFE POSITION) ;
G28 U0 W0 ;
M30 ;

75 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
G72 OD Rough & G70 Finish Facing Cycle with TNRC
Example (No.3)

T02 Tool Nose Vector = 3 T02 Tool Nose Radius = 0.8

Part Program (Stock Boundary - Part Profile)


O1003 (G72 EXAMPLE 3) ;
(STOCK REMOVAL FACING CYCLE) ;
G50 S3000 ;
N10 G21 G99 G40 ;
G0 G28 U0 W0 ;
T0101 ;
G96 S220 M4 ;
X104 Z7 (CYCLE START POINT) ;
G72 W2 R1 ;
G72 P100 Q200 U0.6 W0.1 F0.25 M8 ;
N100 G0 Z-10 ;
G1 G41 X90 ;
X30 Z0 ;
N200 G40 X-1.6 ;
G0 G28 U0 W0 M9 ;
M1 ;
N20 G21 G99 G40 ;
T0202 ;
G96 S300 M4 ;
G0 X104 Z7 (CYCLE START POSITION) ;
G70 P100 Q200 F0.1 M8 ;
G0 X150 Z150 M9 (RAPID TO SAFE POSITION) ;
G28 U0 W0 ;
M30 ;

G73 Stock Removal Pattern Repeating Cycle


76 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup

Stock Removal Pattern Repeating Cycle Parameters (G73)


G73 U(i)W(k) R(d)
G73 P(ns) Q (nf) U(u) W(w) F(f) S(s)
U(i) = Radial distance & direction of relief in X axis (stock). Also specified by parameter No.
5135 (microns).
W(k) = Distance & direction of relief in Z axis (stock). Also specified by parameter No. 5136
(microns).
R(d) = No of repeat rough cutting passes including the semi-finish pass to remove the stock. Also
specified by parameter No. 5137.
P(ns) = Sequence number ( _ _ _ ) for the first block of the program which defines the finish part
profile.
Q(nf) = Sequence number ( _ _ _ ) for the last block of the program which defines the finish part
profile.
U(u) = Distance and direction of finishing allowance in the X axis (diameter value).
W(w) = Distance and direction of finishing allowance in the Z axis.
F(f) = Feedrate for rough cutting.
S(s) = Spindle speed / cut speed for rough cutting.

General Guidelines

 Before programming a G73 pattern repeating cycle the tool must be positioned at the cycle
start point.
 The program blocks that define the part profile to be rough turned must start with a sequence
number (1-99999) that corresponds to the P address in the G73 block.
 The program blocks that define the part profile to be rough turned must end with a sequence
number (1-9999) that corresponds to the Q address in the G73 block.

77 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
G73 Stock Removal Pattern Repeating Cycle (cont)
General Guidelines (cont)

 The part profile to be rough turned (A - B) must show continual decrease (ID) or continual
increase (OD) along the Z axis, i.e. no undercuts or recesses may be programmed in this cycle.
The profile must be monotonic (not varied) in its form.
 The initial move in the Z axis within the cycle can either be a rapid (G0) or linear (G1) move. This
is dependent on whether G0 or G1 is active in the start sequence number block (P address). No
movement of the X axis is allowed within the start sequence number block.
 When a program contains two or more G73 stock removal pattern repeating cycles the start
sequence number (P address) and end sequence number (Q address) must not be duplicated,
different sequence numbers must be specified.
 If TNRC is used when specifying the part profile to be rough turned, this feature must be turned
on (G41 / G42) and off (G40) between the start sequence number (P address) and end sequence
number (Q address). The G73 stock removal cycle ignores tool nose radius compensation and
simply leaves more stock on the part for finish turning.
 The G73 cycle makes a number of cuts along the profile specified by the R word in the first G73
block. The depth of each rough cut is dependant on the amount of relief (stock) that is specified
and the number of repeat passes.
 If the U address, W address and R address are omitted from the first G73 block the values stored in
parameters 5135 (U address),5136 (W address) and 5137 (R address) are used. These parameters
are changed by program command.
 A subprogram can not be called from a block between the start sequence number (P address) and
the end sequence number (Q address).
 Any feed, speed or tool changes that occur in the program blocks that define the profile to be
rough turned are ignored by the G73 stock removal cycle but executed during the G70 finishing
cycle.
 Finish stock allowance U (X axis) and W (Z axis) must be specified with the correct direction, see
diagram below.

78 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
G73 OD Pattern Repeating & G70 Finishing Cycle with
TNRC Example (No.1)

T02 Tool Nose Vector = 3 T02 Tool Nose Radius = 0.8

Part Program (Stock Boundary - Part Profile)


O1001 (G73 EXAMPLE 1) ;
(STOCK REMOVAL PATTERN REPEATING CYCLE) ;
G50 S3000 ;
N10 G21 G99 G40 ;
G0 G28 U0 W0 ;
T0101 ;
G96 S220 M4 ;
X124 Z2 (CYCLE START POINT) ;
G73 U3 W3 R3 ;
G73 P100 Q200 U0.6 W0.1 F0.35 M8 ;
N100 G0 X30 ;
G1 G42 Z0 ;
Z-20 ;
X70.41 Z-55 ;
X90 ;
X110 W-5.77 ;
Z-80 ;
X120 ;
N200 G40 X123 ;
G0 G28 U0 W0 M9 ;
M1 ;
N20 G21 G99 G40 ;
T0202 ;
G96 S300 M4 ;
G0 X124 Z2 (CYCLE START POSITION) ;
G70 P100 Q200 F0.1 M8 ;
G0 X150 Z150 M9 (RAPID TO SAFE POSITION) ;
G28 U0 W0 ;
M30 ;

Subprogram Call
79 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup

When a program contains a fixed sequence of repeated patterns, the pattern can be programmed as a
subprogram. This subprogram can then be called at different points in the main program using the
subprogram call M code M98. The subprogram must end with M99 (end of subprogram) to return to
the main program. The format for a M98 block is as follows:

M98 P**** **** ;

Number of (repeat) Program number


times the subprogram is (4 digits)
called. to be called.
P = 1 - 9999. 0001 - 7999.

If no repeat calls are specified the subprogram is called just once.

Example Subprogram Call

O2000 (MAIN PROGRAM) ; O6001 (SUBPROGRAM) ;


N10 G21 G99 G40 ; M5 ;
G0 G28 U0 W0 ; M45 ;
T0101 ; G98 G125 M0.005 ;
M98 P6001 ; M44 ;
G0 G28 U0 W0 ; G99 M99 ;
M30 ;

The above example is a “one level nesting” i.e. the main program has called the subprogram (one
level) and returned to the main program. Up to four level nesting is permitted with the M98
subprogram call M code, a three level nesting is shown below.

Example Nesting Program


O0001 ; O1000 ; O2000 ; O3000 ;
(MAIN PROG) ; (SUB PROG 1) ; (SUB PROG 2) ; (SUB PROG 3) ;
; ; ; ;
M98 P1000 ; M98 P2000 ; M98 P3000 ; ;
; ; ; ;
M30 ; M99 ; M99 ; M99 ;

After execution of the subprogram the control returns to the program block after the M98 call block in
the main program. If a different point other than the block after the M98 block is required as a return
block a P address (main program sequence number) can be used on the M99 block in the subprogram
e.g.

Example Program with Return Destination

O0001 (MAIN PROGRAM) ; O3000 (SUBPROGRAM) ;


N10 ; ;
N20 ; ;
N30 M98 P3000 ; ;
N40 ; M99 P70 ;
N50 ;
N60 ;
N70 ;
N80 M30 ;
Macro program Call
Macro programs can differ from subprograms in several ways. Firstly macro programs are written by
the machine tool builder or customer and not the control supplier. They are used to control additional
mechanisms on the machine such as a barfeeder / automatic tool setter aswell as machining sequences

80 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
often used by the customer. Macro programs can also contain local variables where different values
can be assigned from the call macro program statement (argument). Macro programs are usually
protected programs (no edit) and have a program number above 9000. Note subprograms can also be
protected with a program number of above 9000.

Example Macro Program

O9020 (BARFEED MACROV2) ;


N2 IF[#1002EQ0]GOTO150 ;
N4 IF[#1000EQ0]GOTO150 ;
N6 IF[#1001EQ0]GOTO10 ;
N8 M69 ;
N10 #100 = #1000 ;
N30 IF[#26NE#0]GOTO50 ;
N40 #26 = 150 ;
N50 #101 = #26 ;
N60 G0 W#101 ;
N70 M34 ;
N80 M78 ;
N90 M80 ;
N100 M35 ;
N110 G0 W-#26 ;
N120 M80 ;
N130 G4X2 ;
N140 M79 ;
N150 M99 ;

A macro program can be called using the following methods : Simple call G65
Modal call G66, G67
Macro call with G code
Macro call with M code
Subprogram call with M code
Subprogram call with T code

Simple call G65


The format for a G65 macro program call is as follows :

G65 P**** L**** **** ;

Program number Number of (repeat) Argument data passed to


(4 digits) to be called. times the macro local variables in the
program is called. macro program.
P = 1 - 9999.

81 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
Macro program Call (cont)
Modal call G66 (G67 Cancel)
The format for a G66 modal macro program call is as follows :

G66 P**** L**** **** ;

Program number Number of (repeat) Argument data passed


(4 digits) times the macro to local variables in
to be called. program is called. the macro program.
P = 1 - 9999.
Once G66 is issued to specify a modal call a macro program is called after a block specifying
movement along axes is executed. This continues until G67 is issued to cancel a modal call.

Macro call using G code

G codes can be used to call macro programs in the same way as a simple call G65. Parameter numbers
(6050 - 6059) call specific macro program numbers (O9010 - O9019) hence by setting a G code
number (1 - 9999) against the parameter number, programming the G code will call the macro
program. The format for calling a macro program with a G code is as follows.

G**** L**** **** ;

G code number. Number of Argument data passed


1 - 9999. (repeat) times the to local variables in
Calling macro macro program is the macro program.
program numbers called.
O9010 - O9019. L = 1 - 9999.

Correspondence between parameter numbers and macro program numbers are as follows.

Program Number Parameter Number G code used Program name


O9010 6050
O9011 6051 124 Semi Manual Tool Setting
O9012 6052 125 Auto Tool Setting
O9013 6053
O9014 6054
O9015 6055
O9016 6056
O9017 6057
O9018 6058
O9019 6059

82 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
Macro program Call (cont)
Macro call using M code

M codes can also be used to call macro programs in the same way as a simple call G65. Parameter
numbers (6080 - 6089) call specific macro program numbers (O9020 - O9029) hence by setting an M
code number (1 - 9999) against the parameter number, programming the M code will call the macro
program. The format for calling a macro program with a M code is as follows.

M**** L**** **** ;

M code number. Number of Argument data


1 - 9999. (repeat) times the passed to local
Calling macro macro program is variables in the
program numbers called. macro program.
O9020 - O9029. L = 1 - 9999.

Correspondence between parameter numbers and macro program numbers are as follows.

Program Number Parameter Number M code used Program name


O9020 6080 61 Barfeed Load New Bar
O9021 6081
O9022 6082
O9023 6083
O9024 6084
O9025 6085
O9026 6086
O9027 6087
O9028 6088
O9029 6089

Subprogram call using M code

M codes can also be used to call subprograms in a similar way to the M98 subprogram call M code.
Parameter numbers (6071 - 6079) call specific subprogram numbers (O9001 - O9009) hence by
setting an M code number (1 - 9999) against the parameter number, programming the M code will
call the subprogram. The format for calling a subprogram with a M code is as follows.

M**** L**** ;

M code number. 1 - 9999. Number of (repeat) times the


Calling macro program numbers macro program is called.
O9001 - O9009. L = 1 - 9999.

Correspondence between parameter numbers and subprogram numbers are as follows.

Program Number Parameter Number


O9001 6071
O9002 6072
 
O9008 6078
O9009 6079

G83 Peck Drilling Cycle

83 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
Peck Drilling Parameters (G83)
G83 X(U) Z(W) P Q R F(f) K
X(U) = X axis (abs) position of hole or incremental distance (U) to the hole from the initial point.
Z(W) = Z axis (abs) endpoint of hole or incremental distance (W).
Q = Peck increment in the Z axis specified in microns. If omitted no pecking is performed.
F(f) = Feedrate.
P = Dwell at hole bottom. (P5000 = 5secs / P0 or not specified = no dwell).
R = Distance from the initial level to start of linear cut feed.
K = Number of repeats (when required).

General Guidelines

 Before programming a G83 peck drilling cycle the tool must be positioned at the initial level
or cycle start point (i.e. at the X axis centreline).
 For standard right hand cutting drills the spindle direction should be set to M3 or M13 (counter
clockwise rotation).
 The tool rapids from the initial point to the X axis co-ordinate then rapids to the R level, then
feeds at the cutting feed rate to the hole bottom then rapid retracts to the initial level.
 Specifying X0 within the G83 cycle will drill the hole at the X axis centreline.
 If Q is not specified no pecking is performed during the cycle.
 If P is not specified, or P0 is specified no dwell occurs at the hole bottom.
 The canned cycle can be cancelled by the following codes : G0, G1, G2, G3 and G80.
 The retract distance (escape distance) for high speed peck drilling is specified by parameter 5114.
This is set as standard to 1mm.

G83 Peck Drilling Cycle Example (No.1)

84 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup

Part Program
O1001 (G83 EXAMPLE 1) ;
(PECK DRILLING CYCLE) ;
N10 G21 G99 G40 ;
G0 G28 U0 W0 ;
T0909 ;
G97 S2000 M3 ;
X0 Z40 ;
G83 Z-30 R-37 Q12000 P0 F0.3 M8 ;
G80 ;
G0 G28 U0 W0 M9 ;
M30 ;

G84 Floating Tapping Cycle

85 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
Tapping Parameters (G84)
G84 X(U) Z(W) F(f) P R K
X(U) = X axis (abs) position of hole or incremental distance (U) to the hole from the initial point.
Z(W) = Z axis (abs) endpoint of hole or incremental distance (W).
F(f) = Feedrate.
P = Dwell at hole bottom. (P5000 = 5secs / P0 or not specified = no dwell).
R = Distance from the initial level to start of linear feed.
K = Number of repeats (when required).

General Guidelines
 Before programming a G84 tapping cycle the tool must be positioned at the initial level or
cycle start point (i.e. at the X axis centreline).
 For standard right hand taps the spindle direction should be set to M3 or M13 (counter clockwise
rotation).
 The tool rapids from the initial point to the X axis co-ordinate then rapids to the R level, the tool
then feeds at the cutting feedrate to the hole bottom, the spindle reverses direction and the tool
feeds back to the R level, the spindle reverts back to its original direction and the tool then rapid
retracts to the initial level.
 Specifying X0 within the G84 cycle will tap the hole at the X axis centreline.
 If P is not specified, or P0 is specified no dwell occurs at the hole bottom.
 The canned cycle can be cancelled by the following codes : G0, G1, G2, G3 and G80.

Note
Feedrate override is ignored during tapping. A feed hold does not stop the
machine until the return operation is completed.

G84 Floating Tapping Cycle Example (No.1)

86 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup

Part Program
O1001 (G84 EXAMPLE 1) ;
(FLOATING TAP CYCLE) ;
N10 G21 G99 G40 ;
G0 G28 U0 W0 ;
T1010 ;
G97 S500 M3 ;
X0 Z50 ;
G84 Z-20 R-47 F1.25 M8 ;
G80 ;
G0 G28 U0 W0 M9 ;
M30 ;

G84 Rigid Tapping Cycle Example (No.1)

87 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
Specifying M29S*** within a tapping block forces the control into rigid tapping mode. In rigid
tapping mode the acceleration / infeed / deceleration and retract feedrate motions of a G84 cycle
are synchronised with spindle rotation, thus there is no need to hold the tap in a floating holder.
The maximum spindle speed for rigid tapping is limited to 1000 rpm.

Part Program
O1002 (G84 EXAMPLE 2) ;
(RIGID TAP CYCLE) ;
N10 G21 G99 G40 ;
G0 G28 U0 W0 ;
T1010 ;
X0 Z50 M8 ;
G97 S250 M3 ;
G84 Z-20 R-47 F1.25 M29 ;
G80 ;
G0 G28 U0 W0 M9 ;
M30 ;

88 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup
G84 Rigid Tap Pecking Cycle Example (No.2)

Part Program
O1002 (G84 EXAMPLE 2) ;
(RIGID PECK TAPPING CYCLE) ;
N10 G21 G99 G40 ;
G0 G28 U0 W0 ;
T1010 ;
X0 Z3 (CYCLE START POINT) ;
G97 S500 M13 ;
G84 Z-12 R0 F1.25 M29 ;
Z-21 ;
Z-30.5 ;
G80 ;
G0 G28 U0 W50 M9 ;
M30 ;

G85 Bore / Ream Cycle


89 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup

Bore / Ream Parameters (G85)


G85 X(U) Z(W) P R K F(f)
X(U) = X axis (abs) position of hole or incremental distance (U) to the hole from the initial point.
Z(W) = Z axis (abs) endpoint of hole or incremental distance (W).
F(f) = Feedrate.
P = Dwell at hole bottom. (P5000 = 5secs / P0 or not specified = no dwell).
R = Distance from the initial level to start of linear cut feed.
K = Number of repeats (when needed). NOT USUALLY REQUIRED.

General Guidelines
 Before programming a G85 bore / ream cycle the tool must be positioned at the initial level or
cycle start point (i.e. at the X axis centreline).
 For standard right hand cutting reamers the spindle direction should be set to M3 or M13 (counter
clockwise rotation).
 The tool rapids from the initial point to the X axis co-ordinate then rapids to the R level, then
feeds at the cutting feedrate to the hole bottom, dwells (if P is specified) then returns to the R level
at double the cutting feedrate then rapid retracts to the initial level.
 Specifying X0 within the G85 cycle will bore / ream the hole at the X axis centreline.
 If P is not specified, or P0 is specified no dwell occurs at the hole bottom.
 The canned cycle can be cancelled by the following codes : G0, G1, G2, G3 and G80.
 If K is not specified or K1 is specified only one cutting cycle is performed. The K word is usually
not required.

G85 Bore / Ream Cycle Example (No.1)


90 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup

Part Program
O1001 (G85 EXAMPLE 1) ;
(BORE - REAM CYCLE) ;
N10 G21 G99 G40 ;
G0 G28 U0 W0 ;
T0909 ;
G97 S1200 M3 ;
X0 Z20 ;
G85 Z-15 R-17 P1000 F0.1 M8 ;
G80 ;
G0 G28 U0 W0 M9 ;
M30 ;

91 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup

92 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )
Fanuc Lathe Programming
Chapter 1 - Startup

93 Nguyễn Anh Sô công ty gia dụng Goldsun Việt Nam ( tài liệu hãng FANUC )

You might also like