papejo said:
Hi, thanks for the answer, I’m a beginner, this would be my third job of this kind, about the diagram, i did take a shortcut wiring the five sensors, I shouldn’t just draw one sensor but the five sensors instead , you are right it might confuse someone...
OK, that's fine and thank you for understanding why I brought it up. Sometimes a small but incorrect detail, or an omission, can make a world of difference in this game.
papejo said:
...Is it ok if configure all inputs as npn including the push buttons, or do I wire the push buttons as pnp
You sound like you are looking for definitive answers when really there are none. All you can do is assess the advice given, which will undoubtedly vary on this subject, and come to your own conclusions.
It is OK to configure all the inputs for NPN devices if that is the signal type that must be connected directly to the inputs.
The push buttons are not biased. They are merely switches. So you can choose to switch negative or positive and both methods will work. You do not have to wire the push buttons the same as the sensors.
Now that you know that you can do the above the next question is should you?
Some earlier PLCs used NPN I/O exclusively but due to growing concerns over safety risks the industry has adopted, in the main, the PNP option, or at least the ability to configure for both. This is because NPN I/O will inadvertently drive the load during a short to ground of the signal wire which may create a risk or produce undesired results. Whereas PNP I/O will short positive to ground and pull down the supply, preventing the load from being driven. This is based on the premise that ground shorts on the signal wire tend to be more prevalent than shorts to positive.
So, in that regard, we could say that using PNP I/O is less of a risk than using NPN I/O but there is still nothing to stop you using either.
Should you mix types in the one system?
Again, this is a matter of opinion, preference, or specification for many of us. But sometimes you just have to deal with what is before you and cannot dictate either way. So a mix may be inevitable. If designing from scratch and you can choose then I would recommend PNP I/O for less risk, better standardisation, etc. But it really depends on what systems or processes you are dealing with. Some electronics are going to use NPN logic specifically and there is nothing you can do about that when you run into it.
You can always interpose undesirable signals to convert them to the logic you require or prefer so as to keep to a standard and not have them mixed. Having differing common polarities on the same I/O module is not ideal and clear labelling and schematics is highly recommended in such cases. Another option, where a mix cannot be avoided, is to use isolated modules for the opposing signals so as to segregate PNP & NPN I/O. But that costs money and small systems often cannot justify the use of a separate module for say a few NPN inputs in a primarily PNP input system.
Both are acceptable methods and both will work but my experience is that PNP I/O is more the industry norm nowadays and NPN I/O, where there is a choice, is less desirable from a safety point of view. Which you should use and whether or not you should mix them is, at the end of the day, really up to you.
Regards,
George