# 讀寫型記憶體單Register寫入指令(06)

{% hint style="info" %}
限使用在 Register 長度為 1 的記憶體，請參考[列表](/qr/fp-as510-paddle-wheel-flowmeter-manual-chinese-v2/communication/modbus-rtu-protocol/read-write-memory-list.md)。
{% endhint %}

## 指令範例

### 控制端發指令(06)格式

| Byte#      | 1             | 2             | 3        | 4        | 5    | 6    | 7   | 8   |
| ---------- | ------------- | ------------- | -------- | -------- | ---- | ---- | --- | --- |
| Node ID    | Slave Address | Function Code | 寫入的記憶體地址 | 寫入的記憶體地址 | 寫入資料 | 寫入資料 | CRC | CRC |
| 範例內容01\~FF | 01            | 06            | 00       | 00       | 00   | 01   | 48  | 0A  |

#### 控制端發訊範例說明

這個範例會改變A01的管徑選項

slave address: 01(本流量計地址)

function code: 06(單一Register寫入指令)

讀取數據的啟始地址: 0000(要寫入記憶體地址)

寫入資料: 0000 (1" PVC管)

CRC: C40B (依 CRC 算法計算出的糾錯碼)

### 流量計回覆(06)格式

| Byte#      | 1             | 2             | 3        | 4        | 5    | 6    | 7   | 8   |
| ---------- | ------------- | ------------- | -------- | -------- | ---- | ---- | --- | --- |
| Node ID    | Slave Address | Function Code | 寫入的記憶體地址 | 寫入的記憶體地址 | 寫入資料 | 寫入資料 | CRC | CRC |
| 範例內容01\~FF | 01            | 06            | 00       | 00       | 00   | 01   | 48  | 0A  |

#### 流量計回覆範例說明

寫入指令符合格式，會將收到的控制端指令回傳給 Master

slave address: 01(本流量計地址)

function code: 06(單一Register寫入指令)

讀取數據的啟始地址: 0000(要寫入記憶體地址)

寫入資料: 0000 (1" PVC管)

CRC: C40B (依 CRC 算法計算出的糾錯碼)


---

# 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/read-write-memory-single-register-write-instruction-06.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.
