# OpcClient.WriteNode Method

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

<dl class="api-definition">
<dt>Type</dt>
<dd><a href="./">OpcClient</a></dd>
<dt>Namespace</dt>
<dd><a href="../namespaces/opc.uafx.client">Opc.UaFx.Client</a></dd>
<dt>Assembly</dt>
<dd>Opc.UaFx.Advanced.dll</dd>
<dt>Package</dt>
<dd>Opc.UaFx.Advanced v2.59.0</dd>
<dt>Members</dt>
<dd><a href="./members">OpcClient Members</a></dd>
<dt>Also in</dt>
<dd>Opc.UaFx.Client</dd>
</dl>

<span class="api-meta">21 overloads</span>

| Overload | Description |
|---|---|
| [WriteNode(OpcNodeId, object)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/writenode#writenode-opc-uafx-opcnodeid-system-object) | Writes the `value` to the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute of the node specified by `nodeId`. |
| [WriteNode(OpcNodeId, OpcAttribute, object)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/writenode#writenode-opc-uafx-opcnodeid-opc-uafx-opcattribute-system-object) | Writes the `value` to the `attribute` of the node specified by `nodeId`. |
| [WriteNode(string, object)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/writenode#writenode-system-string-system-object) | Writes the `value` to the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute of the node specified by `nodeId`. |
| [WriteNode(string, OpcAttribute, object)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/writenode#writenode-system-string-opc-uafx-opcattribute-system-object) | Writes the `value` to the `attribute` of the node specified by `nodeId`. |
| [WriteNode(int, object)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/writenode#writenode-system-int32-system-object) | Writes the `value` to the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute of the node specified by `nodeId`. |
| [WriteNode(int, OpcAttribute, object)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/writenode#writenode-system-int32-opc-uafx-opcattribute-system-object) | Writes the `value` to the `attribute` of the node specified by `nodeId`. |
| [WriteNode(string, int, object)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/writenode#writenode-system-string-system-int32-system-object) | Writes the `value` to the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute of the node specified by `nodeId` and `namespaceIndex`. |
| [WriteNode(string, int, OpcAttribute, object)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/writenode#writenode-system-string-system-int32-opc-uafx-opcattribute-system-object) | Writes the `value` to the `attribute` of the node specified by `nodeId` and `namespaceIndex`. |
| [WriteNode(int, int, object)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/writenode#writenode-system-int32-system-int32-system-object) | Writes the `value` to the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute of the node specified by `nodeId` and `namespaceIndex`. |
| [WriteNode(int, int, OpcAttribute, object)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/writenode#writenode-system-int32-system-int32-opc-uafx-opcattribute-system-object) | Writes the `value` to the `attribute` of the node specified by `nodeId` and `namespaceIndex`. |
| [WriteNode(OpcNodeId, OpcRange, object)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/writenode#writenode-opc-uafx-opcnodeid-opc-uafx-opcrange-system-object)<span class="api-meta">since v2.24</span> | Writes the `value` into the `range` of [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute of the node specified by `nodeId`. |
| [WriteNode(OpcNodeId, OpcAttribute, OpcRange, object)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/writenode#writenode-opc-uafx-opcnodeid-opc-uafx-opcattribute-opc-uafx-opcrange-system-object)<span class="api-meta">since v2.24</span> | Writes the `value` into the `range` of `attribute` of the node specified by `nodeId`. |
| [WriteNode(string, OpcRange, object)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/writenode#writenode-system-string-opc-uafx-opcrange-system-object)<span class="api-meta">since v2.24</span> | Writes the `value` into the `range` of [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute of the node specified by `nodeId`. |
| [WriteNode(string, OpcAttribute, OpcRange, object)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/writenode#writenode-system-string-opc-uafx-opcattribute-opc-uafx-opcrange-system-object)<span class="api-meta">since v2.24</span> | Writes the `value` into the `range` of `attribute` of the node specified by `nodeId`. |
| [WriteNode(int, OpcRange, object)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/writenode#writenode-system-int32-opc-uafx-opcrange-system-object)<span class="api-meta">since v2.24</span> | Writes the `value` into the `range` of [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute of the node specified by `nodeId`. |
| [WriteNode(int, OpcAttribute, OpcRange, object)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/writenode#writenode-system-int32-opc-uafx-opcattribute-opc-uafx-opcrange-system-object)<span class="api-meta">since v2.24</span> | Writes the `value` into the `range` of `attribute` of the node specified by `nodeId`. |
| [WriteNode(string, int, OpcRange, object)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/writenode#writenode-system-string-system-int32-opc-uafx-opcrange-system-object)<span class="api-meta">since v2.24</span> | Writes the `value` into the `range` of [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute of the node specified by `nodeId` and `namespaceIndex`. |
| [WriteNode(string, int, OpcAttribute, OpcRange, object)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/writenode#writenode-system-string-system-int32-opc-uafx-opcattribute-opc-uafx-opcrange-system-object)<span class="api-meta">since v2.24</span> | Writes the `value` into the `range` of `attribute` of the node specified by `nodeId` and `namespaceIndex`. |
| [WriteNode(int, int, OpcRange, object)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/writenode#writenode-system-int32-system-int32-opc-uafx-opcrange-system-object)<span class="api-meta">since v2.24</span> | Writes the `value` into the `range` of [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute of the node specified by `nodeId` and `namespaceIndex`. |
| [WriteNode(int, int, OpcAttribute, OpcRange, object)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/writenode#writenode-system-int32-system-int32-opc-uafx-opcattribute-opc-uafx-opcrange-system-object)<span class="api-meta">since v2.24</span> | Writes the `value` into the `range` of the `attribute` of the node specified by `nodeId` and `namespaceIndex`. |
| [WriteNode(OpcWriteNode)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/writenode#writenode-opc-uafx-opcwritenode) | Writes one value to one attribute of one node using the specified `command`. |

**Exceptions (all overloads)**

| Exception | Condition |
|---|---|
| [ObjectDisposedException](https://learn.microsoft.com/dotnet/api/system.objectdisposedexception) | The object has been disposed of. |
| [OpcException](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcexception/) | The service execution failed upon different circumstances; for more details see exception details. The following issues can lead to that exception: [BadNothingToDo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnothingtodo) and [BadTooManyOperations](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanyoperations). |

## WriteNode(OpcNodeId, object)

Writes the `value` to the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute of the node specified by `nodeId`.

<div class="api-signature" data-lang="csharp">

```csharp
public OpcStatus WriteNode(OpcNodeId nodeId, object value)
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public Function WriteNode(nodeId As OpcNodeId, value As Object) As OpcStatus
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) | The [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) of the node to write to. |
| `value` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The data to write to the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute. |

**Returns**

[OpcStatus](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatus/)

An instance of the [OpcStatus](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatus/) class which indicates the outcome of the write operation.

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `nodeId` indicates to be a null-node-id (see [IsNull](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#isnull)). |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `nodeId` is a null reference (Nothing in Visual Basic). |
| [InvalidOperationException](https://learn.microsoft.com/dotnet/api/system.invalidoperationexception) | The write service is currently not supported, especially using the arguments specified. |

**Remarks**

Known results for the operation are:

| Status | Description |
|---|---|
| [GoodCompletesAsynchronously](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#goodcompletesasynchronously) | The value was successfully written to an intermediate system but the Server does not know if the data source was updated properly. |
| [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid) | For more details see [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid). |
| [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown) | For more details see [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown). |
| [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid) | For more details see [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid). |
| [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid) | For more details see [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid). |
| [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata) | For more details see [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata). |
| [BadWriteNotSupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badwritenotsupported) | The 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. |
| [BadNotWritable](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnotwritable) | For more details see [BadNotWritable](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnotwritable). |
| [BadUserAccessDenied](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baduseraccessdenied) | For more details see [BadUserAccessDenied](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baduseraccessdenied). |
| [BadOutOfRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badoutofrange) | If 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. |
| [BadTypeMismatch](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtypemismatch) | For more details see [BadTypeMismatch](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtypemismatch). |
| [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported) | For more details see [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported). |
| [BadNoCommunication](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnocommunication) | For more details see [BadNoCommunication](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnocommunication). |

## WriteNode(OpcNodeId, OpcAttribute, object)

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

<div class="api-signature" data-lang="csharp">

```csharp
public OpcStatus WriteNode(
    OpcNodeId nodeId,
    OpcAttribute attribute,
    object value)
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public Function WriteNode(
    nodeId As OpcNodeId,
    attribute As OpcAttribute,
    value As Object) As OpcStatus
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) | The [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) of the node to write to. |
| `attribute` | [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) | One of the members defined by the [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) enumeration that defines which node attribute is to be used by the service. |
| `value` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The data to write to the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute. |

**Returns**

[OpcStatus](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatus/)

An instance of the [OpcStatus](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatus/) class which indicates the outcome of the write operation.

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `nodeId` indicates to be a null-node-id (see [IsNull](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#isnull)). |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `nodeId` is a null reference (Nothing in Visual Basic). |
| [InvalidOperationException](https://learn.microsoft.com/dotnet/api/system.invalidoperationexception) | The write service is currently not supported, especially using the arguments specified. |

**Remarks**

Known results for the operation are:

| Status | Description |
|---|---|
| [GoodCompletesAsynchronously](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#goodcompletesasynchronously) | The value was successfully written to an intermediate system but the Server does not know if the data source was updated properly. |
| [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid) | For more details see [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid). |
| [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown) | For more details see [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown). |
| [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid) | For more details see [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid). |
| [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid) | For more details see [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid). |
| [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata) | For more details see [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata). |
| [BadWriteNotSupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badwritenotsupported) | The 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. |
| [BadNotWritable](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnotwritable) | For more details see [BadNotWritable](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnotwritable). |
| [BadUserAccessDenied](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baduseraccessdenied) | For more details see [BadUserAccessDenied](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baduseraccessdenied). |
| [BadOutOfRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badoutofrange) | If 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. |
| [BadTypeMismatch](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtypemismatch) | For more details see [BadTypeMismatch](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtypemismatch). |
| [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported) | For more details see [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported). |
| [BadNoCommunication](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnocommunication) | For more details see [BadNoCommunication](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnocommunication). |

## WriteNode(string, object)

Writes the `value` to the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute of the node specified by `nodeId`.

<div class="api-signature" data-lang="csharp">

```csharp
public OpcStatus WriteNode(string nodeId, object value)
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public Function WriteNode(nodeId As String, value As Object) As OpcStatus
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The textual node identifier of the node to write to. |
| `value` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The data to write to the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute. |

**Returns**

[OpcStatus](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatus/)

An instance of the [OpcStatus](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatus/) class which indicates the outcome of the write operation.

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `nodeId` is an empty string. |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `nodeId` is a null reference (Nothing in Visual Basic). |
| [InvalidOperationException](https://learn.microsoft.com/dotnet/api/system.invalidoperationexception) | The write service is currently not supported, especially using the arguments specified. |

**Remarks**

Known results for the operation are:

| Status | Description |
|---|---|
| [GoodCompletesAsynchronously](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#goodcompletesasynchronously) | The value was successfully written to an intermediate system but the Server does not know if the data source was updated properly. |
| [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid) | For more details see [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid). |
| [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown) | For more details see [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown). |
| [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid) | For more details see [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid). |
| [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid) | For more details see [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid). |
| [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata) | For more details see [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata). |
| [BadWriteNotSupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badwritenotsupported) | The 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. |
| [BadNotWritable](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnotwritable) | For more details see [BadNotWritable](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnotwritable). |
| [BadUserAccessDenied](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baduseraccessdenied) | For more details see [BadUserAccessDenied](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baduseraccessdenied). |
| [BadOutOfRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badoutofrange) | If 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. |
| [BadTypeMismatch](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtypemismatch) | For more details see [BadTypeMismatch](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtypemismatch). |
| [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported) | For more details see [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported). |
| [BadNoCommunication](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnocommunication) | For more details see [BadNoCommunication](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnocommunication). |

## WriteNode(string, OpcAttribute, object)

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

<div class="api-signature" data-lang="csharp">

```csharp
public OpcStatus WriteNode(string nodeId, OpcAttribute attribute, object value)
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public Function WriteNode(
    nodeId As String,
    attribute As OpcAttribute,
    value As Object) As OpcStatus
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The textual node identifier of the node to write to. |
| `attribute` | [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) | One of the members defined by the [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) enumeration that defines which node attribute is to be used by the service. |
| `value` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The data to write to the `attribute`. |

**Returns**

[OpcStatus](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatus/)

An instance of the [OpcStatus](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatus/) class which indicates the outcome of the write operation.

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `nodeId` is an empty string. |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `nodeId` is a null reference (Nothing in Visual Basic). |
| [InvalidOperationException](https://learn.microsoft.com/dotnet/api/system.invalidoperationexception) | The write service is currently not supported, especially using the arguments specified. |

**Remarks**

Known results for the operation are:

| Status | Description |
|---|---|
| [GoodCompletesAsynchronously](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#goodcompletesasynchronously) | The value was successfully written to an intermediate system but the Server does not know if the data source was updated properly. |
| [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid) | For more details see [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid). |
| [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown) | For more details see [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown). |
| [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid) | For more details see [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid). |
| [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid) | For more details see [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid). |
| [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata) | For more details see [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata). |
| [BadWriteNotSupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badwritenotsupported) | The 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. |
| [BadNotWritable](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnotwritable) | For more details see [BadNotWritable](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnotwritable). |
| [BadUserAccessDenied](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baduseraccessdenied) | For more details see [BadUserAccessDenied](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baduseraccessdenied). |
| [BadOutOfRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badoutofrange) | If 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. |
| [BadTypeMismatch](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtypemismatch) | For more details see [BadTypeMismatch](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtypemismatch). |
| [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported) | For more details see [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported). |
| [BadNoCommunication](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnocommunication) | For more details see [BadNoCommunication](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnocommunication). |

## WriteNode(int, object)

Writes the `value` to the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute of the node specified by `nodeId`.

<div class="api-signature" data-lang="csharp">

```csharp
public OpcStatus WriteNode(int nodeId, object value)
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public Function WriteNode(nodeId As Integer, value As Object) As OpcStatus
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The numeric node identifier of the node to write to. |
| `value` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The data to write to the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute. |

**Returns**

[OpcStatus](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatus/)

An instance of the [OpcStatus](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatus/) class which indicates the outcome of the write operation.

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `nodeId` is equals to zero. |
| [InvalidOperationException](https://learn.microsoft.com/dotnet/api/system.invalidoperationexception) | The write service is currently not supported, especially using the arguments specified. |

**Remarks**

Known results for the operation are:

| Status | Description |
|---|---|
| [GoodCompletesAsynchronously](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#goodcompletesasynchronously) | The value was successfully written to an intermediate system but the Server does not know if the data source was updated properly. |
| [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid) | For more details see [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid). |
| [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown) | For more details see [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown). |
| [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid) | For more details see [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid). |
| [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid) | For more details see [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid). |
| [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata) | For more details see [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata). |
| [BadWriteNotSupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badwritenotsupported) | The 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. |
| [BadNotWritable](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnotwritable) | For more details see [BadNotWritable](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnotwritable). |
| [BadUserAccessDenied](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baduseraccessdenied) | For more details see [BadUserAccessDenied](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baduseraccessdenied). |
| [BadOutOfRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badoutofrange) | If 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. |
| [BadTypeMismatch](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtypemismatch) | For more details see [BadTypeMismatch](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtypemismatch). |
| [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported) | For more details see [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported). |
| [BadNoCommunication](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnocommunication) | For more details see [BadNoCommunication](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnocommunication). |

## WriteNode(int, OpcAttribute, object)

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

<div class="api-signature" data-lang="csharp">

```csharp
public OpcStatus WriteNode(int nodeId, OpcAttribute attribute, object value)
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public Function WriteNode(
    nodeId As Integer,
    attribute As OpcAttribute,
    value As Object) As OpcStatus
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The numeric node identifier of the node to write to. |
| `attribute` | [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) | One of the members defined by the [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) enumeration that defines which node attribute is to be used by the service. |
| `value` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The data to write to the `attribute`. |

**Returns**

[OpcStatus](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatus/)

An instance of the [OpcStatus](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatus/) class which indicates the outcome of the write operation.

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `nodeId` is equals zero. |
| [InvalidOperationException](https://learn.microsoft.com/dotnet/api/system.invalidoperationexception) | The write service is currently not supported, especially using the arguments specified. |

**Remarks**

Known results for the operation are:

| Status | Description |
|---|---|
| [GoodCompletesAsynchronously](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#goodcompletesasynchronously) | The value was successfully written to an intermediate system but the Server does not know if the data source was updated properly. |
| [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid) | For more details see [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid). |
| [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown) | For more details see [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown). |
| [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid) | For more details see [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid). |
| [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid) | For more details see [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid). |
| [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata) | For more details see [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata). |
| [BadWriteNotSupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badwritenotsupported) | The 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. |
| [BadNotWritable](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnotwritable) | For more details see [BadNotWritable](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnotwritable). |
| [BadUserAccessDenied](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baduseraccessdenied) | For more details see [BadUserAccessDenied](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baduseraccessdenied). |
| [BadOutOfRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badoutofrange) | If 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. |
| [BadTypeMismatch](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtypemismatch) | For more details see [BadTypeMismatch](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtypemismatch). |
| [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported) | For more details see [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported). |
| [BadNoCommunication](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnocommunication) | For more details see [BadNoCommunication](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnocommunication). |

## WriteNode(string, int, object)

Writes the `value` to the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute of the node specified by `nodeId` and `namespaceIndex`.

<div class="api-signature" data-lang="csharp">

```csharp
public OpcStatus WriteNode(string nodeId, int namespaceIndex, object value)
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public Function WriteNode(
    nodeId As String,
    namespaceIndex As Integer,
    value As Object) As OpcStatus
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The textual node identifier of the node to write to. |
| `namespaceIndex` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The index of the namespace within that the node with the `nodeId` specified can be located. |
| `value` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The data to write to the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute. |

**Returns**

[OpcStatus](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatus/)

An instance of the [OpcStatus](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatus/) class which indicates the outcome of the write operation.

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `nodeId` is an empty string. |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `nodeId` is a null reference (Nothing in Visual Basic). |
| [InvalidOperationException](https://learn.microsoft.com/dotnet/api/system.invalidoperationexception) | The write service is currently not supported, especially using the arguments specified. |

**Remarks**

Known results for the operation are:

| Status | Description |
|---|---|
| [GoodCompletesAsynchronously](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#goodcompletesasynchronously) | The value was successfully written to an intermediate system but the Server does not know if the data source was updated properly. |
| [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid) | For more details see [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid). |
| [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown) | For more details see [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown). |
| [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid) | For more details see [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid). |
| [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid) | For more details see [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid). |
| [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata) | For more details see [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata). |
| [BadWriteNotSupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badwritenotsupported) | The 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. |
| [BadNotWritable](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnotwritable) | For more details see [BadNotWritable](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnotwritable). |
| [BadUserAccessDenied](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baduseraccessdenied) | For more details see [BadUserAccessDenied](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baduseraccessdenied). |
| [BadOutOfRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badoutofrange) | If 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. |
| [BadTypeMismatch](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtypemismatch) | For more details see [BadTypeMismatch](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtypemismatch). |
| [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported) | For more details see [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported). |
| [BadNoCommunication](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnocommunication) | For more details see [BadNoCommunication](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnocommunication). |

## WriteNode(string, int, OpcAttribute, object)

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

<div class="api-signature" data-lang="csharp">

```csharp
public OpcStatus WriteNode(
    string nodeId,
    int namespaceIndex,
    OpcAttribute attribute,
    object value)
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public Function WriteNode(
    nodeId As String,
    namespaceIndex As Integer,
    attribute As OpcAttribute,
    value As Object) As OpcStatus
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The textual node identifier of the node to write to. |
| `namespaceIndex` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The index of the namespace within that the node with the `nodeId` specified can be located. |
| `attribute` | [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) | One of the members defined by the [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) enumeration that defines which node attribute is to be used by the service. |
| `value` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The data to write to the `attribute`. |

**Returns**

[OpcStatus](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatus/)

An instance of the [OpcStatus](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatus/) class which indicates the outcome of the write operation.

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `nodeId` is an empty string. |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `nodeId` is a null reference (Nothing in Visual Basic). |
| [InvalidOperationException](https://learn.microsoft.com/dotnet/api/system.invalidoperationexception) | The write service is currently not supported, especially using the arguments specified. |

**Remarks**

Known results for the operation are:

| Status | Description |
|---|---|
| [GoodCompletesAsynchronously](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#goodcompletesasynchronously) | The value was successfully written to an intermediate system but the Server does not know if the data source was updated properly. |
| [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid) | For more details see [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid). |
| [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown) | For more details see [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown). |
| [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid) | For more details see [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid). |
| [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid) | For more details see [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid). |
| [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata) | For more details see [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata). |
| [BadWriteNotSupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badwritenotsupported) | The 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. |
| [BadNotWritable](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnotwritable) | For more details see [BadNotWritable](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnotwritable). |
| [BadUserAccessDenied](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baduseraccessdenied) | For more details see [BadUserAccessDenied](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baduseraccessdenied). |
| [BadOutOfRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badoutofrange) | If 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. |
| [BadTypeMismatch](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtypemismatch) | For more details see [BadTypeMismatch](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtypemismatch). |
| [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported) | For more details see [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported). |
| [BadNoCommunication](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnocommunication) | For more details see [BadNoCommunication](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnocommunication). |

## WriteNode(int, int, object)

Writes the `value` to the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute of the node specified by `nodeId` and `namespaceIndex`.

<div class="api-signature" data-lang="csharp">

```csharp
public OpcStatus WriteNode(int nodeId, int namespaceIndex, object value)
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public Function WriteNode(
    nodeId As Integer,
    namespaceIndex As Integer,
    value As Object) As OpcStatus
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The numeric node identifier of the node to write to. |
| `namespaceIndex` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The index of the namespace within that the node with the `nodeId` specified can be located. |
| `value` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The data to write to the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute. |

**Returns**

[OpcStatus](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatus/)

An instance of the [OpcStatus](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatus/) class which indicates the outcome of the write operation.

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `nodeId` is an empty string. |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `nodeId` is a null reference (Nothing in Visual Basic). |
| [InvalidOperationException](https://learn.microsoft.com/dotnet/api/system.invalidoperationexception) | The write service is currently not supported, especially using the arguments specified. |

**Remarks**

Known results for the operation are:

| Status | Description |
|---|---|
| [GoodCompletesAsynchronously](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#goodcompletesasynchronously) | The value was successfully written to an intermediate system but the Server does not know if the data source was updated properly. |
| [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid) | For more details see [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid). |
| [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown) | For more details see [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown). |
| [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid) | For more details see [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid). |
| [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid) | For more details see [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid). |
| [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata) | For more details see [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata). |
| [BadWriteNotSupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badwritenotsupported) | The 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. |
| [BadNotWritable](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnotwritable) | For more details see [BadNotWritable](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnotwritable). |
| [BadUserAccessDenied](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baduseraccessdenied) | For more details see [BadUserAccessDenied](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baduseraccessdenied). |
| [BadOutOfRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badoutofrange) | If 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. |
| [BadTypeMismatch](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtypemismatch) | For more details see [BadTypeMismatch](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtypemismatch). |
| [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported) | For more details see [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported). |
| [BadNoCommunication](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnocommunication) | For more details see [BadNoCommunication](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnocommunication). |

## WriteNode(int, int, OpcAttribute, object)

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

<div class="api-signature" data-lang="csharp">

```csharp
public OpcStatus WriteNode(
    int nodeId,
    int namespaceIndex,
    OpcAttribute attribute,
    object value)
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public Function WriteNode(
    nodeId As Integer,
    namespaceIndex As Integer,
    attribute As OpcAttribute,
    value As Object) As OpcStatus
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The numeric node identifier of the node to write to. |
| `namespaceIndex` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The index of the namespace within that the node with the `nodeId` specified can be located. |
| `attribute` | [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) | One of the members defined by the [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) enumeration that defines which node attribute is to be used by the service. |
| `value` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The data to write to the `attribute`. |

**Returns**

[OpcStatus](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatus/)

An instance of the [OpcStatus](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatus/) class which indicates the outcome of the write operation.

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `nodeId` is equals zero. |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `nodeId` is a null reference (Nothing in Visual Basic). |
| [InvalidOperationException](https://learn.microsoft.com/dotnet/api/system.invalidoperationexception) | The write service is currently not supported, especially using the arguments specified. |

**Remarks**

Known results for the operation are:

| Status | Description |
|---|---|
| [GoodCompletesAsynchronously](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#goodcompletesasynchronously) | The value was successfully written to an intermediate system but the Server does not know if the data source was updated properly. |
| [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid) | For more details see [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid). |
| [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown) | For more details see [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown). |
| [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid) | For more details see [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid). |
| [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid) | For more details see [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid). |
| [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata) | For more details see [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata). |
| [BadWriteNotSupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badwritenotsupported) | The 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. |
| [BadNotWritable](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnotwritable) | For more details see [BadNotWritable](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnotwritable). |
| [BadUserAccessDenied](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baduseraccessdenied) | For more details see [BadUserAccessDenied](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baduseraccessdenied). |
| [BadOutOfRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badoutofrange) | If 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. |
| [BadTypeMismatch](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtypemismatch) | For more details see [BadTypeMismatch](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtypemismatch). |
| [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported) | For more details see [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported). |
| [BadNoCommunication](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnocommunication) | For more details see [BadNoCommunication](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnocommunication). |

## WriteNode(OpcNodeId, OpcRange, object)

<span class="api-meta">since v2.24</span>

Writes the `value` into the `range` of [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute of the node specified by `nodeId`.

<div class="api-signature" data-lang="csharp">

```csharp
public OpcStatus WriteNode(OpcNodeId nodeId, OpcRange range, object value)
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public Function WriteNode(
    nodeId As OpcNodeId,
    range As OpcRange,
    value As Object) As OpcStatus
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) | The [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) of the node to write to. |
| `range` | [OpcRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcrange/) | The [OpcRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcrange/) to use to identify the single element or range of elements to write. |
| `value` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The data to write to the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute. |

**Returns**

[OpcStatus](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatus/)

An instance of the [OpcStatus](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatus/) class which indicates the outcome of the write operation.

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `nodeId` indicates to be a null-node-id (see [IsNull](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#isnull)). |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `nodeId` is a null reference (Nothing in Visual Basic). |
| [InvalidOperationException](https://learn.microsoft.com/dotnet/api/system.invalidoperationexception) | The write service is currently not supported, especially using the arguments specified. |

**Remarks**

Known results for the operation are:

| Status | Description |
|---|---|
| [GoodCompletesAsynchronously](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#goodcompletesasynchronously) | The value was successfully written to an intermediate system but the Server does not know if the data source was updated properly. |
| [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid) | For more details see [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid). |
| [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown) | For more details see [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown). |
| [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid) | For more details see [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid). |
| [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid) | For more details see [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid). |
| [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata) | For more details see [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata). |
| [BadWriteNotSupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badwritenotsupported) | The 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. |
| [BadNotWritable](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnotwritable) | For more details see [BadNotWritable](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnotwritable). |
| [BadUserAccessDenied](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baduseraccessdenied) | For more details see [BadUserAccessDenied](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baduseraccessdenied). |
| [BadOutOfRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badoutofrange) | If 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. |
| [BadTypeMismatch](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtypemismatch) | For more details see [BadTypeMismatch](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtypemismatch). |
| [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported) | For more details see [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported). |
| [BadNoCommunication](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnocommunication) | For more details see [BadNoCommunication](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnocommunication). |

## WriteNode(OpcNodeId, OpcAttribute, OpcRange, object)

<span class="api-meta">since v2.24</span>

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

<div class="api-signature" data-lang="csharp">

```csharp
public OpcStatus WriteNode(
    OpcNodeId nodeId,
    OpcAttribute attribute,
    OpcRange range,
    object value)
```

</div>

<div class="api-signature" data-lang="vbnet">

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

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) | The [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) of the node to write to. |
| `attribute` | [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) | One of the members defined by the [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) enumeration that defines which node attribute is to be used by the service. |
| `range` | [OpcRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcrange/) | The [OpcRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcrange/) to use to identify the single element or range of elements to write. |
| `value` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The data to write to the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute. |

**Returns**

[OpcStatus](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatus/)

An instance of the [OpcStatus](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatus/) class which indicates the outcome of the write operation.

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `nodeId` indicates to be a null-node-id (see [IsNull](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#isnull)). |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `nodeId` is a null reference (Nothing in Visual Basic). |
| [InvalidOperationException](https://learn.microsoft.com/dotnet/api/system.invalidoperationexception) | The write service is currently not supported, especially using the arguments specified. |

**Remarks**

Known results for the operation are:

| Status | Description |
|---|---|
| [GoodCompletesAsynchronously](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#goodcompletesasynchronously) | The value was successfully written to an intermediate system but the Server does not know if the data source was updated properly. |
| [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid) | For more details see [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid). |
| [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown) | For more details see [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown). |
| [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid) | For more details see [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid). |
| [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid) | For more details see [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid). |
| [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata) | For more details see [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata). |
| [BadWriteNotSupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badwritenotsupported) | The 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. |
| [BadNotWritable](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnotwritable) | For more details see [BadNotWritable](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnotwritable). |
| [BadUserAccessDenied](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baduseraccessdenied) | For more details see [BadUserAccessDenied](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baduseraccessdenied). |
| [BadOutOfRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badoutofrange) | If 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. |
| [BadTypeMismatch](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtypemismatch) | For more details see [BadTypeMismatch](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtypemismatch). |
| [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported) | For more details see [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported). |
| [BadNoCommunication](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnocommunication) | For more details see [BadNoCommunication](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnocommunication). |

## WriteNode(string, OpcRange, object)

<span class="api-meta">since v2.24</span>

Writes the `value` into the `range` of [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute of the node specified by `nodeId`.

<div class="api-signature" data-lang="csharp">

```csharp
public OpcStatus WriteNode(string nodeId, OpcRange range, object value)
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public Function WriteNode(
    nodeId As String,
    range As OpcRange,
    value As Object) As OpcStatus
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The textual node identifier of the node to write to. |
| `range` | [OpcRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcrange/) | The [OpcRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcrange/) to use to identify the single element or range of elements to write. |
| `value` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The data to write to the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute. |

**Returns**

[OpcStatus](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatus/)

An instance of the [OpcStatus](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatus/) class which indicates the outcome of the write operation.

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `nodeId` is an empty string. |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `nodeId` is a null reference (Nothing in Visual Basic). |
| [InvalidOperationException](https://learn.microsoft.com/dotnet/api/system.invalidoperationexception) | The write service is currently not supported, especially using the arguments specified. |

**Remarks**

Known results for the operation are:

| Status | Description |
|---|---|
| [GoodCompletesAsynchronously](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#goodcompletesasynchronously) | The value was successfully written to an intermediate system but the Server does not know if the data source was updated properly. |
| [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid) | For more details see [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid). |
| [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown) | For more details see [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown). |
| [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid) | For more details see [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid). |
| [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid) | For more details see [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid). |
| [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata) | For more details see [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata). |
| [BadWriteNotSupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badwritenotsupported) | The 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. |
| [BadNotWritable](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnotwritable) | For more details see [BadNotWritable](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnotwritable). |
| [BadUserAccessDenied](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baduseraccessdenied) | For more details see [BadUserAccessDenied](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baduseraccessdenied). |
| [BadOutOfRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badoutofrange) | If 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. |
| [BadTypeMismatch](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtypemismatch) | For more details see [BadTypeMismatch](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtypemismatch). |
| [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported) | For more details see [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported). |
| [BadNoCommunication](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnocommunication) | For more details see [BadNoCommunication](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnocommunication). |

## WriteNode(string, OpcAttribute, OpcRange, object)

<span class="api-meta">since v2.24</span>

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

<div class="api-signature" data-lang="csharp">

```csharp
public OpcStatus WriteNode(
    string nodeId,
    OpcAttribute attribute,
    OpcRange range,
    object value)
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public Function WriteNode(
    nodeId As String,
    attribute As OpcAttribute,
    range As OpcRange,
    value As Object) As OpcStatus
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The textual node identifier of the node to write to. |
| `attribute` | [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) | One of the members defined by the [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) enumeration that defines which node attribute is to be used by the service. |
| `range` | [OpcRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcrange/) | The [OpcRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcrange/) to use to identify the single element or range of elements to write. |
| `value` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The data to write to the `attribute`. |

**Returns**

[OpcStatus](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatus/)

An instance of the [OpcStatus](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatus/) class which indicates the outcome of the write operation.

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `nodeId` is an empty string. |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `nodeId` is a null reference (Nothing in Visual Basic). |
| [InvalidOperationException](https://learn.microsoft.com/dotnet/api/system.invalidoperationexception) | The write service is currently not supported, especially using the arguments specified. |

**Remarks**

Known results for the operation are:

| Status | Description |
|---|---|
| [GoodCompletesAsynchronously](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#goodcompletesasynchronously) | The value was successfully written to an intermediate system but the Server does not know if the data source was updated properly. |
| [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid) | For more details see [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid). |
| [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown) | For more details see [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown). |
| [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid) | For more details see [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid). |
| [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid) | For more details see [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid). |
| [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata) | For more details see [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata). |
| [BadWriteNotSupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badwritenotsupported) | The 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. |
| [BadNotWritable](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnotwritable) | For more details see [BadNotWritable](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnotwritable). |
| [BadUserAccessDenied](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baduseraccessdenied) | For more details see [BadUserAccessDenied](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baduseraccessdenied). |
| [BadOutOfRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badoutofrange) | If 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. |
| [BadTypeMismatch](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtypemismatch) | For more details see [BadTypeMismatch](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtypemismatch). |
| [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported) | For more details see [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported). |
| [BadNoCommunication](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnocommunication) | For more details see [BadNoCommunication](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnocommunication). |

## WriteNode(int, OpcRange, object)

<span class="api-meta">since v2.24</span>

Writes the `value` into the `range` of [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute of the node specified by `nodeId`.

<div class="api-signature" data-lang="csharp">

```csharp
public OpcStatus WriteNode(int nodeId, OpcRange range, object value)
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public Function WriteNode(
    nodeId As Integer,
    range As OpcRange,
    value As Object) As OpcStatus
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The numeric node identifier of the node to write to. |
| `range` | [OpcRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcrange/) | The [OpcRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcrange/) to use to identify the single element or range of elements to write. |
| `value` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The data to write to the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute. |

**Returns**

[OpcStatus](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatus/)

An instance of the [OpcStatus](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatus/) class which indicates the outcome of the write operation.

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `nodeId` is equals to zero. |
| [InvalidOperationException](https://learn.microsoft.com/dotnet/api/system.invalidoperationexception) | The write service is currently not supported, especially using the arguments specified. |

**Remarks**

Known results for the operation are:

| Status | Description |
|---|---|
| [GoodCompletesAsynchronously](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#goodcompletesasynchronously) | The value was successfully written to an intermediate system but the Server does not know if the data source was updated properly. |
| [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid) | For more details see [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid). |
| [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown) | For more details see [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown). |
| [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid) | For more details see [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid). |
| [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid) | For more details see [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid). |
| [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata) | For more details see [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata). |
| [BadWriteNotSupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badwritenotsupported) | The 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. |
| [BadNotWritable](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnotwritable) | For more details see [BadNotWritable](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnotwritable). |
| [BadUserAccessDenied](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baduseraccessdenied) | For more details see [BadUserAccessDenied](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baduseraccessdenied). |
| [BadOutOfRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badoutofrange) | If 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. |
| [BadTypeMismatch](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtypemismatch) | For more details see [BadTypeMismatch](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtypemismatch). |
| [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported) | For more details see [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported). |
| [BadNoCommunication](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnocommunication) | For more details see [BadNoCommunication](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnocommunication). |

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

<span class="api-meta">since v2.24</span>

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

<div class="api-signature" data-lang="csharp">

```csharp
public OpcStatus WriteNode(
    int nodeId,
    OpcAttribute attribute,
    OpcRange range,
    object value)
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public Function WriteNode(
    nodeId As Integer,
    attribute As OpcAttribute,
    range As OpcRange,
    value As Object) As OpcStatus
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The numeric node identifier of the node to write to. |
| `attribute` | [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) | One of the members defined by the [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) enumeration that defines which node attribute is to be used by the service. |
| `range` | [OpcRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcrange/) | The [OpcRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcrange/) to use to identify the single element or range of elements to write. |
| `value` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The data to write to the `attribute`. |

**Returns**

[OpcStatus](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatus/)

An instance of the [OpcStatus](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatus/) class which indicates the outcome of the write operation.

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `nodeId` is equals zero. |
| [InvalidOperationException](https://learn.microsoft.com/dotnet/api/system.invalidoperationexception) | The write service is currently not supported, especially using the arguments specified. |

**Remarks**

Known results for the operation are:

| Status | Description |
|---|---|
| [GoodCompletesAsynchronously](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#goodcompletesasynchronously) | The value was successfully written to an intermediate system but the Server does not know if the data source was updated properly. |
| [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid) | For more details see [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid). |
| [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown) | For more details see [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown). |
| [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid) | For more details see [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid). |
| [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid) | For more details see [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid). |
| [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata) | For more details see [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata). |
| [BadWriteNotSupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badwritenotsupported) | The 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. |
| [BadNotWritable](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnotwritable) | For more details see [BadNotWritable](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnotwritable). |
| [BadUserAccessDenied](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baduseraccessdenied) | For more details see [BadUserAccessDenied](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baduseraccessdenied). |
| [BadOutOfRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badoutofrange) | If 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. |
| [BadTypeMismatch](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtypemismatch) | For more details see [BadTypeMismatch](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtypemismatch). |
| [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported) | For more details see [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported). |
| [BadNoCommunication](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnocommunication) | For more details see [BadNoCommunication](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnocommunication). |

## WriteNode(string, int, OpcRange, object)

<span class="api-meta">since v2.24</span>

Writes the `value` into the `range` of [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute of the node specified by `nodeId` and `namespaceIndex`.

<div class="api-signature" data-lang="csharp">

```csharp
public OpcStatus WriteNode(
    string nodeId,
    int namespaceIndex,
    OpcRange range,
    object value)
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public Function WriteNode(
    nodeId As String,
    namespaceIndex As Integer,
    range As OpcRange,
    value As Object) As OpcStatus
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The textual node identifier of the node to write to. |
| `namespaceIndex` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The index of the namespace within that the node with the `nodeId` specified can be located. |
| `range` | [OpcRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcrange/) | The [OpcRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcrange/) to use to identify the single element or range of elements to write. |
| `value` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The data to write to the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute. |

**Returns**

[OpcStatus](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatus/)

An instance of the [OpcStatus](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatus/) class which indicates the outcome of the write operation.

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `nodeId` is an empty string. |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `nodeId` is a null reference (Nothing in Visual Basic). |
| [InvalidOperationException](https://learn.microsoft.com/dotnet/api/system.invalidoperationexception) | The write service is currently not supported, especially using the arguments specified. |

**Remarks**

Known results for the operation are:

| Status | Description |
|---|---|
| [GoodCompletesAsynchronously](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#goodcompletesasynchronously) | The value was successfully written to an intermediate system but the Server does not know if the data source was updated properly. |
| [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid) | For more details see [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid). |
| [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown) | For more details see [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown). |
| [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid) | For more details see [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid). |
| [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid) | For more details see [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid). |
| [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata) | For more details see [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata). |
| [BadWriteNotSupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badwritenotsupported) | The 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. |
| [BadNotWritable](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnotwritable) | For more details see [BadNotWritable](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnotwritable). |
| [BadUserAccessDenied](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baduseraccessdenied) | For more details see [BadUserAccessDenied](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baduseraccessdenied). |
| [BadOutOfRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badoutofrange) | If 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. |
| [BadTypeMismatch](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtypemismatch) | For more details see [BadTypeMismatch](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtypemismatch). |
| [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported) | For more details see [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported). |
| [BadNoCommunication](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnocommunication) | For more details see [BadNoCommunication](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnocommunication). |

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

<span class="api-meta">since v2.24</span>

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

<div class="api-signature" data-lang="csharp">

```csharp
public OpcStatus WriteNode(
    string nodeId,
    int namespaceIndex,
    OpcAttribute attribute,
    OpcRange range,
    object value)
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public Function WriteNode(
    nodeId As String,
    namespaceIndex As Integer,
    attribute As OpcAttribute,
    range As OpcRange,
    value As Object) As OpcStatus
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The textual node identifier of the node to write to. |
| `namespaceIndex` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The index of the namespace within that the node with the `nodeId` specified can be located. |
| `attribute` | [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) | One of the members defined by the [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) enumeration that defines which node attribute is to be used by the service. |
| `range` | [OpcRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcrange/) | The [OpcRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcrange/) to use to identify the single element or range of elements to write. |
| `value` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The data to write to the `attribute`. |

**Returns**

[OpcStatus](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatus/)

An instance of the [OpcStatus](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatus/) class which indicates the outcome of the write operation.

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `nodeId` is an empty string. |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `nodeId` is a null reference (Nothing in Visual Basic). |
| [InvalidOperationException](https://learn.microsoft.com/dotnet/api/system.invalidoperationexception) | The write service is currently not supported, especially using the arguments specified. |

**Remarks**

Known results for the operation are:

| Status | Description |
|---|---|
| [GoodCompletesAsynchronously](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#goodcompletesasynchronously) | The value was successfully written to an intermediate system but the Server does not know if the data source was updated properly. |
| [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid) | For more details see [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid). |
| [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown) | For more details see [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown). |
| [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid) | For more details see [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid). |
| [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid) | For more details see [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid). |
| [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata) | For more details see [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata). |
| [BadWriteNotSupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badwritenotsupported) | The 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. |
| [BadNotWritable](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnotwritable) | For more details see [BadNotWritable](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnotwritable). |
| [BadUserAccessDenied](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baduseraccessdenied) | For more details see [BadUserAccessDenied](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baduseraccessdenied). |
| [BadOutOfRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badoutofrange) | If 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. |
| [BadTypeMismatch](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtypemismatch) | For more details see [BadTypeMismatch](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtypemismatch). |
| [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported) | For more details see [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported). |
| [BadNoCommunication](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnocommunication) | For more details see [BadNoCommunication](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnocommunication). |

## WriteNode(int, int, OpcRange, object)

<span class="api-meta">since v2.24</span>

Writes the `value` into the `range` of [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute of the node specified by `nodeId` and `namespaceIndex`.

<div class="api-signature" data-lang="csharp">

```csharp
public OpcStatus WriteNode(
    int nodeId,
    int namespaceIndex,
    OpcRange range,
    object value)
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public Function WriteNode(
    nodeId As Integer,
    namespaceIndex As Integer,
    range As OpcRange,
    value As Object) As OpcStatus
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The numeric node identifier of the node to write to. |
| `namespaceIndex` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The index of the namespace within that the node with the `nodeId` specified can be located. |
| `range` | [OpcRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcrange/) | The [OpcRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcrange/) to use to identify the single element or range of elements to write. |
| `value` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The data to write to the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute. |

**Returns**

[OpcStatus](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatus/)

An instance of the [OpcStatus](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatus/) class which indicates the outcome of the write operation.

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `nodeId` is an empty string. |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `nodeId` is a null reference (Nothing in Visual Basic). |
| [InvalidOperationException](https://learn.microsoft.com/dotnet/api/system.invalidoperationexception) | The write service is currently not supported, especially using the arguments specified. |

**Remarks**

Known results for the operation are:

| Status | Description |
|---|---|
| [GoodCompletesAsynchronously](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#goodcompletesasynchronously) | The value was successfully written to an intermediate system but the Server does not know if the data source was updated properly. |
| [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid) | For more details see [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid). |
| [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown) | For more details see [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown). |
| [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid) | For more details see [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid). |
| [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid) | For more details see [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid). |
| [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata) | For more details see [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata). |
| [BadWriteNotSupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badwritenotsupported) | The 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. |
| [BadNotWritable](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnotwritable) | For more details see [BadNotWritable](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnotwritable). |
| [BadUserAccessDenied](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baduseraccessdenied) | For more details see [BadUserAccessDenied](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baduseraccessdenied). |
| [BadOutOfRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badoutofrange) | If 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. |
| [BadTypeMismatch](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtypemismatch) | For more details see [BadTypeMismatch](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtypemismatch). |
| [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported) | For more details see [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported). |
| [BadNoCommunication](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnocommunication) | For more details see [BadNoCommunication](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnocommunication). |

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

<span class="api-meta">since v2.24</span>

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

<div class="api-signature" data-lang="csharp">

```csharp
public OpcStatus WriteNode(
    int nodeId,
    int namespaceIndex,
    OpcAttribute attribute,
    OpcRange range,
    object value)
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public Function WriteNode(
    nodeId As Integer,
    namespaceIndex As Integer,
    attribute As OpcAttribute,
    range As OpcRange,
    value As Object) As OpcStatus
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The numeric node identifier of the node to write to. |
| `namespaceIndex` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The index of the namespace within that the node with the `nodeId` specified can be located. |
| `attribute` | [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) | One of the members defined by the [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) enumeration that defines which node attribute is to be used by the service. |
| `range` | [OpcRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcrange/) | The [OpcRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcrange/) to use to identify the single element or range of elements to write. |
| `value` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The data to write to the `attribute`. |

**Returns**

[OpcStatus](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatus/)

An instance of the [OpcStatus](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatus/) class which indicates the outcome of the write operation.

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `nodeId` is equals zero. |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `nodeId` is a null reference (Nothing in Visual Basic). |
| [InvalidOperationException](https://learn.microsoft.com/dotnet/api/system.invalidoperationexception) | The write service is currently not supported, especially using the arguments specified. |

**Remarks**

Known results for the operation are:

| Status | Description |
|---|---|
| [GoodCompletesAsynchronously](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#goodcompletesasynchronously) | The value was successfully written to an intermediate system but the Server does not know if the data source was updated properly. |
| [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid) | For more details see [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid). |
| [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown) | For more details see [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown). |
| [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid) | For more details see [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid). |
| [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid) | For more details see [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid). |
| [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata) | For more details see [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata). |
| [BadWriteNotSupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badwritenotsupported) | The 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. |
| [BadNotWritable](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnotwritable) | For more details see [BadNotWritable](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnotwritable). |
| [BadUserAccessDenied](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baduseraccessdenied) | For more details see [BadUserAccessDenied](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baduseraccessdenied). |
| [BadOutOfRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badoutofrange) | If 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. |
| [BadTypeMismatch](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtypemismatch) | For more details see [BadTypeMismatch](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtypemismatch). |
| [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported) | For more details see [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported). |
| [BadNoCommunication](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnocommunication) | For more details see [BadNoCommunication](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnocommunication). |

## WriteNode(OpcWriteNode)

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

<div class="api-signature" data-lang="csharp">

```csharp
public OpcStatus WriteNode(OpcWriteNode command)
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public Function WriteNode(command As OpcWriteNode) As OpcStatus
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `command` | [OpcWriteNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/) | The [OpcWriteNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/) instance to process. |

**Returns**

[OpcStatus](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatus/)

An instance of the [OpcStatus](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatus/) class which indicates the outcome of the operation for the `command`.

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `command` is a null reference (Nothing in Visual Basic). |
| [InvalidOperationException](https://learn.microsoft.com/dotnet/api/system.invalidoperationexception) | The write service is currently not supported, especially using the `command` specified. |

**Remarks**

Known results for the `command` specified are:

| Status | Description |
|---|---|
| [GoodCompletesAsynchronously](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#goodcompletesasynchronously) | The value was successfully written to an intermediate system but the Server does not know if the data source was updated properly. |
| [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid) | For more details see [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid). |
| [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown) | For more details see [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown). |
| [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid) | For more details see [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid). |
| [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid) | For more details see [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid). |
| [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata) | For more details see [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata). |
| [BadWriteNotSupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badwritenotsupported) | The 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. |
| [BadNotWritable](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnotwritable) | For more details see [BadNotWritable](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnotwritable). |
| [BadUserAccessDenied](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baduseraccessdenied) | For more details see [BadUserAccessDenied](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baduseraccessdenied). |
| [BadOutOfRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badoutofrange) | If 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. |
| [BadTypeMismatch](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtypemismatch) | For more details see [BadTypeMismatch](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtypemismatch). |
| [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported) | For more details see [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported). |
| [BadNoCommunication](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnocommunication) | For more details see [BadNoCommunication](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnocommunication). |
