Interfacing optoelectric proximity sensor with arduino

The glowing LED denotes that the hardware is properly connected.

No, it doesn't. It means that the LED has power. Do NOT read more into it than that.