Problems with UGCS

I am using UGCS 1.0.9 and am experiencing some issues. First, when I load a file and send it, the spindle will automatically turn on but will not turn off when a job is done. I have to click soft reset to get it to shutdown. This occurs every time I use it. Am I missing a setting? Next, sometimes when I run a job and finish, it seems that the value put in for the step size doesn’t register the same amount of movement as it did before the job. I hope I am explaining this in a way that describes exactly what is happening. Any ideas or suggestions?

Look at you gcode in a text editor and see if there is a M30 command at the end.

What software are you using to create your gcode?

M05 turns off the spindle.

The M30 is the end of code command and will turn off the spindle.

If you use VCarve all the gcode files end with M30

Allen, I am using VCarve. Is there a setting I must select in VCarve to get it to insert that code or should it appear when I save it?

Learn something new every day. Thanks. :wink:

I had this same issue a couple of months ago, and asked this same question. I got this info from someone in that thread, so I am passing it on to you. I updated the footer in my vcarve post-processor to look like this, and now it works perfectly.


  • Commands output at the end of the file

begin FOOTER

“G0 [ZH]”
“G0 [XH] [YH]”


There is not a setting in VCarve. The post processor is where it comes from. So if you are using the standard X-carve post processor you should have an M30 at the end.

You can edit the post processor and check it

Edit - Steven’s post shows the footer in the post processor

So it’s probably recommended to have both M5 or M05 & M30. That is how our program PicEngrave generates the M commands at the end of a file, unless End w/G28 is selected, then it substitutes the M30 with a G28. But, it always will end with a M05 to turn off the spindle or laser, unless Spindle On/Off is not selected before generating the gcode.

1 Like

Thank you Allen!

Thanks Steven! Sorry for the double post, I looked for an issue similar to mine but found nothing. So do you understand what this code is doing? I’m glad it works for you and hope it does me too, however I like to understand and not just put the code in there and say it works. I would like to know what it means. I plan to dive into some G-Code eventually but as of right now I have too many other things to learn with this lol. Thanks again!

“G0 [ZH]” Raises spindle to safe Z height
“M5” Turns off the spindle
“G0 [XH] [YH]” Go back to home position
“M30” End code

1 Like

So does anyone have any idea why my step intervals change? I’ll walk through my workflow…
I use a step interval of say 0.1 to move my spindle to zero. I then click reset zero; load up my file and let it run. Now, when it’s finished I have to click soft reset to get the spindle to stop (I have learned how to fix this now). Now if I go back to machine control and use the same step interval it doesn’t move the same distance at an interval of 0.1 as it did before the job finished. To fix this I must restart UGCS and the X-Carve.

Thanks you!

This solved my problem. Thanks again!

I’m running into this issue as well. the spindle starts, but at the end it doesn’t stop. the end of my code has M30, but it doesn’t show in the command history. doesn’t look like it’s being executed.

I use rhinocam with x-carve PP

going to try with m5

this is currently my last lines of code
G0 Z0.2500
G0 X4.9381 Y1.8689
G0 X0.0000 Y0.0000

this is what i’ll be trying.

G0 Z0.2500
G0 X4.9381 Y1.8689
G0 X0.0000 Y0.0000

If that works, ill edit the PP so it does it every time. If anyone has any other thoughts or suggestions, I’m open to them.


That should work. Is your Z safety height 0.25?

Which version of RhinoCAM are you using? the $595 or the more advanced?

yes, that’s the safety more advanced.

another note, if I manually send m30, it shuts off. it’s as though it’s not running the command at all for some reason.

i’m about to go out and test the modified code. Hopefully it works out.

reporting back: it worked. looks like UGCS (at least v2 nightly build) isn’t sending M30 while sending the file.
So M5 is needed.
Thanks for the feedback!