Male Medeiros
Member
Members
Forum Posts: 3
Member Since:
02/11/2021
02/11/2021
Offline
Dear, I am starting in the opc ua world and I would like to know if there is a way to create objects in C # that represent data structures or variables on an OPCUA server. I saw that there is a library that does this, but it is paid and I have no budget to purchase a license. Thank you very much
Randy Armstrong
Admin
Forum Posts: 1579
Member Since:
05/30/2017
05/30/2017
Offline
The NETStandard stack and samples are open source:
Male Medeiros
Member
Members
Forum Posts: 3
Member Since:
02/11/2021
02/11/2021
Offline
First of all, thank you very much!
Analyzing the examples, I found no way to represent an existing data structure on an OPC server directly for a C # class.
I tried to use it as follows:
m_session.ReadValue (new NodeId ("MyNode")). GetValue (myClass.GetType ())
,but without success.
Can you tell me if something like this is possible, or is it necessary to read the nodes individually and fill the C# class ?
Randy Armstrong
Admin
Forum Posts: 1579
Member Since:
05/30/2017
05/30/2017
Offline
1) You need to create a Session first;
2) The NodeId needs NamespaceIndex (your nodes cannot used NamespaceIndex 0);
3) You can only read the value of a single attribute (i.e. you can’t ‘read’ an object).
4) You can only builtin types or classes that have been generated with the ModelCompiler and are specified as the DataType of the Value.
Forum Timezone: America/Phoenix
Most Users Ever Online: 510
Currently Online: Sam Weintraub
Guest(s) 27
Currently Browsing this Page:
1 Guest(s)
1 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 10
Topics: 1445
Posts: 4889