# Modbus RTU Protocol

## 通訊格式

bit order: lsb first

byte order: big endian

Data bits:8&#x20;

Parity: None&#x20;

Stop bits: 1

Floating point number follows IEEE754-1985. The float32 below stands for 32bits Single precision floating point number.

## 名詞定義

Register: 2 Byte 或 16bit 長，是 Modbus RTU 的記憶體通訊的單位長度。

Byte: 8 bit長

## 記憶體定義及功能

modbus 可操作的記憶體分為兩大類，唯讀型及讀寫型。

唯讀型主要是流量計狀態相關的記憶體，例如即時流量。這部分也是最常使用的記憶體。唯讀型的記憶體只能使用指 04 來讀取。相關頁面如下：

{% content-ref url="modbus-rtu-protocol/read-only-memory-read-instruction-04-and-memory-lists" %}
[read-only-memory-read-instruction-04-and-memory-lists](https://docs.lorric.com/qr/fp-as510-paddle-wheel-flowmeter-manual-chinese-v2/communication/modbus-rtu-protocol/read-only-memory-read-instruction-04-and-memory-lists)
{% endcontent-ref %}

讀寫型主要是流量計設定參數記憶體，例如管徑；還有重設變數，例如累計流量歸零。讀寫型的記憶體只能使用指 03 來讀取。寫入操作一次只能改變一個參數，如果目標參數的記憶體長度是 1個 register，使用指令 06，如果目標參數的記憶體長度是 2 register，使用 30。讀寫型記憶體列表頁面如下：

{% content-ref url="modbus-rtu-protocol/read-write-memory-list" %}
[read-write-memory-list](https://docs.lorric.com/qr/fp-as510-paddle-wheel-flowmeter-manual-chinese-v2/communication/modbus-rtu-protocol/read-write-memory-list)
{% endcontent-ref %}

讀寫型記憶體指令說明頁面如下：

{% content-ref url="modbus-rtu-protocol/read-write-memory-read-instruction-03" %}
[read-write-memory-read-instruction-03](https://docs.lorric.com/qr/fp-as510-paddle-wheel-flowmeter-manual-chinese-v2/communication/modbus-rtu-protocol/read-write-memory-read-instruction-03)
{% endcontent-ref %}

{% content-ref url="modbus-rtu-protocol/read-write-memory-single-register-write-instruction-06" %}
[read-write-memory-single-register-write-instruction-06](https://docs.lorric.com/qr/fp-as510-paddle-wheel-flowmeter-manual-chinese-v2/communication/modbus-rtu-protocol/read-write-memory-single-register-write-instruction-06)
{% endcontent-ref %}

{% content-ref url="modbus-rtu-protocol/read-write-memory-double-register-write-instruction-30" %}
[read-write-memory-double-register-write-instruction-30](https://docs.lorric.com/qr/fp-as510-paddle-wheel-flowmeter-manual-chinese-v2/communication/modbus-rtu-protocol/read-write-memory-double-register-write-instruction-30)
{% endcontent-ref %}


---

# Agent Instructions: 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:

```
GET https://docs.lorric.com/qr/fp-as510-paddle-wheel-flowmeter-manual-chinese-v2/communication/modbus-rtu-protocol.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
