# Read-only memory read instruction(04) and memory lists

{% hint style="info" %}
**The length of total register requested by a single reading command must be less than or equal to 20 registers. Instructions longer than this will be ignored.**
{% endhint %}

## **Instruction example**

Format of command (04) from master

| Byte#          | 1             | 2             | 3                                 | 4                                 | 5                                | 6                                | 7   | 8   |
| -------------- | ------------- | ------------- | --------------------------------- | --------------------------------- | -------------------------------- | -------------------------------- | --- | --- |
| Node ID        | Slave Address | Function Code | Address of first reading register | Address of first reading register | Quantity of registers to be read | Quantity of registers to be read | CRC | CRC |
| Example 01\~FF | 01            | 04            | 00                                | 00                                | 00                               | 02                               | 71  | CB  |

#### **Description of master command**

The example will read instantaneous flow volume.

slave address: 01(address of this flowmeter)

function code: 04(read instruction)

Address of first reading register: 0000(Address of first register to read)

Quantity of registers to be read: 0002 (need to read 2 registers from 0000)

CRC: 71 CB(Calculating error correcting code according to CRC algorithm)

### **Format of flowmeter response(04)**

| Byte#                       | 1             | 2             | 3                       | 4            | 5                         | 6                         | 7                         | 8   | 9   |
| --------------------------- | ------------- | ------------- | ----------------------- | ------------ | ------------------------- | ------------------------- | ------------------------- | --- | --- |
| Node ID                     | Slave Address | Function Code | Amount of response Byte | Data Byte #1 | <p>Data Byte</p><p>#2</p> | <p>Data Byte</p><p>#3</p> | <p>Data Byte</p><p>#4</p> | CRC | CRC |
| <p>Example</p><p>01\~FF</p> | 01            | 04            | 04                      | 00           | 00                        | 00                        | 00                        | FB  | 84  |

#### **Description of flowmeter response example**

slave address: 01(address of this flowmeter)

function code: 04(read instruction)

Amount of response Byte: 04 (2 register=4 byte)

Data Byte: 00 00 00 00(Assume the instantaneous flow volume is 0)

CRC: FB 84(Calculating error correcting code according to CRC algorithm)

## **Definition and** address **of memory**

### How to use these charts

| Function          | Function                                                       |
| ----------------- | -------------------------------------------------------------- |
| Register location | Read-write memory address is not shared with read-only memory. |
| Register length   | The length of variable memory. The unit is Register(2Byte).    |
| Memory definition | For memory data description.                                   |
| Data type         | The format of sending and receiving data type.                 |

### **Read-only memory list**

<table data-header-hidden><thead><tr><th width="116">Register location</th><th width="89">Register length</th><th>Memory definition</th><th>Data type</th><th>Remarks</th></tr></thead><tbody><tr><td>Register location</td><td>Register length</td><td>Memory definition</td><td>Data type</td><td>Remarks</td></tr><tr><td>0000</td><td>2</td><td>instantaneous flow rate</td><td>float32</td><td></td></tr><tr><td>0002</td><td>2</td><td>instantaneous flow velocity</td><td>float32</td><td></td></tr><tr><td>0004</td><td>2</td><td>totalized flow volume</td><td>float32</td><td></td></tr><tr><td>0006</td><td>2</td><td>instantaneous flow rate</td><td>int32</td><td>The value is the cumulative flow X100 integer</td></tr><tr><td>0008</td><td>2</td><td>instantaneous flow velocity</td><td>int32</td><td>The value is the cumulative flow X100 integer</td></tr><tr><td>000A</td><td>2</td><td>totalized flow volume</td><td>int32</td><td>The value is the cumulative flow X100 integer</td></tr><tr><td>000C</td><td>2</td><td>Iout current value uA</td><td>unsigned int32</td><td></td></tr><tr><td>000E</td><td>1</td><td>error code a</td><td>unsigned int16</td><td>First byte is 0, due to no definition.</td></tr><tr><td>000F</td><td>1</td><td>error code b</td><td>unsigned int16</td><td>First byte is 0, due to no definition.</td></tr><tr><td>0010</td><td>1</td><td>error code c</td><td>unsigned int16</td><td>First byte is 0, due to no definition.</td></tr><tr><td>0011</td><td>1</td><td>error code d</td><td>unsigned int16</td><td>First byte is 0, due to no definition.</td></tr><tr><td>0012</td><td>1</td><td>System Status</td><td>unsigned int16</td><td>First byte is 0, due to no definition.</td></tr><tr><td>0013</td><td>4</td><td>totalized flow volume</td><td>int64</td><td>The value represents <strong>cumulative flow multiplied by 100,000</strong>, rounded to the nearest integer (introduced in <strong>P1203</strong>).</td></tr><tr><td>0017</td><td>2</td><td>Dosing</td><td>loat32</td><td>(introduced in <strong>P1203</strong>).</td></tr><tr><td>0019</td><td>2</td><td>Dosing</td><td>int32</td><td>The value represents <strong>cumulative flow multiplied by 100</strong> rounded to the nearest integer (introduced in <strong>P1203</strong>).</td></tr><tr><td>001B</td><td>4</td><td>Dosing</td><td>int64</td><td>The value represents <strong>cumulative flow multiplied by 100,000</strong>, rounded to the nearest integer (introduced in <strong>P1203</strong>).</td></tr></tbody></table>
