In order for the photoelectric sensor to work reliably, it should be set to -25°C~55°C degrees Celsius. This electronic component must have a voltage of 0 in order to function in a circuit or system. Ideally, photoelectric sensors should respond within 5ms. To make the photoelectric sensor work, you have to connect the 2 pins.