G-code reference

G53 G-Code: Machine Coordinate System (One Block)

Machine Coordinate System (One Block) — Moves to positions in the machine coordinate system for one block, ignoring work and tool offsets. G53 Z0 is a common and safe way to retract to Z home.

By cnccode · Updated
PropertyValue
CodeG53
FunctionMachine Coordinate System (One Block)
Modal group00
TypeOne-shot (non-modal) — active only in its own block
Used onMills and lathes
SyntaxG53 G00 Z_

What does G53 do?

Moves to positions in the machine coordinate system for one block, ignoring work and tool offsets. G53 Z0 is a common and safe way to retract to Z home.

G53 is a one-shot code: it only acts in the block where it is written, and the previously active modal codes take over again afterwards.

Syntax and parameters

Format
G53 G00 Z_
AddressMeaning
X Y ZMachine coordinates

G53 example program

Example
G53 G00 Z0 (retract to machine Z home)
G53 X-400.0 Y0 (park table)

▶ Open this example in the G-code viewer

Tips and common mistakes

  • Requires G90 on most controls.
  • Values are machine coordinates — negative on most mills.

Controller compatibility

G53 follows the ISO/Fanuc dialect used by Fanuc, Haas, Brother, Doosan, Hurco (ISO mode), Mazak (EIA/ISO mode), Okuma (G-code mode) and Siemens in ISO dialect mode. Parameters, option packages and builder-specific behaviour can differ, so confirm the details in your machine's programming manual before running a new program.

Frequently asked questions

Is G53 modal?
No. G53 is a one-shot (group 00) code and only acts in the block where it appears.
What does G53 mean in CNC?
G53 means Machine Coordinate System (One Block). Moves to positions in the machine coordinate system for one block, ignoring work and tool offsets. G53 Z0 is a common and safe way to retract to Z home.
What is the difference between G53 and G28?
G53 is Machine Coordinate System (One Block), while G28 is Return to Reference Point (Machine Home). See the G28 page for its syntax and examples.
Can I use G53 on a lathe?
Yes, G53 is used on both mills and lathes, although some parameters differ between them.