I have 2 small mills. My Dyna was already equipped with its switches and a homing routine. Upon start up, my table moves all of the way to the right (X) and touches the switch, then backs off a predetermined amount. It also moves rearward (Y) or away from the operator and basically repeats the same as mentioned for X. Z goes to the top, hits the switch and backs off also. I will have to check on the Z but I believe this is a positive number such as whatever the max Z travel is. Z 0 is the uppermost plane of your workpiece (absolutely double check as this is just my understanding). Also there are various coordinates being used ie: machine and work. I hope I didnt just make it more confusing. For me though the Z is always just starting to cut my workpiece with a negative number (lower than 0). I am sure that is not the right or only way by any means and any further clarification is definitely appreciated.