G81

Machining centerModal, group 09

Drilling cycle (spot drilling)

Format and notes

G81 X_ Y_ Z_ R_ F_ K_

Diagram: G81 motion (side view)

RapidCutting feedInitial pointR pointHole bottom Z① Rapid to R point② To hole bottom ZCutting feed③ Rapid return
Rapid to the R point, then cutting feed from the R point to hole bottom Z. Figure shows G98 (return to initial point); with G99 it stops at the R point and moves to the next hole.

Try it in the simulator (machining center)

G81 repeats rapid to R → feed to Z → retract for each hole. G99 returns to the R point, G98 to the initial level.

    X—
    Y—
    Z—
    T—
    S0
    F0
    —0:00

      Frequently asked questions about G81

      What is G81 (Drilling cycle (spot drilling)) used for and how is it formatted in a CNC program?
      G81 commands "Drilling cycle (spot drilling)" on Machining center. The standard program format is "G81 X_ Y_ Z_ R_ F_ K_". The simplest drilling: rapid to the R point, feed to Z, rapid back out
      Is G81 a modal code or a one-shot (non-modal) code?
      G81 is a modal code (Group 09). Once commanded, it remains active across subsequent blocks until another code from the same modal group overrides it or the control is reset. Always state or cancel modal states explicitly in your safety block and at the end of a tool operation so residual modes do not cause unexpected motion when restarting mid-program.
      Does G81 work differently on machining centers (mills) versus CNC lathes?
      G81 is primarily used on Machining center. Depending on the machine type and the lathe G-code system (System A, B, or C), this code may be unavailable or assigned to a different function, so verify against your machine tool manual.
      Are there differences in G81 across FANUC, Mitsubishi, Okuma, Haas, and Siemens controls?
      While the core behavior of G81 is shared across most ISO-compatible CNC controls (FANUC, Mitsubishi Electric, Haas), controls using native conversational or proprietary dialects (such as Okuma OSP, Siemens native mode, or Heidenhain) or machine-specific M-code tables may use different syntax. Always verify with single-block execution and distance-to-go display on a new machine.

      Sources

      The meaning of this code agrees in two or more sources from different publishers. Explanations are written in our own words.

      1. 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
      2. Haas Automation, Inc. — Mill Operator's Manual – 17 Mill G-Codes (online version) haascnc.com
      3. National Institute of Standards and Technology (NIST), USA — The NIST RS274NGC Interpreter – Version 3 (NISTIR 6556, 2000) nvlpubs.nist.gov