G-code reference

G98 G-Code: Initial Plane Return (Mill) / Feed per Minute (Lathe)

Initial Plane Return (Mill) / Feed per Minute (Lathe) — Mill: canned cycles return to the initial Z level between holes, which is safe over clamps. Lathe: F in mm/min (e.g. for live tooling).

By cnccode · Updated
PropertyValue
CodeG98
FunctionInitial Plane Return (Mill) / Feed per Minute (Lathe)
Modal group10/05
TypeModal — stays active until replaced by another code of the same group
Used onMills and lathes
SyntaxG98

What does G98 do?

Mill: canned cycles return to the initial Z level between holes, which is safe over clamps. Lathe: F in mm/min (e.g. for live tooling).

G98 is modal: once programmed it remains in effect for the following blocks until another code from modal group 10/05 replaces it or the control is reset.

Syntax and parameters

Format
G98

G98 example program

Example
G00 Z25.0
G98 G81 X0 Y0 Z-5.0 R2.0 F150.
X50.0 (returns to Z25 between holes)
G80

▶ Open this example in the G-code viewer

Tips and common mistakes

  • Use G98 when obstacles lie between holes, G99 otherwise for speed.

Controller compatibility

G98 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 G98 modal?
Yes. G98 belongs to modal group 10/05 and stays active until another code of that group is programmed.
What does G98 mean in CNC?
G98 means Initial Plane Return (Mill) / Feed per Minute (Lathe). Mill: canned cycles return to the initial Z level between holes, which is safe over clamps. Lathe: F in mm/min (e.g. for live tooling).
What is the difference between G98 and G99?
G98 is Initial Plane Return (Mill) / Feed per Minute (Lathe), while G99 is R-Plane Return (Mill) / Feed per Revolution (Lathe). See the G99 page for its syntax and examples.
Can I use G98 on a lathe?
Yes, G98 is used on both mills and lathes, although some parameters differ between them.