You should set the photoelectric sensor's temperature to -25°C~55°C for reliable performance. In order for these electronic components to work, they should be given 12V~24V voltage. Sensors with a response time of 1ms are considered ideal. The photoelectric sensor must have the 4 pins connected to work properly. Photoelectric sensors should have their supply voltage set to 0.