Looking for suggestions on how to identify the exact position of the gantry plate on a C-BEAM linear rail with millimeter accuracy. Not sure if this is possible to the level of millimeter accuracy, but any suggestions, tips and ideas would be helpful. From my search, looks like following methods are possible: 1) Using a limit switch and counting the steps of the NEMA 23 motor programmatically. This sounds like a good and cheap approach, but wondering how reliable and repeatable this will be. What kind of problems will I encounter (like motor slipping, etc.) 2) Using an ultrasonic distance sensor. Again wondering how reliable this will be. 3) Using an encoder like an Hall-effect encoder in this DC motor. Is it possible to attach an encoder like this with a NEMA 23 stepper motor and will it produce accurate results?