How to set the process priority for EtherCAT

Topics about the Software of Revolution Pi
Post Reply
Wang
Posts: 44
Joined: 12 Nov 2020, 14:28

How to set the process priority for EtherCAT

Post by Wang »

Hi, we are using RevPi Connect+(CODESYS) for both EtherCAT and Ethernet/IP communication. When the connection established, we noticed that:
1. EtherCAT communication error count keeps increasing.
2. Ethernet/IP communication lost connection sometimes.
We tried to solved the problem by reset the process priority for EtherCAT communication.
How do you think of our solution?
And when we set them to -20, the highest priority, it turns to be communication error, as the image attached. We think it is because the CPU is overloaded and the piControl doesn't have enough resource to work.
Is our thinking correct?
And the problem is, we don't have any experience on it. Would you please kindly share your insights on what priority we should set for it?
And also, if possible, would you please kindly advise how to solve the Ethernet/IP disconnect problem too?

Many thanks in advance.
Wang
Posts: 44
Joined: 12 Nov 2020, 14:28

Re: How to set the process priority for EtherCAT

Post by Wang »

The images are attached here:
Attachments
image006.png
image006.png (152.03 KiB) Viewed 6019 times
image005.png
image005.png (302.31 KiB) Viewed 6019 times
User avatar
dirk
KUNBUS
Posts: 2174
Joined: 15 Dec 2016, 13:19

Re: How to set the process priority for EtherCAT

Post by dirk »

Dear Wang, please try with default bus cycle task, priority 1, 1 ms for both EtherCAT and EtherNet/IP Scanner
Bus cycle task, priority 1, 1 ms

CODESYS Online Help

Bus Cycle Task priority is handled by Codesys itself from the values specified in Global Task Configuration.
Wang
Posts: 44
Joined: 12 Nov 2020, 14:28

Re: How to set the process priority for EtherCAT

Post by Wang »

Hi Dirk,

Thank you for your reply.
We tried with your suggestion:
1st Step: only go with EtherCAT
1. no process priority reset in kernel scheduler
2. priority 1, 1ms for EtherCAT only in CODESYS only
we planned to set priority 1, 1ms for Ethernet/IP as the 2nd step, only if 1st step goes well.
But unfortunately, even without Ethernet/IP, a few minutes after RUN, the codesyscontrol process terminated abnormally. We tried several times, the results are all the same.
Would you please kindly share your insight on this with us?

Many thanks in advance!

Best regards,
WANG
User avatar
dirk
KUNBUS
Posts: 2174
Joined: 15 Dec 2016, 13:19

Re: How to set the process priority for EtherCAT

Post by dirk »

We need to reproduce the error with a test build.Therefore we still need information from you:
Can you send us a RevPi SOS Report?
Can you provide us the Codesys project you used to invoke this error?
Sure we can share this information via Email I'll contact you.
Post Reply