As your machine has no way of knowing where the workpiece actually is,you need to help it a bit.I have to admit to being a few small steps ahead of you with LinuxCNC and I like it's utter reliability.I really need to do more about installing the home and limit switches on my machine and learning how to configure them.The only reason it hasn't been too pressing is that the system helps me more than I had expected.When I power up and before doing anything at all I click the home tab for each axis.Once the job is positioned I move the tool to it and use the touch off function to tell the machine what the job coordinates are and the really nice thing is that even if the part datum is way outside the physical size of the machine,it still accepts the program as long as the job size is within the machine envelope.
Once you have the X and Y datums established you can touch off the top of the material if you know the part Z position of this surface-that is to say if you have a piece of stock X amount thicker than the final piece,which is datumed at zero then you can enter this value when the tool is in the correct place.If you use an electrical touch off sensor you obviously need to calculate for it's height.For tool changes you can repeat the process unless you have a tool library in place with the correct tool lengths in place.Done manually it isn't really a big deal unless you are chasing very small discrepancies and if you are then you need a touch plate anyway.
Do you have a CAM system with a LinuxCNC post processor?I use Freecad and the Path module which does have the right post processor and while it does have quirks,it usually gets the job done.Can hardly wait for the refined version of 3D surfacing to happen.