Skip to main content

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

Project description

caenhv

PyPI version Build and Test PyPI - Python Version

🤔 What is this?

This is an unofficial Python package to interface with CAEN high voltage power supplies over USB (RS232 protocol).

⚠️ 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 caenhv

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

pip install .[test]

👨‍💻 Usage

from caenhv 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[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 off
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

caenhv-0.0.1.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

caenhv-0.0.1-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file caenhv-0.0.1.tar.gz.

File metadata

  • Download URL: caenhv-0.0.1.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for caenhv-0.0.1.tar.gz
Algorithm Hash digest
SHA256 8c81c3abfef3c0b82936cc798cd847fcbefb5112543ed4e44aff53d7ebc87d81
MD5 e44de78398167a3144cbde083bd63e8e
BLAKE2b-256 1591e0a81d4a2fb52d9f478914a8d6f080ba54caf9b1320f55ceeaf622a12944

See more details on using hashes here.

File details

Details for the file caenhv-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: caenhv-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for caenhv-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 829b5eacfe82273dbaf2c90b6fcdbe0960875adceca3b7b091b8f3df2dcf7b46
MD5 38f3414fc48ae5034ba60e387aaa6b92
BLAKE2b-256 fd82bbe996533b93174b777ed13f83fa3be13721a6f82e3f80b0c9f5cd9d1aeb

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