Package: hvl-ccb
History0.14.4 (2023-12-22)Hot-fix to be compatible with the newly released version23.12.0ofblackSwitch to src-layoutIntiepie:implementation propertygenerator_is_runningto check, whether the generator is runningpropertiesprobe_offsetandprobe_gainare not implemented and raise NotImplementedError0.14.3 (2023-11-17)Fix Heinzinger conversion from mA to A and fix wrong docstringsHot-fix to be compatible with the newly released version23.11.0ofblackFixbumpvertag messagesImplementation of Technix to fulfilprotocols.Source0.14.2 (2023-09-07)Change dependency tolibtiepiewith linux binaries using forked versionpython-libtiepie-biAdaptmakefileafter removingsetup.pyFix commit messages and tag withbumpverHot-fix to be compatible with the newly released version3.5.0ofpymodbus0.14.1 (2023-08-21)Removesetup.cfg,setup.py,mypy.ini,pytest.ini,requirements_dev.txtand change topyproject.tomlReplacebump2versionwithbumpverChange dependency tolibtiepiewith linux binariesHot-fix to be compatible with the newly released version6.1.0offlake80.14.0 (2023-07-28)Rework of Heinzinger high voltage source controlvalidation of input values (e.g.voltage-property)mergeHeinzingerPNCandHeinzingerDItoHeinzingeralways return values as V for voltage and A for currentRangeEnum fornumber_of_recordingsfulfilprotocols.Sourceraise Error for getter and setter (e.g. set_current, get_current …), use property insteadHot-fix to be compatible with the newly released version23.7.0ofblackHot-fix to be compatible with the newly released version3.4.0ofpymodbusHot-fix to be compatible with the newly released version1.1.6oflibtiepiedrop support for I2CRemove default import fromhvl_ccb.commandhvl_ccb.devfor specific communication protocols and devices0.13.3 (2023-03-31)Introduce common protocol for voltage and current sourceshvl_ccb.dev.protocols.sourcesUpdate code style toblack23.3.0 andisort5.12.0An_EarthingStickofBaseCubeis implemented as a_SwitchCode improvements for deviceHeinzingeruse property-based instead of getter and setterDeprecationWarning for getter and setter (e.g. set_current, get_current …)0.13.2 (2023-03-17)Hot-fix to be compatible with the newly released version3.0.0oftypeguard0.13.1 (2023-03-03)Repository maintenanceadd the option to manually setn_attempts_maxandattempt_interval_secinqueryof theSyncCommunicationProtocolfix links in description forHeinzingerdigital interface and universal high voltage power supplieskeep copyright year information only indocs/conf.pyandREADME.rstremove copyright year information from the filesfix readthedocs build failed issueupdate code style toblack23.1.00.13.0 (2023-01-27)Drop support for Python 3.7 and 3.8:remove version dependent implementationschanged typing acc. to PEP 585Un-freeze version number of dependencies and upgrade to most recent versions0.12.3 (2022-12-27)Code improvements for devicecube:splitalarmsfromconstantsspliterrorsfromconstantssplitearthing_stickfromconstantssplitsupportfromconstantsUpdate code style toblack22.12.0Smaller change of devicetiepie:change hard coded trigger time out value for no time out/infinite (-1) toltp.const.TO_INFINITY0.12.2 (2022-11-29)Move the device modules into packagesBugfix invalidate_numberto check the order of the limitsRepository maintenance:imports are sorted withisortsomemypyfixing and additional typing0.12.1 (2022-10-31)Fixnumpyversion requirement problemfor Python 3.7: 1.21.6for Python 3.8 and onwards: 1.23.40.12.0 (2022-10-17)Last release for Python 3.7 and 3.8Repository maintenanceupdate Labjack LJM software installer link in the pipelinefix dependencies to the fixed versionfixasyncuato 0.9.95 andpymodbusto 2.5.3 (newer versions break the code)fix PICube checker for slope as it is always positive0.11.1 (2022-09-15)Repository maintenancefix issue withmypyand Python 3.10.7update code style toblack22.8.0project configurations merged intosetup.cfgfix coverage indicator0.11.0 (2022-06-22)New device: Fluke 884X Bench 6.5 Digit Precision MultimeterRangeEnumis a new enum for e.g. measurement ranges which also finds a suitable range objectsmaller changes of devicetiepie:introduce status methodis_measurement_running()to check if the device is armedintroducestop_measurement()to disarm the trigger of the devicefix bug with docs due to change oflibtiepieNameEnumand inherited enums can only have unique entries0.10.3 (2022-03-21)fix bug in the Labjack pulse feature that occurred when the start time was set to 0snew conversion utility to map two ranges on each otherupdate CONTRIBUTING.RSTupdate makefile and make.shimprove the mockup telnet test server0.10.2 (2022-02-28)introduction ofblackas code formatterincrease the required version of the packageaenumremove devicesupercube2015- as it is no longer usedremove unused packageopenpyxlrequirementfix bug in highland loggingimprove handling for communication error with picotech0.10.1 (2022-01-24)several improvements and fixes for devicecube:privatizeAlarmsandAlarmsOverviewfix list of cube alarmsimprove docsfix bugs with earthing sticksfix bug in config dataclass of cubeintroduction of BoolEnumintroduction of RangeEnumbumpversion -> bump2version0.10.0 (2022-01-17)Reimplementation of the Cube (before known as Supercube)new names:Supercube Typ B -> BaseCubeSupercube Typ A -> PICube (power inverter Cube)new import:from hvl_ccb.dev.supercube import SupercubeB->from hvl_ccb.dev.cube import BaseCubenew programming style:getter / setter methods -> propertiese.g. get:cube.get_support_output(port=1, contact=1)->cube.support_1.output_1e.g. set:cube.get_support_output(port=1, contact=1,
state=True)->cube.support_1.output_1 = Trueunify Exceptions of Cubeimplement Fast Switch-Off of Cuberemove methodsupport_output_impulseall active alarms can now be queriedcube.active_alarms()alarms will now result in different logging levels depending on the
seriousness of the alarm.introduction of limits for slope and safety limit for RedReadyduring the startup the CCB will update the time of the cube.verification of inputspolarity of DC voltageSwitch frompython-opcuatoopcua-asyncio(former package is no longer maintained)0.9.0 (2022-01-07)New device: Highland T560 digital delay and pulse generator over Telnet.Rework of the Technix Capacitor Charger.Moved into a separate sub-packageNEW import overimport hvl_ccb.dev.technix as XXXSlightly adapted behaviourAddvalidate_tcp_portto validate port number.Addvalidate_and_resolve_hostto validate and resolve host names and IPs.Remove requirementIPyAdd a unified CCB Exception schema for all devices and communication protocols.Add data conversion functions to README.Update CI and devel images from Debian 10 buster to Debian 11 bullseye.Fix typing due to numpy update.Fix incorrect overloading ofclean_values()in classes of
typeXCommunicationConfig.0.8.5 (2021-11-05)Added arbitrary waveform for TiePie signal generation, configurable viadev.tiepie.generator.TiePieGeneratorConfig.waveformproperty.Inutils.conversion_sensor: improvements for class constants; removed SciPy
dependency.Added Python 3.10 support.0.8.4 (2021-10-22)utils.validation.validate_numberextension to handle NumPy arrays and
array-like objects.utils.conversion_unitutility classes handle correctlyNamedTupleinstances.utils.conversion_sensorandutils.conversion_unitcode
simplification (notransfer_function_orderattribute) and cleanups.Fixed incorrect error logging inconfiguration.configdataclass.comm.telnet.TelnetCommunicationtests fixes for local run errors.0.8.3 (2021-09-27)New data conversion functions inutils.conversion_sensorandutils.conversion_unitmodules. Note: to use these functions you must installhvl_ccbwith extra requirement, eitherhvl_ccb[conversion]orhvl_ccb[all].Improved documentation with respect to installation of external libraries.0.8.2 (2021-08-27)New functionality indev.labjack.LabJack:configure clock and send timed pulse sequencesset DAC/analog output voltageBugfix: ignore random bits sent by todev.newport.NewportSMC100PPcontroller during start-up/powering-up.0.8.1 (2021-08-13)Add Python version check (min version error; max version warning).Daily checks for upstream dependencies compatibility and devel environment
improvements.0.8.0 (2021-07-02)TCP communication protocol.Lauda PRO RP 245 E circulation thermostat device over TCP.Pico Technology PT-104 Platinum Resistance Data Logger device as a wrapper of the
Python bindings for the PicoSDK.Incom.visa.VisaCommunication: periodic status polling when VISA/TCP keep
alive connection is not supported by a host.0.7.1 (2021-06-04)Newutils.validationsubmodule withvalidate_boolandvalidate_numberutilities extracted from internal use within adev.tiepiesubpackage.Incomm.serial.SerialCommunication:strict encoding errors handling strategy for subclasses,user warning for a low communication timeout value.0.7.0 (2021-05-25)Thedev.tiepiemodule was splitted into a subpackage with, in particular,
submodules for each of the device types –oscilloscope,generator,
andi2c– and with backward-incompatible direct imports from the submodules.Indev.technix:fixed communication crash on nested status byte query;added enums for GET and SET register commands.Further minor logging improvements: added missing module level logger and removed some
error logs inexceptblocks used for a flow control.Inexamples/folder renamed consistently all the examples.In API documentation: fix incorrect links mapping on inheritance diagrams.0.6.1 (2021-05-08)Indev.tiepie:dynamically set oscilloscope’s channel limits inOscilloscopeChannelParameterLimits:input_rangeandtrigger_level_abs, incl. update of latter on each change ofinput_rangevalue of aTiePieOscilloscopeChannelConfiginstances;quick fix for opening of combined instruments by disablingOscilloscopeParameterLimits.trigger_delay(an advanced feature);enable automatic devices detection to be able to find network devices withTiePieOscilloscope.list_devices().Fixexamples/example_labjack.py.Improved logging: consistently use module level loggers, and always log exception
tracebacks.Improve API documentation: separate pages per modules, each with an inheritance
diagram as an overview.0.6.0 (2021-04-23)Technix capacitor charger using either serial connection or Telnet protocol.Extensions, improvements and fixes in existing devices:Indev.tiepie.TiePieOscilloscope:redesigned measurement start and data collection API, incl. time out
argument, with no/infinite time out option;trigger allows now a no/infinite time out;record length and trigger level were fixed to accept, respectively, floating
point and integer numbers;fixed resolution validation bug;dev.heinzinger.HeinzingerDIanddev.rs_rto1024.RTO1024instances are now
resilient to multiplestop()calls.Indev.crylas.CryLasLaser: default configuration timeout and
polling period were adjusted;Fixed PSI9080 example script.Package and source code improvements:Update to backward-incompatiblepyvisa-py>=0.5.2. Developers, do update
your local development environments!External libraries, like LibTiePie SDK or LJM Library, are now not installed by
default; they are now extra installation options.Added Python 3.9 support.Improved number formatting in logs.Typing improvements and fixes formypy>=0.800.0.5.0 (2020-11-11)TiePie USB oscilloscope, generator and I2C host devices, as a wrapper of the Python
bindings for the LibTiePie SDK.a FuG Elektronik Power Supply (e.g. Capacitor Charger HCK) using the built-in ADDAT
controller with the Probus V protocol over a serial connectionAll devices poling status or measurements use now adev.utils.Pollerutility
class.Extensions and improvements in existing devices:Indev.rs_rto1024.RTO1024: added Channel state, scale, range,
position and offset accessors, and measurements activation and read methods.Indev.sst_luminox.Luminox: added querying for all measurements
in polling mode, and made output mode activation more robust.Indev.newport.NewportSMC100PP: an error-pronewait_until_move_finishedmethod of replaced by a fixed waiting time,
device operations are now robust to a power supply cut, and device restart is not
required to apply a start configuration.Other minor improvements:Single failure-safe starting and stopping of devices sequenced viadev.base.DeviceSequenceMixin.Movedread_text_nonemptyup tocomm.serial.SerialCommunication.Added development Dockerfile.Updated package and development dependencies:pymodbus,pytest-mock.0.4.0 (2020-07-16)Significantly improved new Supercube device controller:more robust error-handling,status polling with genericPollerhelper,messages and status boards.tested with a physical device,Improved OPC UA client wrapper, with better error handling, incl. re-tries onconcurrent.futures.TimeoutError.SST Luminox Oxygen sensor device controller.Backward-incompatible changes:CommunicationProtocol.access_lockhas changed type fromthreading.Locktothreading.RLock.ILS2T.relative_stepandILS2T.absolute_positionare now called,
respectively,ILS2T.write_relative_stepandILS2T.write_absolute_position.Minor bugfixes and improvements:fix use of max resolution inLabjack.set_ain_resolution(),resolve ILS2T devices relative and absolute position setters race condition,added acoustic horn function in the 2015 Supercube.Toolchain changes:add Python 3.8 support,drop pytest-runner support,ensure compatibility withlabjack_ljm2019 version library.0.3.5 (2020-02-18)Fix issue with reading integers from LabJack LJM Library (device’s product ID, serial
number etc.)Fix development requirements specification (tox version).0.3.4 (2019-12-20)New devices using serial connection:Heinzinger Digital Interface I/II and a Heinzinger PNC power supplyQ-switched Pulsed Laser and a laser attenuator from CryLasNewport SMC100PP single axis motion controller for 2-phase stepper motorsPfeiffer TPG controller (TPG 25x, TPG 26x and TPG 36x) for Compact pressure GaugesPEP 561 compatibility and related corrections for static type checking (now in CI)Refactorings:Protected non-thread safe read and write in communication protocolsDevice sequence mixin: start/stop, add/rm and lookup.format()to f-stringsmore enumerations and a quite some improvements of existing codeImproved error docstrings (:raises:annotations) and extended tests for
errors.0.3.3 (2019-05-08)Use PyPI labjack-ljm (no external dependencies)0.3.2 (2019-05-08)INSTALLATION.rst with LJMPython prerequisite info0.3.1 (2019-05-02)readthedocs.org support0.3 (2019-05-02)Prevent an automatic close of VISA connection when not used.Rhode & Schwarz RTO 1024 oscilloscope using VISA interface overTCP::INSTR.Extended tests incl. messages sent to devices.Added Supercube device using an OPC UA clientAdded Supercube 2015 device using an OPC UA client (for interfacing with old system
version)0.2.1 (2019-04-01)Fix issue with LJMPython not being installed automatically with setuptools.0.2.0 (2019-03-31)LabJack LJM Library communication wrapper and LabJack device.Modbus TCP communication protocol.Schneider Electric ILS2T stepper motor drive device.Elektro-Automatik PSI9000 current source device and VISA communication wrapper.Separate configuration classes for communication protocols and devices.Simple experiment manager class.0.1.0 (2019-02-06)Communication protocol base and serial communication implementation.Device base and MBW973 implementation.InstallationStable releaseTo install HVL Common Code Base, run this command in your terminal:$pipinstallhvl_ccbTo install HVL Common Code Base with optional Python libraries that require manual
installations of additional system libraries, you need to specify on installation
extra requirements corresponding to these controllers. For instance, to install
Python requirements for LabJack and TiePie devices, run:$pipinstall"hvl_ccb[tiepie,labjack]"See below for the info about additional system libraries and the corresponding extra
requirements.To install all extra requirements run:$pipinstall"hvl_ccb[all]"This is the preferred method to install HVL Common Code Base, as it will always install
the most recent stable release.If you don’t havepipinstalled, thisPython installation guidecan guide
you through the process.From sourcesThe sources for HVL Common Code Base can be downloaded from theGitLab repo.You can either clone the repository:$gitclonegit@gitlab.com:ethz_hvl/hvl_ccb.gitOr download thetarball:$curl-OLhttps://gitlab.com/ethz_hvl/hvl_ccb/-/archive/master/hvl_ccb.tar.gzOnce you have a copy of the source, you can install it with:$pipinstall.Additional system librariesIf you have installedhvl_ccbwith any of the extra features corresponding to
device controllers, you must additionally install respective system library; these are:Extra featureAdditional system librarylabjackLJM LibrarypicotechPicoSDK(Windows) /libusbpt104(Ubuntu/Debian)For more details on installation of the libraries see docstrings of the correspondinghvl_ccbmodules.HVL Common Code BasePython 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 v3Copyright (c) 2019-2023 ETH Zurich, SIS ID and HVL D-ITETFeaturesFor managing multi-device experiments instantiate theExperimentManagerutility class.DevicesThe device wrappers inhvl_ccbprovide 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/TypeDevicesBench MultimeterFluke 8845A and 8846A6.5 Digit Precision MultimeterData acquisitionLabJack (T4, T7, T7-PRO; requiresLJM Library)Pico Technology PT-104 Platinum Resistance Data Logger
(requiresPicoSDK/libusbpt104)Digital Delay GeneratorHighland T560Digital IOLabJack (T4, T7, T7-PRO; requiresLJM Library)Experiment controlHVL Cube with and without Power InverterGas AnalyserMBW 973-SF6 gas dew point mirror analyzerPfeiffer Vacuum TPG (25x, 26x and 36x) controller for
compact pressure gaugesSST Luminox oxygen sensorLaserCryLaS pulsed laserCryLaS laser attenuatorOscilloscopeRhode & Schwarz RTO 1024TiePie (HS5, HS6, WS5)Power supplyElektro-Automatik PSI9000FuG ElektronikHeinzinger PNCTechnix capacitor chargerStepper motor driveNewport SMC100PPSchneider Electric ILS2TTemperature controlLauda PRO RP 245 E circulation thermostatWaveform generatorTiePie (HS5, WS5)Each device uses at least one standardised communication protocol wrapper.Communication protocolsInhvl_ccbby “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 inhvl_ccbthat 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 inhvl_ccbprovide 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 protocolDevices usingModbus TCPSchneider Electric ILS2T stepper motor driveOPC UAHVL Cube with and without Power InverterSerialCryLaS pulsed laser and laser attenuatorFuG Elektronik power supply (e.g. capacitor charger HCK)
using the Probus V protocolHeinzinger PNC power supply
using Heinzinger Digital Interface I/IISST Luminox oxygen sensorMBW 973-SF6 gas dew point mirror analyzerNewport SMC100PP single axis driver for 2-phase stepper
motorsPfeiffer Vacuum TPG (25x, 26x and 36x) controller for
compact pressure gaugesTechnix capacitor chargerTCPLauda PRO RP 245 E circulation thermostatTelnetTechnix capacitor chargerFluke 8845A and 8846VISA TCPElektro-Automatik PSI9000 DC power supplyRhode & Schwarz RTO 1024 oscilloscopeproprietyLabJack (T4, T7, T7-PRO) devices, which communicate viaLJM LibraryPico Technology PT-104 Platinum Resistance Data Logger,
which communicate viaPicoSDK/libusbpt104TiePie (HS5, HS6, WS5) oscilloscopes and generators,
which communicate viaLibTiePie SDKSensor and Unit Conversion UtilityThe 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 4000SLMT 70AThe following unit conversion classes are implemented:Temperature (Kelvin, Celsius, Fahrenheit)Pressure (Pascal, Bar, Atmosphere, Psi, Torr, Millimeter Mercury)DocumentationNote: if you’re planning to contribute to thehvl_ccbproject read
theContributingsection in the HVL CCB documentation.Do either:readHVL CCB documentation at RTD,orbuild and read HVL CCB documentation locally; install firstGraphviz(make sure
to have thedotcommand in the executable search path) and the Python
build requirements for documentation:$ pip install docs/requirements.txtand then either on Windows in Git BASH run:$ ./make.sh docsor from any other shell with GNU Make installed run:$ make docsThe target index HTML ("docs/_build/html/index.html") should open
automatically in your Web browser.CreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.