Skip to content

Reference

OpcClient.WriteNode Method

Writes one value to one attribute of one node using the specified command.

Reference

OpcClient.WriteNode Method ​

Type
OpcClient
Namespace
Opc.UaFx.Client
Assembly
Opc.UaFx.Advanced.dll
Package
Opc.UaFx.Advanced v2.59.0
Members
OpcClient Members
Also in
Opc.UaFx.Client

21 overloads

OverloadDescription
WriteNode(OpcNodeId, object)Writes the value to the Value attribute of the node specified by nodeId.
WriteNode(OpcNodeId, OpcAttribute, object)Writes the value to the attribute of the node specified by nodeId.
WriteNode(string, object)Writes the value to the Value attribute of the node specified by nodeId.
WriteNode(string, OpcAttribute, object)Writes the value to the attribute of the node specified by nodeId.
WriteNode(int, object)Writes the value to the Value attribute of the node specified by nodeId.
WriteNode(int, OpcAttribute, object)Writes the value to the attribute of the node specified by nodeId.
WriteNode(string, int, object)Writes the value to the Value attribute of the node specified by nodeId and namespaceIndex.
WriteNode(string, int, OpcAttribute, object)Writes the value to the attribute of the node specified by nodeId and namespaceIndex.
WriteNode(int, int, object)Writes the value to the Value attribute of the node specified by nodeId and namespaceIndex.
WriteNode(int, int, OpcAttribute, object)Writes the value to the attribute of the node specified by nodeId and namespaceIndex.
WriteNode(OpcNodeId, OpcRange, object)since v2.24Writes the value into the range of Value attribute of the node specified by nodeId.
WriteNode(OpcNodeId, OpcAttribute, OpcRange, object)since v2.24Writes the value into the range of attribute of the node specified by nodeId.
WriteNode(string, OpcRange, object)since v2.24Writes the value into the range of Value attribute of the node specified by nodeId.
WriteNode(string, OpcAttribute, OpcRange, object)since v2.24Writes the value into the range of attribute of the node specified by nodeId.
WriteNode(int, OpcRange, object)since v2.24Writes the value into the range of Value attribute of the node specified by nodeId.
WriteNode(int, OpcAttribute, OpcRange, object)since v2.24Writes the value into the range of attribute of the node specified by nodeId.
WriteNode(string, int, OpcRange, object)since v2.24Writes the value into the range of Value attribute of the node specified by nodeId and namespaceIndex.
WriteNode(string, int, OpcAttribute, OpcRange, object)since v2.24Writes the value into the range of attribute of the node specified by nodeId and namespaceIndex.
WriteNode(int, int, OpcRange, object)since v2.24Writes the value into the range of Value attribute of the node specified by nodeId and namespaceIndex.
WriteNode(int, int, OpcAttribute, OpcRange, object)since v2.24Writes the value into the range of the attribute of the node specified by nodeId and namespaceIndex.
WriteNode(OpcWriteNode)Writes one value to one attribute of one node using the specified command.

Exceptions (all overloads)

ExceptionCondition
ObjectDisposedExceptionThe object has been disposed of.
OpcExceptionThe service execution failed upon different circumstances; for more details see exception details. The following issues can lead to that exception: BadNothingToDo and BadTooManyOperations.

WriteNode(OpcNodeId, object) ​

Writes the value to the Value attribute of the node specified by nodeId.

csharp
public OpcStatus WriteNode(OpcNodeId nodeId, object value)
vbnet
Public Function WriteNode(nodeId As OpcNodeId, value As Object) As OpcStatus

Parameters

NameTypeDescription
nodeIdOpcNodeIdThe OpcNodeId of the node to write to.
valueObjectThe data to write to the Value attribute.

Returns

OpcStatus

An instance of the OpcStatus class which indicates the outcome of the write operation.

Exceptions

ExceptionCondition
ArgumentExceptionThe nodeId indicates to be a null-node-id (see IsNull).
ArgumentNullExceptionThe nodeId is a null reference (Nothing in Visual Basic).
InvalidOperationExceptionThe write service is currently not supported, especially using the arguments specified.

Remarks

Known results for the operation are:

StatusDescription
GoodCompletesAsynchronouslyThe value was successfully written to an intermediate system but the Server does not know if the data source was updated properly.
BadNodeIdInvalidFor more details see BadNodeIdInvalid.
BadNodeIdUnknownFor more details see BadNodeIdUnknown.
BadAttributeInvalidFor more details see BadAttributeInvalid.
BadIndexRangeInvalidFor more details see BadIndexRangeInvalid.
BadIndexRangeNoDataFor more details see BadIndexRangeNoData.
BadWriteNotSupportedThe requested write operation is not supported. If a client attempts to write any value, quality, timestamp combination and the server does not support the requested combination (which could be a single quantity such as just timestamp), then the Server shall not perform any write on this node and shall return this status for that node.
BadNotWritableFor more details see BadNotWritable.
BadUserAccessDeniedFor more details see BadUserAccessDenied.
BadOutOfRangeIf a client attempts to write a value outside the valid range like a value not contained in the enumeration data type of a node, the server shall return this status for that node.
BadTypeMismatchFor more details see BadTypeMismatch.
BadDataEncodingUnsupportedFor more details see BadDataEncodingUnsupported.
BadNoCommunicationFor more details see BadNoCommunication.

WriteNode(OpcNodeId, OpcAttribute, object) ​

Writes the value to the attribute of the node specified by nodeId.

csharp
public OpcStatus WriteNode(
    OpcNodeId nodeId,
    OpcAttribute attribute,
    object value)
vbnet
Public Function WriteNode(
    nodeId As OpcNodeId,
    attribute As OpcAttribute,
    value As Object) As OpcStatus

Parameters

NameTypeDescription
nodeIdOpcNodeIdThe OpcNodeId of the node to write to.
attributeOpcAttributeOne of the members defined by the OpcAttribute enumeration that defines which node attribute is to be used by the service.
valueObjectThe data to write to the Value attribute.

Returns

OpcStatus

An instance of the OpcStatus class which indicates the outcome of the write operation.

Exceptions

ExceptionCondition
ArgumentExceptionThe nodeId indicates to be a null-node-id (see IsNull).
ArgumentNullExceptionThe nodeId is a null reference (Nothing in Visual Basic).
InvalidOperationExceptionThe write service is currently not supported, especially using the arguments specified.

Remarks

Known results for the operation are:

StatusDescription
GoodCompletesAsynchronouslyThe value was successfully written to an intermediate system but the Server does not know if the data source was updated properly.
BadNodeIdInvalidFor more details see BadNodeIdInvalid.
BadNodeIdUnknownFor more details see BadNodeIdUnknown.
BadAttributeInvalidFor more details see BadAttributeInvalid.
BadIndexRangeInvalidFor more details see BadIndexRangeInvalid.
BadIndexRangeNoDataFor more details see BadIndexRangeNoData.
BadWriteNotSupportedThe requested write operation is not supported. If a client attempts to write any value, quality, timestamp combination and the server does not support the requested combination (which could be a single quantity such as just timestamp), then the Server shall not perform any write on this node and shall return this status for that node.
BadNotWritableFor more details see BadNotWritable.
BadUserAccessDeniedFor more details see BadUserAccessDenied.
BadOutOfRangeIf a client attempts to write a value outside the valid range like a value not contained in the enumeration data type of a node, the server shall return this status for that node.
BadTypeMismatchFor more details see BadTypeMismatch.
BadDataEncodingUnsupportedFor more details see BadDataEncodingUnsupported.
BadNoCommunicationFor more details see BadNoCommunication.

WriteNode(string, object) ​

Writes the value to the Value attribute of the node specified by nodeId.

csharp
public OpcStatus WriteNode(string nodeId, object value)
vbnet
Public Function WriteNode(nodeId As String, value As Object) As OpcStatus

Parameters

NameTypeDescription
nodeIdStringThe textual node identifier of the node to write to.
valueObjectThe data to write to the Value attribute.

Returns

OpcStatus

An instance of the OpcStatus class which indicates the outcome of the write operation.

Exceptions

ExceptionCondition
ArgumentExceptionThe nodeId is an empty string.
ArgumentNullExceptionThe nodeId is a null reference (Nothing in Visual Basic).
InvalidOperationExceptionThe write service is currently not supported, especially using the arguments specified.

Remarks

Known results for the operation are:

StatusDescription
GoodCompletesAsynchronouslyThe value was successfully written to an intermediate system but the Server does not know if the data source was updated properly.
BadNodeIdInvalidFor more details see BadNodeIdInvalid.
BadNodeIdUnknownFor more details see BadNodeIdUnknown.
BadAttributeInvalidFor more details see BadAttributeInvalid.
BadIndexRangeInvalidFor more details see BadIndexRangeInvalid.
BadIndexRangeNoDataFor more details see BadIndexRangeNoData.
BadWriteNotSupportedThe requested write operation is not supported. If a client attempts to write any value, quality, timestamp combination and the server does not support the requested combination (which could be a single quantity such as just timestamp), then the Server shall not perform any write on this node and shall return this status for that node.
BadNotWritableFor more details see BadNotWritable.
BadUserAccessDeniedFor more details see BadUserAccessDenied.
BadOutOfRangeIf a client attempts to write a value outside the valid range like a value not contained in the enumeration data type of a node, the server shall return this status for that node.
BadTypeMismatchFor more details see BadTypeMismatch.
BadDataEncodingUnsupportedFor more details see BadDataEncodingUnsupported.
BadNoCommunicationFor more details see BadNoCommunication.

WriteNode(string, OpcAttribute, object) ​

Writes the value to the attribute of the node specified by nodeId.

csharp
public OpcStatus WriteNode(string nodeId, OpcAttribute attribute, object value)
vbnet
Public Function WriteNode(
    nodeId As String,
    attribute As OpcAttribute,
    value As Object) As OpcStatus

Parameters

NameTypeDescription
nodeIdStringThe textual node identifier of the node to write to.
attributeOpcAttributeOne of the members defined by the OpcAttribute enumeration that defines which node attribute is to be used by the service.
valueObjectThe data to write to the attribute.

Returns

OpcStatus

An instance of the OpcStatus class which indicates the outcome of the write operation.

Exceptions

ExceptionCondition
ArgumentExceptionThe nodeId is an empty string.
ArgumentNullExceptionThe nodeId is a null reference (Nothing in Visual Basic).
InvalidOperationExceptionThe write service is currently not supported, especially using the arguments specified.

Remarks

Known results for the operation are:

StatusDescription
GoodCompletesAsynchronouslyThe value was successfully written to an intermediate system but the Server does not know if the data source was updated properly.
BadNodeIdInvalidFor more details see BadNodeIdInvalid.
BadNodeIdUnknownFor more details see BadNodeIdUnknown.
BadAttributeInvalidFor more details see BadAttributeInvalid.
BadIndexRangeInvalidFor more details see BadIndexRangeInvalid.
BadIndexRangeNoDataFor more details see BadIndexRangeNoData.
BadWriteNotSupportedThe requested write operation is not supported. If a client attempts to write any value, quality, timestamp combination and the server does not support the requested combination (which could be a single quantity such as just timestamp), then the Server shall not perform any write on this node and shall return this status for that node.
BadNotWritableFor more details see BadNotWritable.
BadUserAccessDeniedFor more details see BadUserAccessDenied.
BadOutOfRangeIf a client attempts to write a value outside the valid range like a value not contained in the enumeration data type of a node, the server shall return this status for that node.
BadTypeMismatchFor more details see BadTypeMismatch.
BadDataEncodingUnsupportedFor more details see BadDataEncodingUnsupported.
BadNoCommunicationFor more details see BadNoCommunication.

WriteNode(int, object) ​

Writes the value to the Value attribute of the node specified by nodeId.

csharp
public OpcStatus WriteNode(int nodeId, object value)
vbnet
Public Function WriteNode(nodeId As Integer, value As Object) As OpcStatus

Parameters

NameTypeDescription
nodeIdInt32The numeric node identifier of the node to write to.
valueObjectThe data to write to the Value attribute.

Returns

OpcStatus

An instance of the OpcStatus class which indicates the outcome of the write operation.

Exceptions

ExceptionCondition
ArgumentExceptionThe nodeId is equals to zero.
InvalidOperationExceptionThe write service is currently not supported, especially using the arguments specified.

Remarks

Known results for the operation are:

StatusDescription
GoodCompletesAsynchronouslyThe value was successfully written to an intermediate system but the Server does not know if the data source was updated properly.
BadNodeIdInvalidFor more details see BadNodeIdInvalid.
BadNodeIdUnknownFor more details see BadNodeIdUnknown.
BadAttributeInvalidFor more details see BadAttributeInvalid.
BadIndexRangeInvalidFor more details see BadIndexRangeInvalid.
BadIndexRangeNoDataFor more details see BadIndexRangeNoData.
BadWriteNotSupportedThe requested write operation is not supported. If a client attempts to write any value, quality, timestamp combination and the server does not support the requested combination (which could be a single quantity such as just timestamp), then the Server shall not perform any write on this node and shall return this status for that node.
BadNotWritableFor more details see BadNotWritable.
BadUserAccessDeniedFor more details see BadUserAccessDenied.
BadOutOfRangeIf a client attempts to write a value outside the valid range like a value not contained in the enumeration data type of a node, the server shall return this status for that node.
BadTypeMismatchFor more details see BadTypeMismatch.
BadDataEncodingUnsupportedFor more details see BadDataEncodingUnsupported.
BadNoCommunicationFor more details see BadNoCommunication.

WriteNode(int, OpcAttribute, object) ​

Writes the value to the attribute of the node specified by nodeId.

csharp
public OpcStatus WriteNode(int nodeId, OpcAttribute attribute, object value)
vbnet
Public Function WriteNode(
    nodeId As Integer,
    attribute As OpcAttribute,
    value As Object) As OpcStatus

Parameters

NameTypeDescription
nodeIdInt32The numeric node identifier of the node to write to.
attributeOpcAttributeOne of the members defined by the OpcAttribute enumeration that defines which node attribute is to be used by the service.
valueObjectThe data to write to the attribute.

Returns

OpcStatus

An instance of the OpcStatus class which indicates the outcome of the write operation.

Exceptions

ExceptionCondition
ArgumentExceptionThe nodeId is equals zero.
InvalidOperationExceptionThe write service is currently not supported, especially using the arguments specified.

Remarks

Known results for the operation are:

StatusDescription
GoodCompletesAsynchronouslyThe value was successfully written to an intermediate system but the Server does not know if the data source was updated properly.
BadNodeIdInvalidFor more details see BadNodeIdInvalid.
BadNodeIdUnknownFor more details see BadNodeIdUnknown.
BadAttributeInvalidFor more details see BadAttributeInvalid.
BadIndexRangeInvalidFor more details see BadIndexRangeInvalid.
BadIndexRangeNoDataFor more details see BadIndexRangeNoData.
BadWriteNotSupportedThe requested write operation is not supported. If a client attempts to write any value, quality, timestamp combination and the server does not support the requested combination (which could be a single quantity such as just timestamp), then the Server shall not perform any write on this node and shall return this status for that node.
BadNotWritableFor more details see BadNotWritable.
BadUserAccessDeniedFor more details see BadUserAccessDenied.
BadOutOfRangeIf a client attempts to write a value outside the valid range like a value not contained in the enumeration data type of a node, the server shall return this status for that node.
BadTypeMismatchFor more details see BadTypeMismatch.
BadDataEncodingUnsupportedFor more details see BadDataEncodingUnsupported.
BadNoCommunicationFor more details see BadNoCommunication.

WriteNode(string, int, object) ​

Writes the value to the Value attribute of the node specified by nodeId and namespaceIndex.

csharp
public OpcStatus WriteNode(string nodeId, int namespaceIndex, object value)
vbnet
Public Function WriteNode(
    nodeId As String,
    namespaceIndex As Integer,
    value As Object) As OpcStatus

Parameters

NameTypeDescription
nodeIdStringThe textual node identifier of the node to write to.
namespaceIndexInt32The index of the namespace within that the node with the nodeId specified can be located.
valueObjectThe data to write to the Value attribute.

Returns

OpcStatus

An instance of the OpcStatus class which indicates the outcome of the write operation.

Exceptions

ExceptionCondition
ArgumentExceptionThe nodeId is an empty string.
ArgumentNullExceptionThe nodeId is a null reference (Nothing in Visual Basic).
InvalidOperationExceptionThe write service is currently not supported, especially using the arguments specified.

Remarks

Known results for the operation are:

StatusDescription
GoodCompletesAsynchronouslyThe value was successfully written to an intermediate system but the Server does not know if the data source was updated properly.
BadNodeIdInvalidFor more details see BadNodeIdInvalid.
BadNodeIdUnknownFor more details see BadNodeIdUnknown.
BadAttributeInvalidFor more details see BadAttributeInvalid.
BadIndexRangeInvalidFor more details see BadIndexRangeInvalid.
BadIndexRangeNoDataFor more details see BadIndexRangeNoData.
BadWriteNotSupportedThe requested write operation is not supported. If a client attempts to write any value, quality, timestamp combination and the server does not support the requested combination (which could be a single quantity such as just timestamp), then the Server shall not perform any write on this node and shall return this status for that node.
BadNotWritableFor more details see BadNotWritable.
BadUserAccessDeniedFor more details see BadUserAccessDenied.
BadOutOfRangeIf a client attempts to write a value outside the valid range like a value not contained in the enumeration data type of a node, the server shall return this status for that node.
BadTypeMismatchFor more details see BadTypeMismatch.
BadDataEncodingUnsupportedFor more details see BadDataEncodingUnsupported.
BadNoCommunicationFor more details see BadNoCommunication.

WriteNode(string, int, OpcAttribute, object) ​

Writes the value to the attribute of the node specified by nodeId and namespaceIndex.

csharp
public OpcStatus WriteNode(
    string nodeId,
    int namespaceIndex,
    OpcAttribute attribute,
    object value)
vbnet
Public Function WriteNode(
    nodeId As String,
    namespaceIndex As Integer,
    attribute As OpcAttribute,
    value As Object) As OpcStatus

Parameters

NameTypeDescription
nodeIdStringThe textual node identifier of the node to write to.
namespaceIndexInt32The index of the namespace within that the node with the nodeId specified can be located.
attributeOpcAttributeOne of the members defined by the OpcAttribute enumeration that defines which node attribute is to be used by the service.
valueObjectThe data to write to the attribute.

Returns

OpcStatus

An instance of the OpcStatus class which indicates the outcome of the write operation.

Exceptions

ExceptionCondition
ArgumentExceptionThe nodeId is an empty string.
ArgumentNullExceptionThe nodeId is a null reference (Nothing in Visual Basic).
InvalidOperationExceptionThe write service is currently not supported, especially using the arguments specified.

Remarks

Known results for the operation are:

StatusDescription
GoodCompletesAsynchronouslyThe value was successfully written to an intermediate system but the Server does not know if the data source was updated properly.
BadNodeIdInvalidFor more details see BadNodeIdInvalid.
BadNodeIdUnknownFor more details see BadNodeIdUnknown.
BadAttributeInvalidFor more details see BadAttributeInvalid.
BadIndexRangeInvalidFor more details see BadIndexRangeInvalid.
BadIndexRangeNoDataFor more details see BadIndexRangeNoData.
BadWriteNotSupportedThe requested write operation is not supported. If a client attempts to write any value, quality, timestamp combination and the server does not support the requested combination (which could be a single quantity such as just timestamp), then the Server shall not perform any write on this node and shall return this status for that node.
BadNotWritableFor more details see BadNotWritable.
BadUserAccessDeniedFor more details see BadUserAccessDenied.
BadOutOfRangeIf a client attempts to write a value outside the valid range like a value not contained in the enumeration data type of a node, the server shall return this status for that node.
BadTypeMismatchFor more details see BadTypeMismatch.
BadDataEncodingUnsupportedFor more details see BadDataEncodingUnsupported.
BadNoCommunicationFor more details see BadNoCommunication.

WriteNode(int, int, object) ​

Writes the value to the Value attribute of the node specified by nodeId and namespaceIndex.

csharp
public OpcStatus WriteNode(int nodeId, int namespaceIndex, object value)
vbnet
Public Function WriteNode(
    nodeId As Integer,
    namespaceIndex As Integer,
    value As Object) As OpcStatus

Parameters

NameTypeDescription
nodeIdInt32The numeric node identifier of the node to write to.
namespaceIndexInt32The index of the namespace within that the node with the nodeId specified can be located.
valueObjectThe data to write to the Value attribute.

Returns

OpcStatus

An instance of the OpcStatus class which indicates the outcome of the write operation.

Exceptions

ExceptionCondition
ArgumentExceptionThe nodeId is an empty string.
ArgumentNullExceptionThe nodeId is a null reference (Nothing in Visual Basic).
InvalidOperationExceptionThe write service is currently not supported, especially using the arguments specified.

Remarks

Known results for the operation are:

StatusDescription
GoodCompletesAsynchronouslyThe value was successfully written to an intermediate system but the Server does not know if the data source was updated properly.
BadNodeIdInvalidFor more details see BadNodeIdInvalid.
BadNodeIdUnknownFor more details see BadNodeIdUnknown.
BadAttributeInvalidFor more details see BadAttributeInvalid.
BadIndexRangeInvalidFor more details see BadIndexRangeInvalid.
BadIndexRangeNoDataFor more details see BadIndexRangeNoData.
BadWriteNotSupportedThe requested write operation is not supported. If a client attempts to write any value, quality, timestamp combination and the server does not support the requested combination (which could be a single quantity such as just timestamp), then the Server shall not perform any write on this node and shall return this status for that node.
BadNotWritableFor more details see BadNotWritable.
BadUserAccessDeniedFor more details see BadUserAccessDenied.
BadOutOfRangeIf a client attempts to write a value outside the valid range like a value not contained in the enumeration data type of a node, the server shall return this status for that node.
BadTypeMismatchFor more details see BadTypeMismatch.
BadDataEncodingUnsupportedFor more details see BadDataEncodingUnsupported.
BadNoCommunicationFor more details see BadNoCommunication.

WriteNode(int, int, OpcAttribute, object) ​

Writes the value to the attribute of the node specified by nodeId and namespaceIndex.

csharp
public OpcStatus WriteNode(
    int nodeId,
    int namespaceIndex,
    OpcAttribute attribute,
    object value)
vbnet
Public Function WriteNode(
    nodeId As Integer,
    namespaceIndex As Integer,
    attribute As OpcAttribute,
    value As Object) As OpcStatus

Parameters

NameTypeDescription
nodeIdInt32The numeric node identifier of the node to write to.
namespaceIndexInt32The index of the namespace within that the node with the nodeId specified can be located.
attributeOpcAttributeOne of the members defined by the OpcAttribute enumeration that defines which node attribute is to be used by the service.
valueObjectThe data to write to the attribute.

Returns

OpcStatus

An instance of the OpcStatus class which indicates the outcome of the write operation.

Exceptions

ExceptionCondition
ArgumentExceptionThe nodeId is equals zero.
ArgumentNullExceptionThe nodeId is a null reference (Nothing in Visual Basic).
InvalidOperationExceptionThe write service is currently not supported, especially using the arguments specified.

Remarks

Known results for the operation are:

StatusDescription
GoodCompletesAsynchronouslyThe value was successfully written to an intermediate system but the Server does not know if the data source was updated properly.
BadNodeIdInvalidFor more details see BadNodeIdInvalid.
BadNodeIdUnknownFor more details see BadNodeIdUnknown.
BadAttributeInvalidFor more details see BadAttributeInvalid.
BadIndexRangeInvalidFor more details see BadIndexRangeInvalid.
BadIndexRangeNoDataFor more details see BadIndexRangeNoData.
BadWriteNotSupportedThe requested write operation is not supported. If a client attempts to write any value, quality, timestamp combination and the server does not support the requested combination (which could be a single quantity such as just timestamp), then the Server shall not perform any write on this node and shall return this status for that node.
BadNotWritableFor more details see BadNotWritable.
BadUserAccessDeniedFor more details see BadUserAccessDenied.
BadOutOfRangeIf a client attempts to write a value outside the valid range like a value not contained in the enumeration data type of a node, the server shall return this status for that node.
BadTypeMismatchFor more details see BadTypeMismatch.
BadDataEncodingUnsupportedFor more details see BadDataEncodingUnsupported.
BadNoCommunicationFor more details see BadNoCommunication.

WriteNode(OpcNodeId, OpcRange, object) ​

since v2.24

Writes the value into the range of Value attribute of the node specified by nodeId.

csharp
public OpcStatus WriteNode(OpcNodeId nodeId, OpcRange range, object value)
vbnet
Public Function WriteNode(
    nodeId As OpcNodeId,
    range As OpcRange,
    value As Object) As OpcStatus

Parameters

NameTypeDescription
nodeIdOpcNodeIdThe OpcNodeId of the node to write to.
rangeOpcRangeThe OpcRange to use to identify the single element or range of elements to write.
valueObjectThe data to write to the Value attribute.

Returns

OpcStatus

An instance of the OpcStatus class which indicates the outcome of the write operation.

Exceptions

ExceptionCondition
ArgumentExceptionThe nodeId indicates to be a null-node-id (see IsNull).
ArgumentNullExceptionThe nodeId is a null reference (Nothing in Visual Basic).
InvalidOperationExceptionThe write service is currently not supported, especially using the arguments specified.

Remarks

Known results for the operation are:

StatusDescription
GoodCompletesAsynchronouslyThe value was successfully written to an intermediate system but the Server does not know if the data source was updated properly.
BadNodeIdInvalidFor more details see BadNodeIdInvalid.
BadNodeIdUnknownFor more details see BadNodeIdUnknown.
BadAttributeInvalidFor more details see BadAttributeInvalid.
BadIndexRangeInvalidFor more details see BadIndexRangeInvalid.
BadIndexRangeNoDataFor more details see BadIndexRangeNoData.
BadWriteNotSupportedThe requested write operation is not supported. If a client attempts to write any value, quality, timestamp combination and the server does not support the requested combination (which could be a single quantity such as just timestamp), then the Server shall not perform any write on this node and shall return this status for that node.
BadNotWritableFor more details see BadNotWritable.
BadUserAccessDeniedFor more details see BadUserAccessDenied.
BadOutOfRangeIf a client attempts to write a value outside the valid range like a value not contained in the enumeration data type of a node, the server shall return this status for that node.
BadTypeMismatchFor more details see BadTypeMismatch.
BadDataEncodingUnsupportedFor more details see BadDataEncodingUnsupported.
BadNoCommunicationFor more details see BadNoCommunication.

WriteNode(OpcNodeId, OpcAttribute, OpcRange, object) ​

since v2.24

Writes the value into the range of attribute of the node specified by nodeId.

csharp
public OpcStatus WriteNode(
    OpcNodeId nodeId,
    OpcAttribute attribute,
    OpcRange range,
    object value)
vbnet
Public Function WriteNode(
    nodeId As OpcNodeId,
    attribute As OpcAttribute,
    range As OpcRange,
    value As Object) As OpcStatus

Parameters

NameTypeDescription
nodeIdOpcNodeIdThe OpcNodeId of the node to write to.
attributeOpcAttributeOne of the members defined by the OpcAttribute enumeration that defines which node attribute is to be used by the service.
rangeOpcRangeThe OpcRange to use to identify the single element or range of elements to write.
valueObjectThe data to write to the Value attribute.

Returns

OpcStatus

An instance of the OpcStatus class which indicates the outcome of the write operation.

Exceptions

ExceptionCondition
ArgumentExceptionThe nodeId indicates to be a null-node-id (see IsNull).
ArgumentNullExceptionThe nodeId is a null reference (Nothing in Visual Basic).
InvalidOperationExceptionThe write service is currently not supported, especially using the arguments specified.

Remarks

Known results for the operation are:

StatusDescription
GoodCompletesAsynchronouslyThe value was successfully written to an intermediate system but the Server does not know if the data source was updated properly.
BadNodeIdInvalidFor more details see BadNodeIdInvalid.
BadNodeIdUnknownFor more details see BadNodeIdUnknown.
BadAttributeInvalidFor more details see BadAttributeInvalid.
BadIndexRangeInvalidFor more details see BadIndexRangeInvalid.
BadIndexRangeNoDataFor more details see BadIndexRangeNoData.
BadWriteNotSupportedThe requested write operation is not supported. If a client attempts to write any value, quality, timestamp combination and the server does not support the requested combination (which could be a single quantity such as just timestamp), then the Server shall not perform any write on this node and shall return this status for that node.
BadNotWritableFor more details see BadNotWritable.
BadUserAccessDeniedFor more details see BadUserAccessDenied.
BadOutOfRangeIf a client attempts to write a value outside the valid range like a value not contained in the enumeration data type of a node, the server shall return this status for that node.
BadTypeMismatchFor more details see BadTypeMismatch.
BadDataEncodingUnsupportedFor more details see BadDataEncodingUnsupported.
BadNoCommunicationFor more details see BadNoCommunication.

WriteNode(string, OpcRange, object) ​

since v2.24

Writes the value into the range of Value attribute of the node specified by nodeId.

csharp
public OpcStatus WriteNode(string nodeId, OpcRange range, object value)
vbnet
Public Function WriteNode(
    nodeId As String,
    range As OpcRange,
    value As Object) As OpcStatus

Parameters

NameTypeDescription
nodeIdStringThe textual node identifier of the node to write to.
rangeOpcRangeThe OpcRange to use to identify the single element or range of elements to write.
valueObjectThe data to write to the Value attribute.

Returns

OpcStatus

An instance of the OpcStatus class which indicates the outcome of the write operation.

Exceptions

ExceptionCondition
ArgumentExceptionThe nodeId is an empty string.
ArgumentNullExceptionThe nodeId is a null reference (Nothing in Visual Basic).
InvalidOperationExceptionThe write service is currently not supported, especially using the arguments specified.

Remarks

Known results for the operation are:

StatusDescription
GoodCompletesAsynchronouslyThe value was successfully written to an intermediate system but the Server does not know if the data source was updated properly.
BadNodeIdInvalidFor more details see BadNodeIdInvalid.
BadNodeIdUnknownFor more details see BadNodeIdUnknown.
BadAttributeInvalidFor more details see BadAttributeInvalid.
BadIndexRangeInvalidFor more details see BadIndexRangeInvalid.
BadIndexRangeNoDataFor more details see BadIndexRangeNoData.
BadWriteNotSupportedThe requested write operation is not supported. If a client attempts to write any value, quality, timestamp combination and the server does not support the requested combination (which could be a single quantity such as just timestamp), then the Server shall not perform any write on this node and shall return this status for that node.
BadNotWritableFor more details see BadNotWritable.
BadUserAccessDeniedFor more details see BadUserAccessDenied.
BadOutOfRangeIf a client attempts to write a value outside the valid range like a value not contained in the enumeration data type of a node, the server shall return this status for that node.
BadTypeMismatchFor more details see BadTypeMismatch.
BadDataEncodingUnsupportedFor more details see BadDataEncodingUnsupported.
BadNoCommunicationFor more details see BadNoCommunication.

WriteNode(string, OpcAttribute, OpcRange, object) ​

since v2.24

Writes the value into the range of attribute of the node specified by nodeId.

csharp
public OpcStatus WriteNode(
    string nodeId,
    OpcAttribute attribute,
    OpcRange range,
    object value)
vbnet
Public Function WriteNode(
    nodeId As String,
    attribute As OpcAttribute,
    range As OpcRange,
    value As Object) As OpcStatus

Parameters

NameTypeDescription
nodeIdStringThe textual node identifier of the node to write to.
attributeOpcAttributeOne of the members defined by the OpcAttribute enumeration that defines which node attribute is to be used by the service.
rangeOpcRangeThe OpcRange to use to identify the single element or range of elements to write.
valueObjectThe data to write to the attribute.

Returns

OpcStatus

An instance of the OpcStatus class which indicates the outcome of the write operation.

Exceptions

ExceptionCondition
ArgumentExceptionThe nodeId is an empty string.
ArgumentNullExceptionThe nodeId is a null reference (Nothing in Visual Basic).
InvalidOperationExceptionThe write service is currently not supported, especially using the arguments specified.

Remarks

Known results for the operation are:

StatusDescription
GoodCompletesAsynchronouslyThe value was successfully written to an intermediate system but the Server does not know if the data source was updated properly.
BadNodeIdInvalidFor more details see BadNodeIdInvalid.
BadNodeIdUnknownFor more details see BadNodeIdUnknown.
BadAttributeInvalidFor more details see BadAttributeInvalid.
BadIndexRangeInvalidFor more details see BadIndexRangeInvalid.
BadIndexRangeNoDataFor more details see BadIndexRangeNoData.
BadWriteNotSupportedThe requested write operation is not supported. If a client attempts to write any value, quality, timestamp combination and the server does not support the requested combination (which could be a single quantity such as just timestamp), then the Server shall not perform any write on this node and shall return this status for that node.
BadNotWritableFor more details see BadNotWritable.
BadUserAccessDeniedFor more details see BadUserAccessDenied.
BadOutOfRangeIf a client attempts to write a value outside the valid range like a value not contained in the enumeration data type of a node, the server shall return this status for that node.
BadTypeMismatchFor more details see BadTypeMismatch.
BadDataEncodingUnsupportedFor more details see BadDataEncodingUnsupported.
BadNoCommunicationFor more details see BadNoCommunication.

WriteNode(int, OpcRange, object) ​

since v2.24

Writes the value into the range of Value attribute of the node specified by nodeId.

csharp
public OpcStatus WriteNode(int nodeId, OpcRange range, object value)
vbnet
Public Function WriteNode(
    nodeId As Integer,
    range As OpcRange,
    value As Object) As OpcStatus

Parameters

NameTypeDescription
nodeIdInt32The numeric node identifier of the node to write to.
rangeOpcRangeThe OpcRange to use to identify the single element or range of elements to write.
valueObjectThe data to write to the Value attribute.

Returns

OpcStatus

An instance of the OpcStatus class which indicates the outcome of the write operation.

Exceptions

ExceptionCondition
ArgumentExceptionThe nodeId is equals to zero.
InvalidOperationExceptionThe write service is currently not supported, especially using the arguments specified.

Remarks

Known results for the operation are:

StatusDescription
GoodCompletesAsynchronouslyThe value was successfully written to an intermediate system but the Server does not know if the data source was updated properly.
BadNodeIdInvalidFor more details see BadNodeIdInvalid.
BadNodeIdUnknownFor more details see BadNodeIdUnknown.
BadAttributeInvalidFor more details see BadAttributeInvalid.
BadIndexRangeInvalidFor more details see BadIndexRangeInvalid.
BadIndexRangeNoDataFor more details see BadIndexRangeNoData.
BadWriteNotSupportedThe requested write operation is not supported. If a client attempts to write any value, quality, timestamp combination and the server does not support the requested combination (which could be a single quantity such as just timestamp), then the Server shall not perform any write on this node and shall return this status for that node.
BadNotWritableFor more details see BadNotWritable.
BadUserAccessDeniedFor more details see BadUserAccessDenied.
BadOutOfRangeIf a client attempts to write a value outside the valid range like a value not contained in the enumeration data type of a node, the server shall return this status for that node.
BadTypeMismatchFor more details see BadTypeMismatch.
BadDataEncodingUnsupportedFor more details see BadDataEncodingUnsupported.
BadNoCommunicationFor more details see BadNoCommunication.

WriteNode(int, OpcAttribute, OpcRange, object) ​

since v2.24

Writes the value into the range of attribute of the node specified by nodeId.

csharp
public OpcStatus WriteNode(
    int nodeId,
    OpcAttribute attribute,
    OpcRange range,
    object value)
vbnet
Public Function WriteNode(
    nodeId As Integer,
    attribute As OpcAttribute,
    range As OpcRange,
    value As Object) As OpcStatus

Parameters

NameTypeDescription
nodeIdInt32The numeric node identifier of the node to write to.
attributeOpcAttributeOne of the members defined by the OpcAttribute enumeration that defines which node attribute is to be used by the service.
rangeOpcRangeThe OpcRange to use to identify the single element or range of elements to write.
valueObjectThe data to write to the attribute.

Returns

OpcStatus

An instance of the OpcStatus class which indicates the outcome of the write operation.

Exceptions

ExceptionCondition
ArgumentExceptionThe nodeId is equals zero.
InvalidOperationExceptionThe write service is currently not supported, especially using the arguments specified.

Remarks

Known results for the operation are:

StatusDescription
GoodCompletesAsynchronouslyThe value was successfully written to an intermediate system but the Server does not know if the data source was updated properly.
BadNodeIdInvalidFor more details see BadNodeIdInvalid.
BadNodeIdUnknownFor more details see BadNodeIdUnknown.
BadAttributeInvalidFor more details see BadAttributeInvalid.
BadIndexRangeInvalidFor more details see BadIndexRangeInvalid.
BadIndexRangeNoDataFor more details see BadIndexRangeNoData.
BadWriteNotSupportedThe requested write operation is not supported. If a client attempts to write any value, quality, timestamp combination and the server does not support the requested combination (which could be a single quantity such as just timestamp), then the Server shall not perform any write on this node and shall return this status for that node.
BadNotWritableFor more details see BadNotWritable.
BadUserAccessDeniedFor more details see BadUserAccessDenied.
BadOutOfRangeIf a client attempts to write a value outside the valid range like a value not contained in the enumeration data type of a node, the server shall return this status for that node.
BadTypeMismatchFor more details see BadTypeMismatch.
BadDataEncodingUnsupportedFor more details see BadDataEncodingUnsupported.
BadNoCommunicationFor more details see BadNoCommunication.

WriteNode(string, int, OpcRange, object) ​

since v2.24

Writes the value into the range of Value attribute of the node specified by nodeId and namespaceIndex.

csharp
public OpcStatus WriteNode(
    string nodeId,
    int namespaceIndex,
    OpcRange range,
    object value)
vbnet
Public Function WriteNode(
    nodeId As String,
    namespaceIndex As Integer,
    range As OpcRange,
    value As Object) As OpcStatus

Parameters

NameTypeDescription
nodeIdStringThe textual node identifier of the node to write to.
namespaceIndexInt32The index of the namespace within that the node with the nodeId specified can be located.
rangeOpcRangeThe OpcRange to use to identify the single element or range of elements to write.
valueObjectThe data to write to the Value attribute.

Returns

OpcStatus

An instance of the OpcStatus class which indicates the outcome of the write operation.

Exceptions

ExceptionCondition
ArgumentExceptionThe nodeId is an empty string.
ArgumentNullExceptionThe nodeId is a null reference (Nothing in Visual Basic).
InvalidOperationExceptionThe write service is currently not supported, especially using the arguments specified.

Remarks

Known results for the operation are:

StatusDescription
GoodCompletesAsynchronouslyThe value was successfully written to an intermediate system but the Server does not know if the data source was updated properly.
BadNodeIdInvalidFor more details see BadNodeIdInvalid.
BadNodeIdUnknownFor more details see BadNodeIdUnknown.
BadAttributeInvalidFor more details see BadAttributeInvalid.
BadIndexRangeInvalidFor more details see BadIndexRangeInvalid.
BadIndexRangeNoDataFor more details see BadIndexRangeNoData.
BadWriteNotSupportedThe requested write operation is not supported. If a client attempts to write any value, quality, timestamp combination and the server does not support the requested combination (which could be a single quantity such as just timestamp), then the Server shall not perform any write on this node and shall return this status for that node.
BadNotWritableFor more details see BadNotWritable.
BadUserAccessDeniedFor more details see BadUserAccessDenied.
BadOutOfRangeIf a client attempts to write a value outside the valid range like a value not contained in the enumeration data type of a node, the server shall return this status for that node.
BadTypeMismatchFor more details see BadTypeMismatch.
BadDataEncodingUnsupportedFor more details see BadDataEncodingUnsupported.
BadNoCommunicationFor more details see BadNoCommunication.

WriteNode(string, int, OpcAttribute, OpcRange, object) ​

since v2.24

Writes the value into the range of attribute of the node specified by nodeId and namespaceIndex.

csharp
public OpcStatus WriteNode(
    string nodeId,
    int namespaceIndex,
    OpcAttribute attribute,
    OpcRange range,
    object value)
vbnet
Public Function WriteNode(
    nodeId As String,
    namespaceIndex As Integer,
    attribute As OpcAttribute,
    range As OpcRange,
    value As Object) As OpcStatus

Parameters

NameTypeDescription
nodeIdStringThe textual node identifier of the node to write to.
namespaceIndexInt32The index of the namespace within that the node with the nodeId specified can be located.
attributeOpcAttributeOne of the members defined by the OpcAttribute enumeration that defines which node attribute is to be used by the service.
rangeOpcRangeThe OpcRange to use to identify the single element or range of elements to write.
valueObjectThe data to write to the attribute.

Returns

OpcStatus

An instance of the OpcStatus class which indicates the outcome of the write operation.

Exceptions

ExceptionCondition
ArgumentExceptionThe nodeId is an empty string.
ArgumentNullExceptionThe nodeId is a null reference (Nothing in Visual Basic).
InvalidOperationExceptionThe write service is currently not supported, especially using the arguments specified.

Remarks

Known results for the operation are:

StatusDescription
GoodCompletesAsynchronouslyThe value was successfully written to an intermediate system but the Server does not know if the data source was updated properly.
BadNodeIdInvalidFor more details see BadNodeIdInvalid.
BadNodeIdUnknownFor more details see BadNodeIdUnknown.
BadAttributeInvalidFor more details see BadAttributeInvalid.
BadIndexRangeInvalidFor more details see BadIndexRangeInvalid.
BadIndexRangeNoDataFor more details see BadIndexRangeNoData.
BadWriteNotSupportedThe requested write operation is not supported. If a client attempts to write any value, quality, timestamp combination and the server does not support the requested combination (which could be a single quantity such as just timestamp), then the Server shall not perform any write on this node and shall return this status for that node.
BadNotWritableFor more details see BadNotWritable.
BadUserAccessDeniedFor more details see BadUserAccessDenied.
BadOutOfRangeIf a client attempts to write a value outside the valid range like a value not contained in the enumeration data type of a node, the server shall return this status for that node.
BadTypeMismatchFor more details see BadTypeMismatch.
BadDataEncodingUnsupportedFor more details see BadDataEncodingUnsupported.
BadNoCommunicationFor more details see BadNoCommunication.

WriteNode(int, int, OpcRange, object) ​

since v2.24

Writes the value into the range of Value attribute of the node specified by nodeId and namespaceIndex.

csharp
public OpcStatus WriteNode(
    int nodeId,
    int namespaceIndex,
    OpcRange range,
    object value)
vbnet
Public Function WriteNode(
    nodeId As Integer,
    namespaceIndex As Integer,
    range As OpcRange,
    value As Object) As OpcStatus

Parameters

NameTypeDescription
nodeIdInt32The numeric node identifier of the node to write to.
namespaceIndexInt32The index of the namespace within that the node with the nodeId specified can be located.
rangeOpcRangeThe OpcRange to use to identify the single element or range of elements to write.
valueObjectThe data to write to the Value attribute.

Returns

OpcStatus

An instance of the OpcStatus class which indicates the outcome of the write operation.

Exceptions

ExceptionCondition
ArgumentExceptionThe nodeId is an empty string.
ArgumentNullExceptionThe nodeId is a null reference (Nothing in Visual Basic).
InvalidOperationExceptionThe write service is currently not supported, especially using the arguments specified.

Remarks

Known results for the operation are:

StatusDescription
GoodCompletesAsynchronouslyThe value was successfully written to an intermediate system but the Server does not know if the data source was updated properly.
BadNodeIdInvalidFor more details see BadNodeIdInvalid.
BadNodeIdUnknownFor more details see BadNodeIdUnknown.
BadAttributeInvalidFor more details see BadAttributeInvalid.
BadIndexRangeInvalidFor more details see BadIndexRangeInvalid.
BadIndexRangeNoDataFor more details see BadIndexRangeNoData.
BadWriteNotSupportedThe requested write operation is not supported. If a client attempts to write any value, quality, timestamp combination and the server does not support the requested combination (which could be a single quantity such as just timestamp), then the Server shall not perform any write on this node and shall return this status for that node.
BadNotWritableFor more details see BadNotWritable.
BadUserAccessDeniedFor more details see BadUserAccessDenied.
BadOutOfRangeIf a client attempts to write a value outside the valid range like a value not contained in the enumeration data type of a node, the server shall return this status for that node.
BadTypeMismatchFor more details see BadTypeMismatch.
BadDataEncodingUnsupportedFor more details see BadDataEncodingUnsupported.
BadNoCommunicationFor more details see BadNoCommunication.

WriteNode(int, int, OpcAttribute, OpcRange, object) ​

since v2.24

Writes the value into the range of the attribute of the node specified by nodeId and namespaceIndex.

csharp
public OpcStatus WriteNode(
    int nodeId,
    int namespaceIndex,
    OpcAttribute attribute,
    OpcRange range,
    object value)
vbnet
Public Function WriteNode(
    nodeId As Integer,
    namespaceIndex As Integer,
    attribute As OpcAttribute,
    range As OpcRange,
    value As Object) As OpcStatus

Parameters

NameTypeDescription
nodeIdInt32The numeric node identifier of the node to write to.
namespaceIndexInt32The index of the namespace within that the node with the nodeId specified can be located.
attributeOpcAttributeOne of the members defined by the OpcAttribute enumeration that defines which node attribute is to be used by the service.
rangeOpcRangeThe OpcRange to use to identify the single element or range of elements to write.
valueObjectThe data to write to the attribute.

Returns

OpcStatus

An instance of the OpcStatus class which indicates the outcome of the write operation.

Exceptions

ExceptionCondition
ArgumentExceptionThe nodeId is equals zero.
ArgumentNullExceptionThe nodeId is a null reference (Nothing in Visual Basic).
InvalidOperationExceptionThe write service is currently not supported, especially using the arguments specified.

Remarks

Known results for the operation are:

StatusDescription
GoodCompletesAsynchronouslyThe value was successfully written to an intermediate system but the Server does not know if the data source was updated properly.
BadNodeIdInvalidFor more details see BadNodeIdInvalid.
BadNodeIdUnknownFor more details see BadNodeIdUnknown.
BadAttributeInvalidFor more details see BadAttributeInvalid.
BadIndexRangeInvalidFor more details see BadIndexRangeInvalid.
BadIndexRangeNoDataFor more details see BadIndexRangeNoData.
BadWriteNotSupportedThe requested write operation is not supported. If a client attempts to write any value, quality, timestamp combination and the server does not support the requested combination (which could be a single quantity such as just timestamp), then the Server shall not perform any write on this node and shall return this status for that node.
BadNotWritableFor more details see BadNotWritable.
BadUserAccessDeniedFor more details see BadUserAccessDenied.
BadOutOfRangeIf a client attempts to write a value outside the valid range like a value not contained in the enumeration data type of a node, the server shall return this status for that node.
BadTypeMismatchFor more details see BadTypeMismatch.
BadDataEncodingUnsupportedFor more details see BadDataEncodingUnsupported.
BadNoCommunicationFor more details see BadNoCommunication.

WriteNode(OpcWriteNode) ​

Writes one value to one attribute of one node using the specified command.

csharp
public OpcStatus WriteNode(OpcWriteNode command)
vbnet
Public Function WriteNode(command As OpcWriteNode) As OpcStatus

Parameters

NameTypeDescription
commandOpcWriteNodeThe OpcWriteNode instance to process.

Returns

OpcStatus

An instance of the OpcStatus class which indicates the outcome of the operation for the command.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe command is a null reference (Nothing in Visual Basic).
InvalidOperationExceptionThe write service is currently not supported, especially using the command specified.

Remarks

Known results for the command specified are:

StatusDescription
GoodCompletesAsynchronouslyThe value was successfully written to an intermediate system but the Server does not know if the data source was updated properly.
BadNodeIdInvalidFor more details see BadNodeIdInvalid.
BadNodeIdUnknownFor more details see BadNodeIdUnknown.
BadAttributeInvalidFor more details see BadAttributeInvalid.
BadIndexRangeInvalidFor more details see BadIndexRangeInvalid.
BadIndexRangeNoDataFor more details see BadIndexRangeNoData.
BadWriteNotSupportedThe requested write operation is not supported. If a client attempts to write any value, quality, timestamp combination and the server does not support the requested combination (which could be a single quantity such as just timestamp), then the Server shall not perform any write on this node and shall return this status for that node.
BadNotWritableFor more details see BadNotWritable.
BadUserAccessDeniedFor more details see BadUserAccessDenied.
BadOutOfRangeIf a client attempts to write a value outside the valid range like a value not contained in the enumeration data type of a node, the server shall return this status for that node.
BadTypeMismatchFor more details see BadTypeMismatch.
BadDataEncodingUnsupportedFor more details see BadDataEncodingUnsupported.
BadNoCommunicationFor more details see BadNoCommunication.