High Voltage Lab Common Code Basis library: a uniform user-friendly object-oriented API for a high voltage engineering research.
2019-09-04, 16:45–17:00, Track 3 (Oteiza)

The library leverages Python richness to provide a uniform user-friendly API for a zoo of industrial communication protocols used to control high voltage engineering devices, together with abstraction and implementations for such devices.


At the heart of ETH High Voltage Lab's (HVL) research are industrial devices put
together into code-automated experiments. It's a zoo of industrial communication
protocols one needs to handle when controlling these devices. HVL decided to switch from
MATLAB to Python as a programming and analysis tool. Python community provides solutions
to majority of technicalities involved in handling multitude of industrial communication
protocols used to control high voltage research experiment devices. Moreover
Python seems to be a more future-proof choice, meeting industry demand for a more
cost-effective and collaborative solution.

The HVL Common Code Basis library (hvl_ccb) provides a uniform user-friendly
object-oriented API as well as implementation for multiple of high voltage engineering
devices and their respective communication protocols. The library leverages Python's
open source community - implementations of specific communication protocols, but also
relies heavily on some of the languages newer features such as typing hints, dataclasses
or enums.

Python typing hints are used not only for their static type checking and autocompletion
support from IDEs, but also for dynamic type checking of the communication protocol's
and devices' configurations. The configurations themselves are a customized
implementation of Python's 3.7 dataclasses. Configurations properties rely heavily on
Python (advanced) enumerations.

Currently, the library supports serial port, VISA over TCP, Modbus TCP, LabJack LJM and
OPC UA communication protocols. These protocols are used within code abstraction of
devices such MBW973 SF6 Analyzer / dew point mirror, LabJack (T7-PRO) device, Schneider
Electric ILS2T stepper motor drive, Elektro-Automatik PSI9000 DC power supply, Rhode &
Schwarz RTO 1024 oscilloscope, or the Lab's state-of-the-art Supercube platform, which
encapsulates safety components, the voltage source, as well as other auxiliary devices.


Project Homepage / Git – https://gitlab.ethz.ch/hvl/hvl_ccb/ Domains – General-purpose Python, Open Source Domain Expertise – none Python Skill Level – basic Project Homepage / Git – https://gitlab.ethz.ch/hvl/hvl_ccb/ Abstract as a tweet – High voltage engineering research equals handling a zoo of industrial communication protocols. Python to the rescue!