Skip to content

Reference

OpcClient.WriteNodes Method

Writes one or more values to one or more attributes of one or more nodes using the specified commands.

Reference

OpcClient.WriteNodes 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

2 overloads

OverloadDescription
WriteNodes(IEnumerable<OpcWriteNode>)Writes one or more values to one or more attributes of one or more nodes using the specified commands.
WriteNodes(params OpcWriteNode[])Writes one or more values to one or more attributes of one or more nodes using the specified commands.

Exceptions (all overloads)

ExceptionCondition
InvalidOperationExceptionThe write service is currently not supported, especially using the commands specified.
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.

WriteNodes(IEnumerable<OpcWriteNode>) ​

Writes one or more values to one or more attributes of one or more nodes using the specified commands.

csharp
public OpcStatusCollection WriteNodes(IEnumerable<OpcWriteNode> commands)
vbnet
Public Function WriteNodes(
    commands As IEnumerable(Of OpcWriteNode)) As OpcStatusCollection

Parameters

NameTypeDescription
commandsIEnumerable<OpcWriteNode>A sequence of OpcWriteNode instances to process.

Returns

OpcStatusCollection

An instance of the OpcStatusCollection its number and order of items matches the number and order of items in the commands sequence. There is for each command one entry which indicates the outcome of the operation for that command.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe commands sequence or one of its items is a null reference (Nothing in Visual Basic).

Remarks

Known results for the commands 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.

WriteNodes(params OpcWriteNode[]) ​

Writes one or more values to one or more attributes of one or more nodes using the specified commands.

csharp
public OpcStatusCollection WriteNodes(params OpcWriteNode[] commands)
vbnet
Public Function WriteNodes(
    ParamArray commands As OpcWriteNode()) As OpcStatusCollection

Parameters

NameTypeDescription
commandsparams OpcWriteNode[]An array of OpcWriteNode instances to process.

Returns

OpcStatusCollection

An instance of the OpcStatusCollection its number and order of items matches the number and order of items in the commands commands. There is for each command one entry which indicates the outcome of the operation for that command.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe commands array or one of its items is a null reference (Nothing in Visual Basic).

Remarks

Known results for the commands 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.