EtherCAT issue when using Codesys 3.5.15.0 on RevPi Connect

Topics about the Software of Revolution Pi
Post Reply
jkilburn
Posts: 1
Joined: 19 Sep 2019, 16:59
Answers: 0

EtherCAT issue when using Codesys 3.5.15.0 on RevPi Connect

Post by jkilburn »

I have recently been in contact with Codesys concerning an issue I am having with Codesys 3.5.15.0 running an EtherCAT master on a RevPi Connect.

The Codesys runtime starts out fine, but after a while something strange happens.
The symptoms are
1. Some small amount of packets are lost as observed in Codesys IDE EtherCAT master status (this morning I viewed a total of 59 packets lost out of 19 million)
2. In the Codesys IDE, all of the EtherCAT slaves start to cycle from INIT to OPERATIONAL, this never recovers - only recovers after warm boot of application
3. During the same time that the EtherCAT slaves appear to be cycling from INIT to OPERATIONAL, the IO is still working - I can observe outputs that I set to cycle at 100ms still switching correctly

After talking at length this morning with Codesys support , we believe that the issue lies in the priority of the Ethernet IRQ. Their (Codesys) thoughts were that the ethercat frames were returning late to their driver IODrvEthercat. We are not familiar with the IRQ associated with the ethernet hardware on the RevPi (different from the stock Raspberry Pi). We would like to change the priority of that IRQ.

What is the IRQ associated with eth1 interface on the RevPi connect and how could I adjust such that the priority is matching Codesys runtime - currently 20?

Thanks,
John
User avatar
dirk
KUNBUS
Posts: 1926
Joined: 15 Dec 2016, 13:19
Answers: 4

Re: EtherCAT issue when using Codesys 3.5.15.0 on RevPi Connect

Post by dirk »

Hi John, you may change the priority of a real time process using the command "chrt". If you don't need the PiBridge then you may also lower those processes. Here in this post you may find more information.
Post Reply