We have been performing a set of performance tests with Codesys EtherCAT master and SoftPLC running on an imx8 based computer. We have tried this both on a Compulab iMX8, and the Advantech EPC-R3720 iMX8Plus. Both computers run our own distribution of Linux.
We are running the Codesys SoftPLC as a high priority process on the operating system. We have tried both FIFO and Round Robin scheduling strategies. So far, we have been able to run the EtherCAT bus at around 200 microseconds. When we try to reduce the speed to say, 100 microseconds, one of two things happens:
1. Sometimes the EtherCAT master does not run at all. In this case, you look at the EtherCAT master statistics, and you can see packets sent, no packet loss, but the bus is not operating at all. You cannot read or write variables.
2. At other times, the bus runs, but there is a very large packet loss, resulting in us missing some of the values we wanted to read. You can see this happening in one of the screenshots attached.
While the EtherCAT master struggles to run at these frequencies, the PLC logic runs without an issue at 10 microseconds cycles.
We have also tried to run the SoftPLC with the real time extensions, although the system proved unstable and crashed several times when doing so. We are still working towards solving this problem.
Our question is, in your experience, what type of EtherCAT cycles are achievable using the CodeSys SoftPLCs? Are there any hardware or operating system considerations we need to consider if we are aiming for very fast EtherCAT cycles?
We have been performing a set of performance tests with Codesys EtherCAT master and SoftPLC running on an imx8 based computer. We have tried this both on a Compulab iMX8, and the Advantech EPC-R3720 iMX8Plus. Both computers run our own distribution of Linux.
We are running the Codesys SoftPLC as a high priority process on the operating system. We have tried both FIFO and Round Robin scheduling strategies. So far, we have been able to run the EtherCAT bus at around 200 microseconds. When we try to reduce the speed to say, 100 microseconds, one of two things happens:
1. Sometimes the EtherCAT master does not run at all. In this case, you look at the EtherCAT master statistics, and you can see packets sent, no packet loss, but the bus is not operating at all. You cannot read or write variables.
2. At other times, the bus runs, but there is a very large packet loss, resulting in us missing some of the values we wanted to read. You can see this happening in one of the screenshots attached.
While the EtherCAT master struggles to run at these frequencies, the PLC logic runs without an issue at 10 microseconds cycles.
We have also tried to run the SoftPLC with the real time extensions, although the system proved unstable and crashed several times when doing so. We are still working towards solving this problem.
Our question is, in your experience, what type of EtherCAT cycles are achievable using the CodeSys SoftPLCs? Are there any hardware or operating system considerations we need to consider if we are aiming for very fast EtherCAT cycles?