Three ways to program a CNC spinning lathe
A CNC spinning lathe reads the roller path for every pass from a program. How that program is made decides how long the machine stands still, how repeatable the result is and how quickly the shop can react to a change. Three methods are common, and all three are legitimate:
- Teach-in (playback): the operator drives the roller on the machine; the control records the motion and replays it.
- Hand-written G-code (manual part programming): a programmer calculates every pass and types the program line by line.
- CAM, or offline programming: the program is prepared on a computer from the drawing and a post-processor converts it into G-code for the control.
Teach-in, offline programming and related terms: metal spinning glossary →
How teach-in (playback) works
In teach-in metal spinning the operator drives the roller over the real blank with a joystick or handwheel while the control records the axis positions. The recording is then replayed for the following parts, which is why the method is also called playback spinning programming. Recorded points are often edited afterwards.
Its strengths are real: teach-in carries an experienced spinner's feel for the material into the program, gives immediate feedback and needs no drawing or extra software; for a one-off prototype it is often practical. Its limits are just as real:
- The machine cannot produce while it is being taught.
- The result depends on the operator; two people may teach the same part differently.
- After a roller, mandrel or sheet thickness change the path is hard to reproduce, so the part is often taught again.
- A recording does not explain why the passes were chosen or link to the drawing.
Hand-written G-code
The second method is writing the program directly as G-code, working out the points, lines and arcs of every pass from the mandrel profile. It gives full control, needs no extra software and is quick for simple profiles or small edits to an existing program. Its limits:
- The program drives the roller centre, not its contact point, so the toolpath is offset from the mandrel profile by the sheet thickness plus the roller nose radius; that offset and the arcs are calculated by hand.
- Many passes and curved profiles invite errors that may only show up on the machine.
- A change of profile, roller or sheet thickness means recalculating much of the program.
- Controls differ: X may be a diameter or a radius value, and arcs may use R or centre offsets (I/J).
Program structure explained: G-code for spinning lathes in the programming guide →
CAM and offline programming
The third method, CAM software made for metal spinning, prepares the program on a computer rather than at the machine: offline programming of a spinning lathe. The profile is read from a DXF drawing, the passes are planned, the roller motion is checked in a toolpath simulation and G-code is output through a post-processor that matches the control.
Its strengths: the machine keeps producing while the next program is prepared, the path is regenerated from the same drawing when the roller, mandrel or sheet thickness changes, and the program is stored with the part. Its limits:
- It needs an accurate drawing; an error in the profile becomes an error in the program.
- It does not replace process knowledge about pass layout, material behaviour and machine limits.
- The first part still needs a trial and a measurement; the simulation shows roller motion, not how the material forms.
- The post-processor must match the control and has to be set up and verified once.
Decision matrix: teach-in vs hand-written G-code vs CAM
The ratings are qualitative and show general tendencies; your own parts, machine and team may shift the balance.
| Criterion | Teach-in (playback) | Hand-written G-code | CAM (offline programming) |
|---|---|---|---|
| Batch size and repeat orders | Practical for one-offs and prototypes | Adequate for stable parts with few passes | Strong for repeat orders |
| Part variety | Each new part is taught at the machine | Each new part is calculated from scratch | Each new part starts from its drawing |
| Profile complexity (arcs, offsets) | Relies on the operator's feel | Offsets and arcs calculated by hand | Offsets and arcs calculated from the profile |
| Operator experience needed | Strong spinning experience | G-code and geometry knowledge | Process knowledge plus learning the software |
| Machine during programming | Not producing | Writing at a desk; trial at the machine | Only trial and fine-tuning |
| Repeatability and documentation | Motion repeats; reasoning not recorded | Readable program; calculations kept separately | Settings and program stored with the part |
| Reacting to changes (roller, mandrel, sheet thickness) | Often taught again | Affected lines recalculated by hand | Path regenerated with the new settings |
| Start-up effort | Low: the machine and its control | Little software, much calculation | Learning time and a one-time post-processor set-up |
Which method when?
Typical scenarios:
- A one-off prototype or a part without a drawing, with an experienced operator: teach-in is a practical start.
- A simple profile or a small correction to an existing program: hand-written G-code is often enough.
- Repeat orders, many different parts or curved profiles: offline programming with spinning lathe programming software, which keeps the machine producing.
- Frequent roller, mandrel or thickness changes: a method that recalculates the path from settings.
Using the methods together
The methods are not rivals, and many shops combine them. Often CAM prepares the base program and the operator fine-tunes it at the machine with a dry run, single block and feed override. What matters is that these corrections go back into the program and the part's records instead of staying at the machine.
Another pattern is staged: a one-off prototype is made by teach-in, and once the part repeats, the program is built in CAM from the drawing.
Moving a part from teach-in to CAM: checklist
When a teach-in part moves to offline programming, these steps reduce surprises:
- Match the zero point and coordinate system to the set-up on the machine.
- Check whether the control runs X in diameter or radius mode.
- Select the post-processor for the control and read the output once.
- Enter the roller nose radius and the measured, not nominal, sheet thickness.
- Check that approach and retract moves clear the tailstock and mandrel.
- Start with a dry run above the part, in single block, at reduced feed override.
- Measure the first part and put the corrections into the program.
- Archive the program with the drawing, noting the roller, mandrel and sheet thickness.
How metal spinning CAM helps
KSOTech Metal Spinning CNC CAM runs in the browser without installation. You select line and arc chains in a DXF profile; conventional passes are planned automatically, shear spinning regions can be switched on or off one by one and back passes added. Passes can be edited with handles, with undo and redo. Blank diameter calculation and annealing warnings support the preparation.
A toolpath simulation (not FEA or process simulation) shows the roller motion with an estimate of path length and time. G-code is exported through post-processor profiles (FANUC turning metric, FANUC style with N line numbers, Generic ISO / Mach3, LinuxCNC I/J), and the toolpath can be exported as DXF; the interface has four languages. The output must be validated on the machine by a qualified expert before production.
See the toolpath simulation in the metal spinning CAM software →
This guide gives general, textbook-level information. Real results and behaviour depend on material, machine, control, tooling and process conditions; validate every new program and part with a trial run supervised by a qualified specialist.