.NET Based OPC UA Client/Server SDK
3.3.0.530
|
A session with the server must be established.
The following dialog shows an example of a basic implementation of the Write service. Press the button “Show Code” to display the corresponding code, and the button “Help” to show this documentation page.
At “Write Request”, you can specify the NodeIds and the values to be written. Press the button “...” right of the field “Node #1” respectively “Node #2” to open a window for browsing the address space.
Select the desired variables and press the button “OK”. The NodeId and the current value of the variable are now displayed in the corresponding fields.
On pressing the button “...” right of the field “Value #1” respectively “Value #2” a dialog window opens.
Here you can enter the value to be written. The data type of this value is shown above of the input field. You’ll recieve an error message if the value is entered in the wrong format. Press “OK” and the value will appear in the corresponding field.
On pressing the button “Write”, the values are written and the StatusCode for the operation is displayed at “Write Response”. Check the box in front of “Use Asynchronous Pattern” to call “BeginWrite” instead of “Write”.
We need to fill a list with WriteValues for writing the data. In this example, the information that is needed for writing is stored in the “Tag” field of a GUI element. The class VariableNode is used to hold the data.