Skip to content
This repository has been archived by the owner on Nov 28, 2023. It is now read-only.
/ pyCLAWSps Public archive
forked from malindasds/pyCLAWSps

python 3 package for controlling a Hamamatsu c11204-01/02 power supply

License

Notifications You must be signed in to change notification settings

burbschat/pyCLAWSps

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

c11204ps

As this fork has evolved to far to maintain it as a fork of pyCLAWSps this repository will be archived and the contents moved to the c11204ps repository.

PyPI - Version PyPI - Python Version

Python package for controlling a Hamamatsu c11204-01/02 power supply. This is essentially a re-write of pyCLAWSps. While the pyCLAWSps was fine for basic control of a c11204 power supply, this package aims to provide a more general, streamlined python interface.

Installation

This package should be in the package index and installable with pip.

pip install c11204ps

Compatibility

The code was developed for a power supply board for the CLAWS scintillation detectors and was only ever tested in this context. However, technically pretty much all functionality should be general, making this package usable as long as the c11204-01/02 serial UART interface can be accessed.

Using the package

Simply instantiate a C11204PS object and call any of the implemented functions. The functions themselves should be documented with docstrings in the code. An example to set and check the voltage is the following:

from c11204ps import C11204PS
# Call with no arguments initializes with first serial port with name
# containing 'CP210' or 'Q_MPPC_CTL'.
ps = C11204PS()  
ps.hv_disable()  # Disable voltage supply
print(ps.get_voltage())  # Should read close to zero

ps.set_voltage(56.7)  # Set the voltage (choose appropriate value)

ps.hv_enable()
print(ps.get_voltage())  # Should read close to set voltage

print(ps.get_status())  # Print dict of status flags for the power supply

License

c11204ps is distributed under the terms of the GPL-3.0-only license.

About

python 3 package for controlling a Hamamatsu c11204-01/02 power supply

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%