I wrote this up earlier this morning and then got side-tracked. Ron posted while I was... doing other things...
Any way... Ron is right.
Rodrigo...
Here's a little story... in terms of the question... as you asked it..
So... I'm making a new input run. I'm installing a sensor. I find that all I have is the sensor (the sensor has a quick-disconnect). I forgot to bring the mini-euro-quick-disconnect-cable-thingee with me.
I call down to the shop. You pick up the phone. I explain the situation. You say, "Sure, I'll bring up the cable... Do you want the 'PNP' kind or the 'NPN' kind?"
After a pregnant pause... I say... "Yes.... bring one of each... and then you can show me which one I should use."
While I'm waiting, I wonder if you keep the "NPN-Cables" stored near the spools of DC-Wire and the "PNP-Cables" stored near the spools of AC-Wire... or, vice-versa?
.
.
.
.
.
Rodrigo...
I've got a box with a couple of dozen sensor cables. Some are 3-pin/3-wire, 4-pin/4-wire, 5-pin/5-wire. None of the cables are marked as being "NPN" or "PNP" specific.
They are simply, multi-conductor cables with a 3-, 4- or 5-pin connector on one end.
If the connector fits the sensor, there ya go.
Now all you need to know is...
- the identity of the pins AT the sensor (function - sensor pin#)
- the identity of the pins/wires IN the connector (connector pin# - wire color)
Example:
SENSOR SENSOR PIN CONNECTOR WIRE
TYPE PIN# FUNCTION PIN# COLOR DESTINATION
------+------+----------+----------+-------+--------------------+
NPN 1 PS(+) 1 BRN PS (+)
2 NotUsed 2 YEL ------
3 PS(-) 3 BLU PS (-)
4 Output 4 BLK Sourcing PLC Input
------+------+----------+----------+-------+--------------------+
PNP 1 PS(+) 1 BRN PS (+)
2 NotUsed 2 YEL ------
3 PS(-) 3 BLU PS (-)
4 Output 4 BLK Sinking PLC Input
------+------+----------+----------+-------+--------------------+
Each Sensor-Pin corresponds to a "function".
Each Sensor-Pin/Function corresponds to a Connector-Pin.
Each Connector-Pin corresponds to a Wire Color.
Each Wire-Color corresponds to a particular destination.
Notice that the only difference is in the destination. In the chart above, the destination is determined by the configuration of the field device (NPN or PNP). ACTUALLY... the destination type determines the required field device type!
There are other possible configuration combinations. The drawings that Eric pointed to indicate all of the possible NPN & PNP sensor connections.
The question, as posed, has nothing to do with the way NPN works versus how PNP works.
Now... if what you are actually talking about is installing a cable (with molded connectors on both ends) between a sensor and something like a profibus I/O Module and that module "expects" an "NPN" sensor... but you have a "PNP" in the field... Now we're talking about a horse of a different color! We might actually be talking about Zerbas.