Questions about python-opcua #1483
Replies: 3 comments
-
|
Hey ho,
first things first: This library is deprecated #1475 , it would be better to swtich to opcua-asyncio. PLCs are getting more and more into OPC-UA and it's mechanisms (like Subscriptions, History etc.). Yes, the session timeout after (I think it was around 1hr here as default) time x is wanted behaviour. Normally in such a case a reconnect procedure would happen. AFAIK we still haven't got a clean way (neither here nor in asyncua), just a workaround. But before we dive in deeper discussions, you may want to switch to opcua-asyncio, since there have been a lot of fixes being made. :) |
Beta Was this translation helpful? Give feedback.
-
there is a method to read many nodes, just call it every X seconds The timeout stuff should not be any issue, you probably have some setup issue on PLC or client side. We are staying connected for months against beckhoff PLCs here. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks got it. Thanks again. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I'm just using for the first time python and this library.
I made a simple script that connect to more than 1 server, manage connection and reconnection and a coroutine that sometimes periodically will get values from a Siemens PLC.
Seems to be just 10 int variables for each client, is it better to do a subscription? or get_values? at the moment i'm using read_value() from nodes childs.
Also i noticed that if the session is in timeout i cannot use activate_session(), i'm gettin BadSessionIdInvalid.
Does the server close the session and client need to connect again if its get timeout?
Also seems that the PLC has its own timeout around 10 seconds (i didnt watch about settings in tia portal), if i would get data every minute should i write/read a variable every 10 second to keep session alive?
Thanks a lot.
Beta Was this translation helpful? Give feedback.
All reactions