» –> <img src=“/_mediaexternal/https.upload.wikimedia.org.wikipedia.commons.thumb.a.ac.waiting.room.icon.svg.2000px.waiting.room.icon.svg.png” class=“pull-right” style=“width:400px”> </html>

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

Format

The command is used as such :

G4 S5

Which means : pause for 5 seconds.

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.

Parameters

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

Note that if Grbl_mode is set to True then the P parameter is the duration to wait in seconds, not milliseconds, as a float value. This is to conform to G-Code standards.

Further reading

These resources are used as references for Gcode :