I am student and i am new to OPC-UA. I am working on project where i am using Codesys software as OPC-UA server and I am done with coding for discovery and subscription by coding simple client application in .NET SDK. I want to read the variables from the server.
How i can able to read the variable in OPC-UA client based on .NET SDK, if i am not using ua-modeler for address space design and i have server as software PLC (Codesys)?
How to extract or read data from OPC-UA server
Moderator: uasdknet
-
- Jr. Member
- Posts: 1
- Joined: 18 Jun 2018, 12:13
-
- Hero Member
- Posts: 21
- Joined: 03 Mar 2017, 16:08
Re: How to extract or read data from OPC-UA server
Hi,
I guess you solved it? Reading a node has nothing to do with the modeler. If you can browse the information model with any client, e.g. with UaExpert, you should be able to find out the NodeId and do a normal Read using the .NET SDK.
I guess you solved it? Reading a node has nothing to do with the modeler. If you can browse the information model with any client, e.g. with UaExpert, you should be able to find out the NodeId and do a normal Read using the .NET SDK.
Code: Select all
var nodesToRead = new List<ReadValueId>();
nodesToRead.Add(new ReadValueId { NodeId = nodeId, AttributeId = Attributes.Value });
var dataValues = this.session.Read(nodesToRead, 0,TimestampsToReturn.Both, new RequestSettings());
-
- Full Member
- Posts: 5
- Joined: 25 Aug 2018, 01:04
Re: How to extract or read data from OPC-UA server
uniashish,
What if you don't have the node ID. How do you browse the address space and obtain the node ID?
What if you don't have the node ID. How do you browse the address space and obtain the node ID?
-
- Full Member
- Posts: 5
- Joined: 25 Aug 2018, 01:04
Re: How to extract or read data from OPC-UA server
Never mind I figured out the answer.