If you learned G-code on a mill, a turning center is mostly familiar: the motion codes are the same. What changes is a small set of lathe-specific codes that handle how a spinning workpiece is cut. Knowing which codes carry over and which are new is half the battle.
What carries over, what is new
The shared codes are the motion ones: G00 rapid, G01 feed, G02/G03 arcs. The lathe-specific additions are where turning practice focuses:
G96/G97: spindle speed mode.G96holds a constant surface speed, so rpm rises as the diameter shrinks;G97sets a fixed rpm. This pair is central to turning.G94/G95: feed mode. Feed per minute versus feed per revolution, the latter common in turning and threading.- Diameter programming. On most lathes the X axis is programmed as a diameter, not a radius, so an X value is the across-the-part dimension.
- Turning and threading canned cycles. Roughing, finishing, and threading cycles automate repetitive passes.
Mill vs lathe at a glance
| Topic | Mill | Lathe (turning) |
|---|---|---|
| Motion codes | G00-G03 | G00-G03 (same) |
| Spindle speed | Usually direct rpm | G96 CSS or G97 rpm |
| Feed mode | Often per minute (G94) | Often per rev (G95) |
| X axis | Position | Often diameter |
| Canned cycles | Drilling, etc. | Turning, threading |
How to practice
Because the motion codes carry over, the fastest path is to make those automatic first, then add the turning set. Drill the common G-codes and common M-codes with beginner CNC code practice, then layer on G96/G97 and the cycles. A lathe-specific routine like the bar puller program shows the turning context in action, and the lathe operator hands-on test covers the assessment side. A free tool like G-Code Sprint builds the shared recall; the turning codes come next.
Bottom line
A turning center shares the motion codes with milling but adds constant surface speed, feed-per-rev, diameter programming, and turning cycles. Lock in the shared basics, then practice the lathe-specific set.
Sources
- LinuxCNC G-code reference (lathe, G96/G97)
- Wikipedia: G-code
- CNCCookbook: G-code and M-code cheat sheet
Frequently asked questions
Are lathe G-codes the same as mill G-codes?
The common motion codes (G00 to G03) are shared, but turning adds its own: G96/G97 for spindle speed mode, G94/G95 for feed mode, diameter programming on the X axis, and turning and threading canned cycles. The basics transfer; the lathe-specific set is new.
What is G96 on a lathe?
G96 sets constant surface speed, so the spindle rpm changes with the diameter being cut to keep the surface speed steady. G97 sets a direct rpm instead. This pair is central to turning and does not appear in basic milling.
How do I practice turning center codes?
Drill the shared common codes for recall first, then add the turning-specific ones. A free tool like G-Code Sprint builds the foundational recall; the turning codes layer on top once the basics are automatic.
G-Code Sprint is a study and practice tool only. It is not a CNC simulator, machine controller, or safety authority. Always follow your instructor, employer, machine manual, and shop safety procedures.