Skip to main content
Version: 2.6

OPC-UA Commands

Generic Command Access

The command module of OPC-UA server can be accessed using the command info structure.

The command address is made of two node ids. The "@"-sign separates the two ids.
Example: {<object_id>}"@"{<command_id}

Example:

{
"Id": "D2DFA580-E5C6-4E49-A845-2C9C902899F7",
"Name": "ReadValue",
"Type": "CommandNode",
"Address": "{ns=2;g={ECE37FDF-4862-4543-AF23-48FFDB8203C7}}@{ns=2;g={0012A45C-E9FD-471E-8AD3-8BB85A33B186}}",
"Arguments": [
{
"Name": "Address",
"DataType": "System.String",
"Type": "Input"
},
{
"Name": "Value",
"DataType": "System.String",
"Type": "Output"
}
]
}

Special Command Access

The OPC-UA control provides following special commands:

  • opc:WriteData: Writes data to an OPC-UA data node
  • opc:ReadData: Reads data from an OPC-UA data node

WriteData

opc:WriteData uses following arguments:

NameDescriptionData Type
AddressAddress to write data to a data nodeSystem.String
DataTypeData type of the OPC-UA data nodeSystem.String
ValueValue to writeSystem.String

Example:

{
"Id": "{30A53102-6737-4A3E-9514-047B938F78A6}",
"Name": "WriteData",
"Type": "CommandNode",
"Address": "opc:WriteData",
"Arguments": [
{
"Name": "Address",
"DataType": "System.String",
"Type": "Input"
},
{
"Name": "DataType",
"DataType": "System.String",
"Type": "Input"
},
{
"Name": "Value",
"DataType": "System.String",
"Type": "Input"
}
]
}

ReadData

opc:ReadData uses following arguments:

NameDescriptionData Type
AddressAddress to write data to a data nodeSystem.String

Output argument is:

NameDescriptionData Type
ValueValue from the DataNodeSystem.String

Example:

{
"Id": "{48060B81-17B8-477C-9CC9-1B0858465780}",
"Name": "ReadData",
"Type": "CommandNode",
"Address": "opc:ReadData",
"Arguments": [
{
"Name": "Address",
"DataType": "System.String",
"Type": "Input"
},
{
"Name": "Value",
"DataType": "System.String",
"Type": "Output"
}
]
}