Setting up machine

following steps using wizard… how do we set homing positions and limits for x,y an z. really new to this. I can move the machine by jogging but want to set limits and a home position

thanks Mike

@Mike, do you have homing or limit switches? If not I’m not sure if that is possible with UGS. Unfortunately when you power off all coordinates are lost. When you next power up and start UGS wherever your gantry is sitting becomes your xyz zero position. I haven’t tried any setups using the homing/linits since I don’t have the switches. Maybe there’s a way but I haven’t figured it out yet. I guess if you always remembered to move the gantry to a specified position before powering down it might work.

no we have no limit switches, just trying to home without. pretty sure we can run without

Ok. Wasn’t sure how to accomplish without the switches. I’d be interested in an update when you get it figured out. I’m sure others would be interested also.

I don’t think that you can set a home position, unless you do add limit switches. A home position really isn’t necessary. It’s not like a 3dprinter where that is necessary. I don’t think there are limits either. It is possible to run any axis to it’s mechanical limit (i.e. runs into something).

@MDeVos, I found this web site called “CNC Philosophy”. Guy has lots of info on gcode programming. This came from one of his articles about whether or not you need limit switches. This was my thinking and I was going to test it tomorrow. The following says:

Set Your Home Or Reference Position

Most software I have researched for home use, will locate the reference position at the point it is at when you start the machine up.

Therefore, if you want to keep the reference point the same every time you operate the machine you need to return it to that position before you switch off the machine.

First off, manually move your machine to where you want the home position to be. I moved all three of my axes in the positive direction to just before they would hit the limit of their movement.

Then you can simply switch the machine and software off and back on again.

All you have to do now is to home the machine at the end of every program you run.


To home the machine you can add the G28 code just before the M30 or M01 like this:-

G91 G28 Z0 - Sets Incremental mode, Moves Z to home first
G28 X0. Y0 - Moves X and Y to home simultaniously
G90 - Sets Absolute mode
M30 - end of program

You can add this to the end of each program to move to home when your program ends or as I plan to do after testing is run this code when finished for the day and home it for the start of the next day. I also want to experiment with the g54-g59 commands to set work coordinates. Homing will help these work I believe. I’m going to set up the commands as a macro. Hope this helps.

CNC Philosophy web site -

@Heyward43 H: I believe that you will find that the G28 idea does not work with UGS. I started a thread on the Google UGS group on this subject. I had read that you could use G28.1 to set your home position. The document that I read said that you could manually jog your machine to any place, then enter G28.1. That would create a home position. Further, that position would be entered into the machine’s eeprom and would stay there permanently until you entered another G28.1 command.

You could then move your machine any which way. You could set a material XYZ0, etc. You could turn the machine off. Then, on restart, you could enter G28 and the machine would go to the home you had entered.

This was exactly what I was looking for. Unfortunately, in UGS, it does not work. In UGS, you can enter G28.1 and it will record that spot. You can then move the machine around, then enter G28 and it will return to that spot. However, if you enter G28.1, then jog the machine to your work piece and zero your axes, UGS will overwrite the G28.1 spot. I figured a way around that was to get my work piece axes all set to 0, then enter G28.1. That way, if the machine crashed or the power went out, I could fire up the machine, enter G28 and it would go back to that point. (This was really why I looked into this in the first place.)

Unfortunately, that did not work, either. It is true that G28.1 puts coordinates into eeprom and that it is more or less permanent. However, when UGS starts and you connect to the controller, it overwrites those coordinates yet again.

So, in short (or long), using UGS you cannot home your machine without switches.

You can read more about this in the Google UGS group and get more info from people with much, much more knowledge about this than me.

I would love to be proven wrong about this. But, I tried several times to make it work, following instructions from a couple of guys on the UGS list. In the end, we all concluded that switches were the answer.

Thanks G. I had forgotten about your trials. That’s a shame it won’t work like it’s supposed to. By the way, I have been using CNCjs pretty much on a regular basis lately. So far it has performed flawlessly. No issues with jogging, like ignoring key taps, or quitting in the middle of a cut. I did find the return to zero jogging buttons. They were just hidden in the middle of the jogging arrows. I created 3 macros for using the touch probe for XYZ alignment. One for each bit diameter 1/16, 1/8 and 1/4. The CNCjs probe for Z works but for X and Y you have to do each axis separately. Won’t do all 3 at the same time that’s why the macros. So far I have run one job with some 3D objects that took about an hour and no problems whatsoever. It’s looking good so far.

@Heyward43 H: After all the initial frustration with UGS, I was ready to give up. However, I have not had any trouble now for quite a while. I moved to the latest build of UGS, which is mid-April 2019 and it seems very solid. He added a “run from line” feature, which seems to work well in testing. So, in the event of a freeze, I should be able to start where I left off.
In terms of the homing issue, no matter the sender, I think the way to go is switches. I ordered and received the switches and I’m just waiting for the capacitors that are needed to filter noise on the wires.
Really, at this point, I’m happy with my setup. I’m just tinkering at the edges… I would like to be able to do repetitive work, hence the switches. I know that there are simpler ways to achieve that, but I’m a glutton for punishment. (Right now, the drag knife is punishing me.)
I’m glad to hear that you are looking good. Have fun.

1 Like

@gwilki G, glad UGS is working better. I may try to update mine and see how it goes. I’m with you on the switches. I’m about ready to order too. What kind are you using? How many, 3 or 6? Do you have a plan on how to install? Just fishing because I have no idea how to mount. Guess I better research and learn. I like some of the examples others have used but I don’t have a 3d printer to create the mounts so I will have to come up with some other method. But it will get done somehow or other.

@Heyward43 H. I got mine from Open Builds. I just went onto their site to get the part number for you and they are now saying that they are no longer available. They were $2 each and they don’t seem to have anything comparable. On Amazon, these are very like mine:

They can be wired normally open or normally closed. I’ve read that NC is the way to go. I got 6, one for each end of X and Y.

I don’t know yet how I will mount them. Like, you I do not have a 3D printer, but I’m sure that I can make something out of plastic or corian that will do the job.

1 Like

On the topic of home positions, I’m not sure why this happens, but sometimes on my Fusion 360 drawings (unique to me, did them from scratch) after the tool path is finishing the machine starts heading off in a -Y and or -XY pathway, as if it is trying to return to some home position I never set. So far I have always set my zeros in the lower left corner area. I can’t figure out where it is getting these mystery details at the end of the toolpath. More confusing, not every project does it. Can anyone shed any light, while we’re talking about homing?

wow… great info thanks for helping me out. i’ll definitely try this out. sorry for the late reply


For the sake of future searchers who end up here… GRBL assumes your first position of your machine on power up is a kind of “absolute home position” and uses it as that magical home position “I didn’t set” that I referred to in my previous message, at least the way Fusion 360 acts at the end of a cut. So if you’re wondering where it is headed, think back to where the machine was located when you powered it on.

For safety, consistency and somewhat in keeping with a general norm in the CNC world, I’ve taken to putting my machine in the right rear corner at max Z height. I’ve also made a macro in UGS to lift to full Z height and head back there. I find myself using it all the time if something goes wrong and I want to extract the bit and get the router out of the way while I investigate.


1 Like

@gwilki I can’t remember what thread I promised to post this but I apologize for being a few days late. Had the laptop nearby so I looked it up, here is my macro I use to send the router up and to the position it thinks is absolute zero (the position it found itself in after the most recent power on). This location is not displaced when I use the XYZ probe function, it is separate, at least in the August 2019 build of UGS.

Z Up, Goto Abs Zero: G28 G91 Z0; G90; G53 G0 X0 Y0

I don’t really read gcode directly yet, just cribbed this from Fusion 360.

EDIT: To finish the thought, and make this useful, when you’re done with your machine for the day return it to a known position. I used the right rear corner at max Z height. Then when you power on it will take this position to be home, if you don’t have homing switches, and use it with the macro.