NC-Programming Manual For Turning Centers With Fanuc 30 Series Controls
NC-Programming Manual For Turning Centers With Fanuc 30 Series Controls
1
1 _____________________________________________________________________________________ 5
Meaning of addresses ____________________________________________________________________ 5
Tool Number Designation_________________________________________________________________ 2
2 Introduction to NC-programming ______________________________________________________ 1
2.1 Program Registration __________________________________________________________ 2
2.2 How to key-in a program on a FANUC control _____________________________________ 3
2.3 Notes on program registration ___________________________________________________ 3
2.4 Notes on writing a program on a PC ______________________________________________ 3
3 List of Commands used in NC-Lathe programming ________________________________________ 4
3.1 Addresses ____________________________________________________________________ 4
3.2 Words _______________________________________________________________________ 5
3.3 Blocks _______________________________________________________________________ 6
3.4 End of Block Character _________________________________________________________ 6
3.5 Range of input data ____________________________________________________________ 6
3.6 The use of decimal fractions in programming _______________________________________ 7
3.7 Suppression of Leading or trailing Zero ___________________________________________ 8
3.8 The use of Sequence Numbers in the program ______________________________________ 8
3.9 Optional Block Skip Character, / Slash __________________________________________ 9
3.10 Feed Command _______________________________________________________________ 9
3.11 Spindle Command ____________________________________________________________ 11
3.12 Tool Command _______________________________________________________________ 12
3.13 Tool-offsets __________________________________________________________________ 12
3.14 Tool-Offset Command _________________________________________________________ 13
4 Tool Nose Radius Compensation ______________________________________________________ 14
4.1 G40, G41 and G42 Tool Nose Radius Compensation Function Commands ______________ 14
4.2 Tool Nose Radius Compensation Data ____________________________________________ 16
5 G-Codes _________________________________________________________________________ 16
5.1 G-Code List (G-code system A, partial listing) _____________________________________ 18
6 Miscellaneous Functions, M -codes _________________________________________________ 19
6.1 M-Code List _________________________________________________________________ 19
7 Coordinate Systems ________________________________________________________________ 21
7.1 Basic Coordinate System _______________________________________________________ 21
7.2 NC Lathe Coordinate System ___________________________________________________ 21
7.3 Machine Coordinate System ____________________________________________________ 23
2
7.4 Work Coordinate System ______________________________________________________ 24
7.5 Work Offsets & Work Coordinate Systems________________________________________ 25
7.6 Work Coordinate System Grid __________________________________________________ 26
7.7 Absolute Coordinate Command _________________________________________________ 27
7.8 Incremental Coordinate Command ______________________________________________ 27
7.9 Absolute & Incremental Command in same Block __________________________________ 29
8 Positioning _______________________________________________________________________ 29
8.1 G0 Positioning in the Work Coordinate System ___________________________________ 29
8.2 Positioning in the Machine Coordinate System _____________________________________ 30
9 Interpolation Function ______________________________________________________________ 31
9.1 G1 - Linear Interpolation ______________________________________________________ 31
9.2 G2 - Circular Interpolation Clockwise ____________________________________________ 32
9.3 G3 - Circular interpolation Counter Clockwise ____________________________________ 32
9.4 Circular Interpolation using arc center point specification ___________________________ 34
9.5 Chamfering & Corner Rounding Function (using Addresses C , R ) _______________ 35
9.6 Chamfering Function (using Addresses I , K) _________________________________ 36
9.7 Thread Cutting Function (G32) _________________________________________________ 37
9.8 Tapping _____________________________________________________________________ 41
10 Reference point return functions ______________________________________________________ 41
10.1 G28- Reference Point Return (Rapid traverse) _____________________________________ 41
10.2 G30 - 2nd Reference Point Return (Rapid traverse)__________________________________ 42
11 Standard Program Format___________________________________________________________ 43
12 Sub Programs _____________________________________________________________________ 45
12.1 Sub Program Call_____________________________________________________________ 45
12.2 Sub program Repetition _______________________________________________________ 46
12.3 Nesting of sub programs _______________________________________________________ 46
13 Simple Canned Cycles for turning (G90) _______________________________________________ 47
13.1 G90 Canned Turning and Boring _______________________________________________ 47
13.2 G90 Canned Cycles for Taper Turning and Boring _________________________________ 51
13.3 G94 Canned Facing ___________________________________________________________ 52
13.4 G94 Canned Cycles for Facing on a Taper ________________________________________ 54
14 Multiple Repetitive Cycles ___________________________________________________________ 55
14.1 G70 Finishing ________________________________________________________________ 55
14.2 G71 Turning Boring Roughing Cycle ___________________________________________ 56
14.3 G72 Facing __________________________________________________________________ 60
14.4 G73 Turning - Boring, Pattern Repeating _________________________________________ 64
3
14.5 G74 Peck Drilling & Face Grooving (trepanning) On The Z Axis _____________________ 67
14.6 G75 Peck Grooving on the X Axis _______________________________________________ 70
15 Thread Cutting Cycles ______________________________________________________________ 72
15.1 Thread Cutting Limitations ____________________________________________________ 72
15.2 Imperfect Thread Calculation___________________________________________________ 73
15.3 G76 Thread Cutting, Multiple Repetitive _________________________________________ 74
15.4 G76 Thread Cutting, Multiple Repetitive, Taper ___________________________________ 78
15.5 G76 THREADING CYCLE TWO LINE FORMAT (FS 0,16,18,21T,31i,32i, -FORMAT)79
15.6 Programming Examples, using the G76-Thread Cutting Cycle _______________________ 83
15.7 G76 Thread Cutting, Multiple Repetitive, Multi Start _______________________________ 85
15.8 G92 Thread Cutting ___________________________________________________________ 86
15.9 G92 Thread Cutting, Taper_____________________________________________________ 88
16 Canned Cycles for hole machining (G80 Series) _________________________________________ 89
16.1 G83 Z-axis Peck Drilling Cycle __________________________________________________ 89
16.2 G84 Z-axis Tapping Cycle ______________________________________________________ 90
17 Miscellaneous Settings ______________________________________________________________ 92
17.1 Instructions for Setting the Work-Zero Point on Lathes with Fanuc 18T 21T, Or 30 Series
Controls. ___________________________________________________________________________ 92
17.2 Work-offset setting procedure for lathes equipped with Q-setter. ______________________ 94
17.3 Work-offset setting procedure for lathes without Q-setter ____________________________ 94
17.4 How To Set the 2nd reference point (G30) on the Fanuc 16/18/21-T/ and 30 Series controls _ 95
17.5 Changing Parameters on 16/18TC and 30 Series Controls ___________________________ 96
18 Operator's Control Panel ____________________________________________________________ 97
4
Meaning of addresses
N G X Y F S T M :
5
Tool Number Designation
T Function is used for the designation of tool numbers and tool compensation.
T Function is a tool selection code usually made of 4 digits.
T 02 02
0 2 Calls the tool number (turret position) and 0 2 is the tool offset number to use.
2
2 Introduction to NC-programming
To write a program for the NC means to translate all of the action that
is required for machining a work piece into a language format that the
control can understand. NC programming is done in an internationally
standardized language that consists of coded text.
The sketch below shows the tool path for the program shown above.
1
The program-text is input to the NC-memory by using the keypad as
provided on the system. It is also possible to upload a program text
file that has been created on a personal computer by connecting a PC to
the RS-232 communication interface device at the NC unit.
The FANUC 18-I, 21-I and 30i Series controls are equipped with a PCMCIA-
card slot, allowing uploading / downloading of NC-programs using a flash
card or a compact flash card (commonly used in digital cameras) with a
PC Card Adapter.
The first line of a program must specify the letter O, followed by the
program number. The range of this number is normally between zero and
9999. When a program number is input into the control memory it
establishes a new file name which is the same as the program number.
2
2.2 How to key-in a program on a FANUC control
The percent sign % must stand at the head of the program and on
the tail end on a line by itself.
Semicolon (EOB character) must not be added at end of a line. Pressing
the enter-key at the end of line or end of block starts a new line.
NC programs must be saved in Text Format. This allows uploading the
file to a FANUC control directly. For details how to upload a program
to the NC system, please consult the operation manual.
3
3 List of Commands used in NC-Lathe programming
This chapter provides an overview of the basic commands and function
codes that are used in NC-programming.
3.1 Addresses
O1234;
Letter O followed by a 4-digit
Program number O
number registers a program in the
NC-memory.
N1234;
Line-number or sequence number. The
Sequence number N
use of line numbers allows manual
and automatic line-search function.
G1 through G99;
Control function. (See the G-code
Preparatory function G
list for detailed description of the
G-codes)
X1.2345;
Coordinate addresses for axis
Coordinate address X,Z,U,W
position command.
R1.2345;
Coordinate address R Arc or corner radius specification.
I-0.1234;
Used for defining the location of an
Coordinate address I,K
arc center point. Also used for
chamfering function.
F0.0005;
Specifies motion distance per
Feed function F spindle revolution, or thread lead,
or motion speed in units of inches
per minute.
S2000;
Spindle speed specifications in RPM-
Spindle speed function S
units or surface speed in units of
feet per minute.
T0101;
Tool function T Tool selection & tool offset command
4
Function Address Application / Use
M8;
Used for activating various machine
Machine function M functions, such as spindle, coolant,
etc.
(See M-code list for details)
Used for sub program call M98P_ and
Search function P for sequence number search command
M99P_.
Dwell command.
Dwell function P,U G4 P1= Dwell-time =1 millisecond
G4 U1. = Dwell-time =1 second.
Number of times to repeat a sub
Repetition function L,P program. M98 P1234 L100 , or M98
P1001234
These addresses when used together
Canned cycle function I,K,P,Q,R with canned cycles have functions
other than as outlined, above.
3.2 Words
More than one word may be required at the same line in order to execute
a task.
For example: G0 X2.5 Z.1 M8. This command instructs the machine to
position a tool at the coordinates X2.5, Z.1 and to turn on the coolant.
5
3.3 Blocks
Numbers or data used in programming must fit a certain range. The data
range varies depending on type of address, unit of measurement and
machine type. The data range in the table below is applicable for most
NC lathes. Maximum data range shown for coordinates is the theoretical
upper limit. Actual maximum range is lower, depending on size and type
of machine.
Data range
6
3.6 The use of decimal fractions in programming
When the decimal point is omitted with an address that permits the use
of decimal fractions, the system reverts to the least input increment as
shown in the table, below.
X1 X0.0001
X10 X0.0010
X100 X0.0100
X1000 X0.1000
X10000 X1.0000
7
3.7 Suppression of Leading or trailing Zero
For example: The accuracy of the number 1.0000 is the same as that of
the number 1.
For example:
N10 (DRILL HOLE)
;
N20 (ROUGH TURN OUTSIDE)
;
N30 (FINISH BORE)
;
The format shown above establishes good overview and organization within
a program. Sequence numbers should be placed in logical order. The
numbers can be spaced in increments of 10, as shown in the example.
Comments that provide clues with regards to operation details, tools,
etc can be placed just after the sequence number. This practice is
helpful for communication between the programmer, setup and machine
operator personnel.
The order of processing is not influenced by the numerical order of
sequence numbers.
8
3.9 Optional Block Skip Character, / Slash
N70 M54;
/N80 M99; - Block skip function
N90 M30
In the above example, the control will ignore the block N80 when the
"Optional Block Skip" switch turned on.
The slash must be placed at the start of the block so that the whole
block of information is subject to the skip function. If it is placed in
random order in the block the control will read & execute the block
information up to the /. Words on the right of the / will be
ignored.
A numerical value following the address F sets the feed rate. There
are two different feed modes available. The feed-mode is selected by
these G-codes:
For bar pulling and for broaching operations where the spindle is not
allowed to rotate the Inches per minute feed mode must be commanded.
In G98-mode the command F 20. for example, sets a feed rate of 20 per
minute.
Note that the G-codes G98 and G99 as well as the feed rate command F
is modal. The meaning of modal is that a command remains active until
it has been cancelled or replaced by another command related to the same
family or group of commands.
9
For example:
Once G98 has been commanded the inches per minute feed mode remains
active in every block. Its not necessary to repeat the command. The
G99 command cancels the G98-mode.
Once a specific feed rate has been commanded it remains active until
replaced with a different feed rate.
For example:
When the command G1 G98 Z-1.25 F20.0 has been used for
bar pulling. Upon completion of this operation, the
instructions for the machining operation to follow just
after the bar pulling operation must include the
commands G99 with an applicable feed rate, without fail.
Suppose the spindle runs at 3000 RPM at the time. If the
feed rate of 20 is still active and the G99-mode has
been command the feed is now 20 per revolution or about
83 feet per second just under 60 miles per hour.
10
3.11 Spindle Command
The command: G97 S2000 M3 P11 runs the spindle at 2000 RPM.
M3 or M4 command the direction of spindle rotation, forward or reverse.
The M5 command stops the spindle.
The command: G96 S500 M3 P11 runs the spindle at a constant surface
speed (circumference speed) of 500 feet per minute. In this mode the
control automatically calculates the spindle RPM, based on the diameter
that is machined, at any given time. The following formula is applied
for calculation of the RPM:
Where:
12 x V
RPM = V = Cutting Speed (feet/minute)
D x 3.14 D = Work piece diameter (inch)
3.82 x V
OR: RPM =
D
For example:
According to this formula, when a cutting speed (V) of 5oo feet per
minute G96 S500 P11 has been commanded the spindle will run 1910
RPM when machining is done on a 1 diameter part.
For safety the maximum spindle RPM must be clamped at a safe speed.
Suppose the maximum permissible spindle speed is 1200 RPM, the command
G50 S1200 must be included in the program.
When constant surface speed control is used the command G50 S-(maximum)
must stand at the beginning of a program, prior to any other spindle
command.
11
The G50 S-command is valid only during G96-mode. G50 S1200 P11 does
not override a G97 S2000 P11 -command. The G50 S-command is modal.
The upper two digits represent the turret position or the tool number
command. The lower two digits represent the tool-offset number command.
For example:
T0100 = Turret position #1 (or tool #1).
This command takes care of tool selection only. The tool-offset must be
commanded, additionally.
3.13 Tool-offsets
The need for tool-offsets is due to the fact that it is very difficult
to physically attach a tool to the machine so that the tool-tip lines up
precisely with a desired point in the coordinate system.
The tool-offset command instructs the control to get the data from the
offset register and compound it to the coordinate system.
12
NO. X Z R T
offset # X axis Z axis Tool nose Tool nose
offset offset radius vector
01 1.75 -.025 .0312 3
02
Tool offsets are important for size control of the part to be machined.
After a part has been machined and inspected for dimensional accuracy,
any size correction that might be needed is manually keyed into the
tool-offset register. The next machined part will reflect the size
correction that has been input.
The complete tool command for tool #1 is T0101 = Tool #1 and offset #1
Alternate tool-offsets.
For example:
T0101 = Tool #1 and offset #1 -primary offset
Or: T0121 = Tool #1 and offset #21 -alternate offset
Tool offsets are not stacked or compounded on top of one another. When
T0121 has been commanded after T0101, then tool-offset #21 only is
effective.
13
4 Tool Nose Radius Compensation
Most carbide turning tool inserts employ a tool nose radius at the tool
tip for the purpose of increasing tool life. Standard radii range from
1/64" up to 3/32" in 1/64th increments, typically. In some cases, radius-
grooving tools are used for machining.
1. Compensating for the tool nose radius in the tool path geometry in the
NC-program. This method produces the best results. However, without
the use of a PC equipped with CAM software, the calculation of the
tool path geometry can become very cumbersome and time consuming.
4.1 G40, G41 and G42 Tool Nose Radius Compensation Function Commands
Geometry of a tool path that has been programmed using the actual part
dimensions can be produced correctly when the automatic tool nose radius
compensation function is applied.
Rules to apply in the use of the tool nose radius compensation function
1. Tool nose radius and tool nose vector must be registered in the tool-
offset tables under the offset number to be used for a given tool.
(See next page for more details)
2. The TNR compensation code (G41 or G42) must be commanded together with
an axis move command, (G0 or G1) one block before actual machining on
the part begins. This is called a RAMP-ON-move. The axis move must
not be smaller than twice the TNR in X or not smaller than the
actual TNR when ramping ON in Z direction.
3. RAMP-ON moves should be done to a point in the Z direction that is at
least 1 x R clear of the first surface to be machined and X on the
diameter to be machined whenever possible.
4. The TNR compensation command is modal. When a program is interrupted
during TNR COMP, G40 must be commanded at the program start up.
5. When G40 is commanded together with an axis move (RAMP-OFF), the
move distance must be at least twice the TNR in X, or at least one TNR
in Z.
6. G40 must not be commanded during actual machining on the part. It will
produce errors on the part geometry.
7. Arc command (G2 or G3) for inside radii that are smaller than the tool
nose radius is not allowed.
8. Small steps at an inside corner or undercuts, smaller than the TNR are
not allowed.
9. In TNR-COMP mode, the cutting direction must never be reversed 180.
10. In TNR-COMP mode, not more than one block without an X or Z
command is allowed.
15
4.2 Tool Nose Radius Compensation Data
NO. X Z R T
offset # X axis Z axis Tool nose Tool nose
offset offset radius vector
01 1.75 -.025 .0312 3
02
NOTES:
1. Turning tools are touched off the normal way. TNR-Compensation only
covers the 90-sector in which the TNR is located.
2. Compensation for radius grooving tools covers the 180-sector in which
the TNR is located. When TNR-COMP is used with radius grooving tools,
they must be touched of as follows:
Vector 5 and 7: touch off Z the normal way, touch off X at the
center of the radius
Vector 6 and 8: touch off X the normal way, touch off Z at the
center of the radius
Vector 0: touch off X the and Z at center of the radius
5 G-Codes
16
G-codes activate various types of control functions or set modes of
operation. G-codes are subdivided into groups or families, by function-
type as shown in the table, below.
The following G-codes are active upon initial power-up of the control:
G0, G18, G22, G40, G54, G80, G97, and G99.
One G-code only from the same group can be commanded in a block. When
more than one G-code from the same group is commanded the last G-code
from within a group specified is activated.
G-codes of all other groups are Modal, meaning that once the G-code
has been commanded it remains active until replaced by another G-code
from within the same group or family.
17
5.1 G-Code List (G-code system A, partial listing)
18
6 Miscellaneous Functions, M -codes
Please note that M-codes may vary from one machine tool builder to
another. Most of the M-codes shown on the list shown below are generally
valid for PUMA Turning Centers only. M0 through M9 may apply for other
brands of turning centers, as well.
19
M-Code Description Spec.
M51 Bar Feeder Command 2 Option
M52 Splash Guard Door Open Option
M53 Splash Guard Door Close Option
M54 Parts Count Option
M58 Steady Rest Clamp Option
M59 Steady Rest Unclamp Option
M61 Switching Low Speed
M62 Switching High Speed
M89 C-AXIS clamp or, Spindle Clamp for non C-axis machines
M90 C-AXIS un-clamp or, Spindle Un-Clamp for non C-axis machines
M91 External M91 Command Option
M92 External M92 Command Option
M93 External M93 Command Option
M94 External M94 Command Option
M98 Sub-Program Call
M99 End of Sub-Program
20
7 Coordinate Systems
21
The sketch below shows the standard two-axis NC-lathe-coordinate system
in a two-dimensional view in which the X-axis runs vertically and the Z-
axis horizontally. The point X0, Z0 is called the ORIGIN or ZERO-POINT
of the coordinate system.
22
7.3 Machine Coordinate System
The origin or zero point of the machine coordinate system is normally
located at the intersection of the main-spindle center axis (X0) and the
spindle flange face (Z0). This point serves as a hard reference for
calibration of the turret HOME-position. The machine coordinate system
origin is the base point for all other coordinate systems. However,
machine coordinates are normally not used for programming of a part.
The sketch below shows the machine coordinate system-grid with the
location of MACHINE ORIGIN and MACHINE REFERENCE POINT. The coordinates
as shown in this example: X10, Z10 are for illustration purpose only.
Actual machine coordinates are different depending on size of machine.
23
7.4 Work Coordinate System
The X-axis work zero point on a NC-lathe is always set at the center
axis of the spindle. This is also the center axis of the work piece. The
origin of the X-axis work coordinates is always the same as the origin
of the X-axis machine coordinates.
Before programming a new part the programmer must decide the location of
the work zero point along the Z-axis. Placing the Z-axis zero point at
the right end face of the part to be machined is recommended. However,
this is at the programmers discretion.
Suppose the work zero point has been decided on the right face of the
part as shown above. During machine setup the distance between machine
zero point and the work zero point along the Z-axis is measured and
recorded in the work offset register. (See sketch, below)
24
7.5 Work Offsets & Work Coordinate Systems
Older NC-lathes are equipped with a single work offset register, known
as the WORK SHIFT. The work-offset distance is entered into the work
shift register. This will set the origin of the Work Coordinate System
or the program zero point. Setting the work zero point on the machine is
the responsibility of the setup person.
At the instant when the work zero point is set the ABSOLUTE POSITION-
display on the machine is updated automatically.
Modern turning centers are equipped with six work-offset registers that
make up six different work coordinate systems.
25
7.6 Work Coordinate System Grid
The sketch below shows a coordinate system grid that is applicable for a
turning center equipped with a turret. The turret is located on the top
right hand side of the spindle, or on the opposite side of the spindle
center as seen from the operator. On this type of turning center all of
the cutting tools are located on the X and Z positive side of the
coordinate system. The machining is normally done at the positive side
on the X-axis only.
26
7.7 Absolute Coordinate Command
A distance measured from the zero point to any point in the coordinate
system is called an ABSOLUTE Dimension. Once the work zero point has
been established the coordinates used for programming are referenced to
that point.
For programming of the tool path that cuts the shape of the part as
shown in the sketch below, the X and Z coordinates at the intersecting
points P1 through P5 of the contour must be known.
The table below shows the points on the tool path, using absolute
dimensions.
27
An incremental dimension is a distance measured from a point in a
coordinate system to another point.
The table below shows incremental coordinate commands for the tool path
that cuts the part shown above. Absolute coordinates are used only for
the start point (P1).
28
7.9 Absolute & Incremental Command in same Block
8 Positioning
This command moves the turret or tools from the current position to a
point specified by X, Z, U or W in the work coordinate system.
Positioning is used for moving a tool near to the part where machining
starts or for retracting the tool away from the machining area. The
positioning speed is up to 1000 inches per minute.
Either one of these commands will position the tool as shown, below.
Notes:
29
As illustrated in the sketch, positioning is not necessarily done in a
straight line from point A to point B. Positioning speed of both axis
servos is about the same. In this case the travel distance along the X-
axis is shorter than along Z. X arrives at the destination before Z.
This command moves the turret or tools from the current position to a
point specified by X, Z, in the machine coordinate system.
30
9 Interpolation Function
Linear interpolation means that both axes, X and Z will arrive at the
commanded point at the same time.
31
9.2 G2 - Circular Interpolation Clockwise
32
For circular interpolation in general, please note the following:
Feed rate must be commanded or a feed rate must be active (modal) when
G2 or G3 is commanded.
The R-command can be applied for any arc when observing the
following rules:
Positive R command is used for arc of 180 degrees or less.
Negative R command is used for arc of more than 180 degrees.
For Example:
When an arc is larger than 180 degrees the R-command must be negative:
G3 X__ Z__ R (negative) - produces the correct tool path as shown in
Figure 1.
When a positive R command is used for an arc larger than 180 degrees:
G3 X__ Z__ R (positive) an incorrect tool path as shown in Figure 2 is
produced.
Figure 1
Figure 2
33
9.4 Circular Interpolation using arc center point specification
Format: G3 X (U) Z (W) I_ K_ F_
Notes:
34
9.5 Chamfering & Corner Rounding Function (using Addresses C , R )
G1 X0 Z0 (start point)
G1 X1.0 C-0.1 F.005
G1 Z-0.5
G1 X0 Z0 (start point)
G1 X1.0 R-0.1 F.005
G1 Z-0.5
35
9.6 Chamfering Function (using Addresses I , K)
G0 X1.0 Z0
G1 Z-.4 F.008
X2.4 K-.2
Z-1.3 I.2
X3.2
G0 X3.7 Z.1
G1 Z-.9 I-.2 F.007
X1.8 K-.2
Z-1.6
X1.5
36
9.7 Thread Cutting Function (G32)
G32 Format:
The G32-command is modal. (The commands: G0, G1, G2, G3, and some others
cancel G32)
37
In the block with the G32-command the feed rate F specifies the Lead
of the thread in inches per revolution.
F=1/TPI
For best LEAD-accuracy, F can be specified by up to 6-digits after the
decimal point.
The sketch above shows (4) thread cutting passes. When the tool is to
follow the lead of the first pass, each of the subsequent passes must
start from the same Z-axis position as the first pass. The program would
look something like this:
38
Programming of a thread requires some machining skills and experience.
The following important factors must be considered when programming a
thread:
Selection of the cutting tool, spindle speed and thread cutting method
is made based on the above factors.
The sketch below shows three different thread cutting methods that can
be applied for V-shaped threads such as common screw and pipe threads.
Plunge cutting
39
Leading edge cutting
Leading edge cutting means that after the first pass only the left
edge of the tool does the cutting. This is accomplished by shifting
the Z-axis start position of the tool toward the thread with every
pass. For V-shaped thread forms the leading edge cutting method works
best, especially for materials with tough chip forming
characteristics.
Here is a sample program showing several threading passes for a leading edge-cutting cycle.
The thread is a 1-12. Normal thread angels are 29 degrees, and a safe approach distance is 4 threads.
With this information we can calculate the Z start at about .4 and the incremental Z shift to .0047 by using
the formula below.
Calculate the difference between the X diameters block N110 and N150 (0.9812 - 0.9461) / 2 = 0.0085.
Multiply this radius value by the tangent of 29 degrees (0.0085 x TAN 29 = 0.0047). This is the incremental
distance in Z between block N100 and N140 (0.400 - 0.0047 = 0.3953).
By using G32 you can control the exact depth and distance of each machining pass. Even if a CAD/CAM
system provides the code, with a few simple calculations you can better understand the program and the
machining process.
40
9.8 Tapping
When using the G32 function for tapping a floating tap holder is
required that provides freedom of movement to the tap in axial
direction. Spindle speed must be kept below 300 RPM to prevent excessive
coasting.
NOTE: This program must not be run in single block mode tap will break
at the bottom of the hole when spindle keeps running forward.
The program command: G28 U0 W0 returns the X and Z-axis from any point
in the work coordinate system directly to the reference point, in
rapid traverse mode, as shown in the sketch, below.
The program command: G28 X7.0 Z1.0 returns the X and Z-axis from any
point in the work coordinate system to a specified intermediate point.
41
See point B shown in the sketch below. Subsequently the move to the
reference point is done in rapid traverse mode.
Caution must be used with the G28 X__ Z__ (absolute command). The
point X, Z, as specified must be clear of the work piece.
The 2nd reference point offers an advantage in that it can be set at any
desired point in the machine coordinate system. Once set the position is
always at the same location. It is not influenced by tool offsets or by
changes in the work coordinate system.
The program command: G30 U0 W0 returns the X and Z-axis from any point
in the work coordinate system directly to the 2nd reference point, in
rapid traverse mode, as shown in the sketch, below.
The program command: G30 X6.0 Z0 returns the X and Z-axis from any
point in the work coordinate system to a specified intermediate point
in the work coordinate system at first. (See point B shown in the
sketch below). Subsequently, the turret is moved from that point to
the 2nd reference point. Both moves are done in rapid traverse mode.
42
Caution must be used with the G28 X__ Z__ (absolute command). The
specified point X, Z, must be clear of the work piece, without fail.
O1234;
LETTER O FOLLOWED BY A 4 DIGIT PROGRAM NUMBER
G50 S-----;
SETS A MAXIMUM ALLOWABLE CHUCK RPM IN G96 MODE
G40 M42;
G40 = CUTTER COMP CANCEL
M41 = FIRST GEAR
M42 = SECOND GEAR
M43 = THIRD GEAR
M44 = FOURTH GEAR
NOTE: M-CODES M41-M44 NOT TO BE USED WHEN MACHINE HAS NO GEARBOX
G96/97 S_____ M3/M4 P11;
G96 = CONSTANT SURFACE FEET
G97 = CONSTANT R.P.M.
S_____ = VALUE OF G96/97
M3 P11= SPINDLE FORWARD
43
M4 P11= SPINDLE REVERSE
-------------------------------------------------------------------
MACHINING INSTRUCTIONS
-------------------------------------------------------------------
M1;
OPTIONAL STOP
M30;
END OF PROGRAM, REWIND TO BEGINNING
44
12 Sub Programs
Programs can be created for various types of operations or routines that
can be used repetitively. For example: Sub programs for operations such
as bar pulling or bar feeding, repetitive grooving, contouring or hole
drilling routines, etc. can be stored in the NC-memory. Whenever the
need arises, a sub program can be conveniently called for execution.
M98 P____ (Call any program number stored in memory that ends with
M99)
At the M98 P__ command, processing of the current program is halted and
the sub program is processed, immediately. Upon completed execution of
the sub program the M99 command returns processing back to the main
program, resuming operation just at the line below the M98 P2 command,
in the case as shown below.
M98 P1234
M30 M99
When a program number is called that does not exist in the memory, the
alarm: NUMBER NOT FOUND occurs.
45
12.2 Sub program Repetition
When a routine needs to be repeated several times consecutively, the
letter L specifies the repetitive count. When L is omitted, the sub
program is executed once only.
For example:
Please note that the first three digits specify the repetitive
count, while the last four digits specify the program number.
In the case shown above, program 100 calls sub program 1 at first.
Next, program 1 calls program 2, then 2 calls 3.
The M99 command on each sub program returns processing back to the
program that called the sub program. Processing of the program that
called the sub resumes at the line just below the M98 P__ command.
46
13 Simple Canned Cycles for turning (G90)
The G90 canned cycles perform a box pattern consisting of in-feed,
retract and returning the tool back to the initial start position by
specifying one block of information only.
G90 is a straight box turning cycle that will permit cutting along the Z
axis, the syntax is as shown:
The tool must first be positioned to the start point of the cycle, after
that the G90 command will instruct the correct tool path & feed rate.
47
Notes on using G90 canned cycles for turning and boring
48
It is possible to use the G90 command and vary your endpoint of the Z-
axis.
The cycle time can be reduced by commanding a G0 with the X axis .05
larger than the cutting diameter. This will let the tool rapid back to
its starting position in Z.
G0 X4.1 Z.1
G90 X3.8 Z-1.4 F.015
49
G0 X3.85
G90 X3.6 Z-1.4 F.015
G0 X3.65
G90 X3.4 Z-1.4 F.015 Here the X axis is commanded to a
G0 X3.45 point .050 larger than it's start
G90 X3.2 Z-1.4 F.015 diameter and will rapid back it's
G0 X3.25 starting position.
G90 X3. Z-1.4 F.008
G0 G40 X12. Z8.
M1
Please note that the G0 will cancel the G90 making it necessary to
command G90 each time as shown
50
13.2 G90 Canned Cycles for Taper Turning and Boring
Taper cutting can be specified using the G90 cycle by the following
syntax:
In the above example the new variable is R, this is used to specify the
direction and amount of taper, the taper is specified radial as the
difference in diameter from front of the taper to back of the taper.
This value is signed + or - depending on if the taper increases or
decreases in diameter.
51
13.3 G94 Canned Facing
G94 is a box turning cycle that will permit the programmer to execute
facing cuts on the part. The syntax is as follows:
The tool must first be positioned to the start point of the cutting
cycle then G94 should be programmed.
52
Notes on using G94 facing
53
13.4 G94 Canned Cycles for Facing on a Taper
The G94 can be programmed to execute a taper cutting action, the syntax
for doing this is as follows:
In the above example the new variable is R, this is used to specify the
direction and amount of taper, the taper is specified as the difference
in Z-axis position from the top of the taper to the bottom of the taper.
This value is signed + or - depending on if the taper increases or
decreases the its depth in the Z axis.
54
14 Multiple Repetitive Cycles
Multiple repetitive cycles allow the programmer to write programs for
complex shapes while keeping the number of program lines down to the
absolute minimum. The programmer will typically write a line that
contains various cutting parameters and after that will write the
machine code that specifies the finished shape of the part. The control
will automatically guide the machine in its various movements from the
outside of the material to the finished shape performing repetitive
cutting until the finished shape is complete.
This cycle is used after using one of the multiple repetitive roughing
cycles (G71, G72 and G73). The G70 command will allow the contour to be
finish turned with the stock allowance of the X & Z-axis being machined.
The F & S functions specified in the contour description are active and
will be used. The syntax is as follows:
Note that the finishing tool must be positioned to start cutting at the
same start point as the roughing tool.
55
14.2 G71 Turning Boring Roughing Cycle
G71 permits the rough machining of a contour along the Z-axis from a
solid blank of material leaving a allowance of stock on the X & Z-axis
to be finish machined afterwards. The syntax is as follows:
G71 U R
G71 P Q U W F
U = the depth of cut for each roughing pass, this is to be designated
radial and without the use of a decimal point. .125" = 1250, .250" =
2500.
R = is the size of the 45 degree pullout during each roughing pass.
P = the sequence number for the start of the program contour.
Q = the sequence number for the end of the program contour.
U = will allow the programmer to specify the amount of stock left on the
X-axis for finishing this is to be specified radial. This value must
be signed negative (-) when doing ID work.
W = will allow the programmer to specify the amount of stock left on the
Z-axis for finishing.
F = roughing feed rate
Note that the shape of the part must increase or decrease in diameter
and move from right to left. If the part goes from a larger to smaller
and back to a larger diameter you must have the Type 2 option. As of
June 98 standard.
The finishing feed rates should be inserted in the finish part
description. This will allow you to change feed rates according to the
surface finish requirements.
56
Tool path of G71 Cycle
57
Notes on using G71 turning - boring
OD Turning ID Boring
58
59
14.3 G72 Facing
G72 permits the rough machining of a contour along the X-axis from a
solid blank of material leaving a allowance of stock on the X & Z-axis
to be finish machined afterwards. The syntax is as follows:
G72 W R
G72 P Q U W F
W = the depth of cut for each roughing pass, this is to be designated
radial and without the use of a decimal point. .125" = 1250, .250" =
2500.
R = is the size of the 45 degree pull out.
P = the sequence number for the start of the program contour.
Q = the sequence number for the end of the program contour.
U = will allow the programmer to specify the amount of stock left on the
X-axis for finishing this is to be specified radial. This value must
be signed negative (-) when doing ID work.
W = will allow the programmer to specify the amount of stock left on the
Z-axis for finishing.
F = roughing feed rate
Note that the shape of the part must decrease or increase in diameter,
the control will not pocket.
60
Tool path of G72 Cycle
61
Notes on using G72 turning - boring
OD Turning ID Boring
62
63
14.4 G73 Turning - Boring, Pattern Repeating
The G73 cycle permits the removal of stock in a fixed pattern cycle
leaving a specified amount of stock for a finish pass. This is most
often used with a casting or forging. The contour will be generated in a
number of passes determined by the programmer. The syntax for this
command is as follows:
G73 U W R
G73 P Q U W F
U (first line) = the thickness of stock to be machined on the X-axis.
W (first line) = the thickness of stock to be machined on the Z-axis.
R = (first line) = the number of roughing passes.
P = sequence number for the beginning of the contour.
Q = sequence number for the end of the contour.
U = direction and radial amount of finish allowance on the X-axis.
W = direction and amount of finish allowance on Z-axis.
F = roughing feed rate.
64
Tool path of G73 Cycle
OD Turning ID Boring
X-axis to the largest X-axis to the smallest
Rapid Positioning diameter to be turned diameter to be turned
G00 Z-axis .1" in front of Z-axis .1" in front of
Work piece Z0 Work piece Z0
Rapid move in X to the Rapid move in X to the
First Line Of smallest diameter to largest diameter to
Contour Description be turned be turned
Command finishing SFM Command finishing SFM
65
14.5
66
G74 Peck Drilling & Face Grooving (trepanning) On The Z Axis
The G74 command can be used both as a peck drilling cycle (to break
chips) and as a face grooving cycle (to "pocket out" a groove area
larger than the groove tool).
G74 R
G74 Z Q F
R (first line) = retraction amount after each peck, no decimal, this
setting will over ride parameter #5139
Z = the total depth to be drilled on the Z axis
Q = the length of each peck, no decimal point
F = the feed rate of the drill
N100 T202 M8
M42 (as needed)
G97 S1400 M3
G0 X0 Z.2
G74 R500 (this first line is optional)
G74 Z-2. Q2000 F.007
G0 G40 X10. Z10. T200
M30
67
The syntax for G74 trepanning is as follows:
G74 R
G74 X Z P
R (first line) = retraction amount after each peck, no decimal, this
setting will over ride parameter #5139
X = final diameter (note 1)
Z = depth of groove
P = step over amount, no decimal point
Q = depth of each peck, no decimal point
Example:
G00 X5.1 Z.1
G74 X3.95 Z-.2 P1100
G0 G40 X9. Z5. T900
M1
Note 1: in order to obtain the X axis coordinate of this point you must
add the desired diameter to the tool thickness multiplied by two.
68
Example #2
G0 X3.5 Z.1
G74 2.3 Z-.5 P3000 Q1000
G0 G40 X(. Z5. T900
M1
69
14.6 G75 Peck Grooving on the X Axis
The G75 command can be used both as a peck drilling cycle (to break
chips) and as a face grooving cycle (to "pocket out" a groove area
larger than the groove tool).
G75 X Z P Q F
X = bottom of groove dimension (diameter)
Z = length of groove in Z axis from Z0
P = depth of each peck
Q = step over amount on the Z axis
F = feed rate
Example #1
70
Example #2
71
15 Thread Cutting Cycles
By programming a single point tool to feed axially over the same point
again and again a thread will be cut. Three thread cutting cycles are
provided: G32, G92 and G76. When these are used, each tool path will
start out at the same point. Threading must be done in G97 mode only.
G32- Each axial pass requires the input of four blocks of data.
G92- Each axial pass requires the input of one block of data.
G76- One block of data is required to cut the whole thread, automatic
in-feed and compound cutting are provided.
Due to the response delay in the servo system there is a limit to how
fast the threading tool can be programmed to move. This limit is on the
maximum allowable RPM with respect to the pitch of the thread.
The above means that the feed rate must not exceed 160 inches per minute
72
15.2 Imperfect Thread Calculation
The cutting tool should be positioned far enough in front of the start
of the thread to allow enough distance for acceleration before it enters
the material (d2). At the end of the thread, there should be enough
distance allowed for deceleration of the tool (d1).
RPM x Pitch
d2 = d1 = d2 x 3.605
1800
Notes on threading:
1) Do not use G96, use G97
2) Do not exceed the maximum allowable RPM in threading
3) Calculate the Imperfect Thread Portion and position tool accordingly.
4) Feed rate override is held at 100% during the threading operation.
73
15.3 G76 Thread Cutting, Multiple Repetitive
The G76 command is a two-line call out the same as all multiple
repetitive cycles. However by setting certain parameters you can
eliminate the first line. However the program will then not dictate
these values the parameters will. If you need to change these values
for each part you are better served to put them in the program. The
program overrides the parameters.
The above parameters are for the 16/18/21 control and are to be set as
desired for the thread/machining conditions on hand
74
The correct syntax for the second line is as follows:
G76 X Z P Q F
X = for OD threads, the minor diameter, for ID threads, the major
diameter.
Z = the endpoint of the thread in the Z-axis.
P = height of a complete thread, radial, no decimal point (note 1)
Q = depth of first cutting pass, no decimal point (note 1)
F = feed rate of tool, this is the same as the thread pitch
75
Tool-path of G76 cycle, OD thread:
76
Example of two line G76
OD Threading ID Threading
77
15.4 G76 Thread Cutting, Multiple Repetitive, Taper
G76 X Z R P Q F
78
15.5 G76 THREADING CYCLE TWO LINE FORMAT (FS 0,16,18,21T,31i,32i, -FORMAT)
(Applicable with Fanuc Controls, T series, systems 0,16,18,21,31i,32i.
Also: Mitsubishi 500L, 50, 64)
FIRST COMMAND LINE: G76 P021060 Q05 R10 (See detailed explanation,
below)
SECOND COMMAND LINE: G76 X__ Z__ P100 Q200 R300 F0.038461 (See detailed
explanation, below)
Q =Depth of the first cut. If P and Q are the same, then the
thread is `cut in a single pass. (Radius value without decimal
point) See note 2, below
NOTES:
79
1.) Upon execution of the G76-cycle all data contained on the first
G76-command line is automatically stored in the parameter tables.
80
81
G76 THREADING CYCLE - SINGLE LINE FORMAT - (FS 15T-FORMAT)
(Applicable with Fanuc Controls, T series, systems 10, 11, 12 AND 15T)
This format can also be used with Fanuc Controls, T series, system 0,
16,18,21 and 30 series, when the tape format setting option is
available. I this case, please display the SETTING PAGE, then check
the TAPE-F -setting. When TAPE-F is set = 0, the two-line format
is valid (see previous page). When it is set = 1, the single-line format
is valid. This setting will affect all G70-series canned cycles, not
just the threading.
Cycle Format: G76 X__ Z__ I__ K__ D__ F__ A__ P__ Q__
P =Cutting method:
P1=constant chip load, single edge cutting
P2=constant chip load, zigzag in-feed, alternating cutting edges
P3=constant cut depth, single edge cutting
P4=constant cut depth, zigzag in-feed
82
15.6 Programming Examples, using the G76-Thread Cutting Cycle
Action Program
1. Enter modal commands G0 G18 G40 G97 G99
2. Enter the tool and tool offset command T0101
3. Enter the Spindle command G97 S100 M3 (M4)P11
(Always use G97, NEVER G96)
4. Turn ON the coolant M8
5. Move the tool to the start position of G0 Z0.125
the thread X1.075
For Z, allow 125 % of the Lead for
start-up clearance away from the
thread
Move Z fist, then X.
For X, allow 0.05 ~ 0.1
diametrical clearance above the major
diameter (OD)
6. Enter the thread cutting cycle G76 P020560 Q05 R0
G76 X0.875 Z-1.0 P625 Q250
F0.1
7. Return the tool to the tool exchange G0 X___
point G0 Z___
Move the X-axis first, then Z M1
Optional stop
83
Example 2: Cutting a 1-10 UNS -internal thread:
Action Program
1. Enter modal commands G0 G18 G40 G97 G99
2. Enter the tool and tool offset command T0101
3. Enter the Spindle command G97 S100 M3 (M4)P11
(Always use G97, NEVER G96)
4. Turn ON the coolant M8
5. Move the tool to the start position of G0 Z0.125
the thread X0.800
For Z, allow 125 % of the Lead for
start-up clearance away from the
thread
Move Z fist, then X.
For X, allow 0.05 ~ 0.1
diametrical clearance below the minor
diameter (I.D.)
6. Enter the thread cutting cycle G76 P020560 Q05 R0
G76 X1.0 Z-1.0 P500 Q150 F0.1
7. Move the tool out of the bore, clearing G0 Z___
the face
8. Return the tool to the tool exchange G0 X___
point G0 Z___
Move the X-axis first, then Z M1
Optional stop
Note: Source for thread dimensions used in the thread cutting cycles
shown above: Machinerys Handbook (Twentieth edition).
84
15.7 G76 Thread Cutting, Multiple Repetitive, Multi Start
Multiple start threads are possible in the G76 mode, you have to shift
the starting point for the extra threads by 1/n of the pitch.
Example
Procedure:
85
15.8 G92 Thread Cutting
The G92 command will drive the cutting tool in a "box" pattern.
G92 X Z F Q
The tool must first be positioned to the start point of the cutting
cycle. The G92 command will then specify the diameter (order point) to
thread at and the pitch.
86
Notes on using G92 threading cycle
OD Threading ID Threading
X axis approx. .1" larger X axis approx. .1"
Rapid move to start than major thread diameter smaller than minor thread
point diameter
Z axis, in front of thread by at least 2 threads
G92 Threading Cycle Order point is smaller Order point is larger
than start point than start point
Example of G92
G92 is modal, it is not necessary to repeat the command for each block,
just change the X-axis order point. When you are finished with this
cycle cancel it out with the G0 command.
If the thread does not run into a relief groove it is suggested that
chamfering pullout be applied. This will be done at a 45-degree angle
and is controlled by parameter #5130. The chamfering distance is set
from .1 - 12.7 of pitch. 1 = .1 pitch of chamfer, 10 = 1 pitch of
chamfer.
87
15.9 G92 Thread Cutting, Taper
G92 X Z R F
88
16 Canned Cycles for hole machining (G80 Series)
Canned cycles for hole machining are optional equipment. Most of the
older FANUC controls are not equipped with this option.
NOTES:
1. Position the tool at X0 and Z at the desired clearance point first.
Then specify the G83-command.
2. When R is used, it is to be specified as an increment (positive or
negative) from the initial level, not as an absolute position.
3. It is recommended not to use R at all.
89
EXAMPLE 1: G83 (Z-axis Peck Drilling Cycle)
90
G87 X-axis Peck Drilling Cycle with Live Tools
NOTES:
1. Position the tool in X and Z at the desired clearance point above the
part where the hole is to be drilled or tapped. Note that the working
direction is parallel to the X-axis. Use diameter dimensions for X.
Then specify the G87 or G88-command.
2. It is recommended not to use R at all.
91
17 Miscellaneous Settings
17.1 Instructions for Setting the Work-Zero Point on Lathes with Fanuc 18T 21T, Or
30 Series Controls.
Every CNC-lathe has one basic coordinate system that remains fixed and
cannot be changed. This is known as the Machine Coordinate System. The
origin or zero point of the machine coordinate system is normally
located at the intersection of the main-spindle center axis (x0) and the
spindle flange face (z0).
92
Depending upon programming method applied the work zero point Z0 may
be located at an arbitrary point along the z-axis of a work-piece, while
X0 is always located at the center axis of the spindle. Thus, the X-
register for all work offsets must always remain zero.
The work zero point, also referred to, as the Program-Zero Point is
normally located at the right end-face of the work-piece. The data
entered into the work-offset registers (G54-G59) Z represents the
actual distance between machine zero point and work zero point along the
Z-axis.
93
17.2 Work-offset setting procedure for lathes equipped with Q-setter.
1. Cutting tools attached to the turret that already have a valid tool
offset in the tool offset registers from a job done previously need
not to be touched-off anew, when setting the work-offset.
2. The raw material for the work-piece to be machined is placed into the
chucking device and clamped.
3. The turret is moved to a safe position for indexing. Select a tool
that is capable of cutting the face on the right-end of the part to be
machined by manually indexing the tool around.
4. Set the mode selector switch to MDI-mode. Press the PROGRAM-key then
press the MDI software-key.
5. When the G54 coordinate system is selected and tool #1 is the tool to
be used for touching-off key-in G54 T0101 EOB (or G55 T0707 EOB,
if G55 and tool #7 is used) then push INSERT. Push CYCLE START
several times, until the command line disappears from the screen.
6. Move the tool near the face of the part. You may cut the face of the
part, if you wish. Or you may position the tool as close as possible
to the raw face of the part. When positioning of the tool has been
94
completed press the OFFSET-key, then the software-key WORK. Now
the screen as shown on page 1 above will appear.
7. Move the yellow cursor onto the Z-data field on the G54 -work
offset. Press the Tool Measure-Key on the operation panel for two
seconds.
8. Now, key-in the Z-coordinate value at which the tool is positioned at
this time. For example, when the tool is positioned at the finished
face, key-in Z 0 then press the MEASRE-software key. For example,
when the tool is positioned at the raw face, key-in Z 0.025 if you
want to remove 0.025 from the raw face, then press the MEASURE-
software key.
9. After pressing the MEASURE-key the work-offset is entered,
automatically. If you are not sure that the setting is right repeat
step 7 and 8 again. If the work offset value remains the same the
procedure has been executed correctly.
17.4 How To Set the 2nd reference point (G30) on the Fanuc 16/18/21-T/ and 30
Series controls
Machine coordinates for the G30 position are stored in parameter #1241.
The easiest way to calculate the G30 position is by physically moving
the turret to the desired tool exchange point. Please make sure that all
tools are clear of the part and the chuck. Then display the position
screen and write down the machine coordinates, (not absolute or
relative).
95
17.5 Changing Parameters on 16/18TC and 30 Series Controls
NOTE:
Be sure to know the exact consequences of changing a specific parameter
setting. After changing the setting of certain types of parameters, re-
booting of the system may be required. Normally, the system displays a
message when power OFF and rebooting is required.
96
18 Operator's Control Panel
The machine is controlled by the various keys and switches located on
the operation panel.
MODE PUSHBUTTON SWITCHES - Use this to select the desired operating mode
Edit Mode - Edit mode is used to enter a new program into memory
whether by keyboard or downloading process, edit an existing
program or searching for data.
Tape Mode - Tape mode is used to run a program from a tape reader.
Reference Point Return - Also known as the machine "home" position. This
is a spot the machine must be made to travel to upon power up in order
for the machine to know its position. Until this operation is performed
you cannot run a program or perform MDI commands.
Jog - Permits the turret to be moved in the X & Z-axis using one of the
jog-feed direction buttons along with the rapid button.
Handle X & Z - Allows you to move the turret in just the X or Z-axis
using the manual pulse generator.
<EMG. RELEASE> - If you overrun the stroke limit of either axis, push
this and one of the Jog Feed Direction buttons at the same time to bring
the turret head back to within its limit.
Handle Feed Dial -There are three positions. When used in conjunction
with the manual pulse generator and in handle mode, you may move the
turret in the following increments:
X1 = .0001 X10 = .001 X1 = .01
Manual Pulse Generator - Rotate this dial in order to move the turret.
Rapid Override Dial - You may select the rate at which the machine
travels in rapid traverse. AT the F0 setting the rapid traverse moves at
97
a relatively slow speed as set by parameter #1421. F25 will move at 25%
speed, F50 will move at 50% speed and F100 will enable 100% of the rapid
feed rate as set by parameter #1420.
Feed rate Override Dial - While the machine is in operation, you may
alter the current programmed feed rate. You can stop the feed entirely
with 0% or override up to 150% of the programmed feed rate.
Jog Feed Direction Buttons & <RAPID> - There are 4 button switches
arraigned around a <RAPID>, while you have the mode selector switch set
to "JOG" you may press any of these keys and move the turret in that
key's direction. Each button corresponds with one of the machine's axial
movements. By pressing <RAPID> at the same time that you press one of
these buttons you make the machine move at the rapid traverse rate.
Spindle Override Dial - While the machine is in operation you may elect
to alter the spindle speed taking it from 50% to 120%.
<START> - When the mode selector switch is in "JOG" or HANDLE mode you
may manually start the spindle by pressing this button. When no spindle
speed command is active the spindle will not rotate.
Low, High, FWD, RVS, JOG Dial (Spindle Mode Selector) - This dial
controls the direction of the spindle when operating it manually, the
Low/High LED's indicate the gearbox position (not all machines have this
indicator as not all machines have a gearbox).
Alarm - This display shows the alarm codes of the machine as different
situations arise.
M02/30 LED - This LED will blink upon the control reading M02 or M30 in
the program.
Chuck LED - This LED will light up when the chuck is clamped. The
machine will not normally start a cutting cycle unless this is lit up
(See: chucking key switch).
Dry Run - When this Pushbutton is turned ON the rapid traverse speed and
feed rate move at jog speed. Dry run must not be used during actual
machining because the feed rate will be too high and tools may break.
98
The feed override switch controls feed velocity in dry run mode. Use DRY
RUN for tool path verification only, without actually machining a part.
<Tool Measure> - Press this first when setting Tool Offsets and the Work
shift Zero (see sections 14 & 15).
Machine Lock Lamp (LED) Machine lock is used for tool path
verification, using the graphics display. When M17 has been commanded
the Machine Lock status lamp (LED) will light up. When a program is
executed in machine lock mode the spindle and coolant will run normally.
The turret will index at the tool command. Only the (X, Y, Z, B) axes
are locked. The M18 command followed by manual Zero Return of all axes
will restore normal operation.
Program Protect Switch - When turned to the left and the key is removed
editing of programs, changing of geometry offsets, work offsets and
other data entry is disabled.
Door Interlock Switch - This switch is a safety feature and should not
be tampered with (altered). When the switch is set to the left and the
door is opened during machining the coolant and turret feed rate will
stop, the spindle will continue to rotate.
99
NC Programming for Turning Centers
For 30 Series Control single path machines
Equipped with
Live Tools & C- Axis
100
ROTARY AXIS FUNCTIONS
When machining with live tools a rotary-axis allows angular positioning of the work piece
between zero and 360 degrees. The CNC system converts one of the lathe spindles into a
rotary axis.
C - Axis
PUMA Turing centers equipped with a turret and driven tools normally employ a rotary axis,
called the C-axis. The main spindle motor drives the rotary axis. A position-encoding device
attached to the spindle provides for positioning of the rotary axis at 0.001-degree resolution.
Linear interpolation with the rotary axis, together with any other axis is possible. For circular
interpolation between a rotary axis and a linear axis, special control functions such as polar
coordinate interpolation or cylindrical interpolation is applied. The rotary axis is switched ON or
OFF by M-codes, alternating between normal spindle operation and C-axis operation.
Work offsets G54 through G59 or the coordinate system setting command G50 sets the work
coordinates for the rotary axis. System parameter 1240 & 1250 sets the reference point (Home
position) for the C-axis.
Both, rapid positioning axis interpolation are disabled while M89 is active.
101
Front view of Lynx 220LM
The feed rate for a rotary-axis is specified in units of angular velocity, either in degrees
per minute or in degrees per tool revolution.
To convert the tangential feed rate on the circumference of a circle that is defined by the radius
R from inches per minute (IPM) into degrees per minute (PM), the following formula is applied:
F per minute =F (IPM) x 57.296 / R
To convert a feed rate from inches per revolution (IPR) into degrees per tool rotation (/ REV)
the formula is the same:
The above formulas calculate the feed velocity for moving the rotary axis alone, not together
with another axis.
For example: Suppose that machining is done on the OD of a 1.5 diameter part, rotating the C-
axis only. The tangential feed rate desired is 5 per minute. What is the required feed rate in
degrees per minute?
102
Feed Rate Calculation for Linear Interpolation with Rotary Axis
Caution concerning the feed rate must be applied when linear interpolation between the rotary
axis and the Z-axis is done. The tangential feed rate along the tool path becomes high when the
arc length of the rotary axis move is relatively short in comparison to the travel distance along
the Z-axis. The feed rate must be reduced, accordingly. It can be calculated as shown in the
example, below.
Example: Machining is done on the OD of a 1.5 diameter part, rotating the C-axis Angle = 30
while moving the Z-axis minus 1, at the same time.
The desired feed rate along the tool path F = 5/minute.
Calculate the feed rate to be used for the interpolation command: G1G98 H60. W-1.0 F___?
1. Calculate the length of the 30 arc segment on the periphery of a 1.5 diameter circle: Arc
length=2Rx/360x60=2x0.75x3.14/360x30=0.392
Or apply the following formula, where: F = feed rate in inches per minute,
A= C-axis rotation angle
103
SPINDLE MODE AND ROTARY AXIS MODE COMMANDS
For PUMA Lathes, equipped with a C-axis, the program commands as shown below apply.
Commands are shown for turning mode and for live tool mode, separately.
Command Explanation
M5,M3 or M4 These commands are normally used for starting or stopping the
spindles. The designation of P__ Selects which spindle
G0 G18 G40 Use these G-codes at the beginning of any program segment where
G80 Canned cycles G81through G88 or cutter compensation G41, G42
is used. G18 (X-Z Plane select, default on power up)
G99 IPR-feed mode should always be used for turning. (G99-mode is set
as default on power-up)
G96 S__ Constant surface speed control command is used for turning only. Not
to be used for drilling, tapping, milling or thread cutting.
G97 S__ Constant (RPM) control command. Use G97 for drilling, tapping
milling or thread cutting. (G97-mode is set as default on power-up).
104
Command Remarks
M05 P12 Live tool spindle rotation-stop command .
G0 G40 G80 Use these G-codes at the beginning of any program segment where
Canned cycles G81through G88 or cutter compensation G41, G42 is
used.
G50 C__ G50 C only! No other axis. This may be used to pre-set the C-axis
coordinates, at the reference point, if desired.
G97 S__M3 P12, Constant (RPM) control command must be used always when C-axis
is active. (G97-mode is set as default on power-up).
G99 IPR-feed mode may be used for any live tool operation, except on
machines built before 1998. (G99 set default on power-up).
G98 IPM-feed mode may be used for any live tool operation. Preferably,
the IPR (G99) feed mode should be used, if possible. For machines
built before 1998, the IPM-feed mode must be applied for Live-Tooling
operations.
105
ANGULAR POSITIONING FUNCTION FOR SPINDLES
Angular positioning function for spindles can be utilized for machining with live tools. Angular
positioning is applied typically on the sub spindle for the PUMA MS-series turning centers.
Spindle orientation
When the spindle orientation option is provided the command M19 S0 P11 is used for
positioning the main spindle at a preset rotation angle. Spindle orientation is used for
applications such as bar pulling of polygon shaped stock, in-feeding of polygon shaped bar
material from a bar feeding device, positioning of the chuck for loading of work pieces, etc.
Data range for parameter setting: zero ~ 4096, positive or negative value.
One full rotation (360 degrees)=4096 units. One unit equals 0.088 degrees. (360/4096=0.088
degrees) One degree equals 11.3636 units.
Caution: Parameter 4077 S2 must not be changed. This parameter sets the live tool spindle
orientation position that is critical about alignment of the drive coupling.
Any angle: G97 S3599 M19 P11 (not to exceed 3600 units)
106
Once commanded, the spindle is held in position under power by the spindle motor. The M3, M4
or M5-command cancels spindle positioning.
System parameter 4077 S-1 sets the reference angle for the main spindle.
107
DRILLING AND TAPPING WITH LIVE TOOLS ON THE C-AXIS
Z-axis tapping
G84 C___Z___F___
Notes: C = C-axis position, X = X-end position, (diameter), Q = peck distance (No decimal point
allowed with the Q. Repeat Q on each subsequent line), P = Dwell, F = Feed Rate.
C-axis clamping command M89 is optional. It can be added to the cycle, as shown in the
example, below.
M90 M90
M35 M35
G28 H0 G28 H0
T0707 T0808
108
G0C0Z.5 X1.5 M8
X1.5 M8 Z.1
Z.1 G97S1000M29P12
G83C0Z-.45.Q1250F.005M89 G84C0Z-.35F.05M89
C270.Q1250M89 C270.M89
G0G80Z.5M90 G0G80Z.5M90
X8.Z4.M5P12 X8.Z4.M5P12
M1 M1
109
Canned cycles for hole machining with the C and X-axis
X-axis tapping
G88 C___X___F___
Notes: C = C-axis position, Z = Z-end position, Q = peck distance (No decimal point allowed
with the Q. Repeat Q on each subsequent line), P = Dwell, F = Feed Rate.
C-axis clamping command M89 is optional. It can be added to the cycle, as shown in the
example, below.
110
POLAR COORDINATE INTERPOLATION FUNCTION G12.1
Programming with the G12.1-function is done on the X-C coordinate system plane. In this
coordinate system plane the Caxis is regarded as a linear axis instead of a virtual rotary axis.
Programming is done similar to the way it is
done on a basic X-Y plane. Linear or circular
interpolation can be done. Cartesian
coordinates are used for defining either the
part shape or the tool path geometry. In the
G12.1-mode the control converts
Cartesian coordinates to Polar
coordinates, automatically.
111
Layout of the X-C coordinate system plane
The diagram above shows the X-C coordinate system plane as viewed when looking at
the front face of the main spindle.
The address X defines a point by the distance from origin horizontally on diameter
(Positive or negative value). On diameter means: twice the actual distance from origin.
The address C defines a point by the actual distance vertically from origin (Positive or
negative value). C is defined in linear units of measurement, not in angular units.
Plane selection
The G18-plane select command must be active in G12.1-mode. On turning centers the
X-Z coordinate system plane (G18) is set as the default plane. System parameter
settings related to the G12.1-funtion are normally set to allow polar coordinate
interpolation in the G18-plane.
112
Positioning command
G0 cannot be used in G12.1-mode. Positioning is done in G1- mode, using a feed rate
of around 30 to 60 per minute, depending on application.
Feed command
In the G12.1-mode the feed velocity can be specified either by units of linear distance
per minute (G98-mode) or by units of linear distance per spindle revolution (G99-mode).
Use of excessive feed rate can adversely influence the accuracy of a machined shape.
Recommend range of feed rates for polar coordinate interpolation is from 1 to around
10 per minute, depending on application. Feed rate must be reduced in case when
circular interpolation is done near the X-C zero point. Velocity of the rotary axis may
become excessive and as a result, servo errors or servo overload may occur.
Address H can be used for incremental move command along the C-axis. H= vertical
distance from a current point to the next point.
Addresses X and C define the end point of an arc. The address R defines the radius of
an arc when the included angle of the arc segment is 180 or less.
Address I specifies the actual distance and direction (+/-) from the start point of the arc
to the arc center along the X-axis.
Address J specifies the actual distance and direction (+/-) from the start point of the arc
to the arc center along the C-axis.
113
Command for arc of less than 360: (G2 or G3) X_ C_ I_ J_
G1 G41 X_ or C_ F_ (Ramp-ON)
G1 G40 X_ or C_ F_ (Ramp-OFF)
When ramping ON or OFF along the X-axis the moving distance must be greater than or
equal to twice the R-data. When ramping ON or OFF along the C-axis the moving
distance must be greater than or equal to the R-data.
a) When the program-coordinates represent the geometry of the tool center-path, the
R-data is set at zero, initially.
b) When the program-coordinates represent the geometry of the actual part shape, the
actual cutter radius must be input on the R-data.
The Tool nose type- data (located at the column T at the tool-offset tables) is part of
the cutter compensation data. On the offset number that is used for a milling cutter the
T data must be set = 0.
114
Tool offset data, including the R and T-data are activated by the tool offset command.
(The D-command, such as used in machining center programming cannot be used).
In polar coordinate interpolation, a flat bottom end mill that is pointing toward the OD of
the part cannot produce an acceptable part shape. On some applications, a ball-nose
end mill that is pointing toward the OD of the part can be used. This type of tool must be
touched off along the X-axis at the center of the ball-nose.
115
Programming example
The figure above left shows two flat surfaces to be machined on the front face of a 1.25
diameter part. A clearance diameter of 1.300 that intersects with both of the flats has been
added to the figure on the right. The coordinates (X 1.0, C0.4153) located at the upper right
corner and (X1.0, C-0.4153) located at the lower right corner will be used for preparing the
machining program. The axial depth of the flats is assumed to be at Z-0.375 from the front face.
A diameter end mill is used for machining the two flats.
Hints on programming and machining with the polar coordinate interpolation function
Before programming the part, a simple part layout should be prepared. An end-view of
the part should be drawn, showing the part just the way it is held by the chuck as viewed
when looking toward the face of the chuck on the main spindle. In this layout the X-
coordinates run horizontally and the C-coordinates run vertically. X-plus direction runs to
the right of X0, C-plus direction runs from zero to 12 oclock. The X-coordinates are
specified on diameter, C-coordinates are specified as actual distance. Radii are
specified as actual distance.
For programming purposes it is assumed that the cutter approaches the part always
from the 3 oclock position (X- axis plus side) on your layout. When deciding the cutting
start point it is recommended placing it at the plus-side of the X-axis.
During machining of the flat surfaces as shown in the above example, the cutter does
not actually move in a vertical direction. In the G12.1-mode, machining of a contour
shape is accomplished by moving the cutter horizontally along the X-axis and by rotating
the C-axis, synchronously.
When negative X-axis coordinates are commanded in the program the cutter center will
not actually travel past the minus side of X0. Instead, the C-axis is rotated around
automatically so that machining on the negative quadrant is accomplished with the cutter
always remaining on the plus-side of the X-axis.
116
Deciding the machining method
The milling operation on this part can be programmed in various different ways. Examples for
three different programming methods A, B and C are shown.
Programming Method A
The cutter compensation function should be applied, always. However the cutter radius amount
entered in the tool-off data should be set either at zero or at a small (plus) amount which will
make the part come out slightly oversize, initially.
117
G12.1 Polar coordinate interpolation ON
G1 G98 C.5339 F60. C-axis position at the first point of the contour shape,
use IPM - feed mode, if desired (Note: the C-command
at this time represents a linear dimension not
degrees)
G1 G41 X1.75F7. (1) Cutter comp ON
X-axis position at the first point of the contour shape
Z-.88 Move the Z-axis to the desired depth on the part
G1 C-.5339 (2) C-axis position at the second point of contour
G2 X-1.75 R1.025 F60. (3) X-axis position at the third point of the contour (No
cutting is done on the arc, a high feed rate is used for
the arc move )
G1 C.5339 F7. (4) Fourth point of the contour
G1 G40 X-2.15 F60. Cutter comp OFF
The X-axis must move at least two times the R-value
that is used in the tool offset
G13.1 Polar coordinate interpolation OFF
G99 G0 X2.5 Retract X-axis & switch back to IPR- feed mode
Z.1 M5P12 Retract Z-axis and stop milling spindle
G30 U0 W0. M9 Second reference point return
M1 Optional stop
Programming Method B
Programming Method C
118
Preparing the machining program for methods B and C
Climb Cutting is done in both cases. Hence the cutting start point coordinates in both cases
are at X1.0 C0.4153. The automatic cutter compensation function G41 is applied. The cutting
start point is located on the top right corner on each of the figures shown. The part dimensions
as shown on the sketches can be plugged directly into the program.
NC Program machining both of the flats in NC Program doing each flat separately,
one continuous path, using a 1/2-diameter using a 1/2-diameter cutter.
cutter.
119
CYLINDRICAL INTERPOLATION
Principle of Operation
The cylindrical interpolation function G7.1 allows circular interpolation between the Z-axis
and a rotary axis. Programming is done using Cartesian coordinates for the Z-axis and
degrees of rotation for the rotary axis. Arc specifications are given in units of linear
measurement. Typical applications for this function include engraving operation for lettering or
for milling of cam shapes on the circumference of a cylinder.
Programming Notes
Plane Select Command: G18
G7.1H < 0 or G7.1 C < 0 activates the cylindrical interpolation function. An H-value or a C-
value greater than zero specifies the radius of the cylinder to be machined.
For example: Cylindrical interpolation mode is set by this command:
120
Z-coordinates specify absolute dimensions parallel to the length of the cylinder. The letter
W can be used for incremental specification along the Z-axis.
C- axis rotation is specified as an absolute angle in degrees. The letter H for incremental
angle specification can be used, instead.
X-coordinates specify absolute dimensions on the OD of the cylinder. The letter U can be
used for incremental specification along the X-axis.
Circular interpolation (G2, G3) between Z-linear coordinates and C- angular coordinates is
performed automatically by the control using the G7.1-function. Circular interpolation
between X and C axis cannot be done.
Arc radius specification. The letter R must be used for arc specifications. Letters I J or K
cannot specify an arc radius in cylindrical interpolation.
Cutter Radius Compensation Functions (G40, G41and G42) can be applied. The cutter
radius as registered under R on the tool-offset tables is applied for cutter radius
compensation automatically.
Tool path: For programming purposes, the surface on the circumference of a cylinder is laid
out in the shape of a rectangle whose length is equal to the cylinder diameter times pi. The
height equals the height of the cylinder. The tool path is then projected onto this rectangle.
Horizontal dimensions are to be converted from linear to angular C axis coordinates. The
Vertical dimensions represent Z-axis coordinates. The zero point of the coordinate system
can be decided at an arbitrary location.
121
When diameter D is used to define the circle,
use this formula: C = L / D x 114.59156
122
Converting linear coordinates to degrees of rotation
For the sample part at hand the factor for converting linear units into degrees is calculated as
follows: 1 / 2.9 x 114.59156 = 39.514331 per 1 of linear distance
C = L x 39.5143
The table below shows the start-points and end-points for the lettering
X Z C
Start point of letter J 2.9 - 0.7 0.4 * 39.5143 = 15.806
End point of letter J 2.9 -.45 15.806
Start point of letter R 2.9 -0.3 -0.1 * 39.5143 = -3.951
End point of letter R 2.9 -.3 -0.4 * 39.5143 = -15.806
123