G04

Machining center, LatheOne-shot, group 00

Dwell (pause)

Format and notes

G04 X_ (seconds, decimal point allowed) or G04 P_ (no decimal point)

Try it in the simulator (machining center)

G04 is a dwell. P is in milliseconds (P2000 = 2 s). Watch the time grow by 2 seconds.

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

      Differences between controls and machines

      The same code can be written or assigned differently depending on the CNC control and the machine builder. Always check your machine’s manual.

      SourceMachineItemDetail
      Haas—FormatG04 P_Haas uses P only. P10. is 10 seconds and P10 is 10 milliseconds (the unit changes with the decimal point). The P value is modal and is carried over into canned cycles
      NISTMachining centerFormatG4 P_ (seconds)In RS274/NGC, P is in seconds
      Siemens (ISO dialect)Machining centerGroup18 (non-modal)Siemens labels non-modal as group 18

      Frequently asked questions about G04

      What is G04 (Dwell (pause)) used for and how is it formatted in a CNC program?
      G04 commands "Dwell (pause)" on Machining center, Lathe. The standard program format is "G04 X_ (seconds, decimal point allowed) or G04 P_ (no decimal point)". Effective only in that block (one-shot)
      Is G04 a modal code or a one-shot (non-modal) code?
      G04 is a one-shot (non-modal, Group 00) code. It acts only in the single block where it is written and does not carry over to the next block, so you must write G04 on every line where that action is required.
      Does G04 work differently on machining centers (mills) versus CNC lathes?
      G04 is primarily used on Machining center, Lathe. 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 G04 across FANUC, Mitsubishi, Okuma, Haas, and Siemens controls?
      Yes. Control builders such as FANUC, Mitsubishi Electric (M80/M800), Okuma (OSP), Haas, Mazak, Siemens (SINUMERIK ISO dialect), and Heidenhain can differ in argument letters, decimal-point rules, and optional parameters for G04. Review the control comparison table above and verify the exact syntax in your machine’s programming manual before proving out the program.

      Sources

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

      1. Mitsubishi Electric — The Basics of CNC Machining Programming (for Machining center) e-Learning material (PDF) mitsubishielectric.com
      2. Mitsubishi Electric — The Basics of CNC Machining Programming (for Lathe) e-Learning material (PDF, BNP-C8027-688) mitsubishielectric.com
      3. 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
      4. Haas Automation, Inc. — G-code, M-code, and Setting (per-code explanation pages) haascnc.com
      5. Haas Automation, Inc. — Mill Operator's Manual – 17 Mill G-Codes (online version) haascnc.com
      6. Haas Automation, Inc. — Lathe Operator's Manual – 16 Lathe G-Codes (online version) haascnc.com
      7. National Institute of Standards and Technology (NIST), USA — The NIST RS274NGC Interpreter – Version 3 (NISTIR 6556, 2000) nvlpubs.nist.gov