Carbide Motion Dwell (G04) time units are unclear

#1

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)
G0Z15.240
(Stop spindle)
M5
(Pause for 1 sec)
G4 X1.0
(Resume)
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 (http://www.shapeoko.com/wiki/index.php/G-Code#Motion_.28G.29), the ‘X1.0’ argument should result in a 1 second pause. Is Carbide Motion expecting a different argument for Dwell?

Cheers,
David

0 Likes

#2

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…)

Randy

0 Likes

(William Adams) #3

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.

0 Likes

(Mark Bellon) #4

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.

mark

0 Likes

(William Adams) #5

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)

0 Likes

#6

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.

Randy

1 Like

PCB_GCode and tool change positions
(Mark Bellon) #7

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?

mark

0 Likes

#8

@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.

Randy

0 Likes