This Functionblock reads the diagnostic information from Ethercat-Master and tries to find out which Ethercat-Device has an error. In case of fixing the Error a automatic change to state OP will be done
The name of the device was written into the variable strSlaveName. If the problem fixed the Ethercat was automatic restarted.
You need for this program the library CXA_ETHERCATMASTER.
Step 1: Import the attached Functionblock
Step 2: Call the Functionblock
Because it is just an diagnosis the cycletime of this task can be slow.
In case of an error like break of Ethercat cable, the bit Topology is not OK is comming and the name of Slavedevice which is missing is shown.
You find more details how it works in the comments.