---
tag: g004
title: Dwell
brief: Pause the planner
author: thinkyhead

group: motion
since: 1.0.0-beta

codes: [ G4 ]

notes:
- If both `S` and `P` are included, `S` takes precedence.
- '[`M0`](/docs/gcode/M000-M001.html)/[`M1`](/docs/gcode/M000-M001.html) provides an interruptible "dwell" (Marlin 1.1.0 and up).'
- '`G4` with no arguments is effectively the same as [`M400`](/docs/gcode/M400.html).'

parameters:

- tag: S
  optional: true
  description: Amount of time to dwell
  values:
  - tag: time
    type: int
    unit: sec

- tag: P
  optional: true
  description: Amount of time to dwell
  values:
  - tag: time
    type: int
    unit: ms

example:
- code: G4 P500 ; Dwell for 1/2 second

---

Dwell pauses the command queue and waits for a period of time.
