.NET Based OPC UA Client/Server SDK
3.0.4.468
|
A session with the server must be established.
The following dialog shows an example of a basic implementation of the Read service. Press the button “Show Code” to display the corresponding code, and the button “Help” to show this documentation page.
On pressing the button “Read”, the two variables Server/ServerStatus/State and Server/ServerStatus/CurrentTime are read. The response, i.e. the value of the variables is displayed in the corresponding fields at “Read Response”. Check the box in front of “Use Asynchronous Pattern” to call “BeginRead” instead of “Read”.
See Read – Read Attribute for an example which allows the user to select the Node and the attribute to read.
The following code reads the values of two OPC UA defined variables from the server and displays the values in the user interface.
The SDK provides classes that contain constants for NodeIds of nodes that are defined in the OPC UA standard model, e.g.
In this example, the value of two nodes from the standard namespace are read, so we can use some these constants to get the NodeIds.