4 releases
Uses new Rust 2024
| 0.2.1 | Aug 20, 2025 |
|---|---|
| 0.2.0 | Aug 15, 2025 |
| 0.1.1 | Jun 16, 2025 |
| 0.1.0 | Jun 13, 2025 |
#528 in Concurrency
183 downloads per month
48KB
1K
SLoC
SPD3303X
Rust library for controlling the Siglent SPD3303X programmable power supply.
Usage
let mut power_supply = Spd3303x::connect_hostname("<IP goes here>")?;
// Double check we talk to the correct device.
power_supply
.verify_serial_number("<your serial number>")
?;
let (ch1, ch2, ch3) = power_supply.into_channels();
ch1.set_limit(LimitQuantity::Voltage, Reading::from(1.000)) ?;
ch1.set_limit(LimitQuantity::Current, Reading::from(0.1))?;
ch1.set_output(State::On)?;
Limitations
Only TCP/IP is supported. The USB interface is not (yet) implemented.
Notes
This library implements the complete command set based on the official datasheet. See src/commands.rs.
Reference: SPD3303X/3303X-E Programmable DC Power Supply, Quick Start, EN_02A (2025-06-13)
A convenient high-level programming interface is provided in src/spd3303x.rs and src/channel_control.rs.
Refer to the API documentation for details: docs.rs
The crate is currenlty on channel nightly for the 'pattern' feature.
In the current early version of the crate (0.x.x), there may be breaking API changes without a major version bump.
Reliability
Integration tests may sporadically fail due to "Connection reset" errors.
This is likely caused by command overruns; apparently the device does not respond reliably to rapid sequences.
If high reliability is required, consider adding rate limiting or retry logic.
Most commands are covered by integration tests.
⚠️ Disconnect any loads from the supply before running tests. The output will be activated with voltage and current!
The instrument subsystem is not tested, as it is not used by the high-level interface.
This library has not been tested with the SPD3303X-E variant.
Errata
The official documentation lacks details about the status response when the device is in Series channel operation mode.
However, the device reliably advertises this mode via set bits 2 and 3 in the status response, and
this implementation decodes those bits accordingly.
Dependencies
~2.3–4MB
~69K SLoC