Encoders are connected via timer counter modules that take quadrature inputs, so they count up and down as you move. I have used an inexpensive Dart 10 pulse per revolution counter to locate the greenhouse bays along a 400 foot path. The encoder should never be on a driven wheel, only an idler. This gets me within a couple of inches, then I drop into creep speed and stop by a photoeye looking for a retro reflector. This gets close positioning even when things have shifted due to expansion and contraction of the building, rails etc. Approaches for alignment always come from the same direction too. So when going back to an earlier location when the counter says I have arrived I brake to a stop and go forward again until the photoeye aligns. At both ends of the path is a long metal bar that is detected by an inductive proximity sensor. This warns the machine that it is near the end and forces it to slow down to avoid crashing into the end. If it is anywhere along the bar it is only allowed to creep. The counter always resets at the home position. On power up the machine always goes home first to reset the counter.
The newer PLCs like the PAC 3000 and DoMore series have lots of memory now. That said, my machines from 20 years ago had enough memory to store 47 positions in each of 60 bays! Those machines are still running today, with only occasional problems, mostly mechanical.
If you use a C-More 6" or larger HMI locally on the machine it has a web server that lets you access it over Ethernet. A 5 dollar app for an Iphone gets you access from you phone too.