Modbus mental model
Address spaces, function codes, Unit IDs, and frames.
Modbus mental model
Modbus exposes four independent address spaces. The number 10 in Holding registers and the number 10 in Input registers are different objects. Every read therefore needs both an address space and a zero-based PDU address.
| Address space | Native shape | Function codes | Typical use |
|---|---|---|---|
| Coils | 1-bit, read/write | FC01 read · FC05/FC15 write | Often outputs, enables, commands |
| Discrete inputs | 1-bit, read-only | FC02 | Status contacts and digital inputs |
| Holding registers | 16-bit, read/write | FC03 read · FC06/FC16 write | Setpoints, configuration, measurements |
| Input registers | 16-bit, read-only | FC04 | Measurements and device telemetry |
One exchange, three identities
- Unit ID
- Identifies the Modbus server/slave behind the connection. On RTU it selects a bus participant; on TCP it is still relevant for gateways.
- PDU address
- The zero-based address sent in the Modbus request. This is the canonical identity Busloom stores for a tag.
- Transaction
- One logical request and response. Raw Traffic shows its TX and RX frames together in chronological order.
What Busloom validates
Busloom does not accept a response merely because bytes arrived. It validates the RTU or TCP envelope, Unit ID, function, declared lengths, requested quantity, byte count, and response shape. A valid Modbus exception is preserved as a completed protocol exchange; malformed transport or PDU data is reported separately.