From CAM origin to machine
- The programmer defines a setup origin (WCS) on the part in CAM.
- Toolpaths are calculated relative to that origin.
- The post outputs coordinates relative to it, plus a work offset selection.
- The operator measures the same point on the machine and stores it in that offset.
How controllers store work coordinates
| Controller | Mechanism | Example |
|---|---|---|
| FANUC / Haas / Mitsubishi | Work offsets | G54–G59, G54.1 P.., G154 P.. (Haas) |
| SINUMERIK | Settable frames | G54–G57, G505–G599 |
| Heidenhain | Preset table / datum table | Preset activation, datum shift cycles |
| Okuma OSP | Work offset numbers | G15 H.. |
Multiple setups in one program
When CAM has several setups (Op10, Op20, multiple fixtures), the post outputs the matching offset at each change and, if needed, a safe retract before switching.
(OP10 - FIXTURE 1)
G54
(...)
(OP20 - FIXTURE 2)
G91 G28 Z0.
G90 G55
(...)
5-axis considerations
On 5-axis machines, the relationship between part origin and rotary centres matters. With TCP and dynamic work offsets, the controller handles it using measured rotary centre data. Without them, the post must know where the part sits relative to the rotary axes.
Common errors
- CAM origin at a different corner than the operator's offset.
- Offset numbers in CAM not matching the setup sheet.
- Missing offset change between setups.
- Z origin at part top in CAM, but at fixture top on the machine.
The post can't measure the part, but it can make the intended origin impossible to misunderstand.
Reliable work offset handling
See our CNC post processor development service and G54–G59 work offsets.