0% found this document useful (0 votes)
63 views18 pages

Lesson Twelve Text

This document provides information on various motion manipulation techniques in CNC machining, including: - G32 threading command that synchronizes feed rate with spindle RPM for consistent threading passes. - Using G32 for tapping operations since it ignores feed rate override like G84 tapping. - G15/G16 polar coordinate system for specifying bolt hole patterns by radius and angle rather than trigonometry. - G50/G51 scaling commands that allow one program to machine parts of different sizes. - G50.1/G51.1 mirror image commands for duplicating a program's motions in a mirrored orientation.

Uploaded by

Vignesh Waran
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
63 views18 pages

Lesson Twelve Text

This document provides information on various motion manipulation techniques in CNC machining, including: - G32 threading command that synchronizes feed rate with spindle RPM for consistent threading passes. - Using G32 for tapping operations since it ignores feed rate override like G84 tapping. - G15/G16 polar coordinate system for specifying bolt hole patterns by radius and angle rather than trigonometry. - G50/G51 scaling commands that allow one program to machine parts of different sizes. - G50.1/G51.1 mirror image commands for duplicating a program's motions in a mirrored orientation.

Uploaded by

Vignesh Waran
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

Lesson Twelve: Motion Manipulation Techniques

Motion Manipulation Techniques


Youve already been exposed to some advanced techniques with basic motion types
(lesson six) and you seen several special motion types (lesson seven). In this lesson,
well expose you to certain ways to take further advantage of these motion types. Some
will be related to improving motions and others will be related to manipulating or
enhancing motions.
G32 - thread cutting command (turning centers)
Most CNC people think of the G32 command as the old way to perform thread
machining operations. Indeed, if you do use G32 to chase threads with a single point
threading tool, each threading pass will require four commands. Here is an example of
one threading pass.
.
.
.
N250 G00 X1.2 Z0.2 (Rapid to approach position)
N255 X0.98 (Rapid to thread position in Z)
N260 G32 Z-0.72 F0.0625 (Chase thread)
N265 G00 X1.2 (Rapid back to approach position in X)
N270 Z0.2 (Rapid back to approach position in Z)
.
.
.
In line N260, the threading tool is chasing the thread (one pass). G32 is much like G01,
except the feedrate will be perfectly synchronized with the spindle RPM. As subsequent
passes are made, each G32 command will ensure that the threading tool moves over the
same path time and time again. Also, note that the control will ignore the feedrate
override function during the G32 command (just like the G84 tapping command does on
machining centers). The machine will move at the programmed feedrate regardless of the
position the feedrate override switch is placed.
Again, notice how similar G32 is to G01. The only differences are 1) speed and feedrate
will be synchronized, 2) subsequent passes will be in the same tool path, and 3) the
feedrate override switch will be ignored.
Using G32 for tapping
Many Fanuc-controlled turning centers do not have a tapping cycle. For these machines
many programmers use G01 for tapping. But since the feedrate override switch is still
effective when G01 is used, the operator must have it 100 percent when tapping is done
with G01. However, if tapping is done with G32, the control will ignore the feedrate
override switch. (Note that single block must be turned off when tapping is done, even
when G32 is used.) Here is an example of a tapping operation.
.
.
.
N150 T0505 (Index to tapping station)

Lesson Twelve: Motion Manipulation Techniques


N155 G97 S500 M03 (Start spindle at 500 rpm)
N160 G00 X0 Z0.2 (Rapid to approach position)
N165 G32 Z-0.75 F0.0625 (Feed tap into hole)
N170 M04 (Reverse spindle)
N175 G32 Z0.2 (Feed tap out of hole)
N180 G00 X8.0 Z7.0 M03 (Rapid to tool change position, reverse spindle to
forward)
.
.
.
G15 & G16 - polar coordinates for machining centers
Not to be confused with polar coordinate interpolation, this feature offers another
coordinate system for machining center programmers. You know that you commonly
specify coordinates in CNC programs using the rectangular coordinate system. And for
most applications, the rectangular coordinate lets you specify positions right from the
workpiece drawing.
About the only exception to this statement has to do with bolt hole patterns (and contours
that involve angular surfaces). With a bolt hole pattern, dimensions are usually specified
with a radius and angle for each hole. The polar coordinate system will allow you to
specify these values directly from the workpiece drawing.
If you want to work in the rectangular coordinate system, you must, of course, use
trigonometry to figure out the centerline coordinates for each hole on the pattern. Since
polar coordinates is not available on all CNC controls, and since it is relatively easy to
figure the centerline coordinates (even using trigonometry) in the rectangular coordinate
system, most programmers do not use polar coordinates to do so.
Additionally, there is one severe limitation to Fanucs version of polar coordinates that
almost renders it useless. With Fanuc, the origin for the polar coordinate system must be
the program zero point in the rectangular coordinate system. Rarely is the center of a bolt
hole pattern the program zero point for your workpiece (with the exception of a ring or
round workpiece). Note that other controls allow you to specify the origin for the polar
coordinate system from the program zero point as part of the polar coordinate command.
This would make polar coordinates much more attractive, and could even help when
performing contour milling operations (eliminating the need for having to calculate
positions on the contour).
G50 & G51 - Scaling
Scaling allows you to manipulate the size of your programmed movements. Though not
commonly needed with conventional (manual) programming, these commands can be
quite helpful in companies that machine with three dimensional programs, as would be
the case when machining a mold core or cavity. One program can be used to machine the
molds for any number of different size molded parts. Note that since this function has
such limited application, it is commonly an option that must be purchased for an
additional price. Here are the commands involved as they are used on Fanuc controls.

Lesson Twelve: Motion Manipulation Techniques


G50 - Cancel Scale Mode
G51 - Turn On Scaling
I - Scale Center In X
J - Scale Center In Y
K - Scale Center In Z
P - Scale Factor
A command that reduces subsequent motion commands to half their programmed values
follows.
G51 I0 J0 K0 P0.5
This command scales about the program zero point. After making the motions under the
influence of scaling, G50 must be commanded to cancel.
G50.1 & G51.1 - Mirror image commands
One commonly misunderstood features of CNC is mirror image. While there are
limitations to the use of this feature, it is a good feature to know about.
General explanation of mirror image
As the name implies, mirror image is used to generate a series of movements that
represent the mirror of the programmed path. All that happens when mirror image is
turned on is that the control reverses the sign (plus to minus or vise versa) for the
mirrored axis. An X axis position of X2.0 before mirror image will be taken as X-2.0
after X axis mirror image is turned on.
Applications for mirror image
Mirror image applies best for hole machining operations. Say you have a side frame that
must be machined in a right hand and a left hand version. Mirror image allows you to
use the same program that machines the left hand side frame to machine the right hand
side frame.
Unfortunately, contour milling operations present a problem for mirror image. While
mirror image will function properly, the problem is related to basic machining practice.
Any climb milling operation will convert to conventional milling when mirror image is
turned on. Any conventional milling operation will convert to climb milling. In most
applications, this is unacceptable, since witness marks as well as finish will be
substantially different based upon milling method.
The two ways to activate mirror image
For almost all controls, mirror image can be turned on manually (through the setting page
of the display screen). Additionally, most controls allow you to program the activation of
mirror image. Your application determines whether you need to turn mirror image on
manually or by programmed command.
Manually turning on mirror image
Say for example, you have 500 left hand workpieces and 500 right hand workpieces to
run. You intend to run all of the left hand workpieces in one setup, then tear down the
set-up and run the right hand workpieces. In this case, there is no need to turn mirror
image on or off in the program. Simply run the one hand of workpiece with mirror image
turned off, then turn on mirror image (manually) before you run the opposite hand. You
must also know that the program zero assignment value for the axis being mirrored must
3

Lesson Twelve: Motion Manipulation Techniques


also be reversed (from minus to plus if fixture offsets are being used) when you run the
mirrored version of the program. If for example, you will be mirroring about the X axis,
the fixture offset for the X axis will be negative when you run the program without mirror
image. It must be positive when after you turn X axis mirror image on. Some controls
also require that you send the machine to its zero return position prior to turning on or off
mirror image (the machines current position may be taken as the center of mirroring).
Turning mirror image on in the program
Another application for mirror image requires that your turn on and off mirror image in
the program. In the previous side frame example, say you intend to run one set (left and
right hand) of side frames during the CNC cycle. If using mirror image to machine one
of the workpieces, you will need to activate mirror image during the programs
execution.
Most Fanuc and Fanuc compatible controls use a G51.1 to activate mirror image. The
axis to be mirrored as well as the center position of mirror is included within this
command. G50.1 is used to cancel.
During setup, the program zero assignment values will be measured in the normal manner
for each workpiece. Here is an example program that combines subprogramming
techniques with mirror image. The center of mirror is right between the two workpieces
that are spaced ten inches apart on the table (five inches to the right of the left
workpiece).
Main Program:
O0001
N005 G54 (1/2 drill)
N010 G50.1 (Cancels mirror image in X)
N015 M98 P1000 (Run entire left hand workpiece)
N020 G51.1 X-5.0 (Turn on X axis mirror image, specify center of mirror)
N025 M98 P1000 (Run entire right hand workpiece)
N030 G50.1 (Cancel mirror image)
N035 G91 G28 X0 Y0 Z0 (Go to zero return position)
N040 M30
Here is the the program that does the actual machining. Though it is quite simple (just
drilling two holes with one tool), it nicely stresses the important points.
O1000
N005 G90 S500 M03
N010 G00 X1. Y1.
N015 G43 H01 Z.1 M08
N020 G81 X1. Y1. R.1 Z-.5 F6.
N025 X2.
N030 G80 M09
N035 G91 G28 Z0
N040 M99
After seeing this simple example, you may feel that programming each hand of the
workpiece is easier, especially when you consider that you must specify the center of

Lesson Twelve: Motion Manipulation Techniques


mirroring in the G51.1 command (you may not know this value as you write the program
unless youre working with a fixture that holds both workpieces). As workpieces get
more complicated, the benefit mirror image provides does improve, but wed agree with
anyone that says its benefits are marginal for machining center applications.
Mirror image on a turning center?
There are two times when mirror image can be nicely applied to turning centers. The
first has to do with gang style turning centers that utilize a tooling table instead of a turret
to hold cutting tools. With this style of machine, some of the tools will be machining on
the plus side of the X axis while others will be machining on the negative side. This can
be extremely confusing to CNC operators (its no picnic for CNC programmers either).
An operator must know which side of the spindle the tool is on before they can adjust an
X offset. Tools on the positive side of the spindle will require a positive offset to make
the diameter bigger while others while tools on the negative side of the spindle will
require a negative offset to make the diameter bigger.
Programmable X axis mirror image will dramatically simplify programming and
operation. If the programmer simply turns on X axis mirror image before programming
tools that machine on the negative side of the spindle center (with G68 for Fanuc
controls), they can program exactly the same for all tools, and operators will be able to
make offset changes without concern for which tool is used to machine a given diameter
(all tools will be treated as if they are cutting on the positive side of the spindle center.
Programmers must remember to turn off X axis mirror image when programming tools
that machine on the positive side of the spindle center (with G69 for Fanuc controls).
Note that another style of machine that has tools on both sides of the spindle centerline is
the engine lathe style. This kind of machine has two turrets mounted to the same crossslide. Though its becoming less popular, all points made about gang type turning centers
still apply.
The second time its helpful to know about X axis mirror image (though there is no need
to program it) is with machine tool builders that reverse the X axis. There are two
machine tool builders that we know of that have the positive direction in the X axis a
motion toward the spindle center (with most machines, this is the minus direction). If
you happen to have this style of machine, along with others that have the X axis
configured in the more common way, you have to maintain two sets of programs (and
program with two styles). If you simply turn on X axis mirror image (once, in the
parameter settings) for those machines you wish to change, you can program all machines
in the same manner relative to the X axis.
G60 - single direction positioning
Single direction positioning is a relatively basic machining center feature that is not often
addressed in basic CNC courses. Backlash will affect positioning accuracy. And for
certain operations, it is possible to eliminate the effect that backlash will cause. Backlash
is, of course, any incorrectness of motion distance during a reversal in axis motion
direction. It is commonly caused by normal wear and tear on the CNC machine tool.
There is a feature called backlash compensation that will add the amount of backlash to
any reversal in motion direction. If backlash compensation is adjusted perfectly, it
electronically eliminates the effect of backlash.

Lesson Twelve: Motion Manipulation Techniques


Single direction positioning is another way to eliminate the effect of backlash when
precise positioning is necessary. It is most commonly required for finish boring on a
machining center, when the position of the hole being bored is critical. As the name
implies, single direction positioning will cause the tool to approach its position from the
same direction in each axis. If the XY plane is selected (with G17), as is normally the
case when finish boring, only the X and Y axes will be affected by single direction
positioning. Note that single direction positioning is affected by plane selection. If G18
is selected the axes involved with single direction positioning will be X and Z.
Parameters control the distance and direction for approach. In most cases, a distance of
0.1 inch is appropriate for distance. When it comes to direction, it commonly doesnt
matter which direction the machine approaches with vertical machining centers. But
with horizontal machining centers, it is best to approach from the minus direction,
especially for the Y axis due to the weight of the headstock.
The next drawing shows the movements caused by single direction positioning.

Drawing shows movements of single direction positioning.

Note that single direction positioning is modal and can be used in conjunction with
canned cycles (normally a boring cycle). When finished machining the last hole, you
must remember to place the machine back in the normal cutting mode (with G64). In
essence, G64 cancels the single direction positioning mode. Here is a program that
machines the workpiece in the last drawing.

Lesson Twelve: Motion Manipulation Techniques


O0001 (Program number)
.
.
.
N250 T06 M06 (Place finish boring bar in spindle)
N255 G54 G90 S800 M03 T07 (Select coordinate system, abs mode, and start
spindle)
N260 G60 G00 X2.0 Y2.0 (Instate single direction positioning, move to first hole)
N265 G43 H06 Z0.1 (Instate tool length compensation)
N270 G86 R0.1 Z-0.75 F2.5 (Machine first hole)
N275 X6.0 (Machine second hole)
N280 X4.0 Y4.0 (Machine third hole)
N285 X6.0 Y6.0 (Machine forth hole)
N290 X2.0 (Machine fifth hole)
N295 G80 G64 (Cancel canned cycle, cancel single direction positioning)
N300 G91 G28 Z0 M19 (Move to tool change position)
N305 M01 (Optional stop)
.
.
.
G64 - normal cutting mode
G64 cancels G60 (single direction positioning mode) and G61 (exact stop check mode).
It should be included as part of your program startup format in the safety blocks that
ensure initialized modes are still in effect.
G68 & G69 - coordinate rotation for machining centers
Coordinate rotation is especially handy when you must machine a series of identical
workpiece attributes (pockets, hole patterns, slots, etc.) around a specified location. It
works best in conjunction with subprogramming. You can specify the machining
operations in one location (the location thats easiest to program). These commands are
placed in the subprogram. In the main program, you specify the current angle of rotation
(with G68) and then call the subprogram. This can be repeated for as many repetitions as
you must machine.
For Fanuc controls, X and Y in the G68 command specify the center of rotation. An R
word specifies the angle. The command
N050 G68 X3.0 Y2.0 R45.0
tells the control to rotate all subsequent coordinates (until G69) about X3.0 and Y2.0 at a
forty-five degree angle.
Here is an example that should clarify the use of coordinate rotation. This subprogram
contains a slot that must be machined in a ring every 30 degrees. The center of the ring is
the center of rotation.
O1000 (Subprogram to machine one slot)
N005 G00 Z0.1

Lesson Twelve: Motion Manipulation Techniques


N010 X 1.0 Y0
N015 Z-0.5
N020 G01 X2.0 F4.0
N025 G00 Z0.1
N030 M30
Here is the main program that machines all 12 slots.
O0001
N005 T01 M06 (Place milling cutter in spindle)
N010 G54 G90 S500 M03 T02 (Select coordinate system, abs mode, start
spindle)
N015 G00 X0 Y0 (Move to workpiece center)
N020 G43 H01 Z0.1 (Instate tool length compensation)
N025 M98 P1000 (Machine first slot in programmed position)
N030 G68 X0 Y0 R30.0 (Rotate coordinate system thirty degrees)
N035 M98 P1000 (Machine second slot)
N040 G68 X0 Y0 R60.0 (Rotate coordinate system thirty degrees)
N045 M98 P1000 (Machine third slot)
N050 G68 X0 Y0 R90.0 (Rotate coordinate system thirty degrees)
N055 M98 P1000 (Machine forth slot)
N060 G68 X0 Y0 R120.0 (Rotate coordinate system thirty degrees)
N065 M98 P1000 (Machine fifth slot)
N070 G68 X0 Y0 R150.0 (Rotate coordinate system thirty degrees)
N075 M98 P1000 (Machine sixth slot)
N080 G68 X0 Y0 R180.0 (Rotate coordinate system thirty degrees)
N085 M98 P1000 (Machine seventh slot)
N090 G68 X0 Y0 R210.0 (Rotate coordinate system thirty degrees)
N095 M98 P1000 (Machine eighth slot)
N100 G68 X0 Y0 R240.0 (Rotate coordinate system thirty degrees)
N105 M98 P1000 (Machine ninth slot)
N110 G68 X0 Y0 R270.0 (Rotate coordinate system thirty degrees)
N115 M98 P1000 (Machine tenth slot)
N110 G68 X0 Y0 R300.0 (Rotate coordinate system thirty degrees)
N115 M98 P1000 (Machine eleventh slot)
N110 G68 X0 Y0 R330.0 (Rotate coordinate system thirty degrees)
N115 M98 P1000 (Machine twelfth slot)
G68 & G69 - Three dimensional coordinate conversion
As you know, G17, G18, and G19 allow you to easily switch planes for machining.
However, the planes must be perpendicular to an axis (XY, XZ, or YZ planes). With
these commands, you can easily use circular interpolation, canned cycles, cutter radius
compensation, and many other special program simplification features. However, these
three plane selection commands only work with three planes.
This special programming feature applies only to five axis machining centers. One very
popular application for five axis machining centers is to machine angular surfaces that are
not parallel to an axis. In essence, three dimensional coordinate conversion allows you to
define your own plane. Once this is done, you can use the same program simplification
8

Lesson Twelve: Motion Manipulation Techniques


features use whenever you work in the three planes defined by G17, G18, and G19
(again, circular motion, canned cycles, cutter radius compensation, and others).
The format for G68 used for three dimensional coordinate conversion is as follows:
N050 G68 Xxx.xxxx Yxx.xxxx Zxx.xxxx Ixx.xxxxx Jxx.xxxx Kxx.xxxx Rxx.xxxx
X, Y and Z specify the center of rotation. I specifies the direction of rotation about X, J
specifies the direction of rotation about Y, and K specifies the direction of rotation about
Z. For I, J, and K, 0 represents minus, 1 represents plus. R specifies the angular
displacement. Note that you can specify two consecutive G68 commands to perform two
angular modifications. G69 is used to cancel.
G70 - Turning center finishing cycle
G70 is a multiple repetitive cycle that is available on Fanuc and Fanuc-compatible
controls (though most turning center control manufacturers have something like it). Its
basic function is commonly well covered in basic CNC courses, since the multiple
repetitive cycles simplify the task of manual programming. However, there is one special
function of G70 that most basic courses dont mention.
Using G70 to repeat commands
If you use the G71 roughing cycle, you know that you must define the finish pass so the
control can determine how roughing must be done. During G71, however, the control
does not actually finish the workpiece. After roughing, you specify a G70 command to
tell the control to finish the workpiece. Here is a simple example of how G71 and G70
work together.
O0001 (Program number)
N005 T0101 (Rough turning tool)
N010 G96 S600 M03 (Start spindle at 600 sfm)
N010 G00 X3.0 Z0.1 (Rapid to workpiece)
N015 G71 P020 Q060 D0.125 U0.04 W0.005 F0.012 (Rough workpiece)
N020 G00 X0.875 (Begin finish pass definition)
N025 G01 Z0 (Come flush with face)
N030 X1.0 Z-0.0625 (Chamfer end)
N035 Z-1.0 (Turn diameter)
N040 X1.875 (Come up face)
N045 X2.0 Z-1.0625 (Chamfer)
N050 Z-2.0 (Turn diameter)
N055 X2.875 (Come up face)
N060 X3.0 Z-2.0625 (Chamfer)
N065 G00 X6.0 Z5.0 (Rapid to tool change position)
N070 M01 (Optional stop)
N075 T0202 (Finish tool)
N080 G96 S800 M03 (Start spindle at 800 sfm)
N085 G00 X3.0 Z0.1 (Rapid up to workpiece)
N090 G70 P020 Q060 F0.005 (Finish workpiece)
N095 G00 X6.0 Z5.0 (Rapid to tool change position)
N100 M30 (End of program)
9

Lesson Twelve: Motion Manipulation Techniques


Line N015 completely rough turns the workpiece based upon what the control sees
between lines N020 and N060 (specified by the P and Q in line N015). But it is not until
line N090 the workpiece is finish turned. In essence, line N090 tells the control to go
back to line N020 (specified by the P word in line N090) and do through line N060
(specified by the Q word in line N090).
While we commonly think of G70 as a finishing cycle (following up G71, G72, or G73),
remember that G70 can be used any time you want commands to be repeated. Generally
speaking, G70 lets you repeat commands just as you would with subprogramming
techniques (M98 and M99) but you can keep the commands to be repeated in the main
program (only one program is required). Consider, for example, this grooving
application.
O0001 (Program number)
.
.
.
N255 T0505 (Grooving tool)
N260 G96 S500 M03 (Start spindle at 500 sfm)
N265 G00 X3.2 Z-0.5 (Rapid to first groove)
N275 G01 X2.5 F0.005 (Plunge groove)
N280 G04 X0.5 (Dwell to relieve tool pressure)
N285 G00 X3.2 (Rapid out of groove)
N290 W-0.03 (Rapid over 0.03)
N295 G01 X3.0 (Feed flush with diameter)
N300 X2.94 W0.03 (Chamfer left side of groove)
N305 G00 X3.2 (Rapid out)
N310 W0.03 (Rapid over 0.03)
N315 G01 X3.0 (Feed flush with diameter)
N320 X2.96 W-0.03 (Chamfer left side of groove)
N325 G00 X3.2 (Rapid out, groove is completed)
N330 Z-1.0
N335 G70 P275 Q325 (Machine second groove)
N340 Z-1.5
N345 G70 P275 Q325 (Machine third groove)
N350 Z-2.0
N355 G70 P275 Q325 (Machine forth groove)
N360 Z-2.5
N365 G70 P275 Q325 (Machine fifth groove)
N370 G00 X6.0 Z5.0 (Rapid to tool change position)
N375 M30 (End of program)
Notice how the first groove is machined during lines N275 and N325 (we move in
incremental for Z to allow the same commands to work in any Z position). After moving
to the next groove position in Z, lines N335, N345, N355, N365, and N375 machine the
other grooves. Again, this is much like what you can do with subprogramming, but the
repeated commands can be kept in the main program.

10

Lesson Twelve: Motion Manipulation Techniques


G76 - threading cycle
As you know, G76 will completely machine the entire thread, regardless of how many
passes are required. The general use of G76 is presented in most basic CNC turning
center courses. However, fully mastering G76 requires a little more effort. There are
several advanced implications, and we present most of them here.
Maximum feedrate when threading
As stated during our discussion of G00 and G01, every CNC turning center will have a
maximum feedrate capability. It is usually set to about half the rapid rate. If your
machine can rapid at 500 ipm, its maximum feedrate will be about 250 ipm. You
normally need not be concerned with the maximum available feedrate, since most
machining operations will never come close to exceeding it. Threading may be the only
exception.
Consider, for example, machining a multiple start thread. Say this thread as four starts,
0.125 apart. The lead of each of the starts will be 0.5, meaning for every spindle
revolution, the Z axis must move 0.5 inch. If this thread is to be machined on a 1.0 inch
diameter at 400 sfm, the spindle will be running at 1,528 rpm. The required feedrate will
be 764 ipm (1,528 times 0.5), which will exceed the maximum programmable feedrate
for most turning centers!
You must understand that most machines will not generate any kind of alarm when you
exceed the maximum programmable feedrate. Most machines will simply do their best,
which means the thread will not have the correct pitch.
What is thread chamfering?
Fanuc and Fanuc-compatible controls have a function called thread chamfering that
controls what will happen at the end of each threading pass. If thread chamfering is
turned off, or if the chamfer amount is set to zero, the tool will reach the end of each Z
axis pass and pull straight out in the X axis. This is commonly desired when a thread
relief groove is machined at the end of the thread.
When thread chamfering is turned on and the chamfer amount is set to one pitch, the tool
will come to within one pitch of each threading pass and then start tapering out in the X
and Z axis at a chamfer angle of 45 degrees. This is sometimes desired when there is no
thread relief groove at the end of the thread (though many users keep thread chamfering
off even when there is no thread relief groove).
A parameter control the chamfer amount. For a 16T control, for example, parameter
number 5130 controls chamfer amount. It is a one place fixed format value. A value of 5
specifies 0.5 of a pitch. A value of 10 specifies one full pitch.
Some machine tool builders use M codes to control whether thread chamfering is on or
off (check your list of M codes to find out if your machine/s have them). Others require
that the parameter controlling chamfer amount be set to zero in no thread chamfering is
desired (in essence, setting this value to zero turns off thread chamfering).
Note that if you dont have M codes to turn thread chamfering on and off, you can use
G10 to change the related parameter. The commands

11

Lesson Twelve: Motion Manipulation Techniques


.
.
G10 L50
N5130 R10
G11
.
.
will set the thread chamfer size to one pitch, and in effect, turn thread chamfering on.
The commands
.
.
G10 L50
N5130 R0
G11
.
.
set the thread chamfer size to zero, effectively turning off the thread chamfering function.
An unexpected problem caused by thread chamfering
If thread chamfering is turned on and you dont know it (possibly the M code that turns
on thread chamfering is initialized), and if you must machine a coarse yet short thread,
you may be in for a bit of a surprise.
Say you must machine a 0.125 pitch thread over a length of just 0.25 inch. Only half the
thread will be machined when thread chamfering kicks in. In worse cases, the threading
tool may start to retract before it even begins cutting the workpiece!
Specifying minimum depth of cut, final depth of cut, and number of spring passes
Some Fanuc controls (the 0T and 3T, for example) allow you to easily specify these
important threading variables as part of the G76 commands. In these commands
.
.
N140 G76 P021060 Q0.005 R0.0002
N145 G76 X0.92 Z-1.0 R0.04 Q0.010 F0.0625
.
.
for example, the first two digits of the P word in the first G76 command specify the
number of spring passes, the second two digits specify the chamfer amount (notice that
you can even specify chamfer amount with this programming format), and the last two
digits specify the tool angle. The Q word in the first G76 command specifies the
minimum depth of cut, and the R word in the first G76 command specifies the final pass
depth of cut. These are important threading variable that commonly change based upon
thread size. If you must machine multiple threads in the same CNC operation, it is
important to be able to change these values from thread to thread, right in your CNC
program.

12

Lesson Twelve: Motion Manipulation Techniques


Note that most Fanuc turning center controls do not allow you to manipulate these values
within the G76 command. Instead, they are parameter settings, meaning you can use G10
to change them from thread to thread within your program. For a 16T control, the
commands
.
.
G10 L50
N5130 R0
N5140 R0030
N5141 R0002
N5142 R3
G11
N045 G00 X3.2 Z0.2
N050 G76 X2.92 Z-0.75 K0.040 D0100 F0.0625 (Machine thread)
turn off thread chamfering (parameter 5130), set the minimum depth of cut to 0.003
(5140), set the final pass dept to 0.0002 (5141), and set the number of spring passes to
three (5142). Line N050 actually machines the thread.
Machining tapered threads
Most basic CNC turning center courses limit their discussions about G76 to machining
straight threads. Taper threading requires that the workpiece be taper turned prior to
threading. The taper angle for taper threading is usually 3.718 degrees (on the side). The
next drawing shows a diagram giving the meaning of each word of the G76 command
when used for taper threading.

13

Lesson Twelve: Motion Manipulation Techniques

Drawing shows the words used with G76 for taper threading

Notice the addition of an I word. The I word specifies the distance and direction from the
end point of the thread to the starting point of the thread along the X axis. For outside
diameter taper threads, I will always be negative. For inside diameter taper threads, I will
always be positive.
The actual value of I requires trigonometry to calculate. I will be equal to the tangent
of the taper angle (usually 3.718 degrees) times the overall length in Z of the threading
pass. This length must include the approach distance (usually 0.200 inch).
If, for example, your external thread is 1.0 inch long and you have a 0.2 inch approach,
the value of the I word will be I-0.0779 (tangent of 3.718 times 1.2)
Multiple start threads
Multiple start threads are required when mating workpieces require the smooth fit of a
fine thread with the axial motion of a coarse thread. Multiple start threads require more
than one lead to be machined. The next drawing shows an example of a four start thread.

14

Lesson Twelve: Motion Manipulation Techniques

Drawing shows four start thread

The drawing on the left shows what the thread will look like after the first start is
machined. Notice that the lead of the thread (.5 inch in this case) is measured over one
start (this will be the feedrate in the G76 command/s). The drawing on the right shows
the balance of thread starts filled in.
Most controls allow multiple start threads to be easily machined by cross threading in a
controlled manner. In essence, you will be machining four independent thread starts,
meaning four separate G76 commands. The feedrate used for each thread start must be
the overall lead of the thread (0.5 inch in our case).
One way to machine this thread that will work on all controls is to physically move the
tool in Z by a value equal to the overall lead (.5 in our case) divided by the number of
thread starts (4 in our case) in between G76 commands. The move-over amount after
each start is machined in our case will be 0.125 inch. This will force the tool to cross
thread in a highly controlled manner.
Here is a program that uses this technique to machine the four start thread shown in the
last drawing.
Program:
O0018 (Program number)
N003 G20 G23 G40 (Ensure that initialized states are still in effect)
N004 G50 S4000 (No need for limiting, limit to machines maximum speed)
N005 T0101 M41 (Select threading tool and low spindle range)
N010 G97 S500 M03 (Turn spindle on CW at 500 RPM)
N015 G00 X4.2 Z0.2 M08 (Rapid to convenient starting position to machine
first start, start coolant)
N020 G99 G76 X3.826 Z-1.9 K0.087 D0160 A60 F0.500 (Machine first start)
N025 G00 Z0.325 (Move over to starting position for second start)
N030 G76 X3.826 Z-1.9 K0.087 D0160 A60 F.500 (Machine second start)

15

Lesson Twelve: Motion Manipulation Techniques


N035 G00 Z0.450 (Move over to starting position for third start)
N040 G76 X3.826 Z-1.9 K0.087 D0160 A60 F0.500 (Machine third start)
N045 G00 Z0.575 (Move over to starting position for fourth start)
N050 G76 X3.826 Z-1.9 K0.087 D0160 A60 F0.500 (Machine fourth start)
N055 G00 X8.0 Z6.0 (Rapid to safe index point)
N060 M30 (End of program)
Notice in blocks N025, N035, and N045, the tool is being moved more and more plus in
Z by 0.125 increments. While this technique works, it has two limitations. First, each
subsequent thread start will take longer to machine than the last, meaning cycle time will
suffer. Second, and more important, there may be times when it is impossible to move
plus in Z without running into an obstruction (like the tailstock). For this reason, newer
controls make it possible to machine multiple start threads without moving in Z between
starts.
For these newer controls, a Q word can be used within the G76 command to tell the
control the rotational angular position of the thread start. Here is another program that
uses this technique to machine the workpiece shown in the last drawing.
Program:
O0019 (Program number)
N003 G20 G23 G40 (Ensure that initialized states are still in effect)
N004 G50 S4000 (No need for limiting, limit to machines maximum speed)
N005 T0101 M41 (Select threading tool and low spindle range)
N010 G97 S500 M03 (Turn spindle on CW at 500 RPM)
N015 G00 X4.2 Z0.2 M08 (Rapid to convenient starting position to machine
first start, start coolant)
N020 G76 X3.826 Z-1.9 K0.087 D0160 A60 F0.500 Q0 (Machine first start)
N025 G76 X3.826 Z-1.9 K0.087 D0160 A60 F0.500 Q90. (Machine second
start)
N030 G76 X3.826 Z-1.9 K0.087 D0160 A60 F0.500 Q180. (Machine third
start)
N035 G76 X3.826 Z-1.9 K0.087 D0160 A60 F0.500 Q270. (Machine fourth
start)
N055 G00 X8.0 Z6.0 (Rapid to safe index point)
N060 M30 (End of program)
Notice the Q word in each G76 command. It simply tells the control where (angularly) to
begin the thread start. For a four start thread, each thread start is simple 90 degrees apart.
Using the E word when threading
You know that the F word specifies the pitch of the thread. If working in the inch mode,
the F word allows four places. If machining a 16 threads per inch thread, you can
perfectly specify the pitch with the F word (0.0625). However, with most threads, the
pitch will not be accurate if limited to the four place format of the F word. A twelve
threads per inch thread will have a pitch of 0.0833333333333. With most Fanuc controls,
you can gain two more digits of accuracy by specifying the pitch with an E word. That is
you can program out to six places (as opposed to four places) with the E word. For a
twelve threads per inch thread, you can specify an E word of E0.083333.

16

Lesson Twelve: Motion Manipulation Techniques


Note that in most cases, youre just machining mating parts. And as long as you specify
the same F word in both programs, your threads will come out correctly enough.
However, if you must machine a perfect lead (as may be the case with some kind of lead
screw), its nice to know the E word is available.
G90 & G91 - absolute and incremental mode
Most basic CNC courses stress the use of absolute mode, and in this mode, all
coordinates are specified from the program zero position. In absolute mode, coordinates
are easy to determine, programming is easier, and values in the program make sense.
However, there are a few points about absolute and incremental mode that are not
mentioned in most basic courses.
Using both in one command
Most Fanuc controlled turning centers use X and Z to specify absolute coordinates and U
and W to specify incremental motions (U is incremental motion in X and W is
incremental motion in Z). This makes it easy to include an absolute coordinate in one
axis in the same command as an incremental departure. Consider, for example, the
following command.
N050 G01 U-0.001 Z1.0 F0.005
The machine will decrease in diameter by 0.001 inch at the same time it moves to an
absolute position of negative one inch in the Z axis.
Note that most current model machining centers also allow incremental and absolute
motions in the same command. This can be very helpful if your machining center has a
rotary axis. Many applications for the rotary axis require it to be used as nothing more
than a simple indexer. And it can be very helpful to program indexing motions in the
incremental mode. And it is quite common to need motion in X, Y, or Z in conjunction
with the rotary axis motion. Consider this command.
N140 G00 G90 X1.0 Y2.0 G91 B90.0
The machine will move to an absolute position in X and Y while incrementally indexing
90 degrees in the positive direction. This is one time when the word order in the
command affects the method by which the command will be executed.
Other applications for the incremental mode
While the absolute mode should be used for the bulk of your programs, we have already
introduced some times when it can be helpful to use the incremental mode. You have
seen that incremental mode can be used when you have repeated identical machining
operations (pocketing, grooving, thread milling, etc.). The motions for one of the
operations can be programmed in the incremental mode and stored in a subprogram.
After positioning the tool to a consistent location relative to the machining operation in
the main program, the subprogram is called.
Note that programming in incremental mode can be difficult. If your machine has the
G52 function (temporary shift of program zero), you can more easily accomplish multiple
identical machining operations without having to use the incremental mode (see the
description of G52 for more information).

17

Lesson Twelve: Motion Manipulation Techniques


Another previously discussed application for the incremental mode is for use with hole
machining canned cycles. If you have a series of evenly spaced holes, by programming
them in the incremental mode, and by using the L word, you can truly reduce the number
of commands required to machine the holes.
Moving relative to zero return
There are times when it can be helpful to move to a position relative to the machines
zero return position. You may, for example, have a special program starting position that
avoids obstructions. Or you may have a manual pallet changer that requires the axes to
be in a special position before you can change pallets. If your machine has the G53
function, you have seen that it is easy to move relative to the zero return position. The
command
N060 G53 X-13.0 Y-3.0
will move the machine to a location thirteen inches in X and three inches in Y from the
zero return position.
Unfortunately, some machines (especially older ones) do not have the G53 function.
With these machines, you can use the incremental mode to help you position the machine
relative to the zero return position. The commands
N060 G91 G28 X0 Y0 Z0
N065 X-13.0 Y-3.0
accomplish the same thing as the previous G53 example.
In line N060, the machine is sent to the zero return position in all axes. In line N065, the
machine is sent (incrementally) thirteen inches in X and three inches in Y from the zero
return position.
Admittedly, G53 is more efficient (the machine does not have to go the zero return
position before it goes to your desired position) and should be your method of choice if
its available. But if your machine does not have G53, at least you can accomplish what
you need with the incremental mode.

18

You might also like