Lab Report 12 Manufacturing
Lab Report 12 Manufacturing
Lab Report 12
Name CMS ID
2. Software Utilized:
NC Viewer
3. Theory
CNC (Computer Numerical Control) lathe programming involves the creation of G-code
and M-code instructions to control a lathe machine. A CNC lathe is primarily used for machining
cylindrical or symmetrical components by rotating the workpiece against fixed or moving cutting
tools. The programming process defines the toolpath, spindle speeds, feed rates, and tool changes
required to produce the desired part geometry with high precision and repeatability.
In CNC lathe programming, the Work Coordinate System is like CNC Milling in which the origin
and orientation of the workpiece relative to the machine are defined. This is typically represented
using the X-axis (for diameter or radial direction) and Z-axis (for length or axial direction). The
use of constant surface speed (CSS) ensures a uniform cutting speed throughout the operation,
improving tool life and surface finish.
Differences in G & M Codes Between CNC Lathe and CNC Milling Programming
CNC lathe and milling programming have some noticeable differences between them. CNC lathe
programming focuses on codes optimized for rotational operations, while CNC milling
programming leverages codes for multi-axis linear and rotary tool movement. For instance, lathe-
specific codes like G71 (rough turning cycle), G72 (finishing cycle), and G76 (threading cycle)
are central to lathe operations. In contrast, milling relies on codes like G81 (drilling cycle) and
G83 (peck drilling cycle) for operations involving stationary workpieces and rotary tools.
Another key difference lies in axis configuration. CNC lathe programming predominantly uses the
X and Z axes, as the workpiece rotates while the cutting tool moves in two dimensions. Milling
programming, on the other hand, involves X, Y, and Z axes, often supplemented by rotational axes
(A, B, C) for advanced 3D and 5-axis machining.
Spindle control codes like M03 (spindle clockwise) and M04 (spindle counterclockwise) are
common to both machines but have distinct applications. In lathes, the spindle rotates the
workpiece, whereas, in milling, the spindle drives the cutting tool.
Another key difference is that because of the rotational motion of the workpiece due to the spindle,
and because of the rotational symmetry, only one side of the workpiece needs to be cut whereas in
milling the whole tool path must be given. Similarly in order to cut the part into two separate parts
in CNC lathe, a parting tool is required instead of the right hand or left hand knife tool whereas in
CNC milling, the part can be directly cut using the 4 point end mill cutter which was used for the
machining operation.
4. Lab Task
5. Discussion
The lab task involved creating a complex geometry on the x-z plane using NC Viewer. The code
was written and simulated in NC Viewer. A challenge was encountered in implementing the
various G-codes required to create the circular motion arcs using G02 and G03 because there is
no option to simulate a CNC lathe programming environment in NC viewer. Similarly, it was
difficult to understand the new axis system coming from CNC milling programming the
geometry was made by entering the appropriate x-z coordinates with a assumed spindle speed of
500 and a feed of 100. Similarly, the last part X00. Z-45 must be done using a parting tool
however since NC viewer does not contain a library of tools therefore It could not be simulated
properly
6. Conclusion
A complex geometry was successfully created through CNC programming using a combination
of G-codes and M-codes and an overview to CNC lathe programming was done.