How to Wire AS to IRC5? automatic stop.

I would like to know how to wire AS to IRC5?  As from (a door interlock or light curtains)

I know it is in connector X5 and it is in positions (12,7) and (6,1). But I am not sure how excatly should I wire them. 

and can I only wire one chanel or I have to wire both chanel?

I also have a question, Can I use only safety relay or I should use safety relay plus a contactor?
Thank you in adavnce