It's important to set the photoelectric sensor's temperature to -40°C~70°C for reliable performance. It is necessary to provide these electronic components with a voltage of 0 to make them work in a circuit or system. It is generally considered that photoelectric sensors have a response time of 3ms. To make the photoelectric sensor work, you have to connect the 4 pins.