# My very first PLC



## Jlarson (Jun 28, 2009)

http://www.google.com/url?sa=t&rct=j&q=sink%20and%20source%20inputs&source=web&cd=1&ved=0CCsQFjAA&url=http%3A%2F%2Fwww.automationdirect.com%2Fstatic%2Fspecs%2Fsinksource.pdf&ei=PuigUpHeA8b3oATOrYGoCQ&usg=AFQjCNH8040fYkWmYQkulFPYyjBpdOIBMA&bvm=bv.57155469,d.cGU&cad=rja

Hope this link works.

In short:
Sinking I/O provides ground
Sourcing I/O provides a voltage


----------



## just the cowboy (Sep 4, 2013)

*Sink or Source*

A Sourceing device supplies power (High) to a device. A sinking device supplies a 0v (low) to a device. Watch out when it comes to inputs/outputs some PLCs word it funny.


----------



## EB Electric (Feb 8, 2013)

As my instructor said sinking is NPN and sourcing is PNP. It is basically changing where the switching is done, sinking it would go +24v to load to switch to ground, where as sourcing it would flow from +24 to switch to load to ground. Sinking card you need to use a PNP sensor with it, sourcing you use a NPN sensor. If you mix them up it will not work. This is what I have been told anyways.


----------



## nolabama (Oct 3, 2007)

....


----------



## nolabama (Oct 3, 2007)

EB Electric said:


> As my instructor said sinking is NPN and sourcing is PNP. It is basically changing where the switching is done, sinking it would go +24v to load to switch to ground, where as sourcing it would flow from +24 to switch to load to ground. Sinking card you need to use a PNP sensor with it, sourcing you use a NPN sensor. If you mix them up it will not work. This is what I have been told anyways.


What does NPN and PNP mean? Is it a type of instrument?


----------



## ponyboy (Nov 18, 2012)

It describes the order of material in a transistor. One sinks input and the other sources output


----------



## Jlarson (Jun 28, 2009)

NPN and PNP are the two types of bipolar junction transistors.


----------



## SteveBayshore (Apr 7, 2013)

Source=where the power for the loop comes from. If the PLC is sourcing, the instrument will not have power in the signal circuit without the connection to the PLC.
Sink=utilizing power. If the PLC is sinking, the field instrument, or a separate power supply, will be supplying the voltage to the control circuit.


----------



## nolabama (Oct 3, 2007)

SteveBayshore said:


> Source=where the power for the loop comes from. If the PLC is sourcing, the instrument will not have power in the signal circuit without the connection to the PLC.
> Sink=utilizing power. If the PLC is sinking, the field instrument, or a separate power supply, will be supplying the voltage to the control circuit.


This was the one I need. Thanks for this explanation. I understand now.


----------



## lefleuron (May 22, 2010)

Wow,

Now I am confused.:laughing:

Nola, I was taught long ago to remember it this way.

We both know current flows from negative to positive, we believe in the "Electron flow" theory.

BUT, there is another theory, you might remember "conventional flow" theory from school- thats where current flows from + to negative.

Just think conventional flow when dealing with sinking/sourcing. If its sourcing, its supplying the current (+), if it sinking current then its (-).

Generally, most inputs I deal with are sinking (I supply the 24 volts, and the PLC input works as the negative, or zero)

Outputs are generally sourcing, the output comes on and 24 volts flows from the PLC (source of the current) to my load.

REMEMBER, thats a general rule, and things can be opposite. sourcing input/sinking output- I dont know about others, but in my area its rare to see. I think thats used more across the big pond.


Worse comes to worse, DONT guess. Or you will be sorry, I know from experience.:laughing:


----------



## JRaef (Mar 23, 2009)

Here's the reality. Most PLCs allow you to chose between PNP or NPN. So it has only to do with the sensors you use, not the PLC itself. In fact it has only to do with DC sensors, like proxes or photo eyes, that must be powered somehow in order to function. For things like dry switch contacts, it makes almost no difference.

A) It doesn't make a realistic difference in 99.99% of applications. In that .01% of applications where there is a difference, technically NPN sensors (the devices in the FIELD) are slightly faster, as in microseconds. However if there is a chance that your signal wires can inadvertently go to ground, that situation will result in an NPN based circuit registering a false "High" logic. There are a lot of feelings about noise immunity as well, but the issues can be addressed separately, in fact SOMETHING about any potential noise issues must be addressed regardless of the sensor type, it's just a matter of WHAT you want to address. 

HOWEVER, if you are used to _*"I put power to my sensor, it sends a signal back to my PLC when it senses something"*_, then you want PNP. This is the way most people educated or trained in North America and Europe learn to think. NPN works by watching the sensor circuit all the time and if a signal does NOT come back, the object is sensed (logic goes High). In Japan (who then fostered a lot of other Asian technology systems) they tend to prefer NPN sensor logic. People can argue the finer points till kingdom come, but it's kind of like 50Hz vs 60Hz, there really is no right answer, it's more of just what you are used to working with.
*
So to that end, the reality is that when you go to purchase sensors** here in the USA**, your local distributor is FAR more likely to have PNP sensors on the shelf. If you are sending a machine to Japan however, they would prefer that you use NPN sensors, so that when THEY go to get a replacement, it's in stock.*

B) The only issue is that you cannot mix them, at least not in the same "card", or in this case because it's a "brick" PLC, you can't mix them on the entire PLC.


----------



## oliquir (Jan 13, 2011)

EB Electric said:


> As my instructor said sinking is NPN and sourcing is PNP. It is basically changing where the switching is done, sinking it would go +24v to load to switch to ground, where as sourcing it would flow from +24 to switch to load to ground. Sinking card you need to use a PNP sensor with it, sourcing you use a NPN sensor. If you mix them up it will not work. This is what I have been told anyways.


humm you mixed pnp and npn. on sinking input card we use npn sensor (it short to 0v when acitvated) on sourcing input card we use pnp sensor that sends 24v to card. On ac circuit it is always sourcing topology, if we used siniking topology we would cut the neutral for lights :blink:

i now always use sourcing when dealing with plc on both input and output side, it is easier to troubleshoot.


----------



## triden (Jun 13, 2012)

JRaef said:


> Here's the reality. Most PLCs allow you to chose between PNP or NPN. So it has only to do with the sensors you use, not the PLC itself. In fact it has only to do with DC sensors, like proxes or photo eyes, that must be powered somehow in order to function. For things like dry switch contacts, it makes almost no difference.
> 
> A) It doesn't make a realistic difference in 99.99% of applications. In that .01% of applications where there is a difference, technically NPN sensors (the devices in the FIELD) are slightly faster, as in microseconds. However if there is a chance that your signal wires can inadvertently go to ground, that situation will result in an NPN based circuit registering a false "High" logic. There are a lot of feelings about noise immunity as well, but the issues can be addressed separately, in fact SOMETHING about any potential noise issues must be addressed regardless of the sensor type, it's just a matter of WHAT you want to address.
> 
> ...



I disagree that there is no right answer. 

There are various reasons why you would want to use an NPN or a PNP output driver and I'll go over a few of them here.

First of all, the primary choice will come down to safety. 
When you have an NPN topology output with the load connected between the voltage source and the I/O card, the output just grounds the device to turn it on. Now if for some reason the output wire on your load becomes shorted to ground, the device will energize because it always has a voltage supplied to it. A PNP on the other hand sources the current to the load (supplies positive voltage if you will) because the load is always grounded. This is a much safer topology because if the lines to the load were to ever short to ground, the load will not turn itself on like with an NPN.

This is also where you get the terms high-side and low-side drivers. NPN being the low-side and PNP being the high-side driver.

The second concern when choosing between NPN and PNP is more of a design concern, and not a concern that any integrator will _usually_ have to worry about. To elaborate though, the silicon channel in an NPN device has a MUCH lower on resistance than an equivalent PNP device. This means that an NPN can drive higher current loads without voltage drop and heating (I2R) issues. PNP's are generally limited to about the half the current sourcing abilities of an NPN because of their internal construction.

I'll draw a picture to help you understand the safety and connection differences between high-side and low-side output drivers.



PNP outputs are much safer, although not as efficient. It's a trade-off as usually, but choose wisely.


----------



## JRaef (Mar 23, 2009)

triden said:


> I disagree that there is no right answer.
> 
> There are various reasons why you would want to use an NPN or a PNP output driver and I'll go over a few of them here.
> 
> ...


I don't happen to disagree with you on the details. But I know from experience that there are a LOT of people in Asia who will! That's why I made the comparison to 50Hz vs 60Hz. For me, it's a no-brainer. For the Germans I used to work for, I was completely wrong, 50Hz was far superior in every way. It was usually only the beer that eventually stopped the discussion by slurring our speech to the the point of being unintelligible.


----------



## dronai (Apr 11, 2011)

Alabama, when you say your "first PLC" are you just installing the I/O, or are you programming as well ?


----------



## oliquir (Jan 13, 2011)

it was true few years ago that npn sensor could drive larger loads, but now with new sensors they use mosfet inside and load is about the same for npn or pnp. a lot of sensor offer both ouputs. there is also universal sensors that works on 20-250vac or dc.


----------



## triden (Jun 13, 2012)

oliquir said:


> it was true few years ago that npn sensor could drive larger loads, but now with new sensors they use mosfet inside and load is about the same for npn or pnp. a lot of sensor offer both ouputs. there is also universal sensors that works on 20-250vac or dc.


I was talking about N and P channel mosfets even though I said NPN and PNP. Bad terminology, I know, but P channel mosfets still have about twice the internal resistance of their N channel counterparts.


----------



## triden (Jun 13, 2012)

JRaef said:


> I don't happen to disagree with you on the details. But I know from experience that there are a LOT of people in Asia who will! That's why I made the comparison to 50Hz vs 60Hz. For me, it's a no-brainer. For the Germans I used to work for, I was completely wrong, 50Hz was far superior in every way. It was usually only the beer that eventually stopped the discussion by slurring our speech to the the point of being unintelligible.


Ah, I suspected that's what you meant but I thought I'd post anyhow.


----------



## HARRY304E (Sep 15, 2010)

JRaef said:


> Here's the reality. Most PLCs allow you to chose between PNP or NPN. So it has only to do with the sensors you use, not the PLC itself. In fact it has only to do with DC sensors, like proxes or photo eyes, that must be powered somehow in order to function. For things like dry switch contacts, it makes almost no difference.
> 
> A) It doesn't make a realistic difference in 99.99% of applications. In that .01% of applications where there is a difference, technically NPN sensors (the devices in the FIELD) are slightly faster, as in microseconds. However if there is a chance that your signal wires can inadvertently go to ground, that situation will result in an NPN based circuit registering a false "High" logic. There are a lot of feelings about noise immunity as well, but the issues can be addressed separately, in fact SOMETHING about any potential noise issues must be addressed regardless of the sensor type, it's just a matter of WHAT you want to address.
> 
> ...



:thumbsup:


----------



## nolabama (Oct 3, 2007)

dronai said:


> Alabama, when you say your "first PLC" are you just installing the I/O, or are you programming as well ?


When I say first , I mean I have a job for it to do. I devised a method for it to switch said job, I have purchased parts, will draw the wiring diagram, draw the logic, program the unit and walk away from the darn thing. Knowing it is ever diligent in preventing the 2 am call out that I hate so much.


----------



## dronai (Apr 11, 2011)

nolabama said:


> When I say first , I mean I have a job for it to do. I devised a method for it to switch said job, I have purchased parts, will draw the wiring diagram, draw the logic, program the unit and walk away from the darn thing. Knowing it is ever diligent in preventing the 2 am call out that I hate so much.


 How many inputs and outputs ?


----------



## nolabama (Oct 3, 2007)

dronai said:


> How many inputs and outputs ?


Not very many. All I need is three I/O to do what I want it to do.


----------

