AKELA OpenVNA
 All Data Structures Functions Variables Typedefs Groups
VNA Class Reference

Higher-level object-oriented library for interfacing with one or more Akela VNAs. More...

Inheritance diagram for VNA:

Public Member Functions

def __init__
 Connect and initialize a remote VNA. More...
 
def set_config
 Configure a connected VNA with specified hoprate, attenuation and (optional) linear sweep parameters. More...
 
def start
 Proxy for RAW_VNA::start()
 
def stop
 Proxy for RAW_VNA::stop()
 
def measure_uncal
 Routine to measure uncalibrated I-Q using an configured VNA task. More...
 
def measure_cal
 Measure S-Parameters using the internal calibration mechanism from the DLL.
 
def save_dll_cal_auto
 
def load_dll_cal_auto
 
def save_dll_cal
 Save the generated cal from the internal DLL calibration mechanism to a local file. More...
 
def load_dll_cal
 Load a calibration data-set from a save file. More...
 

Detailed Description

Higher-level object-oriented library for interfacing with one or more Akela VNAs.

This class serves as a wrapper for vnalibrary.py, which directly wraps the C++ code in vnadll. Functionally, everything here can be implemented using only vnalibrary.py.

Nevertheless, these routines are valuable as they abstract away some of the lower-level details of dealing with the hardware.

Note that this inherits from VNA.vnalibrary.RAW_VNA, so you can (and actually have to, for normal use) call RAW_VNA methods on it directly, without needing to manage two VNA instances.

Constructor & Destructor Documentation

def __init__ (   self,
  device_ip,
  device_ip_port,
  vna_no = None,
  loglevel = logging.INFO 
)

Connect and initialize a remote VNA.

Sets up logging, creates a task instance to control the VNA, establishes connection with VNA on specified IP:port, initializes VNA and downloads hw details, queries task state, and emits some info to the logging interface at the DEBUG level.

Parameters
device_ip(str) IP address of VNA hardware
device_ip_port(int) IP port-number for connection. Typically 1024+
vna_no(int/str) Number/String inserted into logger path for the relevant VNA. The resultant logging path will be: Main.VNA-API-%s, where %s is the value of vna_no. If not specified, this will default to the ASCII IP for the VNA.
loglevel(logging level) Set the log-level for the DLL interface. Defaults to logging.INFO if not specified.
Returns
Nothing

Member Function Documentation

def load_dll_cal (   self,
  filepath,
  checkip = True,
  checkserial = True 
)

Load a calibration data-set from a save file.

Parameters
filepath(string) Local filesystem path to where the saved calibration is located.
checkserial(bool) Validate that the serial number from the calibration matches the serial number from the VNA.
checkip(bool) Validate that the IP of the connected VNA is the same as the IP from the calibration.
def measure_uncal (   self,
  verbosity = 0 
)

Routine to measure uncalibrated I-Q using an configured VNA task.

def save_dll_cal (   self,
  filepath 
)

Save the generated cal from the internal DLL calibration mechanism to a local file.

Parameters
filepath(string) Local filesystem path where the cal data will be saved.
Note that if the file exists, it will be overwritten!

VNA_Exception_Bad_Cal if there is no calibration to save.

def set_config (   self,
  hoprate,
  attenuation,
  freq = None 
)

Configure a connected VNA with specified hoprate, attenuation and (optional) linear sweep parameters.

Parameters
hoprate(vna.HOP_x) frequency hop-rate from HopRateSettings-Py
attenuation(vna.ATTEN_x) Set the tx attenuator to x db. Values from AttenuationSettings-Py
freq(optional) three-tuple of frequencies used to generate a linear sweep of frequency points. Structure is (start_freq, stop_freq, num_points), where start_freq and stop_freq are frequency numbers in megahertz, and num_points is a simple integer.
The sweep will be modified by utilFixLinearSweepLimits to fit the requested parameters to the allowable frequencies on actual hardware
Returns
Nothing

The documentation for this class was generated from the following file: