safety relays and PLCS
It is very important for safety, regulatory and legal reasons that you get this right.

Basics


First you must assume that your PLC could fail with an output on, off, or switching due to software or hardware issues.
You should, of course, put normal safety interlocks into your code but you do not rely on these for personnel safety.
You then hardwire (* see note) the safety circuits so that even if the PLC goes berserk the e-stop will always render the machine safe.


Monitoring

Your safety relay will have auxiliary contacts one of which can drive an input to the PLC so that the PLC knows the status of the safety circuit.

Safety wiring

Safety circuits now almost all use dual channels and monitoring. E-stops have two contacts that are forced apart (not sprung apart) when the e-stop button is pressed. Similarly guard door switches have two contacts and again the act of opening the door will force the contacts apart. If one channel fails to open on e-stop the other will make the system safe but the monitoring will prevent a reset. This forces the user to investigate the problem.

See my answer to Symbol or marking on safety relay for an in-depth of how a safety relay works.


The situation has changed rapidly over the last few years with safety rated logic controllers. These are beyond the scope of this answer.





  The relays are controlling 4 estops and 12 guard door sensors ...


No. The e-stops and guard door switches are controlling the safety relay or, if you prefer, the safety relay is monitoring the switches. The safety relay is controlling the load to ensure energy (electrical, pneumatic, hydraulic, etc.) is de-energised when required.

Related: my answers to the questions below may be helpful.


safety relays and PLCS
Symbol or marking on safety relay
Self Checking Circuit
Specifying relay for breaking injection molding control circuit