Skip to main content

Python API for SigLent SPD3303X/E/C power supplies.

Project description

PyPiVersion Pytest CodeStyle

Introduction

All Credit Goes to [geissdoerfer] This is a branch of their original work. I have added a few features to the original code.

Siglent SPD3303X/-E/C are programmable lab bench power supplies. They can be accessed remotely via a VISA interface.

This package provides a python API for convenient remote programming of the Device via Ethernet/USB. Currently, the module supports setting voltage and current limits, measuring voltage and current and enabling or disabling individual outputs.

The module also provides a CLI tool to conveniently control the power supply from the command line.

Also supports the very similar RS PRO RSPD3303X-E.

Installation

The package is hosted on PyPI. Install it with

pip install spd3303c

or

pipenv install spd3303c

Examples

To connect to a device that is connected to a LAN and accessible under IP 192.168.0.4:

with SPD3303X.ethernet_device("192.168.0.4") as dev:
    dev.CH1.set_voltage(8)
    dev.CH1.set_current(0.75)
    dev.CH1.set_output(True)
    print(dev.CH1.get_current())
    print(dev.CH1.get_voltage())
    print(dev.CH1.measure_voltage())
    print(dev.CH1.measure_current())
    dev.CH3.set_output(True)

To connect to a USB device:

with SPD3303X.usb_device() as dev:
    dev.CH1.set_voltage(8)
    dev.CH1.set_current(0.75)
    dev.CH1.set_output(True)
    print(dev.CH1.get_current())
    print(dev.CH1.get_voltage())
    print(dev.CH1.measure_voltage())
    print(dev.CH1.measure_current())
    dev.CH3.set_output(True)

CLI

To configure and enable channel 1 on an ethernet device under IP 192.168.0.4:

spd-ctrl -d 192.168.0.4 set 1 --voltage 3.3 --current 0.5 --on

To configure channel 2 on a USB device:

spd-ctrl set 2 -v 5 -c 0.1

To disable (fixed) channel 3 on a USB device with verbose logging:

spd-ctrl -vvv set 3 --off

To list all available options try:

spd-ctrl --help
spd-ctrl set --help

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spd3303c-1.0.0.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spd3303c-1.0.0-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file spd3303c-1.0.0.tar.gz.

File metadata

  • Download URL: spd3303c-1.0.0.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.9.12

File hashes

Hashes for spd3303c-1.0.0.tar.gz
Algorithm Hash digest
SHA256 390d30bdd3012321820c2e34103b0dd2fd7a34e25806dc2152ed54a9c28636e2
MD5 8fc9ba431b3897852fa8c4c28c6246d1
BLAKE2b-256 3b2660965f6b4672ecc14454bd0297ee17e934ccd62e5829fd4e36c6bbb16496

See more details on using hashes here.

File details

Details for the file spd3303c-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: spd3303c-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.9.12

File hashes

Hashes for spd3303c-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 562999be5b4e991caa2f9bb01269b3e51be817d50dbb2e59eee6b743e4b16e58
MD5 d700d735263e3b4979133fc3adcad5c6
BLAKE2b-256 983cdfecbf774d5f34d43364d33c05f67d8cc6562db9cb9fb296c5949a946d99

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page