Printed from Kezuriba (kezuriba.net/en/nc/g28/)
G28
Machining center, LatheOne-shot, group 00Automatic return to reference point (zero return)
⌨Format and notes
G91 G28 Z0 (machining center) / G28 U0 W0 (lathe)
- The commanded coordinate is an intermediate point: the machine first rapids there, then returns to the reference point
- Writing G28 X0 Y0 Z0 under G90 passes through the work origin. To avoid creating an intermediate point, use G91 G28 Z0 (U0/W0 on lathes)
- On machining centers it is safer to raise Z first, then return X and Y (Mitsubishi machining center material)
- On lathes, returning X(U) and Z(W) one after the other in separate blocks reduces the risk of interference (Mitsubishi lathe material)
- Axes that are not written do not return
Diagram: G28: return to reference point via intermediate point
≠Differences between controls and machines
The same code can be written or assigned differently depending on the CNC control and the machine builder. Always check your machine’s manual.
| Source | Machine | Item | Detail |
|---|---|---|---|
| Haas | Machining center | Notes | G28 with no axes returns all axes to the machine origin at onceHaas returns all axes when none is specified. On FANUC-type controls (Siemens ISO), only the specified axes return |
📚Sources
The meaning shown agrees in at least two sources (agreement confirmed). Explanations are written in our own words.
- Mitsubishi Electric — The Basics of CNC Machining Programming (for Machining center) e-Learning material (PDF) mitsubishielectric.com
- Mitsubishi Electric — The Basics of CNC Machining Programming (for Lathe) e-Learning material (PDF, BNP-C8027-688) mitsubishielectric.com
- Siemens AG — SINUMERIK 802D sl/840D/840D sl/840Di/840Di sl/810D Programming Manual ISO Milling, 04.2007 Edition (6FC5398-7BP10-0BA0) cache.industry.siemens.com
- Siemens AG — SINUMERIK 802D sl/840D/840D sl/840Di/840Di sl/810D Programming Manual ISO Turning, 04.2007 Edition cache.industry.siemens.com
- Haas Automation, Inc. — G-code, M-code, and Setting (per-code explanation pages) haascnc.com
- National Institute of Standards and Technology (NIST), USA — The NIST RS274NGC Interpreter – Version 3 (NISTIR 6556, 2000) nvlpubs.nist.gov
- Ministry of Health, Labour and Welfare (MHLW), Human Resources Development Bureau, Office of the Councillor for Skills Evaluation — Human resource development manual using the practical exam tasks of the Grade 3 Skilled Worker Test: CNC lathe work (March 2018) waza.mhlw.go.jp