A photoelectric sensor emits a light beam (visible or infrared) from its light-emitting element.A reflective-type photoelectric sensor is used to detect the light beam reflected from the target.A thrubeam type sensor is used to measure the change in light quantity caused by the target crossing the optical axis.