Program zero on a CNC lathe: geometry offsets and work shift
Program zero, geometry offsets and the work shift in under two minutes, shown in NC Proof Turn. Press play to watch.
Every lathe program is written from program zero (also called part zero or work zero). On most lathes that is X0 on the spindle centre line and Z0 on the finished face of the part. The program says “go to X1.9 Z-1.25”, and the control has to know where that is on the real machine, for whichever tool is in the cut.
The control works it out from two kinds of numbers:
- Tool geometry offsets: one X and one Z per tool. Set once, kept from job to job.
- The work shift: one Z number per job. It says where this part’s face is.
This page walks through both, with the numbers from the video.
Start from the zero return position
When the turret goes home (zero return, G28 U0. W0.), it stops at exactly the same spot every time. That spot is the machine’s reference. Every offset is a distance from it.
X geometry offset: entered as a diameter
Lathe programs give X as a diameter. The offset follows the same rule. In the video, the tip of T01 sits 4.0000” above the centre line when the turret is home. The X geometry offset is twice that: 8.0000.
This is why an X offset looks “too big” the first time you see it. The tool is not 8” away from the centre line. It is 4” away, written as a diameter.
Z geometry offset: to one common surface
For Z, every tool is measured to the same surface, and the face of the chuck works well, because it never moves. The Z geometry offset of T01 is the distance from its tip (turret home) to the chuck face: 9.0000.
Each tool gets its own pair. From the video:
| Tool | X geometry | Z geometry |
|---|---|---|
| T01 | 8.0000 | 9.0000 |
| T02 | 6.5000 | 10.2500 |
Measure them once. As long as the tool stays in its holder and the holder stays on the turret, these numbers don’t change from one job to the next.
The Z work shift: one number per job
The part sticks out of the chuck, so program zero is not on the chuck face. The Z work shift is the distance from the chuck face to program zero. In the video the part face is 3.0000” out from the chuck face, so the work shift is 3.0000.
Now the control can find program zero for any tool:
T01 tip to chuck face 9.0000 (Z geometry)
chuck face to Z0 - 3.0000 (work shift)
T01 tip to Z0 6.0000
The control knows T01’s tip is 6 inches from program zero. T02 uses its own 10.2500 with the same 3.0000 shift.
Next job: change one number
The next part sticks out one inch further. With this method you don’t touch the tool offsets. You change the work shift from 3.0000 to 4.0000, and every tool on the turret is right for the new part. One number for the job, not one for every tool.
Compare that with touching every tool on the part face for every job (each Z geometry offset then goes straight to program zero, and the work shift stays at 0). That works too, but with eight tools it is eight touch-offs and eight chances to type a number wrong.
On a Fanuc and on a Haas
The idea is the same; the screens have different names.
- Fanuc lathes: geometry offsets are on the OFFSET ▸ GEOMETRY page (wear has its own page). The work shift has its own WORK SHIFT screen. A common way to set it: with a measured tool, touch the part face and enter Z0 in the measurement field of that screen, and the control works out the shift itself. It can also be written from the program with G10 P0 Z… (P0 is the work shift).
- Haas lathes: tool geometry is on the Tool Offset page, X measured as a diameter. The job’s shift goes in the G54 Z work offset on the Work Offset page (the program then calls G54, the default). G10 L2 P1 Z… writes G54 from the program.
On the control the numbers usually carry a minus sign, because they are measured from home toward the chuck. The video and this page use plain distances to keep the arithmetic easy to follow; the logic is the same.
Older programs sometimes set the coordinate system with G50 X… Z… (Fanuc G-code system A; G92 in systems B and C) at the start, with the tool parked on an exact spot. Geometry offsets plus a work shift replaced that on most machines, because nothing depends on where a tool happens to be parked. Note that G50 with an S word is something else: the maximum spindle speed.
The program doesn’t change
Because the program is written from program zero, it is the same whatever the stick-out. This short Fanuc 0i-TF program faces and turns a 2.000” bar. Run it with 2.0” or 3.0” sticking out of the chuck: not one line changes. Only the work shift does.
%
O1100 (PROGRAM ZERO - WORK SHIFT DEMO)
(FANUC 0I-TF)
(STOCK 2.000 DIA - STICK OUT 2.0)
(PROGRAM ZERO: CENTRE LINE, FINISHED FACE)
(T0101 CNMG 432 OD TURN)
G20 G40 G99
G28 U0. W0.
T0101
G50 S3000
G96 S600 M03
G00 X2.1 Z0.1 M08
G01 Z0. F0.008
X-0.0625
G00 Z0.1
X1.9
G01 Z-1.25 F0.010
X2.1
G00 Z0.1
X1.8
G01 Z-1.25
X2.1
G00 X3.0 Z2.0 M09
G28 U0. W0.
M30
%
The same program runs on a Haas lathe; there the stick-out goes into G54 Z instead of the work shift screen. Both versions run in NC Proof Turn with no errors.
See it before Cycle Start
In NC Proof Turn every program runs from program zero, from the zero return position to the last cut. The info panel shows the tool tip from program zero, so you can read X (as a diameter) and Z at any line and compare it with what you expect. Set the stick-out from the chuck under Stock & tools (or write it in a header comment, as above), and the app shows where the cuts land against the chuck and jaws. A program that cuts too far toward the chuck, or a rapid into the jaws, is flagged before the part is on the machine.
NC Proof takes the tools as measured: it does not read the offset page of your machine. Checking the offsets themselves is still the setup’s job; the app shows what the program does once they are right.
Program zero on a lathe FAQ
What is program zero on a CNC lathe? It is the point every coordinate in the program is measured from. On most lathes X0 is the spindle centre line and Z0 is the finished face of the part, so Z values toward the chuck are negative.
Why is the X geometry offset twice the distance? Lathe X is programmed as a diameter, and the offset follows the same rule. A tool tip 4.0” above the centre line has an X offset of 8.0.
What is a work shift on a lathe? One Z value for the whole job: the distance from the common surface the tools were measured to (often the chuck face) to program zero. Change it and every tool moves to the new part face together.
Do I have to re-measure every tool for a new job? Not with the work shift method. Tool geometry offsets stay as they are; only the work shift changes when the part sticks out a different amount.
Where is the work shift on a Haas lathe? Haas uses the work offset for it: the G54 Z value on the Work Offset page, added to each tool’s geometry offset.
What is the difference between geometry and wear offsets? Geometry is where the tool is when it is set up. Wear is a small correction added on top as the insert wears or a size drifts, so you can fine-tune a diameter without touching the measured geometry.
Paste your own program into NC Proof Turn and watch it run from program zero during the 4-day free trial (no card needed). The user guide explains the rest of the app.