Sie sind auf Seite 1von 9

Lesson Ten: Plane Selection G17, G18, & G19

Plane Selection G17, G18, & G19


With a machining center, it is possible to machine in one of three planes, the X-Y plane,
the X-Z plane, and the Y- Z plane. The next drawing shows the relationship of the three
planes depicted on a vertical machining center. Note that these same planes also apply to
a horizontal machining center.

XZ plane
YZ plane
XZ plane
XY

Drawing shows the three planes of a vertical machining center

Since the X-Y plane is the plane directly facing the spindle on all machining centers,
almost all machining is done in the X-Y plane. For example, if machining a hole,
coordinates for the hole center are usually in the X-Y plane. If milling, the path of the
milling cutter is usually in the X-Y plane.
A G code is used to specify the plane in which you wish to work. With most controls,
G17 is used to specify the X-Y plane, G18 for the X-Z plane, and G19 for the Y-Z plane.
The G17 (X-Y plane) is initialized, meaning when the power is turned on, the control
automatically selects this G code, setting the X-Y plane. This means the programmer
does not have to specify a G17 in the program if working exclusively in the X-Y plane.
Because so much machining is done in the X-Y plane, you may not have even considered
the possibility of working in another plane. And since the control will automatically
select the X-Y plane at power up, you may never have even heard of plane selection.
There may come a time, however, when you must work in a different plane. Here are
some examples with extended discussions.

Lesson Ten: Plane Selection G17, G18, & G19


Plane selection with right angle heads
While not yet a common feature, more and more CNC machines are being equipped with
a device that allows machining to be done at ninety degrees to the spindle direction (Z
axis). This device is called a right angle head. A right angle head can usually be
mounted in the spindle in one of two ways, either allowing a tool to be facing the X-Z
plane or the Y-Z plane.
Whenever a right angle head is used, the distance the tool is protruding from the spindle
centerline must be taken into account when making axis motion commands. If the tool is
pointing in the X direction (as the tool in the previous drawing shows), this length must
be considered with all X movements. If pointing in the Y axis, all Y axis motions must
reflect this distance in a similar manner. This means the programmer must know the
distance from the tool tip to spindle centerline before the program can be written.
Unfortunately, this requires that the tool be preset into the holder to a previously planned
length. While this can be cumbersome, and presetting is considered an obsolete way of
setting tools, it must be done on most controls since they dont have any form of tool
length compensation to help handle this problem.
As with all tools, the tool length is entered into an offset. However, with tools used in the
right angle head, the tool length is the distance between the spindle nose to the center of
the tool being held. Since the distance from the center of the tool to the nose of the
spindle will remain a constant from one tool to the next, the offset value will remain the
same for all tools used in the right angle head.

A right angle head will minimize the number of secondary operations required after the
CNC operation. The right angle head can hold a variety of tools, allowing it to perform a
2

Lesson Ten: Plane Selection G17, G18, & G19


variety of operations. Machining on the sides of a workpiece that would normally require
secondary operations, can now be performed in the CNC operation. Of course, if multiple
operations must be performed on the side of the workpiece, one right angle head will be
required for each tool.
Whenever a right angle head is used, machining will not occur in the X-Y plane. It will
now occur in either the X-Z plane or the Y-Z plane (depending upon how it is placed in
the spindle), making it necessary to specify the proper G code (G18 for X-Z plane or G19
for Y-Z plane) for certain CNC functions. Note that if only rapid (G00) and straight line
cutting (G01) commands will be given with the right angle head, there is no need to
specify the plane selection command. With rapid and straight line cutting commands, the
control will simply follow your series of motion commands, moving the tool to each
programmed position in X, Y, and Z in a point to point manner.
However, there are several programming functions that require the use of plane selection
when working in the X-Z plane and Y-Z plane. Lets take a look at them.
Circular commands
Plane selection as it relates to circular commands was discussed earlier in this module.
Here we give only a quick review.
Any time you give a circular command, you must make the decision as to which
command should be used (G02 clockwise or G03 counter clockwise) in the same way the
machine will interpret the command. Remember the rule. You must view the circular
motion from the plus side of the uninvolved axis. For X-Y circular moves, its easy.
Since you view the movement from the spindle nose position (the plus side of the Z axis),
evaluating most X-Y circular movements is as simple as viewing the print from above.
However, for X-Z and Y-Z circular movements, you must still view the motion from the
plus side of the uninvolved perpendicular axis. For vertical machining centers, an X-Z
circular motion must be viewed from the back of the machine (from plus Y). A Y-Z
circular motion must be viewed from the right side of the machine (from plus X).
Note that the attitude of the right angle head may confuse you. If the tool itself is
pointing in the minus direction (in X or Y), you can view the motion from the tools side
of the workpiece to decide whether to use G02 or G03, making the evaluation slightly
easier. However, if the tool in the right angle head is pointing in the plus direction, you
must still view the motion from the plus side of the uninvolved axis. In this case you
must evaluate G02/G03 from the bottom side of the tool. If you make a mistake and
select the wrong circular command, dont worry too much. You should be able to easily
find this kind of mistake during the programs verification.
Cutter radius compensation
As with circular commands, the CNC control will require that you evaluate cutter radius
compensation commands (G41-cutter left and G42-cutter right) from the plus side of the
uninvolved axis. As long as the right angle head has the tool is pointing in the minus
direction (either X minus or Y minus), climb milling will be G41 (cutter left) and
conventional milling will be G42 (cutter right), just as it is for machining in the X-Y
plane. This assumes a right hand milling cutter is used (spindle running clockwise).

Lesson Ten: Plane Selection G17, G18, & G19


However, if the tool is pointing in the plus direction, this rule for cutter radius
compensation must be reversed.
Here is an example program that combines circular motions and cutter radius
compensation in the same program for use with a right angle head. The next drawing
shows the part to be machined. To keep this example realistic, we are machining holes in
the top surface of this part (no center drilling) as well as the milling of the right side.
Notice that program zero is still specified as it would be for machining on the top surface
of the workpiece. The end mill used to machine into the right side of this workpiece is
being held in the same attitude as shown in the previous drawing (pointing in the X minus
direction). For this example, well say the distance from the tip of the end mill to the
spindle center line is preset to precisely 4.000 in.

Drawing shows the workpiece to be machined with a right angle head

Program:
O0016 (Program number)
(.500 diameter drill)
N005 G17 G54 G90 S800 M03 T02 (Select X-Y plane, coordinate system,
absolute mode, turn spindle on CW at 800 RPM, get tool number two ready)
N010 G00 X.5 Y.5 (Move to first hole location)
N015 G43 H01 Z.1 (Rapid down to just above workpiece)
N020 G81 R.1 Z-.875 F5.0 (Drill lower left hole)
N025 Y4.5 (Drill upper left hole)
N030 X4.5 (Drill upper right hole)
N035 Y.5 (Drill lower right hole)
N040 G80 (Cancel cycle)
N045 G91 G28 Z0 M19 (Return to reference position, orient spindle for tool
change)
4

Lesson Ten: Plane Selection G17, G18, & G19


N050 M01 (Optional stop)
N055 T02 M06 (Change tools to right angle head)
(.875 diameter end mill)
N060 G90 S400 M03 T01 (Select absolute mode, turn spindle on CW at 400
RPM, get tool number one ready)
N065 G00 X8.75 Y1.75 (Rapid to first X-Y position)
N075 G43 H02 Z.75 (Rapid down to just above workpiece)
N080 G19 (Select Y-Z plane)
N085 G41 D32 Y1.0 (Instate cutter radius comp, move to point 1)
N090 G01 Z-.25 (Feed to point 2)
N095 G03 Y1.5 Z-.75 R.5 (Circular move to point 3)
N100 G01 Y3.5 (Feed to point 4)
N105 G03 Y4. Z-.25 R.5 (Circular move to point 5)
N110 G01 Z.6 (Feed to point 6)
N115 G00 X9.1 (Move away in X)
N120 G40 (Cancel cutter radius compensation)
N125 G17 (Switch back to X-Y plane selection)
N130 G91 G28 Z0 M19 (Return to reference point in Z)
N135 M01 (Optional stop)
N140 T01 M06 (Put tool number one back in spindle)
N145 G28 X0 Y0 (Return to reference point in X and Y)
N150 M30 (End of program)
This program requires further explanation. For all movements in X for the right angle
head, the 4.000 tool length (distance from tool tip to spindle center) must be considered.
In line N065, the tip of the tool had to be positioned to an X of 4.75. But the spindle
center (of the machines spindle) is being programmed. The spindle center is 4.000 in
away from the tool tip (in this case), so it had to be added to our desired position.
Notice the Y-Z plane selection command (G19) was not given until just before it was
needed (in line N080). This assures that the plane selection will not affect other
movements in an unexpected way. Also, note that the X-Y plane selection must be
reinstated or else the G81 commands in the first tool will be affected by the G19
command after the first time the cycle is run. More on how plane selection affects
canned cycles in a moment.
Keep in mind that this tool is pointing in the X minus direction. This means that both
circular movements and cutter radius compensation are evaluated from the tool point side
of the motion, making it relatively easy to determine which of G02/G03 and G41/G42 to
use.
Using canned cycles with right angle heads
As you know, canned cycles allow easy programming for hole machining by machining
centers. One relatively simple command is given to specify machining for the first hole,
telling the control what kind of cycle to use (drill, tap, counter bore, etc.) and the
necessary information needed to machine the hole (rapid plane, hole depth, feed rate,
etc.). From then the programmer simply lists the hole locations at which holes are to be
machined. After the last hole, the canned cycle must be cancelled by a G80.

Lesson Ten: Plane Selection G17, G18, & G19


There are a variety of canned cycle types that allow the programmer to specify the kind
of hole to be machined. Drilling, peck drilling, tapping, reaming, and boring are among
the types most often used.
Canned cycles are most often used when machining in the Z axis. That is, as a hole is
being machined, the tool is moving in the Z axis. The holes centerline coordinates are
given in the X-Y plane (G17). However, if using a right angle head, hole machining will
no longer be along the Z axis. Instead, the right angle head will require that machining
be done in the X or Y axis, depending on how the right angle head is held in the spindle
of the machine.
When using the right angle head, programming holes with canned cycles is much easier
than trying to specify that holes be machined longhand with G00 and G01 (just as it is
when machining in the X-Y plane). However, as with circular commands and cutter
radius compensation, canned cycles require that you specify the plane you intend to be
machining holes in before you attempt to use canned cycles. Also, the meaning of each
canned cycle word within the canned cycle itself will change from its meaning if working
in the X-Y plane.
Here we show one common method of how canned cycle usage and plane selection work
together. If you understand these presentations, you should be able to easily adapt to any
variations you come across. For this discussion, we will only discuss canned cycles as
they are used in the absolute mode (G90).
For X-Y plane hole drilling (the one most often used), the hole center coordinates are
specified in the X-Y plane and machining takes place in the Z axis. Here is a list of
words that are used on one popular control and there meanings when machining holes in
the X-Y plane (G17).
X - Hole center coordinate in X axis
Y - Hole center coordinate in Y axis
R - Rapid plane in Z axis
Z - Hole bottom position in Z axis
F - Feedrate
Q - Peck depth for G73 and G83
P - Pause time for G82
The functions of X, Y, R, and Z will change when you change the plane selection. Say,
for example, you are going to use a right angle head as shown in the next drawing. Note
that the drill is pointing in the X minus direction. In this case the Y-Z plane must be used
(G19). The rapid plane (specified by R) will now be along the X axis. The X in the
canned cycle will be the hole bottom position (along the X axis). Y and Z in the canned
cycle command will now specify the hole center coordinates.
Other times you must specify plane selection
Any time you intend to make a two axis circular motion command or use cutter
compensation involving the Z axis (on a machining center), you must first instate the
proper plane selection command (G18 or G19).

Lesson Ten: Plane Selection G17, G18, & G19


Milling with a ball end mill
One time plane selection is necessary involves milling with a ball end mill. If you need
to make circular motions when using a ball end mill, you must consider the proper plane
selection command. Since a ball end mill is often used to plunge in Z as well as mill in X
or Y, it can be used to make X-Z and Y-Z circular moves. The next drawing shows a
motion with a ball end mill that requires an X-Z plane selection (G18). Notice how the
circular motion direction appears to be incorrectly specified. Remember that the motion
direction (G02 or G03) must be decided upon by viewing the motion from the Y plus side
(back of the machine on a vertical machining center).

G02!

X
Drawing shows determination of circular motion based upon using a ball end mill in the X-Z plane

If you intend to allow a range of ball end mill sizes to be used while milling in X-Z or YZ, cutter radius compensation must be used. This will also require that you first select the
proper plane (even if circular motions are not commanded).
Plane selection with coordinate manipulation commands
Many CNC controls are equipped with coordinate manipulation features like polar
coordinates, coordinate rotation, single direction positioning, and scaling that make the
calculation of motion positions much easier. Though these commands are most
commonly used in the X-Y plane, you can also use them to manipulate motions in the XZ and Y-Z planes.
As with canned cycles, you must exchange the direction of machining for the particular
coordinate manipulation feature. Coordinate rotation in the X-Z plane, for example,
would require that the center of rotation be a position in the X-Z plane, instead of in the
X-Y plane.
Plane selection with rotary axes that can tilt tools
Some elaborate multi axis machining centers (four and five axis machines) incorporate at
least one rotary device mounted in the machines headstock used to tilt the tool in the
spindle to the desired attitude relative to the X-Z plane and/or the Y-Z plane.

Lesson Ten: Plane Selection G17, G18, & G19


One application for this form of rotary axis is when machining complicated and
sculptured surfaces, such as the airfoil of a aircraft wing. In this case, the tilting at least
one tilting axis is used to maintain the perpendicularity of the cutting tool to the surface
being machined. In this application, the surface being machined is not along a simple
plane but an extremely elaborate surface. For this reason, this application requires a high
level computer aided manufacturing (CAM) system is required to produce programs used
for this purpose.
Another (simpler) application of a rotary axis used to tilt the tool in the spindle is for
more conventional machining operations done at a specified angle to the spindle.
Normally the angle of rotation is somewhat limited, meaning a full ninety degree rotation
is not possible.
For example, the tool may be tilted to a 45 degree position (relative to the X-Z and/or YZ plane), and a hole may be drilled into a 45 degree angular surface. In this case,
machining is not being done within any of the previously defined planes (X-Y, X-Z, or
Y-Z). The plane for machining is now an angular plane, possibly even incorporating a
combination of two angular planes.
At first glance, this application may seem very difficult to work with. However, most
current CNC controls capable of tilting the tool held in the spindle allow a feature called
variable plane selection. The commands used to evoke this feature vary substantially
from one control to the next.
One popular control uses a G68 for the purpose of variable plane selection. In this
command, the programmer specifies the angular planes position, in effect aligning the
plane selection with the tilted angle of the tool in the spindle. Once instated, all
coordinate related commands discussed in this section (canned cycles, cutter radius
compensation, etc.) will behave in much the same way as previously described. This
feature allows machining operations like milling and hole machining to be done with
relative ease, even on angular surfaces of the workpiece.
Plane selection on turning centers
If you have a simple two axis turning center, you never have to worry about plane
selection. Since there are only two axes (X and Z), and since the G18 (X-Z plane) is
initialized, youll never have to worry about selecting the proper plane.
Do note that some turning centers are equipped with live tooling that allow machining
operations commonly thought of as machining center operations to be performed on
turning centers. Some of these machines are even equipped with a Y axis, meaning every
point just made about machining center plane selection will apply to this hi-bred turning
center.
Most turning centers with live tooling do not have a Y axis. Instead, they depend upon a
combination of workpiece rotation (the C axis) along with X or Z motion to perform
contour milling operations. A special feature called polar coordinate interpolation
(discussed in the next module) dramatically simplifies the programming of contour
milling operations for movements involving the C axis. In essence, youre allowed to
flatten out the C axis, treating it like a linear axis. Our point is that when using certain

Lesson Ten: Plane Selection G17, G18, & G19


CNC functions involving the C axis (like circular motion), some controls require that you
select a different plane.

Das könnte Ihnen auch gefallen