Question: why use pnp or npn?
Answer: PNP sensors produce a positive output to your industrial controls input, while NPN sensors produce a negative signal during an “on” state. If you learned to use sensors before gaining an understanding of transistors themselves, it would be easy to think that a PNP transistor is controlled with positive voltage.