Transparent objects are hardly detected by opposed mode sensors as they reflect the light beam only partially. Retroreflective sensors are better suited for this task because the light beam passes the object twice. This improves the contrast considerably. Anyhow, the switchpoint has to be adjusted precisely which is only possible with sensors featuring sensitivity adjustment. Diffuse mode or convergent mode sensors are best suited for this job.
Temperature-dependent change of switchpoint or output value.