Carbide Motion Dwell (G04) time units are unclear

I am using a Dwell (G04) command in my file to give me a convenient opportunity to pause at known locations. In my g-code I have the following lines:

(Move cutter out of way)
(Stop spindle)
(Pause for 1 sec)
G4 X1.0
M3 S5000

When the program encounters the ‘G4 X1.0’ command, it pauses for a very long time (on the order of a minute). According to the GRBL g-code reference (, the ‘X1.0’ argument should result in a 1 second pause. Is Carbide Motion expecting a different argument for Dwell?


David, use P for the dwell argument. That is RS274 standard, and is in seconds. I’ve never seen X or U as the argument. Mach3 also uses P as the argument.

My motion testing was a whole bunch of these

g0 x50.
g0 x0.
g4 p.5

Go out 50mm, return, pause for half a second to read the dial indicator, repeat a whole bunch of times (copy’n’paste in the text editor since Carbide Motion doesn’t do looping…)


That text came from Wikipedia or the G-code reference. I’ll update it, and will try to find time to research it. (wiki page updated, P seems to be seconds, X and U (both?!?) are milliseconds, not sure if they’re supported by Grbl though).

If you want to do loops, why not use one of the pre-processors.

A neat function for Carbide Motion would be for it to handle G-code for things such as loops which Grbl doesn’t support.

Edit: edit.

The ‘P’ is RS274 standard; I’ve seen it and ‘X’ before. Never heard of or seen a ‘U’ though…

The problem for the G04 is the time units. It was left open in the early spec. Many older references expected milliseconds. This is why they added the ‘P’. Stick with this and you’ll be portable.

As a safety reminder, never depend on a time delay when one wants to stick any part of your body inside the work volume to do something. CNC machines - theoretically - must implement the G code for stop (M00 - awaits a key turn or a button press before proceeding) in order to be compliant. Use this or M01 if it is available and useful.


AIUI, one can insert an exclamation point (!) into the code where one wants a pause when sending G-code to Grbl.

Then, send a tilde (~) which will resume (really wish that all the comm/control programs would add a button for sending this (and the ! and the other control keys)

Carbide Motion accepts M0. Just put it on a line by itself and CM will halt operation until you click the Start icon again. I have used it and confirm it works.


1 Like

Way cool! I’ve seen M01 used and see that it is supported by the Nomad.

On the older machines I’ve used, M01 stops only if the key/knob is turned to the “stop” setting, otherwise it continues. Great when one wants to stop things at certain points but can easily let things continue if one wants it.

@Randy have you seen how M01 works on a Nomad? Click too?


@mbellon, I have not explored M1. I’m not sure how that would be implemented on the Nomad (on-screen toggle for stop enabling?) and I won’t have time to play with it until after Christmas.