A tokio-based modbus library.
- pure Rust library
- async (non-blocking)
- sync (blocking)
- Modbus TCP
- Modbus RTU
- Client & Server
- Open Source (MIT/Apache-2.0)
Add this to your Cargo.toml
:
[dependencies]
tokio-modbus = "*"
If you like to use Modbus TCP only:
[dependencies]
tokio-modbus = { version = "*", default-features = false, features = ["tcp"] }
If you like to use Modbus RTU only:
[dependencies]
tokio-modbus = { version = "*", default-features = false, features = ["rtu"] }
Various examples for Modbus RTU and TCP using either the asynchronous or synchronous API can be found in the [examples] (https://github.com/slowtec/tokio-modbus/tree/master/examples) folder.
- MODBUS Application Protocol Specification v1.1b3 (PDF)
- MODBUS over serial line specification and implementation guide v1.02 (PDF)
- MODBUS Messaging on TCP/IP Implementation Guide v1.0b (PDF)
Copyright 2017-2019 slowtec GmbH
MIT/Apache-2.0