Through-beam sensors consist of transmitter and receiver, each of which are arranged in a housing. Transmitter and receiver are mounted opposite one another. Nontransparent, shiny and reflective objects can be reliably recognized. Through-beam sensors make long ranges possible, with the highest degree of functional safety. Cleaning and maintenance cycles can be reduced to a minimum through the use of through-beam sensors.