Login  •  Register


Creating Custom Structure DataType using our Node Manager

Questions regarding the use of the .NET SDK 2.0 for Server or Client development or integration into customer products ...

Creating Custom Structure DataType using our Node Manager

Postby abhishek.k.nimje » 12 Aug 2019, 11:49

Hi,
We are facing difficulty while reading the the dataValue of our custom structure data type... We are not using sdk's node manager but decided to create our own node manager following the example as described in Tutorials - LargeArrayNodeManager.
We are able to create all kind of Type Objects and they show the information on UaExpert client as expected. However, for our custom structure, the client shows "Unknown Extension Object" in the Value attribute of the variable.

Here is what we have done so far to create Custom structured data type :
- Created a new structured DataType "DynamicType" with DataTypeDefinition "StructureDefinition".
- Create Objects with Type Definition DataTypeEncodingType , one each for Default Binary and Default Xml.
- Added References to DataType "DynamicType" for both Binary abd Xml EncodingType objects.
- Created DataTypeDescriptionType Node - "DynamicType" (Node Class - Variable, TypeDefinition - DataTypeDescriptionType, DataType - String) with value as "DynamicType" .
- Created DataTypeDictionaryType Node - "System", which has a reference (HasComponent) to above created DescriptionType Node.
- Created a VariableType with DataType as "DynamicType".
- Created base datatype variables for each of the fields defined in structure definition.
- Created a class DynamicType with methods for encoding and decoding.

While creating a variable object with type "DynamicType" we assign some default value to all the fields. On UaExpert client, we are not able to see the value as is, instead it shows "Unknown Extension Object".

Please let me know if I missed anything in order to create a custom structured DataType or what all is needed to create one in such a way that Clients such as UAExpert can consume the data successfully.

Thanks in advance,
- Abhi
abhishek.k.nimje
Jr. Member
Jr. Member
 
Posts: 2
Joined: 12 Aug 2019, 08:48

Re: Creating Custom Structure DataType using our Node Manage

Postby abhishek.k.nimje » 14 Aug 2019, 09:14

Please advise on this matter at your earliest convenience... Matt Anderson, from our organization is also working on closing the license's purchase order, will appreciate if we can get any support on this matter right now... :)

Thanks,
-Abhi
abhishek.k.nimje
Jr. Member
Jr. Member
 
Posts: 2
Joined: 12 Aug 2019, 08:48

Re: Creating Custom Structure DataType using our Node Manage

Postby nikhilmv » 14 Aug 2019, 15:51

Just to add what we see is in Demo server code, BaseNodeManager does provide method LinkModelToNode(WorkOrderId, model, null, null, 0); which is not available in ServerManager or LargeArrayNodeManger which we are referring. We are also creating all the objects (DataType, VariableType etc.) programmatically & not via Modeller.
nikhilmv
Full Member
Full Member
 
Posts: 8
Joined: 20 May 2019, 06:27

Re: Creating Custom Structure DataType using our Node Manage

Postby Support Team » 16 Aug 2019, 11:29

Hello Abhi,

for creating custom structure data types, we recommend using UaModeler, as creating the required nodes, references and values manually is very complex and error prone.

If you have the requirement to create them manually (e.g. dynamically based on a PLC program or similar), we recommend using UaModeler to create a sample structure that can be evaluated by UaExpert. Based on this example you can check which nodes, references and values are needed and implement it manually. Please take care to set the NamespaceIndex of BrowseNames correctly and that all references from and to the encoding nodes are present as created by UaModeler.

Using the latest version of UaExpert, the log window shows any errors that occur when loading the type dictionary of a server when connecting. For this, please ensure that the config setting Trace.SDKTraceEnabled is set to 'true' and the Trace.SDKTraceLevel is set to at least 'Warning'. Please do also ensure that General.TypeDictionaryMode is set to 'Reconnect'.
Best regards
Unified Automation Support Team
User avatar
Support Team
Hero Member
Hero Member
 
Posts: 2422
Joined: 18 Mar 2011, 15:09


Return to .NET based OPC UA SDK

Who is online

Users browsing this forum: No registered users and 0 guests

cron