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.
Does the UAGenericObject work with the CallMethod?
The build I have provided is ready to be rolled out. There was just this single targeted change in it.
I am not sure if I can describe the bug briefly. Basically, in order to convert the UAExtensionObject to UAGenericObject, one needs an indication of which server (endpoint) it came from, because the encoding Id contained in the extension object is generally only valid for certain server, and it is this server that needs to be interrogated for everything that has to do with how the data is encoded. The code that converted the inputs and output of the UA Read-s, and Write-s was correct, but in the code that was handling the UA Call-s, the information about the endpoint was lost - an empty endpoint was passed to the parts that do the encoding/decoding.
Best regards
Please Log in or Create an account to join the conversation.
We would appreciate it if you could please let us know when you are rolling this build-out so that we can do the same. Unless the build you provided me with is ready to be made public, in which case I would appreciate it if you could let me know if is ok with making this latest build public as well.
Many thanks for the assistance with this one.
Please Log in or Create an account to join the conversation.
unfortunately I do not have any server capable of returning complex data from method calls (this was also the reason this feature was overlooked at first; but I have now re-checked the server available to me, to no avail).
In the week starting April 12, 2021, there will be a virtual OPC Interoperability Workshop. I will specifically ask around all participant and check whether they have this or can expose it.
I have further analyzed the code. And I think I have found what might be causing the "Host cannot be empty" error in this case. And I have made a "fix" - without being able to test it out, of course.
Please have the customer download and use build 136.1 or later of version 2021.1. It is available here:
www.opclabs.com/files/downloads/OpcDataClient/2021.1/OPC%20D...Client-2021.1-Windows-Full.exe .
Hopefully this will work, or if not, at least the customer will understand that such repeated attempts are our best option in this situation.
Best regards
Please Log in or Create an account to join the conversation.
So unfortunately it looks like the OPC UA server is hosted on an HMI that is part of Filler equipment from a vendor named Kronos so he does not have direct access to the OPC UA server, unfortunately.
Now, do you happened to know of an OPC UA server that supports Method Calls capable of returning Complex Data? I was running my test incorrectly against OPC Router until I realized that OPC Router does not support Methods returning objects so I am not able to test if this an issue with his OPC UA server only or if this is happening with any OPC UA server that supports Methods returning Complex data.
If you have a test server in mind, we could try to test something simple where the server returns an object whenever the UA method is called. If this works, we should be able to ask the customer to try it on his end so that we can determine if this isolated to his Server only.
Please Log in or Create an account to join the conversation.
thanks for update.
It is not necessary to try to find anything wrong with the "host" on the user side. It is correct there. The problem will most likely be inside QuickOPC when it later tries to access the same server for the purpose of obtaining metadata needed to decode the custom data types.
If the endpoint cannot be made public: Which OPC server is it then? Can we get hold of it and configure it in a similar way?
Best regards
Please Log in or Create an account to join the conversation.
I had the chance to talk to the customer and it looks like it will not be possible to expose the endpoint. The server is on a network that has no internet connection.
He also was able to do more testing and he found out that if he calls a method that only returns a single integer value, it works great. He gets back the integer with no errors.
he only gets the error I sent you before ("Host cannot be empty") when he calls a method that returns complex data.
he also implemented the DiscoverLocalEndpoints call in his test app to make sure he used an Endpoint that was sent from the Server itself, see below code. In this case, the Endpoint must be valid.
OpcLabs.EasyOpc.UA.Discovery.UADiscoveryElementCollection lEndpoints =
mClient.DiscoverLocalEndpoints("opc.tcp://10.97.219.220:4840/");
UAEndpointDescriptor endpointDescriptor = lEndpoints[0];
object[] lOutput = mClient.CallMethod(endpointDescriptor, "ns=2;s=MethodSet",
"ns=9;s=DMM.Messages.GetActiveMessages");
The error message indicates the Hostname must not be empty. Since he is getting the Endpoint from the host itself, the hostname is correct and not empty. Please see attached screen print of the EndPoint Descriptor.
So, it looks like the client can get to the server and call the methods just fine. It fails when the method returns complex data.
Also, I have used a generic client to do the method call and it returned and displayed the data correctly, so it is not an issue with the OPC Server side.
Do you have any other ideas on how to troubleshoot this behavior? Thank you for your support.
Attachments:
Please Log in or Create an account to join the conversation.
I agree there is nothing wrong with the endpoint (host name).
Is there any chance the customer can expose the endpoint on the Web (to a specified IP that I would give them) so that I can debug it ftom my side?
Best regards
Please Log in or Create an account to join the conversation.
OpcLabs.EasyOpc.UA.OperationModel.UAException: An OPC-UA operation failure with error ID 'OpcLabs.UAEngine=1202' occurred, originating from '' and with depth of 1. The inner exception, of type "OpcLabs.EasyOpc.UA.Engine.UAEngineException", contains details about the problem. ---> OpcLabs.EasyOpc.UA.Engine.UAEngineException: Invalid opc.tcp discovery URL ("opc.tcp:"): The Host must not be empty.
+ The client method called (or event/callback invoked) was 'CallMultipleMethods'.
--- End of inner exception stack trace ---
at OpcLabs.EasyOpc.UA.OperationModel.UAException.CheckSuccess(Exception exception)
at OpcLabs.EasyOpc.UA.OperationModel.UAException.CheckSuccess(OperationResult operationResult)
at OpcLabs.EasyOpc.UA.IEasyUAClientExtension.CallMethod(IEasyUAClient client, UACallArguments callArguments)
at OpcLabs.EasyOpc.UA.IEasyUAClientExtension.CallMethod(IEasyUAClient client, UAEndpointDescriptor endpointDescriptor, UANodeDescriptor objectNodeDescriptor, UANodeDescriptor methodNodeDescriptor)
at TestOPCUAClient.Form1.btnGetAlarms_Click(Object sender, EventArgs e) in c:\TFS-TPW\KA - IMS Krones Alarmer\Main\TestOpcUAClientNewSDK\Form1.cs:line 62
Now, looking at the error description, it looks like the host is empty but it does not make any sense because the host is never empty as you will see in the code. Attached is the code that the customer is running. Please do let time know if you have any suggestions or questions.
Please Log in or Create an account to join the conversation.
thank you for the details.
I have determined that the problem is related the fact that the value returned in the method 'out' argument is an *array* of object of custom data type. By inspecting the code, I have found that returning (converting) such arrays is properly supported for Reads, but - by omission - not in the 'out' arguments of UA method calls.
Version 5.54 is no longer maintained.
As I was in process of releasing version 5.60 (2021.1), I have made a fix for this issue into this new version. It was released today.
In theory the same fix could be made as the "very last fix" into version 5.59 (2020.3), but I do not think it is necessary.
Best regards
Please Log in or Create an account to join the conversation.
The Type of the object that is in the first index value of the Output is an array of Objects. The objects in this array are of type "UAExtensionObject", which only has binary data. (See screenshot)
He still is not able to cast any level of the returned objects to the UAGenericObject class, so he cannot see any of the returned complex data.
Do you have any other suggestions?
Please Log in or Create an account to join the conversation.