Skip to content
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

SDO and PDO parallel execution #867

Open
nkt17 opened this issue Oct 25, 2024 · 4 comments
Open

SDO and PDO parallel execution #867

nkt17 opened this issue Oct 25, 2024 · 4 comments

Comments

@nkt17
Copy link

nkt17 commented Oct 25, 2024

Good day everyone.
I need periodically request not mappable object by SDO. So the question occured. Can we parallel execute next actions?

ec_send_processdata();
ec_receive_processdata(EC_TIMEOUTRET);

and
2.
ec_SDOread(1, index, subindex, FALSE, &size1, &v1, EC_TIMEOUTSAFE);

@nkt17
Copy link
Author

nkt17 commented Oct 25, 2024

Also when i'm trying to request object by SDO sometimes there is incorrect data (correct data is 33282, incorrect data -1527169000)

image

@ArthurKetels
Copy link
Contributor

Yes, PDO and SDO can function perfectly next to each other. But make sure they are running in different threads. Also check the return value of any SDO function, they might fail. And when it fails check the error message that is stored in the error list.

@nkt17
Copy link
Author

nkt17 commented Oct 27, 2024

Yes, PDO and SDO can function perfectly next to each other. But make sure they are running in different threads. Also check the return value of any SDO function, they might fail. And when it fails check the error message that is stored in the error list.

Good day. Thanks for response.
I removed lock_guard to allow PDOs and SDOs execute at the same time:
image

I use this method to request parameters on the next photo (right values).
image

On removing lock_guard all the parameters became wrong (result on the next photo)
image

@ArthurKetels
Copy link
Contributor

OK, but did you do it the way I instructed? You do not show any of your code or a wireshark trace.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants