5 releases (3 breaking)
0.5.0 | Dec 20, 2024 |
---|---|
0.3.0 | Oct 31, 2024 |
0.2.1 | May 9, 2024 |
0.1.1 | Dec 28, 2023 |
0.1.0 | Dec 28, 2023 |
#243 in Robotics
349 downloads per month
68KB
1.5K
SLoC
gsdtool
- CLI tool for PROFIBUS GSD files 
gsdtool
provides utilities for working with GSD files, expecially in the
context of the profirust
PROFIBUS communication stack.
Installation
cargo install gsdtool
Generating Peripheral Configuration
The config-wizard
subcommand interactively generates peripheral configuration
data using selected modules and setting values:
❯ gsdtool config-wizard FRAB4711.gsd Welcome to the station configuration wizard! Station: "FRABA Encoder" from "FRABA" Ident: 0x4711 Selecting modules (maximum 1): Select module 1/1 (ESC to stop): Class 2 Multiturn Code sequence: Increasing clockwise (0) Class 2 functionality: Enable Scaling function control: Enable Measuring units per revolution (0 - 8192): 4096 Total measuring range (high) (0 - 512): 256 Total measuring range (low) (0 - 65535): 0 Peripheral Configuration: // Options generated by `gsdtool` using "FRAB4711.gsd" let options = profirust::dp::PeripheralOptions { // ........ }; let mut buffer_inputs = [0u8; 4]; let mut buffer_outputs = [0u8; 4]; let mut buffer_diagnostics = [0u8; 57];
Parsing Device-based Diagnostics
The diagnostics
subcommand parses diagnostics reported by a peripheral using
the information from the GSD file:
❯ gsdtool diagnostics si0380a7.gsd Diagnostics Data (as fmt::Debug slice): [160, 0, 0, 32, 72, 100, 255, 255, 255, 255, 255, 255, 0, 41, 0, 128, 0, 0] Bit 29: ====== Segment DP2 ====== Bit 127: A/B shorted, too much resist. Area 40-47: 100 = Reflection error rate: 100%
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
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.
Dependencies
~6–16MB
~228K SLoC