In this paper, we describe the design and working principle of two wire displacement measuring sensors. The two sensors are used in a pulsed wire setup for undulator magnetic field measurements. First one is optocoupler sensor consists of a LED – phototransistor pair and the other one is a laser sensor of laser photodiode pair. Both the sensors work on the principle of light interruption and gives comparative results in our experimental setup.