PicoVNA Matlab Interface

Discussions forum for our Sampling Oscilloscopes, VNA, and Pulse Generators
Post Reply
gosler
Newbie
Posts: 0
Joined: Fri Aug 09, 2019 3:25 pm

PicoVNA Matlab Interface

Post by gosler »

Attempting to remote control PicoVNA with Matlab.

This has been tried using Matlab R2011 and R2014, PC OS is Windows 10

Using the latest version of PicoVNA2 Control (v17), the program ID is not created and attempting to create an object file in matlab fails reporting invalid ProgID. The ProgID does not appear as a software Class name.

Reverting to PicoVNA2 Control (v12), PicoControl2.PicoVNA_2 now appears as a software class name, but creation of an actxserver object still results in the following error.

obj = actxserver('PicoControl2.PicoVNA_2');
Error using feval
Server Creation Failed: Class not registered

Error in actxserver (line 86)
h=feval(['COM.' convertedProgID], 'server', machinename, interface);

Any ideas on why the latest version v17 doesn't register the class name, or why the error above occurs with V12. Is this an issue with Windows 10?

Any pointers appreciated.

NeilH
PICO STAFF
PICO STAFF
Posts: 267
Joined: Tue Jul 18, 2017 8:28 am

Re: PicoVNA Matlab Interface

Post by NeilH »

Hi

When you get the error with v12 is the VNA open in the software or in any other instance on the PC?

For v17 there is a bug with the current installer version that doesn't properly register the dll for use, to do this open the CMD as an administrator then navigate to C:\Windows\sysWOW64 then run this command;
regsvr32 PicoControl2.dll
This will then register the dll for use with MATLAB

Neil
Neil
Technical Support Engineer

punch98
Newbie
Posts: 0
Joined: Thu Sep 05, 2019 1:46 am

Re: PicoVNA Matlab Interface

Post by punch98 »

Hi,

I am using MATLAB 2016a / 2018b with PicoVNA software v17 on Windows 10 Pro, and getting the same error message : "Server Creation Failed: Class not registered". Both MATLAB versions are giving this.

I ran "regsvr32 PicoConrol2.dll" from cmd as administrator at C:\Windows\SysWOW64

Can I get some pointer for this? Is there a v16 software available that I can try?

Thank you!

NeilH
PICO STAFF
PICO STAFF
Posts: 267
Joined: Tue Jul 18, 2017 8:28 am

Re: PicoVNA Matlab Interface

Post by NeilH »

Hi

Using the regsvr32 will register the dll for use with 32 bit applications only as the dll itself is 32 bit so it would work with a 32 bit version of MATLAB such as 2015b 32 bit.

Neil
Neil
Technical Support Engineer

matt.nickels
Newbie
Posts: 0
Joined: Tue Aug 30, 2022 8:22 pm

Re: PicoVNA Matlab Interface

Post by matt.nickels »

I started playing with this for Pico VNA3 since it does not appear one can get PicoVNA2 anymore, no luck out of the box connecting from Matlab.

Tried connectVNA and connectVNA108 (since this looks to use PicoControl3 even though I have a 106) and got same error as others:

Error using feval
Server Creation Failed: Class not registered

Windows 10 Pro
Matlab 2021b

Not sure if this is a 32/64 bit issue, but also I could not find any evidence that the PicoControl2/3 dll is registered at all even though it's supposed to be when PicoVNA is installed. So...

I downloaded Matlab 2015b (last of the 32 bit versions). In there, connectVNA seems to work and returns a PicoControl2_PicoVNA_2 object. FND() returns "8805". connectVNA108 does not work. I guess not surprising since I have a 106 not a 108, but looking at the functions under the hood, connectVNA108 just uses VNA3 instead of VNA2. I only have the VNA3 software installed (since that is all you can get anymore from the web). And VNA3 GUI seems to work with the 106. So there is a little confusion on my end but it seems that there is some relation of the 106 to the PicoControl2 dll and the 108 to the PicoControl3 dll, separate from the VNA2 vs. VNA3 software.

NeilH
PICO STAFF
PICO STAFF
Posts: 267
Joined: Tue Jul 18, 2017 8:28 am

Re: PicoVNA Matlab Interface

Post by NeilH »

Hi

PicoVNA3 software contains the dlls for both the PicoVNA3 and PicoVNA2 but currently they are only available in 32 bits and the bridging for use in 64 bit is not done by the installer. An updated version is currently under development for a 64 bit software and dlls but I have no information about a timeline for this.

Below I have provided steps to manually creating the bridging repository for using a 32 bit dll in 64 bit apps. In the instructions if you replace the CLSID number in all the instructions with the one for your dll by searching for PicoVNA 2 or PicoVNA3 in Regedit.
  • 1. Open Regedit
    2. Go to HKey_Classes_Root/Wow6432Node/CLSID/{2856BC1D-2651-4153-A8D6-9AE79DFA6744} in Regedit
    3. Right click on this entry and select New -> String Value
    4. Name this new string value to AppID
    5. Right click on AppID and choose modify from the menu
    6. Set the Value Data to; {2856BC1D-2651-4153-A8D6-9AE79DFA6744}
    7. Go to HKey_Classes_Root/Wow6432Node/AppID
    8. Right click and choose New -> Key
    9. Rename the new key to {2856BC1D-2651-4153-A8D6-9AE79DFA6744}
    10. Right click this key and choose New -> String
    11. Rename the new string to DllSurrogate
    12. Go to HKey_Local_Machine/Software/Classes/AppID
    13. If {2856BC1D-2651-4153-A8D6-9AE79DFA6744} doesn’t already exist in the folder
    a. Right click and choose New -> Key
    b. Rename the new key to {2856BC1D-2651-4153-A8D6-9AE79DFA6744}
Neil
Technical Support Engineer

Post Reply