> 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-tx320-english-v1/communication/modbus-rtu-protocol/read-write-memory-ram/read-write-memory-write-multiple-registers-command-16.md).

# Read/Write Memory - Write Multiple Registers Command (16)

{% hint style="info" %}
Function Code 16 (0x10) is the **standard** Modbus "Write Multiple Registers" command, supported by virtually every PLC and HMI. Since Function Codes 30 and 31 are proprietary short-frame formats that many PLCs cannot generate, Function Code 16 provides a standards-compliant alternative path to write the exact same parameters at the exact same addresses — only the frame format differs.
{% endhint %}

#### Function Code 16

The Write Multiple Registers command (Function Code 16) writes data to one or more consecutive registers using a standard, variable-length Modbus frame. Unlike Function Codes 06, 30, and 31 — each fixed to one specific data width — Function Code 16 can write Int16 (1 register), Float32 (2 registers), or Int64 (4 registers) values, matching whatever width the target parameter requires. \
Data type ranges match those described under Function Codes 06, 30, and 31. \
Examples: Set A15 Damping to 10, A18 Low Flow Cutoff to +5.5, or C04 Dosing Target to 999,999,999.

#### Read/Write Memory – Write Multiple Registers Command (16) Format

![](https://2757023840-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfX3l9RzQpCUpspFteU5B%2Fuploads%2FLAquszsp7VSMjbEmOW52%2Fmodbus-16-TX-diagram-en.png?alt=media\&token=f2f50b5f-a7ab-4b42-8e20-31a1342337dc)

<figure><img src="https://2757023840-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfX3l9RzQpCUpspFteU5B%2Fuploads%2FzxXQjBTibj7u16Jqujv4%2Fmodbus-16-RX-diagram-en.png?alt=media&amp;token=4d5fc587-6323-4be6-bd47-cc36cd6a0a7f" alt=""><figcaption></figcaption></figure>

***

## Modbus RTU Read/Write Memory – Write Multiple Registers Command (Function Code 16)

### **Example 1 —** 16-bit: A15 Damping

This example shows the master using **Function Code 16** to write **10** to the parameter **“A15 Damping”**.

According to the Read/Write Memory List:

* **Starting Address:** 00 12
* **Register Length:** 1
* **Data Type:** Int16

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

Convert the decimal value **10** to **Int16 (Big Endian)** format.

$$
10 ₁₀ = 000A ₁₆
$$

The resulting 2-byte data is:： `00` `0A`。

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

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

```
TX: 01 10 00 12 00 01 02 00 0A 25 25
```

* Slave Address: `01`
* Function Code: `16` (0x10)
* Starting Register Address: `00 12` (A15 Damping)
* Quantity of Registers: `00 01`&#x20;
* Byte Count: `02`&#x20;
* Written Data: `00 0A` (10 in decimal)
* CRC: `25 25` (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 10 00 12 00 01 A1 CC
```

* Slave Address: `01`
* Function Code: `16` (0x10)
* Starting Register Address: `00 12` (A15 Damping)
* Quantity of Registers Written: `00 01`&#x20;
* CRC: `A1 CC` (calculated CRC)

Once the master receives the RX frame and verifies that the **Starting Register Address**, and Quantity of Registers Written are correct, it confirms that **A15 Damping has been successfully set to 10**.

***

### **Example 2 —** 32-bit: A18 Low Flow Cutoff

This example shows the master using **Function Code 16** 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
* **Data Type:** : Float32

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

Convert the decimal value **+5.5** to **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 16 with a Byte Count of 04, writing 4 data bytes to two registers starting at address 00 15.

```
TX: 01 10 00 15 00 02 04 40 B0 00 00 26 BB
```

* Slave Address: `01`
* Function Code: `16` (0x10)
* Starting Register Address: `00 15` (A18 Low Flow Cutoff)
* Quantity of Registers: `00 02`&#x20;
* Byte Count: `04`&#x20;
* Written Data: `40 B0 00 00` (+5.5 in Float32)
* CRC: `26 BB` (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 10 00 15 00 02 50 0C
```

* Slave Address: `01`
* Function Code: `16` (0x10)
* Starting Register Address: `00 15` (A18 Low Flow Cutoff)
* Quantity of Registers Written: `00 02`&#x20;
* CRC: `50 0C` (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-tx320-english-v1/communication/modbus-rtu-protocol/read-write-memory-ram/read-write-memory-write-multiple-registers-command-16.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.
