Proximity sensor in manufacturing, Proximity sensor technology, Photosensor in automation