Вы находитесь на странице: 1из 13

Lesson Six: Techniques With Motion Types

Techniques With Motion Types


In this lesson well look at some motion techniques that are not commonly discussed in
basic CNC courses. Note that were still talking about the basic motion types rapid
(G00), straight line (G01), and circular (G02-G03) motion. In lesson seven, well discuss
more advanced motion types.
G00 & G01 rapid and straight line motion for positioning (not cutting)
The basic motion types (including G00 and G01) are usually well covered in most basic
CNC courses - at least as far as basic usage goes. Here we intend to expose some
important things not commonly addressed in basic courses.
As you know, G00 will cause the machine to move as fast as it possibly can in all
commanded axes (if more than one axis is commanded, its likely that the motion will not
be in a straight line). The primary function of rapid motion is, of course, to help
minimize air cutting time during the programs execution. Most instructors teach
students that if theyre not cutting anything in the motion they should be causing the tool
to move at rapid. While this is a great rule of thumb, there are times when using G01 for
positioning (non-cutting) movements is advantageous - in fact - there is even one time
when using G01 is actually faster!
What is your maximum feedrate?
Most CNC users can quickly state the rapid rates for the various machines they own. Its
well publicized, and machine tool builders are quite proud of how fast they can make
their machines move. For smaller machines, its not uncommon to have rapid rates well
in excess of 1,000 inches per minute.
However, most CNC users cannot as readily state their machines maximum feedrate (the
fastest the machine can move in G01 mode). Indeed, you may have to scour your
machine tool builders programming manual to find this specification (if you find it at
all). A control parameter setting, the maximum feedrate is commonly set to about half
the machines rapid rate (but confirm this to be sure). If, for instance, the machine has a
rapid rate of 1,000 ipm, the maximum feedrate will probably be in the neighborhood of
500 ipm. Since it is rare that a cutting operation would require this fast a motion rate (but
well show one such machining operation a little later), most CNC users are not
concerned with maximum feedrate.
Which is faster, G00 or G01?
At first glance, it may seem like a no-brainer that the rapid mode is much faster than the
straight line motion mode. While rapid motion is commonly your best choice for fast
axis motion, there is one time when G01 may be (much) faster than G00 - when making
very small movements since the machine will not actually reach its rapid rate. How G01
compares to G00 for small movements is also determined by how certain control
parameters that are related to axis acceleration and deceleration are set.
Though a service engineer may take exception with the details this explanation, this
presentation should be easy enough for everyone to understand. With most controls,
acceleration and deceleration parameters for the rapid (G00) mode are set up with
exponential methods. The left-most drawing shows a graph of exponential accel/decel.

Lesson Six: Techniques With Motion Types


7 time constants

Time

Time

2 time constants
300 ipm

Motion rate

1,200 ipm

Motion rate

Motion rate

5 time constants

Time

Notice that most controls will take about five time constants to complete the acceleration.
Though variable, lets say the time constant is currently set to 100 milliseconds. The
same will be true for deceleration. This means that the machine will be accelerating for
about the first 1/2 second of motion. At the end of the command, the machine will be
decelerating for the last 1/2 second of the command (again, this is assuming five time
constants are required and each time constant is 100 ms). For lengthy motions, there will
be ample time to accelerate up to the machines rapid rate and decelerate down when the
machine comes close to the end of the motion. The longer the motion, the more distance
the machine will truly move at the full rapid rate.
As you probably know, with short rapid motions the machine will never reach its full
rapid rate (in our example, any rapid motion requiring less than one second). It will be
right in the middle of the acceleration when it determines that it must start decelerating if
it is to stop in the commanded position. The middle illustration shows this kind of
motion in graph form. Notice that the machine never came close to reaching its full rapid
rate when it begins slowing down. Though this graph is not perfect (there will be lots of
variables based upon machine size and how the related parameters will be set), notice that
the time required for this motion is about 700 ms (seven time constants). And again, the
machine never comes close to its true rapid rate.
Though it may come as a bit of a surprise, we can commonly speed up the machines
motions during short positioning movements by programming in G01 mode instead of
G00. One of the main reasons for this is that acceleration/deceleration is handled
differently when G01 is used. First of all, its done in a linear fashion (not exponential).
And second, usually only 2-3 time constants (200 - 300 ms) are required to complete
acceleration/deceleration. The right-most drawing illustrates this. Even though slower
feedrates are programmed (well be using 300 ipm), the machine will actually respond
faster in G01 mode than it will in G00 mode.
A test
Its hard to predict just what kind of improvement you can expect by programming short
movements with fast feed G01 commands as opposed to rapid motion commands. Factors
include the machine size, the rapid rate, the feedrate used, and how
acceleration/deceleration parameters are set. However, there is a test you can perform to
determine just how much you can save with a specific machine.
This first test program simulates center drilling 50 closely spaced holes. Note that the
depth of each hole is only 0.2 (0.3 actual movement) and the holes are spaced 0.5 apart)
While its rather long, you can of course use a text editor and copy-and-paste to avoid
2

Lesson Six: Techniques With Motion Types


typing the whole program out longhand. Note also that this program is using G00, even
though motions are quite small. Ensuring that rapid override and feedrate override are set
to 100%, run and time this program. It requires about 25 inches of X axis travel, so move
the machine at least 25 inches to the negative side of the plus over-travel limit prior to
running.
O0001 (Test program with G00)
G91 G01 Z-0.3 F8.0
G00 Z0.3
X0.5
G01 Z-0.3
G00 Z0.3
X0.5
G01 Z-0.3
G00 Z0.3
X0.5
G01 Z-0.3
G00 Z0.3
X0.5
G01 Z-0.3
G00 Z0.3
X0.5
G01 Z-0.3
G00 Z0.3
X0.5
G01 Z-0.3
G00 Z0.3
X0.5
G01 Z-0.3
G00 Z0.3
X0.5
G01 Z-0.3
G00 Z0.3
X0.5
G01 Z-0.3
G00 Z0.3
.
.
(Repeated 40 more holes)
.
.
M30
Here is the second test program that uses G01 for positioning movements. Run and time
this program and compare it to the first one.
O0002 (Test program using G01 for all motions)
G91 G01 Z-0.3 F8.0

Lesson Six: Techniques With Motion Types


Z0.3 F300.
X0.5
Z-0.3 F8.0
Z0.3 F300.0
X0.5
Z-0.3 F8.0
Z0.3 F300.0
X0.5
Z-0.3 F8.0
Z0.3 F300.0
X0.5
Z-0.3 F8.0
Z0.3 F300.0
X0.5
Z-0.3 F8.0
Z0.3 F300.0
X0.5
Z-0.3 F8.0
Z0.3 F300.0
X0.5
Z-0.3 F8.0
Z0.3 F300.0
X0.5
Z-0.3 F8.0
Z0.3 F300.0
X0.5
Z-0.3 F8.0
Z0.3 F300.0
.
.
(Repeated 40 more holes)
.
.
M30
What were your results?
You may be quite surprised at the results of this test. Wed be interested in hearing them
so we can relate more specific information based upon machine sizes. If you will let us
know the differences in cycle time (you can email us at lynch@cncci.com).
We make one last point about G00 versus G01 for short positioning movements.
According to GE Fanuc Automation, youll put much less stress and strain on the
machine if you use G01 for short positioning movements. With G00, the axis drive
system is constantly chasing its tail trying to determine the proper rate of motion (again,
look at the middle drawing). No sooner than a drive motor begins to speed up, it has to
begin slowing down. This causes spikes in power consumption and places undue wear
and tear on the servo drive system.

Lesson Six: Techniques With Motion Types


How do canned cycles work?
Of course that there are several canned cycles to help perform hole machining operations.
When it comes to the points just made about short positioning movements, you must
understand that most controls use G00 (internal to the canned cycle) on a regular basis.
The G81 drilling cycle, for example, uses G00 to retract from the hole and to move to
hole locations. You might add this short program to your series of tests.
O0001 (Program number)
G91 G81 X0.5 R0 Z-0.3 F8.0 L25 (Drill 25 holes along a line)
M30
This time were drilling with G81 (feed to depth retract at rapid). Since the command is
given in incremental mode, we can include the X0.5 and the L25 to make the machine
drill 25 equally spaced holes. When you time the execution of this program, you will
likely find that it takes the same amount of time as the G00 test (again, G81 uses G00
internal to the cycle). You might even find it takes a little longer since, depending upon
control model, canned cycles can take longer to execute than straight forward motion
commands.
Using G01 for fast feed approach
As stated, machines are coming with faster and faster rapid rates. It is not unusual for a
new machine to have a rapid rate in excess of 1,500 inches per minute. But with many
machines, the rapid override function has not been improved sufficiently to provide
adequate control of the machine while its making rapid movements - especially when
approaching to within a small distance away from the workpiece (most programmers
rapid to within no more than 0.1 inch from the surface to be machined).
Note that it is the machine tool builder that provides the rapid override function (not only
Fanuc) and machine tool builders vary with regard to how much control they provide.
The best control of rapid override weve seen is tied to the single block switch. If single
block is on, the rapid override function is automatically activated and a multi-position
switch (commonly feedrate override) is used to control the rate of motion. In its lowest
position, rapid motion occurs at but a crawl. With this much control of rapid motion,
even verifying very tiny rapid approach distances is safe and easy.
But as stated, not all machine tool builders provide this much control of their rapid rate.
With some rather crude rapid override functions, you have a four-position rapid override
switch (100%,50%, 25%, and 10%). In its lowest position (10%), a machine having a
rapid rate of 1,500 inches per minute will still be moving at 150 inches per minute.
Worse, some builders give but a simple on/off switch for rapid override. If turned on,
rapid motion will occur at 25% of its normal rate.
Some machines provide additional control of rapid rate with the dry run function. When
dry run is turned on, the jog feed or feedrate override switch is used to more adequately
control rapid rate - and you can still slow motion to a crawl. But since you should not let
the machine cut under the influence of dry run (dry run slows rapid motion but it speeds
up cutting motions), having to deal with dry run for the purpose of verifying approach
movements can be cumbersome.

Lesson Six: Techniques With Motion Types


Again note that with some machines, the only control youll have of rapid rate is the
rapid override function (dry run may not even affect rapid motions). With these
machines, verifying approach movements when small approach distances are used can be
very dangerous.
For machines that have inadequate control of rapid, and even with those that force you to
use dry run to fully control rapid rate, you can facilitate the task of verifying approach
movements by keeping the initial movement a tool makes in an approach (at rapid) a
large distance from the surface to be machined - a distance that can be easily spotted at
ten percent of the machines rapid rate. Usually 2.0 inches is sufficient.
For the balance of the approach, switch to the G01 straight line cutting mode and feed at
a fast feedrate. To minimize air cutting time, we recommend using the machines fastest
programmable feedrate, which is normally half the rapid rate. Example:
N015 G00 X1.0 Y1.0
N020 G43 H01 Z2.0
N025 G01 Z0.1 F200.0
N030 G81 R0.1 Z-0.5 F4.5
With this approach, the machine will stop two inches above the work surface in line
N020. The machine will still be moving at rapid during this movement, but the setup
person should be able to catch any mistake if the tool comes closer than this distance. In
line N025, the feedrate override switch will control the balance of the approach motion,
giving the setup person the ability to completely manipulate the approach motion rate.
Which is initialized, G00 or G01?
It may be helpful to know that you have control of whether the machine powers up in the
G00 or G01 mode (a parameter controls this choice). If your setup people and operators
do quite a bit of manual data input (MDI) functions, and if these actions include actually
causing axis motion, it may be wise to ensure that the machine powers up in the G01
mode to minimize the potential for undesirable rapid motion during their first MDI
motion command.
Reducing rapid approach distance
Most basic CNC courses teach beginners to rapid within 0.1 inch (or 2.5 mm) of qualified
surfaces to be machined. By qualified, we mean surfaces that are not varying from one
workpiece to another. For unqualified surfaces (like many castings and forgings),
beginners are taught to keep the approach distance even greater.
While 0.1 inch is a safe approach distance, consider its effect on cycle time. Say you
must center drill (or spot drill) and drill fifty holes. If you stay 0.1 inch away from the
surface, the machine will be air cutting for a distance of 0.1 before it comes into contact
with each hole. Times fifty holes, thats five inches of air cutting. At five inches per
minute (not an unreasonable feedrate for center drilling or spot drilling), this equates to
one minute of cycle time.
If you reduce the rapid approach distance to 0.05 inch, youll cut thirty seconds from the
cycle! Note that since you will still use verification functions like single block, dry run,
and jog feedrate to control each tools approach motion, this should be no more
dangerous than having an approach distance of 0.1 inch (as long as the surface is truly

Lesson Six: Techniques With Motion Types


qualified). In fact, we contend that if you would have been taught in basic CNC courses
to make your rapid approach distance 0.05 inch, you wouldnt have had any problems
you havent had staying 0.1 inch away!
Note that this technique does assume that you are using a relatively accurate method of
determining tool length compensation values (measuring tool lengths with a tool length
measuring fixture, measuring tools on the machine, etc.).
What is your rapid approach distance after center drilling or spot drilling?
The center drill actually makes a certain amount of clearance for the subsequent drill.
The larger the center drilled hole, the more clearance youll have. Look at the next
drawing.

Rapid To Work Surface!

Drawing shows how you can rapid the drill tip right to work surface after center drilling

Believe it or not, youll have ample clearance for the drill after center drilling to rapid the
drill tip right down to the work surface. Here is an example of how much clearance
youll have. If you center drill to a 0.25 inch diameter, and if you use a 118 degree twist
drill, the drill will still have to move about 0.07 inch before it starts cutting. If you stay
0.1 away from the work surface, the tool will have to move 0.17 inch before it starts
cutting!
If you spot drill to a diameter bigger than the drill diameter (to make a chamfer for the
hole to be drilled), you can actually send the drill into the hole by the drill lead amount
(0.3 times the drill diameter for a 118 degree twist drill) and still have the chamfer
amount for clearance.
Before you are too quick to discount this technique (many programmers are a little
nervous when they hear this for the first time), go out to your machine with a stop-watch.
During the machining cycle use the stop-watch to determine just how much air cutting
time there is in the program thats running. In some cases, you can reduce the program
execution time by over 20% by applying this technique! This savings will likely justify
whatever effort and precautions you must take in order to safely implement it.

Lesson Six: Techniques With Motion Types


G01 - Straight line cutting motion (also called linear interpolation)
Because it is such a needed motion type, G01 is usually well covered in basic CNC
courses. Of course, G01 can be used to machine any straight surface - and a feedrate (F
word) specifies the rate of motion. Drilling holes, milling straight surface, and turning
straight diameters, tapers and chamfers are among the many machining operations that
can be done with G01. We have but a few points to make.
Efficiency of basic motion types
Throughout your CNC career, youre going to be exposed to lots of fancy programming
features that simplify programming (in module number one, we called them convenience
features). While many of these higher level programming features are quite helpful, you
must understand that the control can always follow a series of straight forward motion
commands (G00, G01, G02, & G03) faster than it can interpret and execute a canned
cycle that causes the same motions. We say Any time you make the control think, it
takes time. From a purely cycle time related standpoint, straight forward motion
commands will always make the control execute as quickly as possible.
Minimizing corner rounding
All CNC controls have a look ahead buffer to keep the machine from having to come to a
complete stop between commands. This minimizes the tendency for tools to leave dwell
marks on the workpiece as it is being machined. However, to keep the machine from
stopping during a transition from one straight line motion to another (G01 to G01), the
control will actually cause the tool to begin the second motion command before it
completely finishes the first. For outside corners, this has the effect of creating a small
radius on the corner (actually the motion generated is not a perfect radius). The larger the
machine and the faster the feedrate, the more likely the controls tendency will be to have
the tool to round corners.
For most applications, the amount of corner rounding is unnoticeable. Either the machine
is light enough or the feedrate is slow enough that the amount of corner rounding is
immeasurable. But consider milling a free machining material like aluminum with a
larger machining center. It is quite likely that outside corners (corners that are supposed
to be sharp) will have a noticeable rounding which may cause the workpiece to be out of
tolerance.
Fanuc and Fanuc-compatible control manufacturers offer two ways to program around
this problem. A G04 dwell command can be placed between the two G01 motions to
cause the machine to come to a complete stop and pause for a specified length of time.
Or the exact stop check command (G09 or G61) can be used. Either will have the effect
of forcing the machine to leave a sharp corner. Both the dwell command and the exact
stop check commands are discussed later in this course.
If you have this problem on a regular basis, you should consult your machine tool
builder. While you can use the methods just introduced to program around this machine
problem, your machine tool builder may be able to improve the way your machines axes
respond during transitions from one G01 command to another. In essence, they may be
able to tighten up the response of the axis drives. These modifications are made through
parameter changes.

Lesson Six: Techniques With Motion Types


G02 & G03 - circular motion commands
Since all machining and turning centers are equipped with these two motion types, they
are also well covered in most basic CNC courses, While it is still a simple motion to
understand, circular motion tends the be the hardest of the three basic motion types to
master (rapid motion, straight line motion, and circular motion). Also note that with most
controls, G02 and G03 are not only used to generate circular motion, they are also used to
generate helical motion for milling threads on a machining center. In this discussion,
well only discuss G02 and G03 as they apply to circular motion. Helical motion will be
presented in the next module.
Which way is clockwise?
In basic CNC courses, beginners are taught that G02 is clockwise circular motion and
G03 is counterclockwise circular motion. While this is generally correct, there is a better
definition for determining arc direction. For machines with more than two axes (like
machining centers) you must determine clockwise versus counterclockwise by viewing
the motion from the plus side of the uninvolved axis.
It just so happens that when you view XY circular motion on for a machining center,
youre always doing so from the plus side of the Z axis. However, if you even intend to
program circular motion in the XZ, you must view the motion from the plus side of the
Y axis (the column side of a vertical machining center). If you intend to program circular
motion in the YZ plane, you must view the motion from the plus side of the X axis (right
side of a vertical machining center).
Look at the drawing. Notice that since this is an XZ motion on a vertical machining
center, you must view the motion from the plus side (column side) of the Y axis.

G02!

X
Additionally, if you do intend to make circular motion in any plane other than XY (XZ or
YZ), you must first command the proper plane selection (see G17, G18, and G19 later in
this module). It just so happens that G17 is initialized, meaning you never have to
program plane selection if you work exclusively in the XY plane (as most programmers
do).
Limitation of the R word

Lesson Six: Techniques With Motion Types


Most instructors limit their presentations in basic CNC courses to the use of the R word
to specify the size (radius) of the arc being generated. While the R word works just fine,
you should be aware of its limitation. Generally speaking, the R word tends to be too
forgiving. That is, the control will respond by doing something regardless of whether the
R word is correctly specified. The major point: If you intend to use the letter address R
to specify the radius of a circular motion, you better be sure that you specify it correctly.
If you specify a value that is too large or too small, its likely that the arc machined will
not be what you expect. If, for example, you specify a too large a radius for an arc thats
supposed to be tangent to both adjacent entities, its likely that the arc will not be tangent
to at least one of the entities. This problem can be most troublesome when the amount of
error is very small. You probably wont catch it during a dry run. Only when you
machine (and scrap) your first workpiece will it be evident that something is wrong.
Directional vectors
Commonly thought of as the old way to specify arc size for circular motions, directional
vectors can still be used to specify the arc size. Admittedly, they are more difficult to
master than the simple R word. But they also overcome the limitation just mentioned. If
you are off by as little as 0.0001 inch with your specification of directional vectors, most
current model controls will generate an alarm - not allowing the program to cut (and
scrap) a workpiece.
Three letter addresses are used (for two axis turning centers, only I and K are used):
I - distance and direction from start point of arc to center of arc in X
J - distance and direction from start point of arc to center of arc in Y
K - distance and direction from start point of arc to center of arc in Z
To determine which of I, J, and/or K you must use, first imagine arrow/s drawn from the
start point of the arc to the center of the arc. If that arrow or arrows can be drawn along
the X axis, youll be using an I in the circular motion command. If you can draw an
arrow along the Y axis, youll be including a J. And if you can draw an arrow along the
Z axis (commonly on turning centers), youll be including a K in the circular motion
command.
You must also be concerned with polarity of directional vectors. If the arrow/s point in
the plus direction, the polarity of the related I, J, and/or K values will be positive. If they
point in the negative direction, the related polarity will be negative.
Admittedly, directional vectors are much more difficult to program than the simple R
word. However, since they tend to be more failsafe, we recommend using them,
especially if you have a computer aided manufacturing (CAM) system that is generating
your CNC programs for you. (A CAM system can output directional vectors for circular
motion as easily as it does the R word.)
Here is an example program that uses directional vectors for circular motions.

10

Lesson Six: Techniques With Motion Types

Program:
O0005 (Program number)
N010 G54 G90 S350 M03 (Select coordinate system number one, absolute
mode, and start spindle CW at 350 RPM)
N015 G00 X-0.625 Y-0.25 (Rapid to point 1)
N020 G43 H01 Z-0.25 (Instate tool length compensation, bring tool down to
work surface)
N025 G01 X5.25 F3.5 (Feed to point 2)
N030 G03 X6.25 Y0.75 J1.0 (CCW circular motion to point 3)
N035 G01 Y3.25 (Feed to point 4)
N040 G03 X5.25 Y4.25 I-1.0 (CCW circular motion to point 5)
N045 G01 X0.75 (Feed to point 6)
N050 G03 X-0.25 Y3.25 J-1.0 (CCW circular motion to point 7)
N055 G01 Y0.75 (Feed to point 8)
N060 G03 X.75 Y-0.25 I1.0 (CCW circular motion to point 9)
N065 G00 Z0.1 (Rapid away from workpiece)
N070 G91 G28 Z0 (Return to tool change position)
N075 G28 X0 Y0 (Return to starting point in X and Y)
N080 M30 (End of program)
Notice that since all of these arcs are full 90 degree arcs, only one or the other of I and J
are required in each command.
Arc limitations
Many basic CNC courses do not acquaint novice programmers with limitations related to
how large an arc can be. The limitation has to do with how many quadrant lines your

11

Lesson Six: Techniques With Motion Types


motion can cross. A quadrant line is simply a centerline (vertical or horizontal) of the
arc. With most current model controls your motion is allowed to cross one quadrant line
per circular command. If your circular motion must go further, you must break the
motion into two or more consecutive commands. The only exception to this statement is
that most current model controls do let you generate a complete circle in one command,
as long as you start/end on a quadrant line.
For most controls, this means you can generate a circular motion of up to 180 degrees,
assuming you start or end on a quadrant line. Though this motion starts and ends on a
quadrant line, it crosses but one quadrant line.
Full circle in one command
As stated, most controls allow you to specify a complete circle motion in one command,
as long as you start and end on a quadrant line. To do so (with most controls), you must
specify the motion with directional vectors (not with the R word). If you work
exclusively with the R word for circular motion arc size, you may find it just as easy to
break the full circle motion into two half circles and continue using the R word.
The command
N055 G02 J-1.0 F5.0
will cause the machine to make a full circle in the clockwise direction with a 1.0 radius
starting from the twelve oclock position (center of the arc is one inch minus of the start
point along the Y axis).
Arc in and out techniques
For machining center contour milling applications, there will be times when you must
approach to and escape from actual surfaces of the workpiece being machined. If you
move the tool directly to the surface (on axis only), its likely that the tool will leave a
nasty witness mark on the surface being machined. See the drawing.

Witness mark
here!

Drawing shows tendency for leaving witness mark if end mill approaches right to surface

To correct this problem, most programmers will have the tool arc in to approach and arc
out to escape from the surface being machined. The next drawing shows the motion.
12

Lesson Six: Techniques With Motion Types

Minimize
witness mark

Drawing shows arc in and out to approach to and escape from machined surfaces.

13

Вам также может понравиться