Skip to main content

An unofficial Python package 🐍📦 to interface with CAEN high voltage power supplies

Project description

HVPS

PyPI version npm version

PyPI downloads Python Version

Build and Test Upload Python Package to PyPI and nodejs bindings to npm

🤔 What is this?

The goal of this Python package is to interface with different brands of high voltage power supplies in a uniform way. Currently only CAEN and iseg brands are supported. Communication is performed via serial port (over USB).

⚠️ Disclaimer

The features of this package are based on my needs at the time of writing. I have done very limited testing on a single model (DT1471ET) but it should also work for other CAEN power supplies also supporting RS232.

If you use this package, it is very possible you find a bug or some oversight. You are encouraged to make a pull request or to create an issue to report a bug, to request additional features or to suggest improvements.

⚙️ Installation

Installation via pip is supported. To install the latest published version, run:

pip install hvps

To install the package from source, including development dependencies, clone the repository and run:

pip install .[dev]

👨‍💻 Usage

CAEN

from hvps import Caen

# automatically detect serial port and baudrate (can be manually set)
caen = Caen()
# get the first module. CAEN supports multiple modules over the same connection
# typically only one module will be present
module = caen.module(0)

# get channel number 2
channel = module.channel(2)

# print current 'vset' and 'vmon' values
print(f"vset: {channel.vset}")
print(f"vmon: {channel.vmon}")

# switch channel off and on
channel.turn_off()
channel.turn_on()

# set a new value of 'vset'
channel.vset = 300.0  # 300 V

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

hvps-0.0.3.tar.gz (31.6 kB view details)

Uploaded Source

Built Distribution

hvps-0.0.3-py3-none-any.whl (32.4 kB view details)

Uploaded Python 3

File details

Details for the file hvps-0.0.3.tar.gz.

File metadata

  • Download URL: hvps-0.0.3.tar.gz
  • Upload date:
  • Size: 31.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.4

File hashes

Hashes for hvps-0.0.3.tar.gz
Algorithm Hash digest
SHA256 01de0aa460b72f7aff14a6b6376063bb1719efc1408d9abb084ee260f5df4d13
MD5 e458ddffae8462cbb8bee169f1c4ac42
BLAKE2b-256 55b54c11e768c5d97571f00f362a900f86bf96c203d1731c8c3bdbf1868769e8

See more details on using hashes here.

File details

Details for the file hvps-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: hvps-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 32.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.4

File hashes

Hashes for hvps-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3ce18b8033ad232a4862260face45323182a65a22ced69918138bf55da076a73
MD5 8e607c9a45c614f4ede36ebddbe95067
BLAKE2b-256 062b4fc7e58fc62860bf3cc5b2d9e0edf7de72ff4681a1ede8240caaf5917377

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