Software
ModBee Modbus
Modbus that never blocks
Modbus RTU, ASCII and TCP, as client and server, plus a TCP-to-serial bridge, from one C++17 code base for Arduino, Linux, macOS and Windows. Nothing waits on the bus, so the rest of the program keeps running while requests are in flight.
What it does
Requests go into a queue that refuses duplicates and replaces an older setpoint with the latest one. Every accepted operation reaches exactly one conclusion, with timeouts measured per unit and retries with backoff.
Every value is tagged with a quality, and 32-bit and 64-bit values can be read in any of the four word orders, with a probe to find the right one.
What it is not for
Modbus TCP Security (TLS), serial networks of more than 247 units, or real-time control.
Features
- RTU, ASCII and TCP, each client and server at once
- TCP-to-serial bridge
- Non-blocking queue with duplicate refusal and setpoint supersede
- Per-unit timeouts and retries with backoff and jitter
- Quality on every value: good, uncertain, bad or unknown
- Function codes 01-06, 0F, 10, 16, 17 and 2B/0E, plus serial diagnostics
Runs on
ESP32, ESP8266, SAMD, RP2040, STM32, Arduino mbed boards and Uno R4; Linux, macOS and Windows. About 2 KB of RAM per link.