My problem is the communication with the VNA through a Python script. I am able to control and measure the PicoVNA with the PicoVNA2 Software. Now, I would like to communicate with it from a Python script. I followed the steps mentioned in the git repository picosdk-picovna-python-examples, however I come across some problems. The script finds the VNA and connects to it, so in the next step, I am trying to execute SelectKit() to set the calibration. I am using a .kit file exported from the official software. The response to the function call is just "Error". When I try using "?" instead of the file path, the calibration window crashes with the error
Traceback (most recent call last):
File "PicoVNAExamples.py", line 23, in
ans = picoVNACOMObj.SelectKit('?', 1)
pywintypes.com_error: (-2147023170, 'The remote procedure call failed.', None, None)
I tried skipping this step and importing a calibration, which I also saved in the software itself. This calibration is accepted with Status OK. Then in the next step, I am calling picoVNACOMObj.Measure('S11'), which returns "No cal".
I am using Python 3.8.6 on Windows 10 64-bit.
Does anyone know how to solve this problem?