Conversational programming for CNC lathes: what it is and how to get it on LinuxCNC
· ~11 min read
Conversational programming is a way to get a part program without writing G-code by hand and without a CAM system. The operator picks an operation - turning, threading, grooving, drilling - and fills in fields with sizes and cutting data. The system works out the rest: passes, approaches, retracts, the finishing pass. Tens of thousands of production machines are programmed this way. This article covers how conversational programming works, what it can do, where its limits are, and how to get the same thing on a LinuxCNC machine, which has no conversational mode of its own.
Contents
- What conversational programming is
- Conversational systems on industrial controls
- What working in a conversational screen looks like
- What conversational programming gives you
- Limitations
- By hand, conversational or CAM
- Conversational programming and LinuxCNC
- Turn G-code - conversational for LinuxCNC
- Example: an M20×1.5 thread in a couple of minutes
- If you are used to ShopTurn or Mazatrol
What conversational programming is
There are three ways to get a program for a CNC machine:
- Write G-code by hand. Full control, but you need to know your control’s codes, work out every pass and not make a single typo.
- Generate a toolpath in CAM. You need a model of the part, stock and tool setup, and then a post processor for your specific control. More on this in the overview of CAM software for CNC lathes.
- Fill in a conversational screen. The system asks questions in a machinist’s language: stock diameter, final diameter, length, depth of cut, feed. The answers are the program.
Conversational sits between hand-written code and CAM. No part model is needed - the sizes come straight from the drawing. You do not have to know G-code, but you do need to know the process - cutting data, allowances, the order of operations: the conversational screen works out the toolpath, the machinist still makes the decisions.
Conversational systems on industrial controls
The idea is not new. Mazak introduced Mazatrol back in the early 1980s, and since then almost every major control maker has had a conversational mode:
- Siemens SINUMERIK ShopTurn - conversational turning on the 828D and 840D sl. A program looks like a work plan: a list of steps such as “facing -> contour roughing -> groove -> thread”, each step a screen with a picture and fields. Mills get its twin, ShopMill.
- Fanuc MANUAL GUIDE i - conversational programming for Fanuc controls. Under the hood it uses the standard Fanuc cycles G70-G76, so the program stays readable G-code.
- Mazak Mazatrol - Mazak’s own language. Instead of G-code there are tables of “units”: material, turning, threading, tools.
- Haas IPS (Intuitive Programming System) - templates for simple operations on the Haas control.
- Heidenhain MANUALplus and CNC PILOT (smart.Turn mode) - Heidenhain lathe controls programmed through cycles.
- Fagor - control models with a conversational mode (the “TC” series for lathes).
- Okuma - conversational programming on OSP controls.
They all share one principle: a picture of the operation, fields for the sizes, a graphic check, then the machine runs it. They differ in depth (simple templates or a full contour with arcs), in the set of cycles, and in what the screen turns into: plain G-code (Manual Guide i) or a proprietary format that only that control reads (Mazatrol).
What working in a conversational screen looks like
A typical sequence at the machine:
- Pick the operation. Turning, facing, grooving, threading, drilling, cutoff.
- Geometry. Start and end diameter, length, start coordinates, and for a thread the pitch and number of starts. The fields are labelled on the picture, so you do not need to remember which word is “U” and which is “W” on this control.
- Cutting data. Depth per pass, finishing allowance, roughing and finishing feeds, RPM or surface speed, coolant.
- Check. The graphics show the tool path over the stock. A wrong diameter shows up on the screen, not as a broken insert.
- Run or save. The control runs the step right away or saves the program to come back to later.
A week later you need the same part, only longer? Open the same screen, change one number, and the program is recalculated.
What conversational programming gives you
Speed. A typical operation - a stepped shaft, a thread, a groove - is programmed in minutes, right at the machine, without a CAM computer and without moving files around.
Fewer mistakes. The system calculates passes, approaches and retracts itself. No typos in coordinates, no missing minus signs, no forgotten retract before a rapid move.
No model needed. For typical job-shop parts - shafts, bushings, pins, fittings - a paper drawing or a sketch with sizes is simpler and faster than any 3D model.
Process knowledge built in. Roughing passes down to the allowance, then a finishing pass, separate feeds, a proper threading cycle with the depth spread across passes. What takes dozens of lines of hand-written code is a handful of fields.
A visual check. Simulating the toolpath before running is the main safety net. An experienced setter sees it, and so does an operator who does not read G-code.
Quick to learn. A machinist who knows the operation learns a conversational screen in hours, not in weeks of CAM or G-code courses.
Easy edits. Changing a diameter, a pitch or a feed means changing one field, not hunting through the program text and recalculating lines.
Limitations
To be fair about where conversational stops:
- Tied to the control. ShopTurn exists only on Siemens, Mazatrol only on Mazak. A program made in one control’s conversational mode often cannot be moved to another.
- Complex contours. A part made of many blended arcs, a formed profile, engraving - CAM does these more easily and more reliably.
- Mill-turn centers. Live tooling, C and Y axes, a sub-spindle, Swiss-type machines - that is CAM territory.
- Process knowledge is still on you. The screen calculates passes, but cutting data, tool choice and workholding are the machinist’s job.
By hand, conversational or CAM
| G-code by hand | Conversational | CAM | |
|---|---|---|---|
| Part model needed | No | No | Yes |
| G-code knowledge | Required | Not required | Not required |
| Typical operation | 15-60 minutes | 1-5 minutes | 10-30 minutes |
| Risk of typos | High | Low | Low |
| Check before running | Toolpath preview | Operation graphics | 3D simulation |
| Complex contour, mill-turn | Hard | Limited | Yes |
| Moving to another control | Edit the code | Usually not possible | Via the post processor |
| Learning | Weeks | Hours | Weeks |
Most of the work in a small shop is shafts, bushings, threads, tapers, grooves and cutoff. That is exactly what conversational programming was made for.
Conversational programming and LinuxCNC
LinuxCNC is a free and very flexible CNC control. It runs home-built machines, retrofitted manual lathes, small benchtop lathes like the 7x12 mini lathe or WM210, and training machines. But it has no built-in conversational mode on the level of ShopTurn. What it does have:
- Canned cycles: G76 (multi-pass threading), G71/G72 (contour roughing and facing in newer versions), the G81-G83 drilling cycles. Good building blocks, but a person still has to assemble the program from them. Details in the reference Lathe G-codes and M-codes.
- NGCGUI - forms for your own subroutines (O-codes) in an Axis or Gmoccapy tab. Handy, but you have to write or find the subroutines and debug them yourself.
- NativeCAM - a free add-on with mill and lathe operations inside the LinuxCNC interface.
- Home-made conversational tabs and lathe macros that users share on the LinuxCNC forum. Usually built for one specific machine and one specific GUI, installed by editing the configuration (the ini file).
All of these live inside the LinuxCNC configuration. To hook them up you need to be comfortable with ini files, HAL and subroutines.
Turn G-code - conversational for LinuxCNC
Turn G-code is a standalone program that gives a LinuxCNC machine conversational programming for lathe operations. You do not touch the LinuxCNC configuration: the program installs with a normal installer on the same computer (Linux) or on an office PC (Windows), and what comes out is an ordinary G-code file.
12 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), grooving, drilling, boring, cutoff, chamfer and radius and the Archimedean spiral on a face.
A form instead of code. Each cycle is a form with fields: diameters, lengths, depth per pass, finishing allowance, feeds, RPM. The program works out the roughing and finishing passes itself - a worked example from form to finished file is in CNC lathe G-code generator.
A live 2D simulator. The tool path is shown right in the cycle form, before the program is saved. It is the same “graphics before running” that industrial controls have.
Code for your control. G7/G8 (X as diameter or radius) with one switch for every cycle - more in G7 and G8 in LinuxCNC. Threading moves as G33 or G32 with the pitch word I/K/F, configurable coolant M-codes, tool number, comments and M30. The program adapts to the operator’s habits, not the other way round. On other controls see Turn G-code on different CNC controls.
Readable output. What you get is plain G-code text. You can see it in the LinuxCNC preview, open and edit it by hand, archive it or send it to a colleague.
English and Russian interface, mm and inches.
What Turn G-code does not have: chaining operations into one work plan like ShopTurn, or a free contour made of arcs. Each cycle is a separate program, and a complex formed part still calls for CAM.
Example: an M20×1.5 thread in a couple of minutes
What it looks like in practice:
- Open the Threading cycle, choose external and right-hand.
- Enter the diameter 20 mm, pitch 1.5 mm, the length of the threaded section, number of starts 1.
- Set the run-in before the part and the run-out at the end, so the tool gets up to speed and leaves the thread smoothly.
- Set the depth, the number of passes and the RPM.
- Watch how the passes lay out in the simulator and save the program.
By hand, the same thread means working out the thread depth, spreading it across passes and writing dozens of G33 lines with approaches and retracts. How it works under the hood is covered in Threading in LinuxCNC: G33 and G76.
If you are used to ShopTurn or Mazatrol
Many people come to LinuxCNC from production work: they retrofit an old machine or put LinuxCNC on their own lathe at home. Differences to be ready for:
- The program and the control are separate. In ShopTurn the conversational screen is part of the control. Here Turn G-code prepares the file and LinuxCNC runs it. The upside is that you can prepare programs on another computer while the machine is cutting.
- Check twice. First the Turn G-code simulator, then the LinuxCNC toolpath preview and, if needed, a dry run.
- Tool numbers. Output of the tool number in Turn G-code can be switched on or off. If you use Fanuc-style wear offsets (T0101), check how tool changes are set up in your LinuxCNC configuration.
- X mode. Industrial lathe controls almost always program X as a diameter. In LinuxCNC that is G7, and Turn G-code sets it with one switch.
Try it yourself: download Turn G-code and make your first program in a couple of minutes. 15 days free, no key and no card, and after that a lifetime license: one payment, no subscription.
