HVL Common Code Base

PyPI version Supported Python versions Pipeline status Coverage report Documentation Status Development pipeline status https://img.shields.io/badge/code%20style-black-000000.svg https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336 https://img.shields.io/badge/linting-pylint-yellowgreen

Python common code base (CCB) to control devices, which are used in high-voltage research. All implemented devices are used and tested in the High Voltage Laboratory (HVL) of the Federal Institute of Technology Zurich (ETH Zurich).

  • Free software: GNU General Public License v3

  • Copyright (c) 2019-2023 ETH Zurich, SIS ID and HVL D-ITET

Features

For managing multi-device experiments instantiate the ExperimentManager utility class.

Devices

The device wrappers in hvl_ccb provide a standardised API with configuration dataclasses, various settings and options, as well as start/stop methods. Currently wrappers are available to control the following devices:

Function/Type

Devices

Bench Multimeter

Fluke 8845A and 8846A
6.5 Digit Precision Multimeter

Data acquisition

LabJack (T4, T7, T7-PRO; requires LJM Library)
Pico Technology PT-104 Platinum Resistance Data Logger (requires PicoSDK/libusbpt104)

Digital Delay Generator

Highland T560

Digital IO

LabJack (T4, T7, T7-PRO; requires LJM Library)

Experiment control

HVL Cube with and without Power Inverter

Gas Analyser

MBW 973-SF6 gas dew point mirror analyzer
Pfeiffer Vacuum TPG (25x, 26x and 36x) controller for compact pressure gauges
SST Luminox oxygen sensor

Laser

CryLaS pulsed laser
CryLaS laser attenuator

Oscilloscope

Rhode & Schwarz RTO 1024
TiePie (HS5, HS6, WS5)

Power supply

Elektro-Automatik PSI9000
FuG Elektronik
Heinzinger PNC
Technix capacitor charger

Stepper motor drive

Newport SMC100PP
Schneider Electric ILS2T

Temperature control

Lauda PRO RP 245 E circulation thermostat

Waveform generator

TiePie (HS5, WS5)

Each device uses at least one standardised communication protocol wrapper.

Communication protocols

In hvl_ccb by “communication protocol” we mean different levels of communication standards, from the low level actual communication protocols like serial communication to application level interfaces like VISA TCP standard. There are also devices in hvl_ccb that use a dummy communication protocol; this is because these devices are build on proprietary manufacturer libraries that communicate with the corresponding devices, as in the case of TiePie or LabJack devices.

The communication protocol wrappers in hvl_ccb provide a standardised API with configuration dataclasses, as well as open/close and read/write/query methods. Currently, wrappers for the following communication protocols are available:

Communication protocol

Devices using

Modbus TCP

Schneider Electric ILS2T stepper motor drive

OPC UA

HVL Cube with and without Power Inverter

Serial

CryLaS pulsed laser and laser attenuator
FuG Elektronik power supply (e.g. capacitor charger HCK) using the Probus V protocol
Heinzinger PNC power supply using Heinzinger Digital Interface I/II
SST Luminox oxygen sensor
MBW 973-SF6 gas dew point mirror analyzer
Newport SMC100PP single axis driver for 2-phase stepper motors
Pfeiffer Vacuum TPG (25x, 26x and 36x) controller for compact pressure gauges
Technix capacitor charger

TCP

Lauda PRO RP 245 E circulation thermostat

Telnet

Technix capacitor charger
Fluke 8845A and 8846

VISA TCP

Elektro-Automatik PSI9000 DC power supply
Rhode & Schwarz RTO 1024 oscilloscope

propriety

LabJack (T4, T7, T7-PRO) devices, which communicate via LJM Library
Pico Technology PT-104 Platinum Resistance Data Logger, which communicate via PicoSDK/libusbpt104
TiePie (HS5, HS6, WS5) oscilloscopes and generators, which communicate via LibTiePie SDK

Sensor and Unit Conversion Utility

The Conversion Utility is a submodule that allows on the one hand a unified implementation of hardware-sensors and on the other hand provides a unified way to convert units. Furthermore it is possible to map two ranges on to each other. This can be useful to convert between for example and 4 - 20 mA and 0 - 10 V, both of them are common as sensor out- or input. Moreover, a subclass allows the mapping of a bit-range to any other range. For example a 12 bit number (0-4095) to 0 - 10. All utilities can be used with single numbers (int, float) as well as array-like structures containing single numbers (np.array(), list, dict, tuple).

Currently the following sensors are implemented:

  • LEM LT 4000S

  • LMT 70A

The following unit conversion classes are implemented:

  • Temperature (Kelvin, Celsius, Fahrenheit)

  • Pressure (Pascal, Bar, Atmosphere, Psi, Torr, Millimeter Mercury)

Documentation

Note: if you’re planning to contribute to the hvl_ccb project read the Contributing section in the HVL CCB documentation.

Do either:

or

  • build and read HVL CCB documentation locally; install first Graphviz (make sure to have the dot command in the executable search path) and the Python build requirements for documentation:

    $ pip install docs/requirements.txt
    

    and then either on Windows in Git BASH run:

    $ ./make.sh docs
    

    or from any other shell with GNU Make installed run:

    $ make docs
    

    The target index HTML ("docs/_build/html/index.html") should open automatically in your Web browser.

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.