To make sure the photoelectric sensor works, set its temperature to zero. In order for these electronic components to work, their voltage must be set to 10V~30V. For photoelectric sensors, a response time of 1ms is considered optimal. The 4 pins on the photoelectric sensor need to be connected for it to work.