To make sure the photoelectric sensor works, set its temperature to zero. If you want these electronic components to work, you need to apply 10V~30V. The ideal response time for a photoelectric sensor is 300μs. Connecting the 5 pins is necessary for the photoelectric sensor to work properly.