Professional Documents
Culture Documents
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_ _ _ _ ;
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.
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.
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.
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
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).
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
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)
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
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
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:
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.
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
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
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
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
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
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)
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
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)
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)
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.
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.
The new X axis geometry offset will over write the existing geometry offset and
reset the appropriate wear offset to zero.
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.
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.
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 ;
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.
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 ;
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-
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
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
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%).
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.
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)
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)
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)
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)
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.
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
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
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.
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.
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)
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)
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)
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
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
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)
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)
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)
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
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
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.
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.
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.
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)
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)
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)
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:
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.
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.
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.
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
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 :
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.
Correspondence between parameter numbers and macro program numbers are as follows.
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.
Correspondence between parameter numbers and macro program numbers are as follows.
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**** ;
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.
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 ;
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.
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 ;
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 ;
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.
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 )