Skip to content

Instantly share code, notes, and snippets.

@Snegovikufa
Created August 27, 2013 02:37
Show Gist options
  • Save Snegovikufa/6349066 to your computer and use it in GitHub Desktop.
Save Snegovikufa/6349066 to your computer and use it in GitHub Desktop.
OPC Ua write attribute value
WriteValueCollection nodesToWrite = new WriteValueCollection(1)
{
new WriteValue
{
NodeId = new NodeId("REQUIREDNODEID"),
AttributeId = Attributes.Description,
Value = new DataValue(new LocalizedText("ASDASDAD")),
}
};
Cursor = Cursors.WaitCursor;
try
{
StatusCodeCollection statusCodes;
DiagnosticInfoCollection diagnostics;
_session.Write(null, nodesToWrite, out statusCodes, out diagnostics);
} finally
{
Cursor = Cursors.Default;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment