CNC Programming
Cartesian Coordinate System
The French mathematician and
philosopher Rene Descartes devised the Cartesian or rectangular coordinate
system. With this system, any specific point can be described in mathematical
terms from any other point along three perpendicular axes, Fig. 36-6. This
concept fits machine tools perfectly since their construction is generally
based on three axes of motion (X, Y, Z) plus an axis of
rotation. On a plain vertical milling machine, the X axis is the
horizontal movement (right or left) of the table, the Y axis is the
table cross movement (toward or away from the column), and the Z axis is
the vertical movement of the knee or the spindle. CNC systems rely heavily on
the use of rectangular coordinates because the programmer can locate every
point on a job precisely.
When points are located on a
workpiece, two straight intersecting lines, one vertical and one horizontal,
are used. These lines must be at right angles to each other, and the point
where they cross is called the origin, or zero point, Fig.36-6A.
The three-dimensional coordinate
planes are shown in Fig. 36-6B. The X and Y planes (axes) are
horizontal and represent horizontal machine table motions. The Z plane
or axis represents the vertical tool motion. The plus (+) and minus (-) signs
indicate the direction from the zero point (origin) along the axis of movement.
The four quadrants formed when
the XY axes cross are numbered in a counterclockwise direction, Fig.
36-6A. All positions located in the first quadrant would be X positive (X+) and
Y positive (Y+). In the second quadrant, all positions would be X negative (X-)
and Y positive (Y+). In the third quadrant, all locations would be X negative
(X-) and Y negative (Y-). In the fourth quadrant, all locations would be X
positive (X+) and Y negative (Y-).
In Fig. 36-6 point A would be 2
units to the right of the Y axis and 2 units above the X axis. Assume that each
unit equals 1 in. The location of point A would be X + 2.000 and Y + 2.000. For
point B, the location would be X + 1.000 and Y - 2.000. In CNC programming it
is not necessary to indicate plus (+) values since these are assumed. However,
the minus (-) values must be indicated. For example, the locations of both A
and B would be indicated as follows:
A X2.000 Y2.000
B X1.000
Y-2.000
Machine Axes Motion
Machining centers have probably
made the greatest impact in CNC machining because of their ability to perform
such a variety of machining operations on a workpiece with only one setup.
Axis Motion Direction
Understanding the direction of
axis motion is very important for both the CNC operator and the CNC programmer,
Fig.36-7. On a typical, three axis CNC vertical machining center, the motion of
each axis is as follows:
• X axis motion (table) is left
and right.
• Y axis motion (saddle) is
towards or away from the column.
• Z axis motion spindle) is up
and down.
Each axis can travel in only two
directions, identified as the positive motion (+) and the negative motion (-).
As any direction is always relative to the viewing position, on a CNC vertical
machining center it is taken as the operator standing in front of the machine.
For the X axis, the
positive direction will move the spindle (tool) towards the right end of the
machine table. Moving the Y axis in the positive direction positions the
spindle (tool) towards the column or away from the CNC operator. The Z axis
positive direction moves the cutting tool up and away from the workpiece and
down towards the workpiece in the negative direction.