-
Notifications
You must be signed in to change notification settings - Fork 707
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to perform both PDO and SDO communication simultaneously without affecting the PDO communication thread cycle #885
Comments
Currently, it seems that the blocking is caused by ecx_waitinframe_red. Both PDO and SDO use this function to wait for data to arrive. |
SOEM supports multiple threads. So you should be able to run PDO in one thread and SDO in another, while not blocking each other. However this depends on the performance of scheduler. What OS are you using, and what is the scheduler policy? SOEM works best with real time scheduler, and the PDO thread should have a higher priority than the SDO thread.. |
Thank you for your detailed reply. I am using a Linux system with a real-time kernel, and I created a real-time thread for PDO communication using osal_thread_create_rt. I also modified the sched_priority within this function to a higher value. For the SDO communication thread, I used osal_thread_create to create it. I checked the thread priorities, and the PDO thread's priority is clearly higher than the SDO thread. From the Wireshark data, I can see that when there is jitter in the PDO communication, the first few data frames are related to SDO. Additionally, from the system call interrupt information, it seems that the SDO thread interrupts are affecting the PDO thread. |
I think this issue is similar to #604 Kind regards |
Hi,
I am currently using SOEM for ecat communication testing, and my requirement is for SOEM to run with a 1ms cycle. It performed well in the initial tests, but I have a thread that needs to periodically read and write some SDOs. After adding this thread, the ecat thread gets blocked.I noticed that SDO read and write operations are blocking. Do you have a proper method to prevent the ecat thread from being blocked due to SDO operations?
The text was updated successfully, but these errors were encountered: