Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Read from VNA over GPIB in VB

Solved!
Go to solution

Hello all,

 

I'm working on an automation program to pull data from a VNA over a GPIB port to a computer, then save it in some arbitrary file.

 

We have some pre-configured settings on the VNA, and normally we have it set to simply save ASCII data to a file.

 

Can anyone point me towards how I can perform this read in VB, or where I can read how I can do this?

 

 

Thanks for your time!

 

0 Kudos
Message 1 of 10
(5,374 Views)

Hello,

 

What VNA you are using?

 

Cheers!

 

 

 

 

0 Kudos
Message 2 of 10
(5,356 Views)
Solution
Accepted by Michael B.

Hi Michael B.

 

Depending on the VNA, if there is a driver for it on www.ni.com/idnet you could potentially get the CVI version of the driver compiled then use the Measurement Studio driver wizard to do it that way. Or you can use the VISA API to send commands to the VNA and receive them and parse them that way. The VISA method would require you to know exactly which commands your instrument uses.

 

Hope this helps!

 

Chris T.
0 Kudos
Message 3 of 10
(5,348 Views)

norrod,

 

We're using the R&S ZVB4 VNA. We have a requirement at the moment to write this as a

standalone application, which is why I ask if it can be done in VB at all.

 

Thanks for your time.

0 Kudos
Message 4 of 10
(5,296 Views)

As a correction to the above, I made a mistake in which VNA we're using.

 

The one we're using is the R&S ZVM.

0 Kudos
Message 5 of 10
(5,292 Views)

Hi Michael B.,

 

Are you using VB.net? If so you can use the instrument driver found here:

http://sine.ni.com/apps/utf8/niid_web_display.model_page?p_model_id=876

 

Compile the cvi code into a dll and load the fp file in the Instrument Driver Wizard in Visual Studio to create the wrapper around the C dll.

 

Hope this helps!

Chris T.
0 Kudos
Message 6 of 10
(5,243 Views)

Hi Christopher,

 

Yes, I am using VB.NET For the programming. I've actually moved past the initial issue of communicating with the device.

We were using the VisaNS drivers which included support for .NET programming.

 

However, we still need to read data from the VNA.

More specifically, we're looking to remove an intermediary step. We're setting up the unit to save an ASCII file, read off the dB, mag

and phase, and then then saving the data to a file for transfer to a computer.

 

However, I can't find anywhere in the documentation for actually reading the data that's normally saved to the mass storage device on the unit.

Could you possibly point me towards any documentation or examples that show how to do this?

 

 

Thanks for your time!

 

 

 

0 Kudos
Message 7 of 10
(5,181 Views)

Hi Michael B,

 

Looking through this, I don't see any commands where it will send the data over to the PC. (looked at the user guide Vol. 2 on the manufacturer's website). I see there are commands for manipulating the data on the memory of the VNA. The thing about the commands is that they are device specific, if the manufacturer has not given a way to receive data from the device there is not much you can do. Maybe the manufacturer might have more information on perhaps a command that we might be missing that might transfer data over.

 

Hope this clears some things up.

 

Regards,

Chris T.
0 Kudos
Message 8 of 10
(5,150 Views)

Christopher,

 

Thanks for your help through this. I was actually able to find the command that would transfer data files over the GPIB to our local machine for manipulation.

 

For reference for others, it was the MMEM:DATA command. We simply wrote the command to the the unit, then did a ReadToFile() to get a local copy.

 

We also had to increase the buffer size a bit just so it would transfer the whole data file all at once (to prevent requiring multiple reads).

Message 9 of 10
(5,073 Views)

I'm using the vna.read() statement from the pyvisa program and it takes a very long time, tens of seconds, to read data to the PC. Why is this, what can i do to speed this up. many thanks. N

0 Kudos
Message 10 of 10
(392 Views)