Panasonic MQ-W adjustable range reflective type sensor can detect white or black object at the same distance. Therefore, the sensor can even detect individual objects that are mixed with black objects or objects of various colors that were hard for the diffuse reflective type sensor to detect. Adjustable range reflective type sensor dose not detect objects beyond the set range. For this reason, malfunction does not occur even if there are moving machines or people passing by in the background. Adjustable range reflective type sensor detects the distance by the angle, not by the light receiving intensity. Even if the lens surface is soiled by dust or any powdery material, there is little variation of sensing range. In addition, the sensor stably detects approaching objects at a fixed distance because the distance is sensed by the angle of received light.