Photoelectric Sensor Explained with Practical Examples