CAM software for CNC lathes: an overview, and when Turn G-code is enough
· ~11 min read
There are three ways to get a part program for a CNC lathe: write the G-code by hand, generate a toolpath in CAM software, or fill in a form in a conversational programming system right at the machine. This article looks at the well-known CAM packages with turning modules and at the conversational systems built into industrial controls, and then compares them with Turn G-code. Turn G-code was written for one job: getting a ready program for a typical lathe operation on LinuxCNC, fast.
Contents
- What CAM is and how it works
- High-end industrial CAM
- Mid-range and affordable CAM
- Regional and free CAM
- Conversational programming on the control
- What LinuxCNC itself offers
- Comparison table
- Advantages of Turn G-code
- When you do need full CAM
- Glossary
What CAM is and how it works
CAM (Computer-Aided Manufacturing) calculates a toolpath from the part geometry. The usual chain looks like this:
- CAD: a 3D model or 2D drawing of the part (SolidWorks, Autodesk Inventor, KOMPAS-3D, T-FLEX CAD, FreeCAD), or an import from STEP, IGES, Parasolid, DXF.
- CAM: the programmer defines the stock, the work coordinate system, the tools from a library (insert, holder, nose radius) and the operations: roughing, semi-finishing, finishing, grooving, threading, parting. CAM calculates the toolpath and the remaining stock (rest machining).
- Verification: material removal simulation and collision checking (holder, chuck, tailstock).
- Post processor: turns the internal toolpath data (CL data, APT) into G-code for a specific control: Fanuc, Siemens SINUMERIK, Heidenhain, Haas, Mazak, LinuxCNC, Mach3/Mach4.
- Sending to the machine: USB stick, network, DNC.
The weak link in this chain is the post processor. If it is not tuned for your control, the code ends up with the wrong threading code (G32 instead of G33), the wrong X mode (radius instead of diameter, G7/G8 in LinuxCNC), extra M-codes or commands your control does not know. Tuning a post is a job of its own, sometimes a paid one.
High-end industrial CAM
These packages are made for factories, engineering offices and mill-turn centers with live tooling, a C axis, a Y axis, a sub-spindle and Swiss-type sliding headstock lathes.
- Siemens NX CAM: part of the NX/Teamcenter ecosystem. Turning, 3+2 and 5-axis milling, mill-turn, its own Post Builder, PLM integration.
- CATIA / DELMIA Machining (Dassault Systèmes): the Lathe Machining module for aerospace and automotive, running inside 3DEXPERIENCE.
- PTC Creo NC: CAM inside Creo Parametric, associative with the model.
- Mastercam (Lathe, Mill-Turn, Swiss modules): one of the most widely used CAM systems in the world, with a huge post library and many trained programmers.
- ESPRIT (now ESPRIT EDGE): strong in multi-channel lathes, Swiss-type and mill-turn, with channel synchronization.
- GibbsCAM: turning and mill-turn, multi-task machines (MTM).
- Edgecam: turning, milling, mill-turn, feature recognition from the model.
- hyperMILL (OPEN MIND): mainly 5-axis milling, with mill-turn too.
- TopSolid’Cam: integrated CAD/CAM with turning and mill-turn operations.
Well-known milling-first packages include PowerMill, Cimatron and WorkNC, and independent G-code verification is done with VERICUT and NCSIMUL (simulation of the finished NC code on a machine model).
Price: from several thousand to tens of thousands of dollars per seat, plus training and maintenance. For a shop with a single LinuxCNC lathe that is usually overkill.
Mid-range and affordable CAM
- Autodesk Fusion (formerly Fusion 360): CAD and CAM in one cloud app, with Turning (profile, groove, thread, part-off), simulation and a post library that includes LinuxCNC. Paid subscription; a free personal license for non-commercial use exists, with limitations.
- Autodesk Inventor CAM: CAM inside Inventor.
- SolidCAM: runs inside SolidWorks and Inventor, with a turning module and mill-turn. Known for its iMachining milling technology.
- CAMWorks: CAM inside SolidWorks and Solid Edge, with automatic feature recognition (AFR) and a machining knowledge base (TechDB).
- BobCAD-CAM: affordable CAM with separate Lathe and Mill-Turn modules, popular with small US shops.
- SprutCAM X: turning, milling, mill-turn, robots, and simulation on a kinematic machine model.
These are cheaper, but they still need a part model, tool and operation setup, code generation and checking - and, for LinuxCNC, a suitable post. For a simple “shaft with a shoulder and a thread”, this takes longer than the machining itself.
Regional and free CAM
- ADEM CAM (ADEM CAD/CAM/CAPP): a Russian system for turning and milling, with its own post processors.
- T-FLEX NC: the CAM module for T-FLEX CAD, 2D/3D, turning included.
- FreeCAD, CAM workbench (formerly Path): free and open source. Milling is well developed; turning operations are still limited and need manual tweaking.
- For mills and wood routers, Estlcam, Vectric VCarve / Aspire and Carbide Create are popular, but they have no turning operations.
Conversational programming on the control
Industrial controls have long solved the same problem Turn G-code solves: the operator does not write G-code or open CAM, but fills in a conversational dialog right at the machine.
- Siemens SINUMERIK ShopTurn: technology cycles for turning, threading and grooving, with graphical contour entry.
- Fanuc MANUAL GUIDE i: conversational programming for Fanuc controls, using the G70-G76 cycles.
- Mazak Mazatrol: Mazak’s own conversational language.
- Haas IPS (Intuitive Programming System): conversational templates on the Haas control.
- Heidenhain MANUALplus / CNC PILOT: Heidenhain lathe controls with cycle-based programming.
- Mach3/Mach4 have Lathe Wizards for simple turning operations.
Conversational systems are tied to their own control and machine. You cannot put them on a LinuxCNC lathe - a home-built machine, a retrofitted Soviet 16K20 or 1K62, or a Chinese benchtop CJ0618, WM210 or Optimum.
What LinuxCNC itself offers
- G76: a multi-pass threading cycle with depth, compound angle and taper at the ends.
- G71/G72 (in newer LinuxCNC versions): roughing cycles for turning and facing along a contour.
- G33, G33.1 (rigid tapping), drilling cycles G81-G83.
- O-codes (subroutines,
o<sub> call, while/repeat loops) and NGCGUI: forms for your own subroutines right in the Axis or Gmoccapy interface. - The LinuxCNC forum has user-made lathe macros for typical operations.
These are good building blocks, but you still have to assemble the program yourself: calculate passes, approaches, retracts and safe points. The codes are covered in detail in our G-code and M-code reference for lathes.
Comparison table
| Industrial CAM (NX, Mastercam, ESPRIT) | Mid-range CAM (Fusion, SolidCAM, SprutCAM) | Conversational control (ShopTurn, Manual Guide i) | By hand / G76, NGCGUI | Turn G-code | |
|---|---|---|---|---|---|
| Needs a 3D model | Yes | Yes | No | No | No |
| Works with LinuxCNC | Via a post | Via a post | No | Yes | Yes, code made for LinuxCNC |
| Time per typical operation | Tens of minutes | 10-30 minutes | Minutes | Long, typo-prone | 1-2 minutes |
| Simulation | Full 3D, collisions | 3D | 2D graphics on the control | Axis preview | 2D simulator before output |
| Complex contour, mill-turn | Yes | Yes | Partly | No | No, typical cycles |
| Learning curve | Weeks, courses | Days | Hours | You must know G-code | Minutes |
| Cost | Thousands to tens of thousands $ | Hundreds of $ a year and up | Part of the control | Free | $25 a month, 15 days free |
Advantages of Turn G-code
1. No part model needed. Dimensions come straight from the drawing or the stock: diameter, length, thread pitch. No CAD, no STEP files, no stock setup.
2. Code made for LinuxCNC. The program knows LinuxCNC’s specifics: G7/G8 (diameter/radius in X) with one button for all cycles, G33 with the pitch in K (or G32 and the letter I/K/F if the code goes to another control), configurable coolant M-codes (M7/M8/M9), tool number, comments, M30 at the end. No post to write or tune.
3. 12 ready lathe cycles. OD turning, facing, threading (external and internal, right- and left-hand, multi-start, with run-in and run-out), taper threading, taper, sphere (including concave, like a pulley groove), groove, drilling with pecking to clear chips, boring, cutoff, chamfer and radius (all four combinations: external/internal, front/back) and an Archimedean spiral on the face.
4. Roughing and finishing passes are calculated for you. Depth per pass, finishing allowance, separate roughing and finishing feeds, spindle speed, safe point. The last roughing pass lands exactly on the allowance, with no extra hair-thin pass.
5. See the toolpath before you run it. The built-in 2D simulator shows the tool path over the stock before the file ever reaches the machine. A wrong diameter or length shows up right away, not as a broken insert.
6. Runs right at the machine. Install it on the LinuxCNC control PC (Linux install) or on a regular Windows PC (Windows install) if programs are prepared in the office.
7. Minutes to learn, not hours. A clear form with fields in English or Russian, mm or inches. A machinist who knows the operation only has to fill in the fields.
8. A fair price. 15 days free, then from $25 a month (pricing). That is less than a day of a CAM programmer’s time, and nothing like the price of an industrial CAM seat.
When you do need full CAM
To be honest about the limits: Turn G-code does not replace Mastercam or NX. You will need CAM if you have:
- a complex free-form contour made of many blended arcs and lines in a single operation;
- a mill-turn center with live tooling, C and Y axes and a sub-spindle;
- a Swiss-type lathe or a multi-channel control;
- series production that needs setup sheets, a tool database and links to PLM/ERP.
For a small shop, a private, school or hobby LinuxCNC lathe, most of the work is shafts, bushings, threads, tapers, grooves and parting off. For that, Turn G-code is faster than any CAM system.
Glossary
| Term | Meaning |
|---|---|
| CAD | Design: a drawing or 3D model of the part |
| CAM | Toolpath calculation and part program output |
| CAPP | Computer-aided process planning: routings, process sheets |
| Toolpath | The path the tool follows |
| Post processor | Turns a toolpath into G-code for a specific control |
| CL data, APT | Intermediate toolpath format before the post |
| Stock | The starting volume of material in CAM |
| Rest machining | Cleaning up material left by the previous tool |
| Feature recognition | Automatic detection of model features: holes, grooves, shoulders |
| Mill-turn | Turning and milling on one machine |
| Live tooling | Driven rotating tools in a lathe turret |
| C axis | Controlled spindle rotation used as a coordinate axis |
| Swiss-type | Sliding headstock lathe |
| Conversational programming | Programming through forms on the control |
| DNC | Sending programs to the machine over a network or cable |
| G7 / G8 | X coordinate as diameter or radius (LinuxCNC) |
| G33 / G32 | Spindle-synchronized threading move (LinuxCNC / Fanuc) |
| G76 | Multi-pass threading cycle |
| G96 / G97 | Constant surface speed (CSS) / constant RPM |
| G41 / G42 | Tool nose radius compensation |
| Finishing allowance | Material left for the finishing pass |
Try it yourself: download Turn G-code and generate your first program in a couple of minutes. 15 days free, no key needed.
