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