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).
| Property | Value |
|---|---|
| Code | G98 |
| Function | Initial Plane Return (Mill) / Feed per Minute (Lathe) |
| Modal group | 10/05 |
| Type | Modal — stays active until replaced by another code of the same group |
| Used on | Mills and lathes |
| Syntax | G98 |
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
G98G98 example program
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.