Some basic info on photoeyes from the Primer:
Photoelectric sensors or Photoeyes transmit and receive a light signal. The sensor changes state when the light changes from being received to not being received or vice-versa. There are two conditions for the output of a photoeye; Light On, where the output of the sensor is energized when light is detected, and Dark On, where the sensor output is energized when no light is being received.
Usually photoeyes use an LED or Light Emitting Diode to generate the light signal. A lens is usually placed in front of both emitter and receiver to help amplify the light signal. The LED may be of various colors in the visible light range or in the infrared spectrum which gives the light a longer range. Lasers are also often used for precise detection or longer range applications.
Through-Beam photoeyes have a separate emitter which transmits the light and receiver which receives the signal and controls the output state. Because the sensor has to have two separate cables terminated for power and signal and it has two physical pieces, it is more expensive in both installation time and in hardware cost than other configurations. The through beam photoeye has a longer range and is considered to be most reliable when detecting absence and presence of objects.
Retroreflective photoeyes use a reflective tape or a plastic reflector to bounce the light off of back into its receiver. The emitter and receiver are both built into the same housing and use a common power wire which reduces cost over the through beam type, but the range is shorter.
To minimize interference from the light bouncing off of other reflective surfaces, a polarized signal is often used. A corner cube type reflector shifts the light 90 degrees before it is received and only light out of phase with the transmitted light is accepted as a signal.
Diffuse Reflective photoeyes use the object to be detected as a target. Light is transmitted from the emitter and received similarly to the other configurations, however received light indicates the presence of a target rather than its absence as with the through beam and retroreflective. Diffuse reflective photoeyes are not the ideal sensor to use for simple absence or presence of an object since the amount of light received is affected by the reflectivity and color of the target. This property can however be used to an advantage when using the sensor to differentiate between colors.
A red LED signal will reflect much more strongly from a red object than from a green object and vice-versa. Techniques using red, green, blue, yellow and white LEDs as light sources are often used in color detection photoeyes.
In general for simple object detection the most reliable method is to use a through-beam. This is however also the most expensive method since cables have to be run to devices on both ends. The second choice is the retroreflective eye, ideally polarized. This only requires the location of a reflector on the far side of the object. Diffuse is usually the last choice for object detection since it is very dependent on the properties of the object being detected.