Skip to content

API Wrapper library and example code for acquiring data from one or more VNAs.

Notifications You must be signed in to change notification settings

AkelaInc/OpenVNA-Python-Demo

Repository files navigation

PyOpenVNA

This repository contains both the Akela VNA DLL API Python wrapper and a simple demo program that showcases the ability for a single computer to acquire and plot data from an arbitrary number of remote VNAs.

Both the API wrapper and demp program are Python 2 and Python 3 compatible.

In the demo program, additional VNAs can be added and/or removed dynamically without needing to start and stop a acquisition from any active VNAs. Additionally, the choice of measured S-parameters, as well as some simple analysis functions (iFFT of the frequency domain data) can be enabled/disabled on-the fly without even halting a running acquisition (the changes are simply applied on the next sweep).

Lastly, each VNA can be calibrated, and the calibration stored in a local file if desired.

Fundamentally, the architecture of thie application is quite straight-forward. It uses a standard, 2-thread model, where one thread handles the UI, and the other communicated with the hardware. The two threads communicate via a pair of thread-safe queues.

Dependencies:

  • PyQt5
  • PyQtGraph
  • Numpy (the API calls take/return numpy arrays)
  • Colorama (For logging niceness)

The VNA DLL From https://github.com/AkelaInc/OpenVNA. Any DLL from the 2.x series should work, though the latest version is generally preferable.

The DLL is not bundled in this project, as this python code is 32/64 bit agnostic, whereas the DLL is not. You will need to chose the appropriate variant for your system python.

NOTE: The Version of PyQtGraph in Pip is (as of 2015-09-03) sufficently out of date that is will not work (it doesn't support Qt5). If you build from current sources, it works fine. PyQtGraph has subsequently been updated on PyPi, so it should be useable at this point.

Currently, this demo has been tested on both linux and windows.

Once the dependencies are installed, simply running python main.py will start the demo.

To use the DLL & API alone, numpy and colorama are required, though the other dependencies can be ignored.

Colorama can be installed through pip on windows without issue, though numpy can be involved. The package from http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy provides an easy shortcut.

About

API Wrapper library and example code for acquiring data from one or more VNAs.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages