For reliable performance, set the temperature of the photoelectric sensor to -40°C~70°C. For photoelectric sensors to work, they have to be at -40°C. For reliable operation, a maximum operating temperature of 70°C is required. Connecting the 2 pins is necessary for the photoelectric sensor to work properly.