Unless you already have Quality (Fail/OK) BITs in the PLC functions you have to program a "heartbeat".
PLC "A" Turns a Bit to 1 in PLC "B" which resets it to 0.
When this BIT stays unchanged for a certain amount of time, then you have a com. failure.
Do the same thing from B to A.