From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview GPIB-USB-HS and Network Analyzer

Hi, I have a quick question; I am currently working with an older Vector Network Analyzer and Labview for controlling antenna array measurements. Currently, we have two Labview VI's that work independently, but we would like to combine them into one to further automate our process. What I am having trouble with is writting to the VNA with the two VI's combined. I have copied the working VI and have setup the same control logic for it in the combined module as it has in the working VI, but it does not seem to work when added with the other .VI.

 

I am new to Labview, so it is probably a simple error, but if someone could look over what I'll attach and see if there is a solution, I would greatly appreciate it! Currently, in the combined module, there are no errors, and the first part, writing the sequence to the parallel port works, but that writing to the parallel port does not seem to trigger the VNA to become active and write the data. I can provide more details if necessary, but here are the files. The calib1.VI is required to run the VNA_Try, but nothing needs to be changed there; the VNA_Switch_Combine is the one that is not currently working.

 

Thank you for your help!

Download All
0 Kudos
Message 1 of 15
(3,596 Views)

Hi MicrowaveEgr,

I do not have an exact answer as to why you are seeing this behavior in your current code, but I do have some suggestions/comments that may help find the root cause. I suggest you try running the code while having highlight execution on, this will show the data flowing through the wired connections and let you know when certain sections of your code are running. You can enable this by clicking the lightbulb on the toolbar of the block diagram.

One thing I would like to note is that in your current setup you have 2 while loops, one of which appears to be port writing and the other writing commands via VISA to the GPIB device. The loop that writes the VISA commands to the GPIB device (or the VNA_TRY7.vi code) will not run until the while loop doing the port in/out is stopped. Not sure if this is the behavior you expect, but thought it was worth pointing out.

-Jake B.

0 Kudos
Message 2 of 15
(3,557 Views)

Thank you for you help; I actually resolved this issue just after I posted. It required just making a few changed to the VNA Case Structures.

0 Kudos
Message 3 of 15
(3,543 Views)

Now I was able to get the program working, but while it was running yesterday, it stopped in the middle of an experiment, and I have not been able to get it to work again.

 

The error that I am receiving is the following:

VISA: The connection for the given session has been lost.

 

Previously, when I received this error, I would try a combination of restarting the computer and re-calibrating the VNA, and this would fix it. Now, however, it has been almost two days that I have not been able to get this to work. I have tried using NI MAX to detect the instrument, and sometimes it does detect it, but when it does, I still get the same error. There are other times when NI MAX does not detect the GPIB controller, but there does not seem to be a consistent reason as to why the GPIB device is or is not detected by NI MAX.

 

What could have gone wrong? The code remained the same, and has not changed since it worked.

 

Thank you.

0 Kudos
Message 4 of 15
(3,515 Views)

Ive had physical connectivity problems before with Agilent instruments and the GPIB-USB-HS. Most likely it is something else, but if the analyzer is intermitantly disappearing from MAX it is worth a shot try connecting the analyzer to the GPIB-USB-HS through a GPIB cable rather then directly. 

0 Kudos
Message 5 of 15
(3,507 Views)

What GPIB card or device are you using on your computer for communicating with VNA?  Sounds more like you're having an issue with that card or device (or its driver) than VNA itself.  Are you using one of those USB-based (prologix) type device? (Although I'm guessing that those don't even show in NI MAX since they communicate through Serial VISA.)

 

Are you using an NI GPIB card or device?

 

-DP

--------------------------------------------------------

New Controls & Indicators made using vector graphics & animations? Click below for Pebbles UI


0 Kudos
Message 6 of 15
(3,498 Views)

Thank you for your reply; I am using GPIB-HS-USB that connects from the VNA to the computer. It was working fine, then stopped in the middle of a measurement. We have had some issues before, but typically turning off the VNA and computer, re-calibrating the VNA and then connecting the USB cable to the computer would generally work, but now that does not.

0 Kudos
Message 7 of 15
(3,474 Views)

Have you disabled the sleep, hibernate modes on the PC? These modes shut down the power from the usb ports and can really mess things up when a test is running.

 

Ben64

0 Kudos
Message 8 of 15
(3,466 Views)

I think your VISA session is getting lost in your stacked sequence. Granded it has been years since I used a sequence but follow your VISA resource line, but I belive you have to pass it through each frame of the sequence?

 

You should seriously consider losing the stacked sequence in favor of a state machine or at least use the error cluster for flow control instead of a sequence.

 

 

Speaking of error clusters... Wire your error clusters!

 

You could be getting an error returned from the instrument and not even know it.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 9 of 15
(3,460 Views)

Thank you for the responses; I was able to get it to start working this morning, then it stopped for some time, and then I was able to get it working again.

 

When I go into NI MAX, sometimes it will detect only one instrument with PAD of 17, which does not work, and other times it will detect the correct one (PAD of 16). But there are also many times when no instrument is detected, and I cannot figure out what is causing that. Is there a reason this may be occurring? Faulty cable, perhaps? It is not that old.

0 Kudos
Message 10 of 15
(3,447 Views)