LinuxCNC G28 Go to Predefined Position

G28 is a LinuxCNC G-code that makes a rapid move to a predefined absolute machine position stored in parameters. With axis words, it first rapid-moves to the programmed position including offsets, then rapid-moves to the stored predefined position for the specified axes. It is intended for use when the machine is homed to a repeatable position and a G28 position has been stored with G28.1.

Source checked5/5 values · 2026-10-26

Specification

1 source
Languagegcode
CodeG28
SyntaxG28 axes
DialectLinuxCNC

Parameters

NameDescription
axesAny axis as defined in the configuration; optional axis words specify a destination including offsets before the rapid move to the stored predefined position. Any axis not specified will not move.

Study notes

  • G28 uses values stored in parameters 5161-5169 as the final X Y Z A B C U V W point; the G28 and G28 axes descriptions also refer to parameters 5161-5166.
  • G28.1 stores the current absolute position into parameters 5161-5166.
  • All axes defined in the INI file will be moved when a G28 is issued.
  • With G28 axes, any axis not specified will not move.
  • G28 axes first makes a rapid move to the position specified by the axis words including offsets, then rapids to the stored absolute position for the specified axes.
  • Parameter values are absolute machine coordinates in the native machine units specified in the INI file.

Safety

  • Only use G28 when the machine is homed to a repeatable position and the desired G28 position has been stored with G28.1.
  • If no positions are stored with G28.1, all axes will go to the machine origin.
  • It is an error if cutter compensation is turned on.
↑↓ navigate↵ openesc close