Sensor pin output help

Hello, I am new to here. I just want to figure out this sensor pin arrangement. Please someone help me to understand this. This has 4 pins. But according to the datasheet it has 3 wire. Those are black, blue, white and brown. I need to wire this sensor. What wires i should use? Thank you.
 

Attachments

The datasheet shows the connection diagram (see attached).

That sensor is a 4-wire PNP sensor. The difference between 3-wire and 4-wire is that 4-wire provides both normally open and normally closed outputs, while 3-wire provides only one of these (either NO or NC). You will likely only need one of these outputs for your application. Perhaps this article will provide a little more information on wiring for your needs:
https://automation-insights.blog/2018/02/14/an-easy-way-to-remember-pnp-and-npn-sensor-wiring/
 

Attachments

The datasheet shows the connection diagram (see attached).

That sensor is a 4-wire PNP sensor. The difference between 3-wire and 4-wire is that 4-wire provides both normally open and normally closed outputs, while 3-wire provides only one of these (either NO or NC). You will likely only need one of these outputs for your application. Perhaps this article will provide a little more information on wiring for your needs:
https://automation-insights.blog/2018/02/14/an-easy-way-to-remember-pnp-and-npn-sensor-wiring/
Thank you very much. It is clear now.
 
Top