Skip to content

MatzeS/spd3303x

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SPD3303X

Rust library for controlling the Siglent SPD3303X programmable power supply.

Usage

let mut power_supply = Spd3303x::connect_hostname("<IP goes here>").await?;

// Double check we talk to the correct device.
power_supply
    .verify_serial_number("<your serial number>")
    .await?;

let (ch1, ch2, ch3) = power_supply.into_channels();

ch1.set_limit(LimitQuantity::Voltage, Reading::from(1.000)) .await?;
ch1.set_limit(LimitQuantity::Current, Reading::from(0.1)).await?;
ch1.set_output(State::On).await?;

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages