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.2.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

spd3303x-1.0.2-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: spd3303x-1.0.2.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for spd3303x-1.0.2.tar.gz
Algorithm Hash digest
SHA256 49a3463186c7bf914bb32596d4be9b4e295040cb6937cdbf611fb67c31a3e30f
MD5 43b946f3dba47e4e45e327649a657048
BLAKE2b-256 b72074f11ad300ba4ea07c3d02241cf24d6338e72f8aafbb3d5fec87e7d0f372

See more details on using hashes here.

File details

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

File metadata

  • Download URL: spd3303x-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for spd3303x-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 21cd80cbe64b1ef6b54702ff9785156ecc2d3ac6460335023f6b7a64cd68a7b1
MD5 447db7ab99987688b3e8f4208a5ecbd3
BLAKE2b-256 9511604ff298168cb420288802e425b045bdceec339903c232a3ad22b3922e8f

See more details on using hashes here.

Supported by

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