Read User-Defined DataType in combination with OPC Binary
Posted: 13 Apr 2016, 19:11
Dear Support Team, dear users,
I'm trying to implement an OPC UA client by using parts of the sample code, provided by Unified Automation SDK. It works fine except for the "User defined types within inputArguments-field:
There is a field, which contains different attributes, one of those types is "ScanParameters", which was derived from 'Structure' ==> (according to UaExpert: {...|...|0|0|false|false|[enum]}) <= structure of the user-defined DT
By analyzing DataType-Tree I found definition of the dataType and a corresponding "OPC Binary" type-description. BUT: what about description/structure of the given datatype?
Where can i find information about datatype-fields (as given above)? What methods of the SDK can be used to achieve this?
It would be great, if someone could provide an example/sample code, how to extract definition and description of single fields of user defined datatypes, in order to fill those fields with values and to execute a call (method).
p.s.: by filling such dataTypes with values, which source-type must be used? E.g.:
Thank you for your help!
I'm trying to implement an OPC UA client by using parts of the sample code, provided by Unified Automation SDK. It works fine except for the "User defined types within inputArguments-field:
There is a field, which contains different attributes, one of those types is "ScanParameters", which was derived from 'Structure' ==> (according to UaExpert: {...|...|0|0|false|false|[enum]}) <= structure of the user-defined DT
By analyzing DataType-Tree I found definition of the dataType and a corresponding "OPC Binary" type-description. BUT: what about description/structure of the given datatype?
Where can i find information about datatype-fields (as given above)? What methods of the SDK can be used to achieve this?
It would be great, if someone could provide an example/sample code, how to extract definition and description of single fields of user defined datatypes, in order to fill those fields with values and to execute a call (method).
p.s.: by filling such dataTypes with values, which source-type must be used? E.g.:
Code: Select all
List<Variant> inputArgs = new List<Variant>(); // List of input arguments for a method
inputArgs.Add(new Variant("something")); // so far no problem
inputArgs.Add(....); // user defined datatype, which has Structure as BuiltInType?