GreatLight CNC Machining Factory logo
CNC Machining
Rapid Prototyping
Materials
Industries
News
About GL

Get Instant Quote

Setup guide

How to Find Workplace Coordinates for CNC Machining

A step-by-step setup procedure for machinists and process engineers: touch off on a vise, store G54–G59 offsets, and verify the numbers before the first cut. Written for 3-axis and 5-axis work held to ±0.005 mm.

G54–G59 offsetsProbe vs edge finderRotary table C-axisVerify before cutting
how to find workplace coordinates for cnc machining
Quick answer

Key takeaways

Work coordinates are a stored distanceG54 is the XYZ gap from machine home to part zero, nothing more. The control trusts it fully.
Probe beats edge finder on repeatabilityA spindle probe repeats to a few microns. A 10 mm edge finder on 1,000 rpm gets you 0.01–0.02 mm.
Always verify with an indicatorSweep a known datum face after writing offsets. Two minutes here saves a scrapped block.
Rotary work needs a center, not an edgeOn a 4th or 5th axis, the offset must sit on the rotation axis or the error scales with angle.
Definitions

Machine coordinates vs workplace coordinates for cnc machining

Every CNC control carries two coordinate systems at the same time. Machine coordinates (MCS) are fixed to the iron: X0 Y0 Z0 sit at the reference or home switches, and they never move unless a technician re-datums the machine. Work coordinates (WCS) are the numbers you create each setup. G54 through G59 are the standard storage slots, and each one holds an XYZ offset from machine home to a point you choose on the part or fixture.

When a program calls G54, the control adds those stored values to every programmed move. Program X0 Y0 Z0 and the tool travels to the physical spot you touched off. This is why a bad offset ruins the whole run: the toolpath is correct, but the frame it lands in is not.

The convention matters too. On a vertical mill, Z0 is usually the top of the stock or a finished face, and negative Z cuts downward. On a lathe, Z0 is commonly the finished face and X0 is the spindle centerline. Mixing the two conventions across a shop is one of the most common sources of crashes when a program moves between machines.

Pick one datum scheme and write it on the setup sheet. Top of stock for roughing, top of a finished face for finishing, and a corner or a bore center for XY. If the drawing gives a datum, use it. Fighting the drawing datum means re-posting every operation when the customer revises the model.

  • 1
    MCSFixed to the machine. Used for tool changes, safe Z, and home moves.
  • 2
    WCSSet per job. G54–G59 plus extended slots G54.1 P1 and up.
  • 3
    Datum choiceCorner for prismatic parts, bore center for round or symmetrical parts.
Why it matters

What a coordinate error actually costs

A 0.05 mm offset error is invisible on a roughing pass and fatal on a finished bore. On a part held to ±0.005 mm, the setup consumes most of the tolerance budget before the first chip is cut. If the offset is 0.02 mm off and the machine repeats to 0.005 mm, you have already spent four-fifths of the allowance on setup alone.

The failure is rarely dramatic. More often the part comes out with a wall 0.03 mm thin on one side and thick on the other, or a bolt pattern that will not line up with its mating part. By the time the inspector catches it, the material, the tool wear, and the machine hours are gone.

On multi-operation parts the errors stack. Op 1 sets a datum on the raw stock. Op 2 sets a datum on a machined face that was itself produced from the Op 1 datum. Any error in Op 1 is now baked into the reference for Op 2. Three operations deep, a 0.01 mm setup error can turn into a 0.03 mm feature-to-feature error.

Fixtures reduce this. A dedicated soft jaw or a plate with dowel pins returns the part to the same physical location every time, so Op 2 only needs a quick Z touch-off rather than a full re-datum. The offset stops being a measurement problem and becomes a repeatability problem.

Tooling

Probe, edge finder, or shim: which to use

A spindle probe is the most repeatable option. Renishaw-style probes repeat to a few microns and can pick up a bore, a boss, or a corner automatically. They also let you re-check the datum between operations without touching the part by hand. The trade-off is cost and the need to keep stylus tips and calibration discs in good condition.

A mechanical edge finder is the workhorse for one-off jobs. Run it at 800–1,000 rpm and watch for the moment the tip kicks off-center. That kick happens at roughly half the tip diameter, so a 10 mm finder gives a 5 mm offset. Expect 0.01–0.02 mm of uncertainty from runout, spindle speed, and how steady your hand is on the pulse wheel.

A 0.05 mm shim under the tool works for Z but not for XY. It is fast and needs no special hardware, but the feel of the drag varies between operators. Two people can get 0.02 mm apart on the same face. Use it for rough stock, not for a finishing datum.

For high-volume work, a tool setter and a probe on the same machine pay for themselves in setup time. The setter measures tool length automatically and the probe finds the part. Together they cut a typical setup from 20 minutes to under 5.

  • 1
    ProbeBest repeatability. Use for bores, bosses, and any datum you will re-check.
  • 2
    Edge finderFast and cheap. 10 mm tip, 800–1,000 rpm, subtract half the tip diameter.
  • 3
    ShimZ only. Acceptable for roughing, not for a finishing datum.
Rotary and 5-axis

Setting workplace coordinates for cnc machining on rotary axes

A 4th axis or trunnion adds a rotation center that must be found before any angled feature is cut. The XY of the offset has to sit on the axis of rotation, not on a corner of the part. If the offset is 0.05 mm off the centerline, a 90° rotation moves the part by 0.05 mm; a 180° rotation moves it by 0.10 mm.

To find the centerline, indicate a test bar or a ground cylinder held in the chuck or fixture. Sweep the top and the side, then split the difference. Repeat at two positions along the axis to confirm the bar is parallel to the rotation axis. If the bar runs out more than 0.01 mm over 200 mm, fix the fixture before setting offsets.

On a simultaneous 5-axis machine, the control needs both the work offset and the kinematic model of the rotary axes. The offset and the pivot point are separate values. Touching off the part sets G54; the pivot is set once during machine calibration. If the pivot drifts after a crash, every angled toolpath will be wrong even though G54 looks perfect.

For a Ø400 mm rotary table, probe or indicate the table face for Z0 and the center bore for X0 Y0. Then verify by cutting a shallow test circle and measuring its diameter and position. A 0.02 mm deviation on the test circle is usually a centerline error, not a tool runout error.

Mistakes

Common setup errors and how to catch them

The most frequent mistake is forgetting to activate the right work offset. The program calls G54 but the operator set G55. The tool then runs to the previous job's coordinates. On a machine with a 500 × 500 × 450 mm envelope, that is usually a crash rather than a near miss.

Second is a dirty or burred datum face. A 0.02 mm burr on the corner of a block shifts the entire XY frame. Deburr the datum faces before touch-off, and use the same faces for every operation. If the burr is on the face you touch and not on the face you cut, the error is invisible until inspection.

Third is ignoring thermal growth. A spindle that has been running for two hours is longer than a cold one. On a job held to ±0.005 mm, a cold-machine setup followed by a hot-machine cut can drift 0.01–0.02 mm in Z. Warm up the spindle for 10–15 minutes before setting the final offset.

Fourth is reusing an offset after a fixture change. If the vise is removed and re-bolted, the old numbers are meaningless. Re-datum the part, or better, pin the fixture to the table so it returns to the same location. Then verify with an indicator before trusting the stored values.

  • 1
    Wrong offset activeCheck the G-code and the offset page side by side before the first rapid.
  • 2
    Burred datumDeburr the touch-off face. A 0.02 mm burr is a 0.02 mm offset error.
  • 3
    Thermal driftWarm the spindle 10–15 minutes before the final Z touch-off.
Procedure

Step-by-step: how to find workplace coordinates for cnc machining

Follow the order. Skipping the verification step is how parts get scrapped.

  • 1
    Clean and seat the workholdingStone the vise jaws, wipe the table, and blow out the T-slots. A chip under a jaw can tilt a part by 0.02 mm over 100 mm. Torque vise bolts evenly and re-check the jaw parallelism with a dial indicator.
  • 2
    Establish the XY datumFor a corner datum, touch the X and Y faces with a 10 mm edge finder at 800–1,000 rpm and subtract 5 mm from each reading. For a bore datum, indicate the bore in four quadrants until TIR is under 0.01 mm, then set X0 Y0 at the center.
  • 3
    Set Z0 on a known faceTouch the tool to a clean, flat face with a 0.05 mm shim or use the tool setter. Record the value and note which face it is. If you used top of stock, write down the stock allowance so the finishing offset is not a guess.
  • 4
    Write the values into the offset pageEnter the measured machine-home distances into G54 X, Y, and Z. Do not overwrite the work offset that the previous job is still using if the machine holds multiple setups. Use G55 or an extended slot instead.
  • 5
    Verify with an indicator before cuttingCommand the machine to G54 X0 Y0 Z0 with the spindle stopped and a dial indicator in the spindle. Sweep a known face and confirm the reading is under 0.01 mm. If it is not, the offset is wrong, not the indicator.
  • 6
    Prove the first cut in airRun the program with a positive Z offset of 10–20 mm so the tool traces the path above the part. Watch for over-travel, fixture collisions, and unexpected rapids. Then remove the offset and cut.
  • 7
    Log the offsets on the setup sheetRecord G54 X, Y, Z, the datum face, and the tool numbers used for touch-off. The next operator can then repeat the setup without re-deriving it from scratch.
Decision table

Which coordinate method fits the job

Match the method to the tolerance, the quantity, and the machine.

MethodTypical uncertaintyBest forAvoid when
Spindle probe0.002–0.005 mmBores, bosses, re-checks between opsStylus is bent or uncalibrated
10 mm edge finder0.01–0.02 mmOne-off prismatic parts, corner datumsTolerance is under ±0.01 mm
Shim on face0.01–0.03 mmRough stock, Z touch-off onlySetting a finishing datum
Soft jaws with pins0.005–0.01 mmOp 2 and Op 3 on the same partThe first operation on raw stock
Test bar on rotary0.005–0.01 mm4th axis and trunnion centerlinesBar is not parallel to the axis
Air cut + indicatorConfirms, does not setEvery setup before the first cutNever skip this step

Set it, verify it, then cut

A correct offset takes minutes. A wrong one costs the part, the material, and the machine time. Probe when the tolerance justifies it, edge find when it does not, and always sweep a known face before the first rapid.

FAQs

Workplace coordinates questions

What is the difference between machine coordinates and work coordinates?

Machine coordinates are fixed to the machine's home position and never change during normal operation. Work coordinates are the offsets you create for each setup, stored in G54 through G59 and extended slots.

The control adds the active work offset to every programmed move. If the offset is wrong, the toolpath is still correct but it lands in the wrong place on the table.

Can I use more than one work coordinate system on a single part?

Yes. A common pattern is G54 for the top face and G55 for a side face on the same part, or G54 for the part and G55 for a fixture-mounted sub-plate. This avoids re-datuming between operations.

Keep a written map of which offset belongs to which face. Most wrong-offset crashes come from a setup where two offsets look similar on the screen.

How accurate does the coordinate setup need to be?

Budget the setup error to no more than one-third of the total tolerance. For a ±0.005 mm part, that means the setup should be repeatable to about ±0.0015 mm, which in practice means a probe or a pinned fixture.

For a ±0.05 mm part, an edge finder at 0.01–0.02 mm is fine. Do not spend probe time on a job that does not need it, but do not use an edge finder on a job that does.

What tools do shops use to find workplace coordinates?

Spindle probes, mechanical edge finders, dial indicators, tool setters, and 0.05 mm shims. A test bar or ground cylinder is used for rotary axis centerlines.

The choice depends on tolerance and quantity. High-mix shops typically keep a probe on the main machines and edge finders on the manual mills.

Why is 5-axis coordinate setup more involved?

Because the offset must be correct relative to the rotation axis, not just to the table. A small error off the centerline grows with rotation angle, so a 0.05 mm error at 0° becomes 0.10 mm at 180°.

The machine also needs a calibrated pivot point. That is a separate value from G54 and is set during machine calibration, not during part setup.

How do I stop a good setup from drifting during a long run?

Warm up the spindle for 10–15 minutes before the final touch-off, and check a known feature every 20–30 parts with a probe or an indicator.

If the machine has thermal compensation, confirm it is switched on. On long runs, a mid-run check catches drift before the last 200 parts are cut off-center.

Send us your next setup-heavy job

Upload a model and we will return a quotation with free DFM analysis within 12 hours. Parts ship in 3–5 days, with 100% inspection before shipment.

12-hour quoteFree DFM analysis100% inspectionNo minimum order quantity

Follow

More from the shop floor

We publish setup notes, tooling trials and inspection data from the factory floor.

FacebookTikTokYouTubeLinkedInInstagramThreadsPinterest

Trusted by engineers and manufacturers worldwide

Tesla Ford Motor Company BYD Auto Denso Magna International Boeing Airbus Medtronic KUKA FANUC