Skip to main content

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

Project description

HVPS

PyPI version Build and Test PyPI downloads Python Version

🤔 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

from hvps import CaenHV

# automatically detect serial port and baudrate (can be manually set)
caen = CaenHV()
# get the first module. CAEN supports multiple modules over the same connection
# typically only one module should 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.off()
channel.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.2.tar.gz (23.2 kB view hashes)

Uploaded Source

Built Distribution

hvps-0.0.2-py3-none-any.whl (22.1 kB view hashes)

Uploaded Python 3

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