Optical sensors function contactlessly. They detect objects independent of their characteristics (e.g., shape, color, surface structure, material). The basic operating principle is based on the transmission and reception of light. There are three different versions: 1. The through-beam sensor consists of two separate devices, a transmitter and a receiver that are aligned with one another. If the light beam between the two devices is interrupted, the switching output integrated in the receiver changes its status. 2. With the retro-reflective sensor, the transmitter and receiver are located in one device. The emitted light beam is reflected back to the receiver by a reflector that is to be mounted opposite the device. As soon as the light beam is interrupted, the switching output integrated in the device changes its status. 3. With the diffuse reflection sensor, the transmitter and receiver are in one device. The emitted light beam is reflected by the object that is to be detected. As soon as the receiver detects the reflected light, the switching output integrated in the device changes its status.