# Read/Write Memory - Single Register Write Command (06)

{% hint style="info" %}
When writing large values using different data formats (e.g., Float32 or Int64) and performing conversions, very small differences may occur due to internal calculation methods. These differences are typically less than 1/10,000 and are considered normal. Please refer to [Read/Write Memory List](https://docs.lorric.com/qr/fu-es-echosense-instruction-manual/communication/modbus-rtu-protocol/read-write-memory-ram/read-write-memory-read-list)
{% endhint %}

#### **Function Code:** 06

The Single Register Write Command (Function Code 06) is used to write one simple Int16 parameter (1 register, 16-bit). It is suitable for setting options, codes, or small-range integers.

#### **Read/Write Memory – Single Register Write Command (06) Format**

![](https://4028902321-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSBz5Tlpy8GCIkK4ygkgZ%2Fuploads%2FO5zGTvGYS56x6bfXFDlB%2Fmodbus-06-TX-diagram-en.png?alt=media\&token=1d38d890-ed3c-4cc3-8115-a821112bc88b)

![](https://4028902321-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSBz5Tlpy8GCIkK4ygkgZ%2Fuploads%2FaiR0Iv4HVTbXgpyt0JM8%2Fmodbus-06-RX-diagram-en.png?alt=media\&token=f6870ab9-0972-4285-89d0-92115125bbee)

#### Read/Write Memory – Single Register Write Command (06)

This example demonstrates how the master uses **Function Code 06** to write the parameter **“A03 Pipe Geo Unit”** and set the unit to **inch**.

According to the Read/Write Memory List, this parameter has:

* **Starting Address:** `00 01`
* **Register Length:** 1 register
* **Data Type:** `int16`

#### Master Sends Write Command (TX Frame)

```
TX: 01 06 00 01 00 01 19 CA
```

* Slave Address: 01
* Function Code: 06
* Starting Register Address: 00 01 (A03 Pipe Geo Unit address)
* Written Value: 00 01 (unit = inch)
* CRC: 19 CA (calculated by CRC algorithm)

#### Slave Response Data (RX Frame)

When the write command is successful, the master receives a response from the slave as confirmation.

```
RX: 01 06 00 01 00 01 19 CA
```

* Slave Address: 01
* Function Code: 06
* Register Address: 00 01 (A03 Pipe Geo Unit)
* Written Value: 00 01 (inch)
* CRC: 19 CA (must match the TX CRC)

If the RX frame exactly matches the TX frame (including CRC), it confirms that:

* The command was successfully executed.
* The value **00 01** (inch) was correctly written to register **00 01**.
* The slave has acknowledged completion of the operation.
