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
- Connections, Reconnections, Certificates
- Disconnect and reconnect parameters
Disconnect and reconnect parameters
Ad 1. No. The keep-alive interval is set for all non-isolated EasyUAClient objects at once, using AdaptableParameters, and for each isolated EasyUAClient in its IsolatedParameters, but if you are using more servers on the same EasyUAClient, they all share the same keep interval.
Ad 2. You cannot currently obtain the effective keep-alive interval. As I wrote before, however, the server isn't actually "revising" it - that was my mistake, I confused it with other parameters. Normally, the effective keep-alive interval is the same number as you specify. There are some edge cases (which also depend on the server) in which it isn't. For example, in the current implementation, it cannot be shorter than 10 ms, and it cannot be longer than certain percentage of the session timeout as revised by the server. But this is implementation dependent, subject to change, and do not expect us to ever reveal all the related details.
Ad 3. See above - there is no "revised" keep-alive interval, so to speak. I think that in your case, as in 99% of cases anyway, the actual value used will be the one you specify. The client then tries to issue some request to the server at least every keep-alive interval, and uses the value twice as longer to detect when the server is not responding.
Ad 4. The recommendation is: Use Isolated == true only when you have to. Examples of such situations are:
a) For whatever reason, you need two or more sessions to the same server.
b) You need to set some parameters differently for certain servers.
c) You are writing a reusable software library, so you do not want to "share" the parameters and connections to servers etc. with other parts of the larger environment your library will live in and which may also use EasyXXClient objects for something else.
Best regards
Please Log in or Create an account to join the conversation.
As posted I changed the "object".IsolatedParameters.SessionParameters.KeepAliveInterval, but our client is not set to Isolated mode. When changing EasyUAClient.AdaptableParameters.SessionParameters.KeepAliveInterval the client responded as expected. Are there more "hidden" KeepAliveIntervals?
A couple of questions related to this:
1. Is it possible to set KeepAliveInterval seperately for each OPC Server if not running in Isolated mode and using EasyUAClient.AdaptableParameters.SessionParameters.KeepAliveInterval?
2. When the server is revising and possibly changing the requested KeepAliveInterval, is it possible to read the revised number?
3. Will the timeout calculation use two times the revised KeepAliveInterval or requested KeepAliveInterval?
4. Is there any recommendations with regards to using Isolated mode in general? Today our design is one client instance for each OPC server, but we do not set the Isolated parameter. What are the pros and cons of Isolated mode?
Please Log in or Create an account to join the conversation.
Besides that, changing the right one (or changing them both), should be enough. I have set them to 500 (ms), and I am notified of the disconnect in what I estimate to be not much more than 1 second, certainly less than 2 seconds. Tested with the ConnectivityExplorer application, and a connection to our public demo server.
Regards
Please Log in or Create an account to join the conversation.
Note: KeepAliveInterval is changed on the client object after it is created, but before it is connected to the server.
Please Log in or Create an account to join the conversation.
Second, by inspecting the code, I have found that the actual detection of keep-alive error you a value that is twice as much as KeepAliveInterval. So, with the default being 5000 ms, it comes to 10 seconds. This particular behavior is not in our code, it is in the OPC Foundation stack/SDK that we are using.
I am not sure which particular log entry you refer to as "timeout", but it can be something that does not directly cause a connection to be marked as being in failure.
Best regards
Please Log in or Create an account to join the conversation.
- If the server does not approve of the KeepAliveInterval, will the variable "IsolatedParameters.SessionParameters.KeepAliveInterval" be updated or can I view the final value elsewhere?
- When timing with a stopwatch the time from unplugging network cable to Disconnect event is received, we always see (substantially) higher time than KeepAliveInterval. The time is between 12-20 seconds with KeepAliveInterval to 5sec. Is there some other parameters affecting this?
- There seems to be a small delay between the EasyUAClient.LogEntry for timeout and the ServerConditionChanged event (maybe 1 to 3 sec).
Please Log in or Create an account to join the conversation.
- They increase the load on the server, the network, and the client.
Regards
Please Log in or Create an account to join the conversation.
This is what KeepAliveInterval (opclabs.doc-that.com/files/onlinedocs/QuickOpc/Latest/User%2...ameters~KeepAliveInterval.html ) or KeepAliveIntervalDebug is for.
Default is 5000 (5 seconds), you can make it shorter to detect problems quicker.
But there are some warnings:
1. By doing so, you increase the possibility of "falsely positive" detections.
2. The value you specify is not final. It gets negotiated with the server, and the server has the final word (this must be so, for conformance with OPC UA specs). It may happen that the server will not go under certain limit.
3. There is no determinism ("hard real time") in OPC UA Client-Server specs, and neither it is in the Ethernet network nor in Windows. This can work in both ways: It may cause false positives (see #1), but also false negatives (the disconnection will be detected later than wished, because simply the Windows threads of your app won't get chance to run soon enough).
Best regards
Please Log in or Create an account to join the conversation.
For the reconnection part (I understand this is the less important piece):
See the RetrialDelay property, opclabs.doc-that.com/files/onlinedocs/QuickOpc/Latest/User%2...onParameters~RetrialDelay.html . Default is 10000 (10 seconds), you may make it shorter.
In order for this to work, you need to also consider that the reconnection does not happen immediately after this period elapses.Instead, the global component's "engine" checks all sessions in a periodic task, and initiates a reconnection of those that are due for reconnection. See opclabs.doc-that.com/files/onlinedocs/QuickOpc/Latest/User%2...meters~ReconnectionPeriod.html . This can only be set once, before you start any OPC operations. Default is 5000 (5 seconds), so the total time to the (initiation of the) reconnection, in the default state, can be approximately 10-15 seconds.
I will reply to the part about disconnection detection timing in a separate post later. I need to verify something before I answer.
Best regards
Please Log in or Create an account to join the conversation.
Can you guide us to the relevant parameters that controls the reconnect/disconnect timings and any potential considerations we need to know about?
Thanks
Please Log in or Create an account to join the conversation.
- Forum
- Discussions
- QuickOPC-UA in .NET
- Connections, Reconnections, Certificates
- Disconnect and reconnect parameters