> For the complete documentation index, see [llms.txt](https://docs.lorric.com/qr/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lorric.com/qr/fu-lt-english-v1/communication/modbus-rtu-protocol/read-write-memory-ram/read-write-memory-dual-register-write-command-30.md).

# Read/Write Memory Dual-Register Write Command (30)

{% hint style="info" %}
When large values are processed using different data formats (e.g., *float32* vs. *int32*), minor numerical differences may occur due to internal calculation methods. These differences are typically less than **1/10,000** and are normal.

This command applies **only to 32-bit (2-register) memory items**.
{% endhint %}

#### Function Code 30

The Dual Register Write command (Function Code 30) writes data to two consecutive registers (32-bit / 4 bytes).\
It is used for parameters that include decimal or signed values.\
Float32 range: \~1.18 × 10⁻³⁸ to 3.4 × 10³⁸\
Examples: Set A18 Low Flow Cutoff to +5.5, Set A23 Zero Offset to −0.08.

#### Read/Write Memory – Dual Register Write Command (30) Format

![](/files/vMoxTsNK9mTuoNGfXEWl)

![](/files/eDtAlrcRBJXfO7Dg0rL3)

### Modbus RTU Read/Write Memory – Dual Register Write Command (Function Code 30)

This example shows the master using **Function Code 30** to write **+5.5** to the parameter **“A18 Low Flow Cutoff”**.

According to the Read/Write Memory List:

* **Starting Address:** 00 15
* **Register Length:** 2 (two registers)
* **Data Type:** Float 32

#### 1. Value Conversion and Data Preparation (Hex Data)

Convert the decimal value **+5.5** to **IEEE 754 Float32 (Big Endian)** format.

$$
5.5 ₁₀ = 40B00000 ₁₆
$$

The resulting 4-byte data is:：`40` `B0` `00` `00`。

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

The master uses Function Code 30 with a Byte Count of 04, writing 4 data bytes to two registers starting at address 00 15.

```
TX： 01 30 00 15 00 02 04 40 B0 00 00 27 D1
```

* Slave Address: `01`
* Function Code: `30`
* Starting Register Address: `00 15` (A18 Low Flow Cutoff)
* Number of Registers Written: `00 02` (2 registers / Float32)
* Byte Count: `04` (4 data bytes)
* Written Data (Float32): `40 B0 00 00` (+5.5 in Hex)
* CRC: `27 D1` (calculated CRC)

#### 3. **Slave Response (RX Frame)**

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

```
RX: 01 30 00 15 00 02 D1 CB
```

* Slave Address: `01`
* Function Code: `30`
* Starting Register Address: `00 15` (A18 Low Flow Cutoff)
* Registers Written: `00 02` (confirmation of 2 registers written)
* CRC: `D1 CB` (calculated CRC)

Once the master receives the RX frame and verifies that the **Function Code**, **register address**, and **number of registers written** are correct, it confirms that **A18 Low Flow Cutoff has been successfully set to +5.5**.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.lorric.com/qr/fu-lt-english-v1/communication/modbus-rtu-protocol/read-write-memory-ram/read-write-memory-dual-register-write-command-30.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
