Back to top

Restarting the PxMM Motion Engine when an Ethercat Fault occurs

The status of the Ethercat/motion Engine can be monitored with the MLMotionStatus function block.

In a Project with the PLCopen Motion Engine, if the Ethercat Network goes down due to an Ethercat Network fault, the system can be restarted and any drive and controller errors cleared with the following code that:

- First resets the Motion Engine fault

- Then restarts the Motion Engine and Ethercat Network

- Then clears the Controller  (PxMM) fault

- Then clears any drive side  faults that may be active. A One second timer is added to give the drives time to clear the fault before enabling. As an alternative, the ErrorStop output from the MC_ReadStatus  function block for each axis could be monitored. 

- and finally will re-enables the drive by setting  Closeloop = 1, which is tied into the MC_Power function block  (example below from a KAS IDE 2 axis Template). In another application you may want to re-enable per the overall architecture of the code.

EXAMPLE: 2 axis application


Note: When restarting the Ethercat Network, re-executing other initialization code that create axes and cam profiles should not be done as this can adversely affect PxMM operation.

In the attached example project, the green Restart System button was added to the Control Panel and tied to the RestartSys variable













Dome's picture
Ia this logic suitable for firmware 2.11. With revision 2.10 all works fine, but with 2.11 PCMM generate an E21 error code.
Is it any difference in the behavior between revision 2.10 and 2.11.

Is it any suggestion about how to solve this trouble?
Thank you
cwontrop's picture

You are getting an E21. What was done to cause the E21? Did you do anything to eliminate the fault condition, before trying to restart the network?

For your information a short test was just conducted with  KAS version;  2. 11 Build 2, 11, 1, 69452 and it did not get a E21 error with the following test: Starting the example project, disconnecting the EtherCAT cable between drive's 1 and 2. then getting an E30 error,then  reconnecting the cable, then pressing the green Restart System button in the KAS Project Control Panel, then observing that the E30 when away and there were no other errors.

Dome's picture
Procedure to test the routine was as for your desription.
Starting point was : PCMM no errors.

We did the lost of EtherCat cable
We saw the E30
We reconnect cable
We press the Resart Push button (we make an hardware one as we are having the pannel).
Error went away.

Moreover, We repeated the loop af failure/Restart several times (3) with a waiting time in between (4min.).
All appered good... but
at 4th time, during Restart System we get the E21 error.

During the day, we had done that simulation several times.... but all after a multi cycle ended with E21.

I am wondering if there is something that I can check in my system as I suppose that the routine itself works...

Thanks for your help.