Skip to main content

Python API for SigLent SPD3303X

Project description

PyPiVersion Pytest CodeStyle

Introduction

Siglent SPD3303X/-E 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 spd3303x

or

pipenv install spd3303x

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

spd3303x-1.0.3.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

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

spd3303x-1.0.3-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file spd3303x-1.0.3.tar.gz.

File metadata

  • Download URL: spd3303x-1.0.3.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for spd3303x-1.0.3.tar.gz
Algorithm Hash digest
SHA256 bde8fb2165d5ce753b7d66565718919d0cd24ce567cdc281065d246db14f67de
MD5 4f46330a192790921062338fef4a60cb
BLAKE2b-256 d08209ca1c17a91c9f96394a8a14558a8b6ec7e36cee281a162875ee8e097ee4

See more details on using hashes here.

File details

Details for the file spd3303x-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: spd3303x-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for spd3303x-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b55baa92e31c41d7efc101b6bb6673deebc415a57c868ac69c2d2c7909b2d4c0
MD5 3c9220e39cc45fda30ff921ac2bdf905
BLAKE2b-256 b73e0b138c00d78500dbc55177376cc2400dd3fc3249043008d226996f94a0a4

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