Port: 30000 already in use with multiple connections on Linux #424
Replies: 3 comments
-
Hi can you please provide a sample of your code that can reproduce the error, thanks. |
Beta Was this translation helpful? Give feedback.
-
Here's my python code:
And here's the Plc stuct ST_LinuxData:
And my PLC.MAIN:
Everything works fine as long as I have TwinCAT open on a laptop, however, as soon as I open the TwinCAT on PLC or connect an HMI as a new ads client, I get 'Port: 30000 already in use as 0x7ffe9a7eba50' error. |
Beta Was this translation helpful? Give feedback.
-
I think this may be linked to #422 and #423 as I just tested this on windows and works fine there. You may need to come up with a workaround for this as its an underlying ADS issue, see the discussion threads. It may also be worth trying a different threading style, currently you're missing the self.cmd() method from the main thread, but it's using the ADS connection on the second thread. You are better off having one ADS connection per thread, this may solve the issue. |
Beta Was this translation helpful? Give feedback.
-
I have a class with a plc member. I have a thread that sends a counter to MAIN.iCamClk. I have another node which writes to a struct. The codes works well without the clock thread but as soon as I try to run the thread I get:
Beta Was this translation helpful? Give feedback.
All reactions