G4 G-code

Waiting room

G4 means “pause for a given duration of time”.

This is useful for example to wait for spindles to ramp up to speed, or to wait for small layers to cool down on 3D printers.

Format

The command is used with either the S parameter (seconds) or P parameter:

V1: Seconds and Milliseconds

G4 S5

Pause for 5 seconds.

V2: Seconds and Milliseconds

G4 S5

Pause for 5 seconds.

Parameters

Parameter Usage Example
S Duration to wait in seconds G4 S10
P Duration to wait in milliseconds (thousandth of a second) G4 P100

When is enabled, the P parameter is interpreted as float seconds (not milliseconds) to conform to standard G-Code specifications.

Parameter Usage Example
S Duration to wait in seconds G4 S10
P Duration to wait in milliseconds (thousandth of a second) G4 P100

When is enabled, the P parameter is interpreted as float seconds (not milliseconds) to conform to standard G-Code specifications.

Further reading

These resources are used as references for Gcode:

This is a wiki! If you'd like to improve this page, you can edit it on GitHub.