Skip to content

Add 32-bit float register decoding (--float) #4

@19bk

Description

@19bk

Many industrial sensors store values as 32-bit IEEE 754 floats across two consecutive registers. Add a `--float` flag that reads register pairs and decodes them:

```bash
modbus read 192.168.1.10 40001 -c 4 --float

Reads 4 registers, decodes as 2 float values

```

Should support both big-endian and little-endian byte/word order (`--byte-order BE` / `--word-order LE`), since different manufacturers use different conventions.

Python struct module handles the actual decoding. The tricky part is the byte order options.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions