-
Notifications
You must be signed in to change notification settings - Fork 56
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
ScanDevices stucks in endless loop #57
Comments
So PREOP is never reached? The only changed lines are: https://github.com/Apollo3zehn/EtherCAT.NET/blob/master/native/SOEM_wrapper/soem_wrapper.c#L562-L566 |
Yes PREOP is never reached, if I comment out these changed lines of code its working ;) |
I found the solution, it is required to check for EC_STATE_PRE_OP | EC_STATE_ACK instead of EC_STATE_PRE_OP alone. I´ll publish an update soon. |
Should be fixed now with commit 4c8a647 :-) Sorry for the confusion. |
@Apollo3zehn I just recognized your fix increased the master start time significantly. I currently have four slaves and it now takes approx. 25s compared to 5s before. If I change the code like this, master start time goes back to 5s. The differece is to explicitly call ecx_writestate(context, 0) and only check for EC_STATE_PRE_OP. Do you think it's a proper solution ?
|
I have also noticed an increase in startup time but I thought it was caused by my network card driver. I´ll check that tomorrow. |
We could also skip the automatic state change in SOEM ( https://github.com/OpenEtherCATsociety/SOEM/blob/d9261e801d109eaf99b94907b6d24bac4a123968/soem/ethercatconfig.c#L593) and do it ourselves later. The thing is that I don't know why EC_STATE_ACK is required. I have slaves devices available for testing on monday, unfortunately not tomorrow. |
I think I found the issue: At the end of Back in Opposed to that, Therefore my previous solution could not work and instead it should probably look like I did it here: 2f1ee3c |
Great, thank's for solving this issue, now the performance is much better! Yes this works for me. |
The adapted ScanDevices function stucks in endless loop on my current configuration. I have to investigate further to check the root cause, but it seems commit 9ad66bb Wait for PREOP before accessing EEPROM broke something on ScanDevices logic. If I revert to commit b393404 all is working as expected ... any idea?
The text was updated successfully, but these errors were encountered: