[Solved] UGS Homing issues

So for whatever reason UGS is just having a hell of a time getting projects centered. I’ll get the bit centered on the corner of the block of foam I’m carving and then turn the main unit and spindle on, I’ll load up the tool path file in UGS and everything looks good, the machine and work coordinates are all at 0 and everything looks good, but when I start sending the file the x-carve only moves about 1/4 of the way out and starts carving the piece way off from where it’s projected to be. I’ve tried changing the toolpaths and everything, and if I try to change the home position or machine home, it just gets worse. Has anyone had this issue or does anyone have any fixes I could try? I’m a little new to this and I’m not sure why it’s being so difficult. It carves some things just fine but the stuff I’m working on lately is just throwing it for a lop.


What software did you use to create the gcode?

I’ve been using MashCAM to make the gcode.

You need to be sure the Grbl is set to the same units (inches or mm) as the units in the meshcam gcode file. You can manually send the G20 command to put Grbl in inches mode (or G21 for mm)

Also be sure that the machine x/y/z is zeroed before you send the file.

How do I check what units the files in so I can check to see? And when I enter G20 in the command list on grbl nothing happens how do I know its worked?

Edit: Sending the code set to G20 or G21 still yields the same results. It’s almost like it’s starting from halfway through the project. like the part I’m working on now is about 11" on the Yaxis at zero it’ll only move up about 5 inches and then start carving like that’s where the top is. And when I bring it back to home after I canceled it, it moves way off the piece to where the real 0,0 coordinate is, even though the coordinates where at 0,0 (both work and machine) at the start. This is extremely frustrating to me.

You’ll have to look at the G-code that’s generated by the software you are using. Some software systems include a preamble to set up the machine. If you enter a G-code command and then run the file the preamble may undo what you did with that command.

Be sure the home position is set where you think it is, I have made the mistake of setting the home in the center of the work in the software and then positioning the spindle at the lower left corner of the work. That makes a real mess.

Next if you are using UGS I have had good luck
connecting UGS,
jogging the spindle to lower left and then
zeroing the Z to touch the work,
exiting UGS
and then restarting UGS to be sure everything is zeroed,
then load the file and send it.

I know there are other ways to do this but this method is the most foolproof I have found.

You can open your Gcode file in a text editor to check to see if it is sending the correct setup commands. It should be sending either a G20 or G21 depending on the units you used in the program. If it does not have a G20 or G21 you can send it manually or put in the file at the start.

Make sure your using the same units (MM/Inch) for your stuff.
I had an issue with one of my axis and it was related to not having enough current going to my stepper. The machine would throw its position off. Just search the forum and you’ll find how to change it, its pretty common.
Also you can change the Stepper ammount for your xcarve in the grbl firmware through UGS, type in $$ to find your current settings. X and Y should be set to 40 steps per mm I believe :slight_smile:

Ok, so I tried the opening closing opening method with ugs and it still is way off. It’s in the right units and it’s at machine and work zero so I just don’t know what’s wrong. I’m gonna post up the gcode that I’m trying to run when I get back from hand therapy and see if any of you find something wrong with it that I’m missing. Is there any way to see what the village to the stepper motors is? I don’t think that’s the problem cause it carved the piece fine just no where where it should be.

I agree, it sounds like the problem is in the gcode.

Alright I’m back home. So here’s the gcode that meshcam generates. Could someone smarter then me let me know if anythings wrong with it?

Taimajora top rough.nc (131.3 KB)

I’m new to G-code, but it doesn’t seem like this file establishes the addressing mode (G90 or G91). So, I’m guessing that the file is depending on whatever setting was in effect when the file runs.

G90 = absolute addressing
G91 = relative addressing

Just as an example, for my situation, here is how one of my files start
G0 Z6.0000
G0 X0.0000 Y0.0000 S0 M3

Ok so I can’t stress this enough to people, check the damn straps and make sure they’re tight. Nothing was wrong with anything except my oversight of those things, the right y track strap had somehow loosened up considerably, and after tightening it, my problem went away.

Thanks for all the help and suggestions though!

However I’m still learning some stuff about this, what’s the difference between absolute addressing and relative addressing?

Absolute addressing gives the co-ordinate you want the machine to move to. Relative addressing says move a distance from where the machine is.

If your position is at X100,Y100 and you want your machine to move to X500,Y500 it would be G0 X500 Y500 with absolute addressing.

If your position is at X100,Y100 and you want your machine to move to X500,Y500 it would be G0 X400 Y400 with relative addressing.

Glad you tracked it down!
I was amazed at how much my belts and set screws loosened over the first few carves. :frowning:

My best guess is the new belts stretch a bit so you need to tighten them up a couple of times until they settle in.
And the set screws keep rattling loose from al the vibrations