G28

Machining center, LatheOne-shot, group 00

Automatic return to reference point (zero return)

⌨Format and notes

G91 G28 Z0 (machining center) / G28 U0 W0 (lathe)

Diagram: G28: return to reference point via intermediate point

G28 motionStartIntermediate point(commanded coordinates)Reference pointReturning ZZ reference (machine)Workpiece (top = Z0)G91 G28 Z0Straight up from hereG90 G28 Z0Via Z0 (top face)
The coordinates commanded in G28 are the intermediate point on the way. The axes rapid to it first, then return to the reference point. Writing Z0 in G90 passes through the workpiece top, so return Z straight up with G91 G28 Z0.

≠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.

SourceMachineItemDetail
HaasMachining centerNotesG28 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.

  1. Mitsubishi Electric — The Basics of CNC Machining Programming (for Machining center) e-Learning material (PDF) mitsubishielectric.com
  2. Mitsubishi Electric — The Basics of CNC Machining Programming (for Lathe) e-Learning material (PDF, BNP-C8027-688) mitsubishielectric.com
  3. 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
  4. Siemens AG — SINUMERIK 802D sl/840D/840D sl/840Di/840Di sl/810D Programming Manual ISO Turning, 04.2007 Edition cache.industry.siemens.com
  5. Haas Automation, Inc. — G-code, M-code, and Setting (per-code explanation pages) haascnc.com
  6. National Institute of Standards and Technology (NIST), USA — The NIST RS274NGC Interpreter – Version 3 (NISTIR 6556, 2000) nvlpubs.nist.gov
  7. 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