In my opinion, you don't need any code to handler EtherCAT error, this is done by OpconBase, if EtherCAT state is not ok, all object will receive Cancel signal from OpconBase or by SafetyAddon, and your object will execute OnExecCancel, normally the unit object would call Reset method of peipheral object, you only need put some code in Reset method of peipheral object to such as reset _step variables.
... View more