Printed from Kezuriba (kezuriba.net/en/nc/g04/)
G04
Machining center, LatheOne-shot, group 00Dwell (pause)
Format and notes
G04 X_ (seconds, decimal point allowed) or G04 P_ (no decimal point)
- Effective only in that block (one-shot)
- On lathes, used at the groove bottom or in cut-off to dwell for one or more revolutions so no uncut stock is left
- The unit changes with the address and whether a decimal point is used. Mitsubishi training material: P is 1/1000 s (no decimal point), X is seconds (with decimal point)
- Siemens ISO: during feed per minute (G94) the dwell is given in seconds; during feed per revolution (G95) it is given in spindle revolutions
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
Simulator with exercises: Machining center page
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.
| Source | Machine | Item | Detail |
|---|---|---|---|
| Haas | — | Format | G04 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 |
| NIST | Machining center | Format | G4 P_ (seconds)In RS274/NGC, P is in seconds |
| Siemens (ISO dialect) | Machining center | Group | 18 (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.
- Mitsubishi Electric — The Basics of CNC Machining Programming (for Machining center) e-Learning material (PDF) mitsubishielectric.com
- Mitsubishi Electric — The Basics of CNC Machining Programming (for Lathe) e-Learning material (PDF, BNP-C8027-688) mitsubishielectric.com
- 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
- Haas Automation, Inc. — G-code, M-code, and Setting (per-code explanation pages) haascnc.com
- Haas Automation, Inc. — Mill Operator's Manual – 17 Mill G-Codes (online version) haascnc.com
- Haas Automation, Inc. — Lathe Operator's Manual – 16 Lathe G-Codes (online version) haascnc.com
- National Institute of Standards and Technology (NIST), USA — The NIST RS274NGC Interpreter – Version 3 (NISTIR 6556, 2000) nvlpubs.nist.gov