Modbus
The Modbus tab connects to a Modbus/TCP slave and reads registers and coils. With Pro you can also write holding registers and coils.
Connect
Enter the connection details and tap Connect:
- Host / IP — the device's address (e.g.
192.168.1.21) - Port — TCP port, default
502 - Unit — the Modbus unit/slave id (default
1)
BacBus remembers your last-used connection and pre-fills it next time. Tap the button again (● Connected — Disconnect) to close the connection.
Discover what's mapped
Modbus is not self-describing — a device won't tell you which registers exist. BacBus gives you two discovery tools.
Discover points
Tap 🔎 Discover points. BacBus probes the first 256 addresses (0–255) of each
address space (holding registers, input registers, coils, discrete inputs) and
reports the contiguous blocks that actually respond. Each block appears as a tappable chip showing its address
range; tap it to load that block straight into the reader and read it (as
uint16, up to 100 values). This is the fastest way to find real data on an
unfamiliar device. Points mapped above address 255 won't be found this way —
enter their Start address directly.
Scan unit IDs
Tap 🔢 Scan unit IDs to probe unit ids 1–32. This finds the live slaves sitting behind a Modbus TCP→RTU gateway. Tap a responding id to target it for subsequent reads.
Some devices answer every unit id with the same data (they ignore the unit id entirely). BacBus detects this and tells you so you can pick any id and move on.
Read
Configure the read and tap Read:
- Function:
- Holding Registers (FC3) — read/write registers
- Input Registers (FC4) — read-only registers
- Coils (FC1) — read/write bits
- Discrete Inputs (FC2) — read-only bits
- Start — starting address
- Count — number of values to read
- Type (registers only) — how to decode the raw registers (see below)
- Word order (32-bit types only) — byte/word ordering
Results show each value's address, the raw register words (hex) or bit, and the decoded value. A teal left stripe marks writable rows (holding registers and coils); input registers and discrete inputs are read-only.
Data types and word order
Register values can be decoded as:
| Type | Registers |
|---|---|
Unsigned 16-bit (uint16) | 1 |
Signed 16-bit (int16) | 1 |
| Hex 16-bit | 1 |
Unsigned 32-bit (uint32) | 2 |
Signed 32-bit (int32) | 2 |
Float 32-bit (float32) | 2 |
Count is the number of values, so reading 10 float32 values reads 20
registers.
For 32-bit types, devices differ in how they order the two registers and the
bytes within them. BacBus exposes a Word order selector — ABCD (big-endian), CDAB
(word-swapped), BADC (byte-swapped), DCBA (little-endian) — so you can match the device's convention and get correct
values without guesswork.
Write (Pro)
Writing requires BacBus Pro. Only holding registers and coils are writable; input registers and discrete inputs are read-only by protocol.
Tap a writable result row to open its inline control:
- Registers — a numeric stepper with an adjustable Step, or type a value directly. BacBus encodes it using the same data type and word order the row was read with.
- Coils — an ON/OFF switch.
The value is staged — it isn't sent until you tap Write. The panel shows the previous value (and its data type) for confirmation; Reset discards the staged change. After writing, BacBus re-reads the block so the row reflects what the device actually stored.
Export (Pro)
Tap ⤓ CSV in the results bar to export the current read — address, raw, and value — and share it. CSV export requires Pro.