# Single Bit Data Read/Write Commands (01 / 05) – Common for HMI

{% hint style="info" %}
**Purpose and Use Cases:** Certain Human-Machine Interfaces (HMIs) only support the **05 Write Command** to send a signal to reset the accumulated total. Additionally, some HMIs require support for the **01 Read Command** to verify that the sensor is functioning correctly. Please refer to [Read/Write Memory List](https://docs.lorric.com/qr/fu-es-echosense-instruction-manual/communication/modbus-rtu-protocol/read-write-memory-ram/read-write-memory-read-list)
{% endhint %}

### Function Code 01 Example – Single Bit Read

{% hint style="info" %}
This command **does not reset** the C02.Del.Total (Totalizer Clear) option. It is used for **reading a single bit via HMI** (01/05). When the 01 command is sent correctly, the slave responds by returning the requested bit status only.
{% endhint %}

### Master Sends 01 (TX) Example

```
TX: 01 01 00 0A 00 01 A4 0E
```

* **Slave Address:** 01 (Flow meter address)
* **Function Code:** 01 (Read 1 bit)
* **Starting Address:** 02 01 (C02.Del.Total memory address)
* **Quantity:** 00 01 (Read 1 bit)
* **CRC:** A4 0E (Error check)

### Slave Response 01 (RX) Example

```
RX: 01 01 01 00 51 88
```

* **Slave Address:** 01
* **Function Code:** 01 (Read)
* **Data:** 01 00 (Bit value, slave is online and responding)
* **CRC:** 51 88

## Function Code 05 Example – Single Bit Write (Trigger Totalizer Clear)

{% hint style="info" %}
This command **activates** the C02.Del.Total clear option, immediately resetting the totalizer to zero.
{% endhint %}

### Master Sends (TX) Example

```
TX: 01 05 02 01 FF 00 DC 42
```

* **Slave Address:** 01
* **Function Code:** 05 (Write single register)
* **Starting Address:** 02 01 (C02.Del.Total memory address)
* **Data:** FF 00 (Trigger clear)
* **CRC:** DC 42

### Slave Response (RX) Example

```
RX: 01 05 02 01 FF 00 DC 42
```

* **Slave Address:** 01
* **Function Code:** 05
* **Starting Address:** 02 01
* **Data:** FF 00 (Echoes successful write)
* **CRC:** DC 42
