Joel said...
"Yes, we have machines with connection like that. This is for a safety purpose, the operator should close the 10 doors in able to operate the machine."
If it is a small machine and all of the doors are within easy reach or view, then yes, you can do it as simply as Joel said.
As a safety device, the ten-door-series-circuit should either enable or disable a physical power relay (the one that supplies power to the output side of the PLC).
And there should be at least some kind of indication that the safety circuit is not made. That is, there should be an Input that indicates "Safety Circuit is Closed". It's always nice to know WHY something won't do what it's supposed to do.
The program should, of course, condition its behavior based on the state of the Safety Circuit. That is, do not disable the power to the PLC. Instead, have the program respond to the fact that the Safety Circuit is - or has just - opened. While the open Safety Circuit causes the output power to drop out, the lost Safety Circuit Input signal causes the program to adjust itself accoringly.
When the Safety Circuit signal is restored, do you want the program to simply "resume" from where it left off?
Maybe YES, maybe NO.
Or, should the system require a re-start process of some kind?
Maybe YES, maybe NO.
The "CLASSIC" answer is... it DEPENDS!
So, all of that is fine for a wee-small system - one where you can easily "see" the "doors" (these could just as easily be E-Stops).
What if the system is not-so-wee or maybe it's friggin' huge!
It might take an hour to make the rounds to check all of the doors or E-Stops. All because you don't know which door or E-Stop is preventing the process from running.
Certainly you can have the E-Stop or door wired so that a local light indicates "ajar" or some such. But you would still have to at least begin to make the rounds to find it.
The larger the system, the more cost effective it is to have each door or E-Stop provide a single unique input to the PLC (in addition to the series circuit that controls the output power relay).
Then, if the system won't run, the status of each E-Stop and/or door can be observed on an HMI screen - or, at least, on the input indicators at the PLC.