Help with XYZ Probe

G38 g-code command is not enabled in the V1 maintained Marlin firmware for the Primo. You can use G28 instead for Z. I’ve seen a couple of threads on the forum about enabling G38 in the Primo firmware. It is not as simple as just changing a single define and recompiling. Here is a post where I enable G38 for use as part of a bitsetter functionality, but the results are very specific what I was trying to do. In this post, Ryan gives a recipe, but I don’t know if it was ever verified.

As for finding the corner for X and Y, I went part way down that rabbit hole using a corner plate similar to this one. The problem I ran into was that the scripts need to know the diameter of the router bit. I could have just made separate routines for 1/8 and 1/4 bits, but I’d be depending on the milled diameter of the bit being accurate, and that the diameter would be read correctly even with the flutes on the bit.

As an alternate solution to probing, you could mount fences (or pins) so that your stock is mounted at a known coordinate. Then your scripts could easily find the corner of the stock.