Fanuc (milling and turning)
G04 P1000P with no decimal point is read in milliseconds: P1000 is a one second dwell. If you prefer seconds with decimals, you write it with X (or with U on a lathe): G04 X1.0 is the same as G04 P1000.
We use technical and security cookies and, only if you accept, analytics with no cross-site tracking. More in the Cookie policy and Privacy policy.
We use first-party cookies and technical storage to make the site work, Google reCAPTCHA security technology and, only if you accept, Vercel analytics (no cookies, no cross-site tracking). You can accept or reject analytics; both options are equivalent and you can change your choice at any time. More info: Cookie policy, Privacy policy, Legal notice and Terms and conditions.
G04 stops axis motion for the time you tell it and then carries on with the next block, without stopping the spindle or the coolant. You use it so the tool turns once or twice at the bottom of a groove or a countersink and leaves a clean surface, to give the spindle time to come up to speed or the coolant time to arrive, and to keep two moves from being blended together. It is not modal: it only affects the block it is written in.
For reference only: syntax changes with the control, the post-processor and the machine parameters. Check the official manual and run a simulation before cutting. Legal notice.
Fanuc (milling and turning)
G04 P1000P with no decimal point is read in milliseconds: P1000 is a one second dwell. If you prefer seconds with decimals, you write it with X (or with U on a lathe): G04 X1.0 is the same as G04 P1000.
Haas
G04 P1.0On Haas P is read in seconds and takes decimals, so P1.0 is one second and a P1000 copied out of a Fanuc program would be a thousand seconds of machine standing still. It is the difference that catches people out most when moving programs between controls: check it in your machine manual before you trust it.
Siemens 840D / 828D
G4 F2.5On Siemens the time goes in F and in seconds, and the G4 block has to stand alone. With S you ask for the dwell in spindle revolutions (G4 S2 is two revolutions), which is more useful than time when what you want is one full turn of the edge at the bottom.
Heidenhain TNC (Klartext)
FUNCTION DWELL TIME1.5On modern TNCs the wait is programmed with FUNCTION DWELL and the time in seconds. In old programs it shows up as CYCL DEF 9.0 TIEMPO DE ESPERA, with the value on line 9.1.
| Letter | What it sets | Unit |
|---|---|---|
| P | Dwell time. It is the usual letter, and also the one that changes units between controls: milliseconds with no decimals on Fanuc, seconds with decimals on Haas. | ms or s depending on the control |
| X / U | Dwell time in seconds with decimals on Fanuc (X1.5). On a lathe U is used for the same thing, because X is an axis coordinate. | s |
| F | Dwell time on Siemens, in seconds. Here F has nothing to do with feedrate: inside a G4 block it changes meaning. | s |
| S | Dwell measured in spindle revolutions on Siemens (G4 S2). It is the honest way to ask for the wait, because what cleans the bottom up is revolutions, not seconds. | spindle revolutions |
Grooving a 3 mm wide recess in a 40 mm steel shaft on the lathe, down to a 30 mm diameter. The insert feeds all the way in, is left turning for a moment so the bottom comes out round and without the spiral step you get when you pull straight out, and then retracts. G97 keeps the rpm fixed, which matters in grooving because constant surface speed would run the rpm up as the diameter drops.
O0104 (GOLA CON PAUSA EN EL FONDO) | ( Program header. ) |
G21 G18 G40 | ( Millimeters, XZ plane (the lathe plane) and no tool nose radius compensation. ) |
T0303 | ( The 3 mm grooving tool with its offset, number 3. ) |
G97 S900 M03 | ( Direct rpm, 900 rev/min, and spindle on. Nine turns a second: that is the number the dwell is worked out from. ) |
G00 X42. Z-20. M08 | ( Rapid approach to 42 mm diameter, two millimeters clear of the part, and at the axial position of the groove. ) |
G95 | ( Feed per revolution, which is how grooving insert tables are written. ) |
G01 X30. F0.08 | ( Feeds in to the groove diameter, at eight hundredths of a millimeter per revolution. ) |
G04 P500 | ( A half second dwell on a Fanuc control, where P is in milliseconds. At 900 rpm that is about seven turns of the part: plenty for the insert to clean the bottom. On a Haas, this same value would be 500 seconds. ) |
G00 X42. | ( Comes out of the groove in rapid, with the recess finished. ) |
G00 X200. Z100. M09 | ( Retract to the change position and coolant off. ) |
M05 | ( Spindle stop. ) |
M30 | ( End of program. ) |
Four things, and all four come from the shop floor. The first is cleaning up a bottom: when a tool reaches the bottom of a groove, a countersink or a hole and retracts straight away, it leaves a spiral mark because it keeps feeding as it comes out; one or two turns of dwell wipe that out. The second is giving time to something the program does not control: the spindle coming up to speed, the coolant arriving, a tailstock or an ejector finishing its move. The third is separating blocks so the control does not blend them. And the fourth, in boring, letting the edge come off the wall before reversing.
A useful dwell is measured in spindle revolutions, not in seconds: one or two turns is plenty, and the arithmetic is direct, 60 divided by the rpm times the number of turns. At 900 rpm, two turns is 0.13 seconds; at 3000 rpm, 0.04. Putting a full second in just in case is expensive for two reasons: in production, one second per hole across five hundred holes is over eight minutes given away, and at the bottom of the cut a long dwell means the edge is rubbing instead of cutting, heating up and burnishing the surface, which in stainless work hardens it and finishes off the insert.
It is not a stop: the axes hold still, but the program carries on by itself when the time is up, so it is no substitute for M00 or M01 when somebody has to step in. It does not guarantee the spindle has reached speed either: that is handled by the spindle at speed signal the control checks on its own, and a fixed dwell is a workaround that stops being valid the moment the rpm change. And on machines with block lookahead, dropping a G04 into the middle of a finishing pass forces an exact stop and can leave a visible mark on the surface.
It depends on the control. On Fanuc, P is in milliseconds and P1000 is one second. On Haas, P is read in seconds, so that same block would be an enormously long dwell. It is the first thing to check when you take a program from one machine to another.
No. G04 holds axis motion only; the spindle keeps turning and the coolant keeps running. That is exactly why it works for cleaning up the bottom of a groove: the tool goes on cutting in place without feeding.
One or two spindle revolutions. The arithmetic is 60 divided by the rpm, times the turns you want: at 1200 rpm, two turns is a tenth of a second. In canned cycles this is already catered for and you program it with the P of G82, with no separate G04 needed.
G04 waits a set time and carries on by itself; M00 stops the program and nothing moves until somebody presses cycle start. If what you want is to measure the part, blow chips off or look at something, the right instruction is M00 or M01, never a long dwell.
On Siemens yes, with G4 S followed by the number of revolutions. On Fanuc and Haas the dwell is always a time, so you do the conversion yourself from the active rpm. That means reviewing the dwell every time the cutting speed changes.
CNC IDE: editing with G/M tooltips, line inspector, conversion between controls and 2D/3D toolpath.
CNC Alarms and Solutions Guide. Enter the error code or symptom to find the cause and how to repair it at the machine.
Estimate CNC turning and milling cycle time from G-code. Calculate parts per hour with a breakdown of cutting, rapids, canned cycles and tool changes.