Steve I have attached my "check limit switch repeatability" test code.
Limit Switch Repeatability test
Custom21.sbc (6.3 k)
Put it in the "Custom" folder under C:\SbParts\Custom. Be sure you are not using custom21 for some other purpose, if so, rename the file appropriately.
This comes with my standard disclaimer- I don't support it, and don't even claim it has value for anybody else. Use at your own risk.. Study it to see what it does, its just a modified version of the XYZero routine.
Enjoy!
D