Crates.io | profirust |
lib.rs | profirust |
version | 0.2.0 |
source | src |
created_at | 2023-12-28 15:46:28.111084 |
updated_at | 2024-05-09 10:12:58.471117 |
description | PROFIBUS-DP compatible communication stack in pure Rust |
homepage | |
repository | https://github.com/rahix/profirust |
max_upload_size | |
id | 1082485 |
size | 291,467 |
A PROFIBUS-DP compatible communication stack written in Rust.
profirust is a pure-Rust PROFIBUS-DP compatible communication stack. PROFIBUS is an industrial bus protocol used to communicate with field devices like remote I/O, transducers, valves, drives, etc.
If you want to learn more, I suggest reading my blog posts about profirust or my PROFIBUS Primer.
profirust works well for the features it currently supports, however it has not proven itself in a real application yet. There are still some features missing which are needed for production use. Check the roadmap below.
At this time, profirust is developed as a spare time project. If you are interested in this project, help is gladly accepted in the following forms:
profirust is designed to have as little hardware dependency as possible.
All you need is a UART interface with an RS-485 transceiver. You can then
write a matching implementation of ProfibusPhy
. It is encouraged to submit
such implementations for inclusion in profirust.
At the moment, the following implementations are available:
LinuxRs485Phy
: Implementation for non-realtime Linux UART devicesRp2040Phy
: Implementation for RP2040 microcontrollersembedded-hal
-supported microcontrollersThis is a short guide for getting communication up and running with your PROFIBUS peripheral:
gsdtool
to set up the configuration and parameterization of your
peripheral:
cargo run -p gsdtool -- config-wizard path/to/peripheral.gsd
The configuration wizard will walk you through all the settings you need to
make. At this stage, you also need to setup the modules of your peripheral.
The wizard will then give you Rust code for configuring the peripheral
options to your selected values.PeripheralOptions
block and I/O buffers that gsdtool
emitted.RUST_LOG=trace
to see bus communication.
Hopefully, you should now be able to establish cyclic communication with
your peripheral.Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.