Any suggestions for OPC UA Client which can parse Structures as output arguments in the method call. | OPC UA Implementation: Stacks, Tools, and Samples | Forum

Avatar
Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
Lost password?
sp_Feed sp_PrintTopic sp_TopicIcon
Any suggestions for OPC UA Client which can parse Structures as output arguments in the method call.
Avatar
Mohit Agarwal
Member
Members
Forum Posts: 19
Member Since:
10/18/2019
sp_UserOfflineSmall Offline
1
09/07/2021 - 01:31
sp_Permalink sp_Print

HI,

I need to validate a scenario where, OPC UA Server will return a Structure as output argument of the method call.

I tried some available clients but that DO NOT work.

The scenario is, the output argument is defined as BaseDataType in the nodeset file and OPC UA Server will send the required structure type (this type is also defined in the Address Space -> Types).

When the output argument definition is BaseDataType, the available generic clients are NOT able to decode the information and I need to validate if the information is correctly sent from the OPC UA Server which is implementing one of the CS we have developed.

Avatar
Randy Armstrong
Admin
Forum Posts: 779
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
2
09/07/2021 - 10:42
sp_Permalink sp_Print

If you use custom structures as method arguments then many clients will need knowledge of the method/structures to handle it properly.

A few generic clients may be able to handle it by reading the DataTypeDefinition even if they can parse they would not understand the semantics of the structure.

Avatar
Mohit Agarwal
Member
Members
Forum Posts: 19
Member Since:
10/18/2019
sp_UserOfflineSmall Offline
3
09/07/2021 - 23:44
sp_Permalink sp_Print sp_EditHistory

Yes, but if the custom structure is already a defined DataType inherited from Structure? 

I was able to use UA Client where it was able to parse the data if I set the data type to concrete type for the Array of Structures.

But when I give it as Array of BaseDataType and Server sent the concrete type inside the array, then the client was NOT able to parse it.

One more thing is UA Client which I used was able to show the the Attributes window (Read Response) all the values but in the Monitored Item Window Pop-up it was NOT able to parse that information..

Hence, it might be a GUI thing but from application point of view, I want to validate if I can receive the Array of Structures sent as BuiltIn Type Array of BaseDataType in both Read Response and Monitored Item.[Image Can Not Be Found].

The same monitored item which works in the ReadResponse (Attributes Window), does NOT work in the Method output argument. 

So, I just wanted to know if there is any open source client which I can use to do some basic validation of the complex type output argument.

Avatar
Zbynek Zahradnik
Member
Members
Forum Posts: 52
Member Since:
02/24/2014
sp_UserOfflineSmall Offline
4
09/08/2021 - 05:13
sp_Permalink sp_Print

I believe that our client library (QuickOPC: https://www.opclabs.com/produc.....mplex-data ) will be able to do that. And if not, I am ready to fix it, possibly in cooperation with you.

If the input arguments to the method are simple types, you may use the pre-built OpcCmd utility (made with the QuickOPC library) to test it out: https://kb.opclabs.com/Tool_Do.....md_Utility . Otherwise, it might be necessary to write a small program to invoke the method. Or, if you send me the server or open an endpoint, I will test it myself.

An example command to call a method is:

uaClient call //opcua.demo-this.com:51210/UA/SampleServer nsu=http://test.org/UA/Data/;i=10755 nsu=http://test.org/UA/Data/;i=10756 [Boolean]False [SByte]1 [Byte]2 [Int16]3 [UInt16]4 [Int32]5 [UInt32]6 [Int64]7 [UInt64]8 [Float]9 [Double]10

 

Best regards

Avatar
Mohit Agarwal
Member
Members
Forum Posts: 19
Member Since:
10/18/2019
sp_UserOfflineSmall Offline
5
09/09/2021 - 06:49
sp_Permalink sp_Print

Hi,

Thank you for your reply. I cannot open an endpoint since it is built in our internal systems and I do not have a cloud based option to expose now.

My input arguments are simple types but the output argument is a BaseDataType which will be assigned with a custom structure defined in the address space.

I can share the binary file of the server if that is fine.

Avatar
Randy Armstrong
Admin
Forum Posts: 779
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
6
09/09/2021 - 07:06
sp_Permalink sp_Print

But when I give it as Array of BaseDataType and Server sent the concrete type inside the array, then the client was NOT able to parse it.

This is a limitation of the client.

All the information that client needs to parse it is available.

It appears to be an edge case that is not supported.

Avatar
Zbynek Zahradnik
Member
Members
Forum Posts: 52
Member Since:
02/24/2014
sp_UserOfflineSmall Offline
7
09/09/2021 - 07:12
sp_Permalink sp_Print

@Mohit Agarwal, you can email me at zbynekz (at) opclabs.com. If you give me the server binary (is it for Windows?) and instructions (which object/method it is, and what argument values to use), I will test it out myself with our client. 

Best regards

Avatar
Mohit Agarwal
Member
Members
Forum Posts: 19
Member Since:
10/18/2019
sp_UserOfflineSmall Offline
8
09/09/2021 - 07:12
sp_Permalink sp_Print

Thank you Randy, I understand that.

For that reason, I wanted to check if there were any available clients for quick validation.

Zbynek Zahradnik reponded that QuickOPC Client may work and he is willing to fix it if that does not. I can provide the server binary to him if he is fine to check or check the example code.
 
Thank you Randy and Zbynek Zahradnik for your responses.
 
@Zbynek Zahradnik, please let me know if you are fine to validate this scenario with the mentioned client.
Avatar
Mohit Agarwal
Member
Members
Forum Posts: 19
Member Since:
10/18/2019
sp_UserOfflineSmall Offline
9
09/09/2021 - 08:26
sp_Permalink sp_Print

@Zbynek Zahradnik, The following link has the OPC UA Test Server Binary which exposes the example Structure mentioned.

https://drive.google.com/file/.....sp=sharing

Avatar
Zbynek Zahradnik
Member
Members
Forum Posts: 52
Member Since:
02/24/2014
sp_UserOfflineSmall Offline
10
09/12/2021 - 04:34
sp_Permalink sp_Print

I tested calling the method form our client (OpcCmd utility).

It did not work originally, but not because of the reason discussed (related to BaseDataType), but due to other, relatively minor issues, that had to do with less frequent encodings (for record, they were: Guids, LocalizedText, and null arrays). After fixing those, I was able to call the method and get the output argument just fine.

I have updated the OpcCmd tool available on the Web (the link posted earlier) with the version with the fixes.

You can use the following command to call the method and view the output argument:

uaClient call //localhost:40451 ns=1;s=/ObjectsFolder/1_Handheld_TighteningSystem/ResultManagement ns=1;s=/ObjectsFolder/1_Handheld_TighteningSystem/GetLatestResult [Int32]10000 --!extractElement 1 --!viewValue=::D99

I originally wanted to post the output here, but it is quite long; I will email it to @Mohit Agarwal instead.

Best regards

Avatar
Mohit Agarwal
Member
Members
Forum Posts: 19
Member Since:
10/18/2019
sp_UserOfflineSmall Offline
11
09/12/2021 - 06:23
sp_Permalink sp_Print

Hello Zbynek,

Thank you very much for your quick response and quick update on the OpcCmd Utility. I am able to view the output argument with BuiltInType BaseDataType now.

Forum Timezone: America/Phoenix
Most Users Ever Online: 202
Currently Online: Jerome H
Guest(s) 13
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 9
Topics: 950
Posts: 2968