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.
Reading Time
thank you for this post. You are right - at least, in this case you have described.
It should be noted that Live Mapping, in order to be able to operate in a generic way, by its very definition, must rely primarily on browsing paths. Only browsing paths can guarantee, that an identification of a mapped member can be composed together, using data about its parent, and about the current member. In order for this to work in OPC UA, at some point the browse paths need to be translated to Node IDs - which is the call you are describing.
Whether and how much the TranslateBrowsePathsToNodeIds is demanding on the server side is completely server specific. For some servers, it may be an easy and fast operation. For other servers, it can be expensive. And, it can be expensive because either a) the developers have not implemented it well, or b) because the nature of the underlying device/protocol makes it so (in such case the developers have no way to make it fast).
This was one of the reasons we have, in addition to browse paths, also allowed the Live Mapping to work directly with Node IDs, using the "template" concept. Luckily, you were able to use it in your case, so - good for you. It should be noted, however, that (again, depending on the server), it is not always applicable. The Node IDs that the server uses may be completely unrelated - for example, the server might be using a unique integer for each node, and you would have no way of guessing that integer from the ID of the parent node and a name of your member.
One last note: I have some doubts about whether, in your particular case, the expensiveness of the TranslateBrowsePathsToNodeIds is truly a necessity. The fact is that what the TranslateBrowsePathsToNodeIds call gets on input is in principle similar to the structure of your NodeIdTemplatString. Why then should interpreting it be much more expensive than interpreting the Node ID is not clear to me.
Best regards
Please Log in or Create an account to join the conversation.
- Captain_Dash
- Topic Author
- Offline
- Platinum Member
- Posts: 69
- Thank you received: 0
We talked about this issue with the vendor of the opc ua server and they told us that from the server point of view the TranslateBrowsePathsToNodeIdsRequest is a very, very expensive operation. In our case the server tried to allocate and free memory in the kernel space which is not a quick operation and in this short example this invokes about 5000 of this operations. Instead of using browsepaths we are now using the nodeids which speeds up this operation to under 2 seconds for the first call and even faster for every further call of the read method.
Here a little code snippet:
axisDescriptor = new UANodeDescriptor
{
NodeId = new UANodeId(NodeId)
};
lock (MapLock)
{
clientMapper.Map(MappedObjectInternal,
new UAMappingContext
{
EndpointDescriptor = ServerInstance.DiscoveryUriString,
NodeDescriptor = axisDescriptor,
NodeIdTemplateString = "$(ParentNodeId)$(BrowseName)",
MonitoringParameters = 250
});
}
clientMapper.Subscribe(true);
clientMapper.Read();
Please Log in or Create an account to join the conversation.
Upload instructions sent by email.
Best regards
Please Log in or Create an account to join the conversation.
- Captain_Dash
- Topic Author
- Offline
- Platinum Member
- Posts: 69
- Thank you received: 0
By the way a big thank you for your patience and effort.
Please Log in or Create an account to join the conversation.
If needed, I can provide you with a way to deliver us the logs confidentially. But with what you have just described, I think that you should first look for reasons elsewhere. For example, you can put Wireshark on both sides, and by doing that, determine whether the cause for such enormous delay is in the network, or in the server.
Please Log in or Create an account to join the conversation.
- Captain_Dash
- Topic Author
- Offline
- Platinum Member
- Posts: 69
- Thank you received: 0
What I can see in Wireshark now is that
UA Secure Conversation Message: TranslateBrowsePathsToNodeIdsRequest
was send from the client and after about 77 seconds the client received
UA Secure Conversation Message: TranslateBrowsePathsToNodeIdsResponse
Then the client sent a read request
UA Secure Conversation Message: ReadRequest
and receives
UA Secure Conversation Message: ServiceFault
with the ServiceResult BadSessionIDInvalid.
Please Log in or Create an account to join the conversation.
- Captain_Dash
- Topic Author
- Offline
- Platinum Member
- Posts: 69
- Thank you received: 0
Please Log in or Create an account to join the conversation.
For a serious diagnosis, please follow the instructions I have given in earlier post(s).
Please Log in or Create an account to join the conversation.
- Captain_Dash
- Topic Author
- Offline
- Platinum Member
- Posts: 69
- Thank you received: 0
we are still not able to get to the ground of our issues. We recorded some information with wireshark but cannot find the origin of the failure. The client sends a Hello message several times with a time diference of 15 seconds, and the acknowledge message will not be received. Then a Reset will be send multiple times and afterwards the Hello message receives the acknowledge message, data will be transfered but we're still receiving errors in our application.
Something like "BadSessionIdInvalid"
I could send you the wireshark recording, but i do not want to load it up here for the public viewers.
Since yesterday the behavior changed to worse. I am not aware of changes on the code but we are receiving errors when we want to discover the server by name.
UAException
"An OPC-UA operation failure with error code -1 (0xFFFFFFFF) occurred, originating from 'Opc.Ua.Core'. The inner exception, of type 'System.Net.Sockets.SocketException', contains details about the problem."
SocketException
"The requested name is valid, but no data of the requested type was found"
Can you say something to this error?
Best Regards
Please Log in or Create an account to join the conversation.
Please see kb.opclabs.com/Collecting_information_for_troubleshooting .
Best regards
Please Log in or Create an account to join the conversation.