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

Multiple masters on same computer using same working counter #95

Open
hstroetgen opened this issue Jan 17, 2023 · 3 comments
Open

Multiple masters on same computer using same working counter #95

hstroetgen opened this issue Jan 17, 2023 · 3 comments

Comments

@hstroetgen
Copy link

hstroetgen commented Jan 17, 2023

I use pysoem for an end-of-line test system. This tester uses one master to control Beckhoff terminals with digital/analog IO and the second master controls the DuT (device under test, a servo drive ).
When I run my test cases (two instances of my master are created), I can observe that the working counter of the master controlling the Beckhoff terminals becomes wrong as soon as something happens to the DuT (power cycle, state change, etc.).
I was able to solve the problem by installing my master application with a different name in parallel to the original master in my virtual environment (ugly solution).
Is it possible to fix this? Is this related to pysoem at all?

@bnjmnp
Copy link
Owner

bnjmnp commented Jan 17, 2023

Hi @hstroetgen, I saw that coming one day. The check if multiple instance of the master class are working properly was on my todo list, with the hope it would work right away, or this would barely be needed by users, but I lived with the fear that it doesn't work.
The SOEM library is supporting it, so this should not be the limiting factor. I will look into it the coming weeks, I planned to further work on PySOEM anyway.

@hstroetgen
Copy link
Author

Hey @bnjmnp, thank you very much! That's great news.

@bnjmnp
Copy link
Owner

bnjmnp commented Feb 12, 2023

I did some tests on this, but until now I could not see any issues when using 2 network interface cards at the same time.
One time I basically created a Python script similar to "basic_example.py", where I use two instances of the "BasicExample" class and then let both run functions run in a tread. That seemed to work fine.
From my experience, it sometimes helps to increase the timeout argument given to receive_processdata() when having issues with the process-data working counter.
Anyway I will try to further investigate the multi master use case.

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