- Posts: 26
- Thank you received: 0
Online Forums
Technical support is provided through Support Forums below. Anybody can view them; you need to Register/Login to our site (see links in upper right corner) in order to Post questions. You do not have to be a licensed user of our product.
Please read Rules for forum posts before reporting your issue or asking a question. OPC Labs team is actively monitoring the forums, and replies as soon as possible. Various technical information can also be found in our Knowledge Base. For your convenience, we have also assembled a Frequently Asked Questions page.
Do not use the Contact page for technical issues.
- Forum
- Discussions
- QuickOPC-UA in .NET
- Reading, Writing, Subscriptions
- UA parameters corresponding to DA parameters
UA parameters corresponding to DA parameters
- I-Tecnology
- Topic Author
- Offline
- Elite Member
You're right, the problem is on the first read, if PLC is not conncted when I start the application.
I will try to move (carefully) parameter on the OPC server side.
Thank you
Please Log in or Create an account to join the conversation.
The two timeouts - the one for the communication between the OPC UA client and the server, and the other for communication between the OPC server and the PLC - have very different purpose, and one cannot safely stand for the other.
If you shorten the OPC UA-level timeout in order to get "faster response" in case of communication problems, here is what will likely happen: The UA client side will abandon the pending request sooner, but it will not be cancelled on the UA server. The server will continue waiting for the value from the PLC. Further requests to the server, if they come "too soon", will have to wait until the outstanding requests are finished, make them to take even longer(!). And the number of uncompleted requests may start rising inside the server, causing further problems such as memory increase, queue overflows etc.
Suggestions to handle your issue properly depend on the application, but in general they are:
- Whenever possible, use OPC subscriptions instead of repeated Reads.
- Set the timeout for communication between the OPC server and the PLC to the right value.
- If you have to use the Reads, set the MaximumAge in the UAReadParameters (that you can pass to the Read) to a value that would allow the server to provide you the value from its cache in usual case (and, if needed and supported, configure the server to poll the value periodically for you). In fact, default value for MaximumAge already asks the server to give data form the cache anyway, so I am a bit surprised that your calls need to wait for the PLC, but it is possible that either you have changed the MaximumValue, or that the issues arise on the first Read when obviously there is nothing in the cache, or that the server does not interpret the MaximumAge correctly.
Best regards
Please Log in or Create an account to join the conversation.
The timeout value you are looking is most likely the OperationTimeout on the OPC UA service level. There is no configurable property for it in QuickOPC. It is possible to change it but you must go quite deep. To do that, read opclabs.doc-that.com/files/onlinedocs/QuickOpc/Latest/User%2...plication%20Configuration.html . In short, you need to create two XML config file AND change the value of the ConfigurationSources property.
For convenience, I am attaching the configuration file for OPC UA SDK that we are currently using inside QuickOPC. Look for <OperationTimeout> under <TransportQuotas>. Currently it is 120000 milliseconds (2 minutes).
Note that by shortening this timeout too much you can cause some otherwise correctly performing operations to appear failed.
Best regards
Please Log in or Create an account to join the conversation.
- I-Tecnology
- Topic Author
- Offline
- Elite Member
- Posts: 26
- Thank you received: 0
Please Log in or Create an account to join the conversation.
Are you connecting
a) directly to a PLC that has an OPC UA server embedded in it, or
b) are you connecting to an OPC UA server on (your own or) a separate box that is then in turn connecting to the PLC?
Because, certainly in the later case, I would argue that the right place to tune the timeouts would be on the OPC UA server, if the communication is issue is *between the OPC UA Server and the PLC*.
Regards
Please Log in or Create an account to join the conversation.
- I-Tecnology
- Topic Author
- Offline
- Elite Member
- Posts: 26
- Thank you received: 0
when I try to connect to plc with multiple object and plc is not present, I have to wait much time before all timeout will end.
which is the timeout period to change to accept a missed comunication and go on?
I'm using UA client 5.51.465.1.
Best regards
Please Log in or Create an account to join the conversation.
For all the hold periods, there is one common equivalent. It is in a (static) EasyUAClient.AdaptableParameters.SessionParameters.HoldPeriod. When a EasyUAClient ahs Isolated=true, then use easyUAClient.IsolatedParameters.SessionParameters.HoldPeriod.
There is no equivalent for UpdateRates.ReadAutomatic, the EasyUAClient doe snot have that behavior at all.
For timeouts, there are multiple settings that get combined together, and you cannot influence them in "one go" as in OPC DA. The most important is probably EasyUAClient.AdaptableParameters.SessionParameters.SessionTimeout .
Regards
Please Log in or Create an account to join the conversation.
- I-Tecnology
- Topic Author
- Offline
- Elite Member
- Posts: 26
- Thank you received: 0
are there any general parameters to set with OPC UA?
With OPC DA I used this parameters:
easyDaClient.InstanceParameters.HoldPeriods.TopicRead = ...
easyDaClient.InstanceParameters.HoldPeriods.TopicWrite = ...
easyDaClient.InstanceParameters.HoldPeriods.ItemDetach = 1000;
easyDaClient.InstanceParameters.HoldPeriods.ServerDetach = 1000;
easyDaClient.InstanceParameters.UpdateRates.ReadAutomatic = 1000 * 10;
easyDaClient.InstanceParameters.Timeouts.ReadItem = 10000;
easyDaClient.InstanceParameters.Timeouts.WriteItem = 10000;
With OPC UA I didn't find them.
Please Log in or Create an account to join the conversation.
- Forum
- Discussions
- QuickOPC-UA in .NET
- Reading, Writing, Subscriptions
- UA parameters corresponding to DA parameters