// the find
goburrow/modbus
Fault-tolerant implementation of modbus protocol in Go (golang)
A Go client library for Modbus, covering both TCP and serial (RTU/ASCII) transports with the standard set of bit and register operations. It's for anyone writing industrial/IoT software in Go that needs to talk to PLCs, sensors, or other Modbus slave devices.
Clean separation between the transport handler and the client interface, so you can reuse a TCP/serial connection across multiple requests instead of reconnecting per call. Covers the full standard function set (coils, discrete inputs, holding/input registers, FIFO queue, mask write) rather than just the common subset. CRC and LRC checksum logic for RTU/ASCII framing is implemented and has dedicated tests, which is the part people usually get wrong when rolling their own.
Client-only — there's no server/slave side, so you can't use this to simulate a Modbus device for testing against your own code. No context.Context support anywhere in the API; cancellation and timeouts are limited to the handler.Timeout field, which doesn't compose with the rest of a modern Go codebase. CI is wired to Travis, which has been effectively dead for most open-source accounts for years, so that green badge doesn't tell you anything about current build health. Last push was mid-2024 with a fork count (393) nearly 40% of its star count, which usually means a lot of people hit bugs or missing features and patched their own copy instead of getting it merged upstream.