How do you count distance with a photo eye? Photo eye typically is triggered when a part comes into front of it and block the light path into the photo eye (either transmissive or reflective).
Once you get the reading to output the measured data to a display is very easy, especially with a PLC that has built-in display such as the Wx100 or FMD or FX PLC with a LCD420 display.