Python Interface installation

Getting started

  1. Assemble a HVPS, including the low voltage and high voltage testing.
  2. Perform the initial configuration and calibration, using either the LabVIEW interface (point 2.1), The Python library (point 2.2), or sending a command to the board (point 2.3).
  3. It is recommended to perform a calibration of the HVPS if you have a HV probe and a multimeter
    1. You can make make a manual calibration (point 2)
    2. If you also have a NI-DAQ platform, you can use the LabVIEW interface to perform an automatic calibration

Windows: using the executable file

  1. Be sure the drivers are installed on your system.
  2. From the Download page, grab the py-hvps-interface-exe_vx.x.zip archive and uncompress it somewhere on your computer
  3. Double click on the main.exe executable to launch the interface
  4. The interface opens. You must have an HVPS connected to the USB port, or you will get an error message.

Using the source code

Currently, we only have made an executable for Windows. If you are using OSX, Linux, or another OS, you can easily launch the interface using the source code. This also applies to Windows if you want to modify the source code, or use the HVPS class to write your own programmes.

  1. Install Python 3 on your system.
  2. Install PySerial from command line (command prompt / terminal): pip install pyserial (if you have both python 2 and python 3 on your system, you may need to use pip3 install pyserial).
  3. Optionally, if you want to be able to display the custom waveform within the interface, you need to install the Pillow library (pip install Pillow). Matplotlib is also required, but usually installed with Python. In any case, if these packages are missing, a warning message will be displayed.
  4. Get the py-hvps-interface.vx.x.zip from the download page and uncompress it on your computer.
  5. to run: python main.py (must be done from the directory that contains the interface files. If you have Python2 and Python3 on your system, the command might be python3 main.py)
    1. Alternatively, on Linux-based systems, you can use the file GUI.sh to start the interface. You may need to change the file attribute to give it permission to launch (chmod +x GUI.sh)
    2. Alternatively, on Windows, you can use theĀ  GUI.bat file to start the interface.
      Double clicking on it will launch the interface. You can then create a shortcut to your desktop to easily launch the interface.
  6. The file install.txt contains more info on the requirements, installation, and configuration on different platforms.

back to the Python Interface menu