Digital infrared edge sensor with CCD line chip, reflection mode, to detect the position of textile webs with great precision. The transmitter and the receiver are integrated in the sensor housing. Possibility to switch to mechanical edge detection is included.