the fact of the matter is that YES, we can hook up PNP and NPN transistors in MANY different ways and get them to work ...
BUT ...
most technicians reading this thread are not dealing with TRANSISTORS ... instead they're dealing with DC SENSORS and some brands/models of sensors might be marked:
(1) "PNP" or "NPN" ...
while other brands/models of sensors might be marked:
(2) "SINKING" or "SOURCING" ...
the figure below shows some information culled from the manual for the 1746-IV16 and 1746-IB16 DC input modules (used as examples) ... here's a link for anyone interested:
http://literature.rockwellautomation.com/idc/groups/literature/documents/in/1746-in027_-en-p.pdf
the information is taken from pages 21 and 22 (Adobe pages 21 and 22) ...
so once again, YES, you certainly can hook up PNP and NPN transistors in MANY different ways and get them to work – as long as the LOADS they're driving are ISOLATED ...
BUT ... (and here's the crux of the matter) ...
from a PLC technician's point of view, in MANY cases the LOADS are actually PLC INPUT MODULES – and in MANY cases those modules do NOT (I repeat) do NOT have isolated circuits ...
SO ...
to someone who doesn't already understand the concepts involved, it sort-of-kind-of sounds like some of you guys are saying that you can hook up "any old" type of sensor to "any old" type of module ... those of us who've been around for a while know that is definitely NOT the case – but the beginners who are reading this thread could easily come away with the WRONG conclusions ...
just to show how "perplexing" this simple topic can become, here's a story from "once upon a time" when I worked as a tech rep for an Allen-Bradley distributor ...
at one point in time the company computers were set up so that whenever a customer would order either one of these SINKING or SOURCING type input modules, the computer wouldn't allow the sales clerk to complete the order – until Gary or Kit or I got involved ... basically we had to call the customer and make SURE that he was ordering the type of module that he really needed ... this is one of those situations (life is full of them) where you have a 50-50 chance of getting it right – but it comes out WRONG at least 90% of the time ... the main idea was that when the wrong-type module that the customer had specified wouldn't work – they'd want to return it ... we couldn't sell it again – the seal had been broken and wires had been connected to it ... that's the reason for the extra "check and make sure" this is REALLY what the customer needs to work correctly with his other components ...
party on ...
.