+Z+X
0:00 / 2:26
%
O1000 (M24X2 THREADED SHAFT - CNC LATHE SIMULATOR)
(BAR D50 L90 - C45 STEEL)
(T0101 ROUGHING CNMG120408)
(T0202 FINISHING VNMG160404)
(T0404 GROOVING AND PARTING 3 MM)
(T0606 THREADING 60 DEG PITCH 2)
N10 G21 G18 G40 G99
N20 G28 U0. W0.
N30 T0101
N40 G50 S2500
N50 G96 S220 M03
N60 G00 X52. Z2. M08
(FACING)
N70 G01 Z0. F0.2
N80 X-1.6 F0.15
N90 G00 X52. Z2.
(PROFILE ROUGHING WITH G71)
N100 G71 U2. R0.5
N110 G71 P120 Q210 U0.4 W0.1 F0.25
N120 G00 X19.8
N130 G01 Z0. F0.12
N140 X23.8 Z-2.
N150 Z-28.
N160 X30.
N170 Z-40.
N180 G02 X40. Z-45. R5.
N190 G01 Z-60.
N200 X46. Z-63.
N210 X52.
N220 G00 X80. Z20.
(PROFILE FINISHING WITH G70)
N230 T0202
N240 G50 S3000
N250 G96 S260 M03
N260 G00 X52. Z2.
N270 G70 P120 Q210
N280 G00 X80. Z20.
(THREAD RELIEF GROOVE WITH G75)
N290 T0404
N300 G96 S120 M03
N310 G00 X32. Z-28.
N320 G75 R0.5
N330 G75 X20. Z-28. P1500 F0.06
N340 G00 X80. Z20.
(M24X2 THREAD WITH G76)
N350 T0606
N360 G97 S700 M03
N370 G00 X28. Z5.
N380 G76 P010060 Q100 R50
N390 G76 X21.35 Z-26. P1227 Q350 F2.
Line 13, Col 1 · Fanuc

N60 G00 X52. Z2. M08

ModeG90PlaneG18UG21MoveG00S.modG96TT0101SS220CoolantONCompG40

Movement

Segment distance
≈ 26.08 mm
Time (fast)
≈ 0.2 s
Block time (cycle time)
0.7 s · 0.5%
Cumulative to here
4.2 s

Spindle

Effective RPM (G96)
≈ 2500 · Ø26.0
Vc (G96)
220 m/min
Tooling
T0101
Words in the line
  • N60Block number
  • G00Quick positioningView code

    Fast movement to a coordinate without controlling cutting advance.

  • X52X coordinate
  • Z2Z coordinate
  • Turns coolant on or off.

Guide

Online CNC lathe simulator: check the program before it reaches the machine

Paste your lathe program and watch it machine the bar in 2D and 3D: facing, G71 roughing, G70 finishing, G75 grooving, G76 threading and parting off, with cycle time and warnings before you cut. It runs in the browser, free and with nothing to install. The page opens with an M24×2 threaded shaft made with those cycles: press play to see how each one works, or replace it with your own program.

1

Lathe cycles, pass by pass

G71 and G72 rough the profile in real passes, not as a single line; G70 runs the finishing contour; G73 repeats the profile as many times as R says; G74 and G75 peck in Z and groove in X; G76 splits the thread into passes that get finer and finer. You see where stock is left and whether the profile between P and Q is closed properly.

2

Diameter, constant surface speed and rpm limit

On a lathe X is a diameter and U/W are incremental, and the simulator reads them that way. Under G96 it works out the rpm at every diameter up to the G50 limit (G92 on Fagor, LIMS on Siemens), which is what drives the time of a facing or parting-off move.

3

The bar in 3D, losing stock

The 3D view spins the bar and removes stock pass by pass. It shows you a reversed profile, a groove in the wrong place or a parting-off move that does not reach the centre in time, before the first bad part comes off.

4

Warnings before you cut

It warns about a G01 without a feed, cutting with the spindle stopped, impossible coordinates (a lost decimal point), text the control would not understand and a program without M30. Each warning takes you to its line.

5

Fanuc, Haas, Siemens and Fagor

It recognises the control when you paste the program. Fanuc and Haas G71/G70, Siemens CYCLE95 and Fagor G68/G69 are drawn as roughing cycles with their passes, each with its own syntax: on a Fagor, for instance, G71 means millimetres, not roughing.

6

Cycle time by tool

It adds up cutting and rapid moves for each tool using the real G96 rpm and tells you which operation eats the time. Handy to quote a batch or decide what to optimise first.

7

Live tools, C axis and axial drilling

It also draws on-axis drilling and tapping (G83, G84, G85 and Siemens CYCLE8x) and live-tool operations with a C axis. Under «Examples» there is a lathe part with live tools and a Citizen-style sliding-head part.

8

Getting started in one minute

Paste the program into the editor (or drop the .nc, .txt, .mpf… file), press play and use the timeline to jump to any block. Click a segment of the drawing and the editor jumps to its line; move the cursor in the editor and the segment lights up.

Frequently asked questions

CNC lathe simulator FAQ

Is there a free online CNC lathe simulator?

Yes, this one. It runs in the browser, free and with nothing to install: you can try it without an account, and with a free account you work full screen and save your programs. The program is not uploaded to any server: it is simulated on your computer.

Which lathe cycles does it simulate?

Fanuc and Haas G71 and G72 roughing, G70 finishing, G73 pattern repeat, G74 peck drilling, G75 grooving and G76 threading; G83, G84 and G85 axial drilling and tapping; Siemens CYCLE95 and Fagor G68/G69. Roughing cycles are drawn with their passes and threads with their depth passes.

How do I know my G71 is programmed correctly?

Look at the 2D view: the passes must stay outside the profile by the U and W allowances, and the G70 finishing pass must match the drawing. If the passes cut through the profile or fall short, check the P and Q numbers, the sign of U and W, and that the first profile block (the P block) only moves in X.

Does it calculate the cycle time of a lathe program?

Yes. It adds up cutting and rapid moves by tool and, under G96, works out the rpm at every diameter within the G50 limit. It is an estimate: it does not count acceleration, slow tool changes or stops. To match your machine, use the cycle time calculator, which stores a time profile for each lathe.

Can I see the lathe part in 3D?

Yes. The 3D button on the playback bar shows the bar spinning and the stock each pass removes. You can rotate and zoom the view and follow the program with the timeline.

Does it work for Siemens Sinumerik or Fagor lathes?

Yes. It recognises Siemens programs (CYCLE95, LIMS…) and Fagor 8055 ISO programs (G68/G69, G92 S, P… parameters). External CYCLE95 roughing is drawn with its passes; internal roughing, not yet.

Does it simulate live-tool or sliding-head lathes?

Yes. It draws axial drilling and tapping and live-tool operations with a C axis, and under «Examples» there is a live-tool lathe part and a Citizen-style sliding-head part to see how they are programmed.

Is X a diameter or a radius?

A diameter, as on nearly every lathe: X50 is a 50 mm diameter. U and W are the incremental X and Z moves. The view shows the largest diameter the program reaches and the effective rpm at every moment.

How is it different from a mill simulator?

On a lathe the part spins and the tool moves in the XZ plane, so diameter, constant surface speed and profile roughing cycles matter. This simulator does both: it detects on its own whether the program is for a lathe or a mill and sets the view and the stock.

Keep going

Related tools