LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA Find Resource searches internet?

Hi...  We have a large LabVIEW code that a lot of people run on various pc's...  I also run the same code, on an office pc and also on a laptop...  When anyone runs this code from anywhere EXCEPT my office pc, when the user wants to exit the code, it takes about 8 seconds for the code to do all its close out work and stop...  On my office pc, however, the exact same code takes about 80 seconds, 10 times as long...  The work I do requires me to start and later exit this code often so I finally got curious as to why this code takes so long to stop on my machine...  Using a few well placed breakpoints I discovered the problem occurs at an instance of "VISA Find Resource"...  What we are doing at this step is closing the VISA reference to up to 8 virtual serial com ports and it loops through 8 times searching for ports with names like "ASRL1::INSTR" and so forth..  One thing that is different about my office pc is I also have an NI GPIB card with a couple of instruments hanging on that bus...  Whether I have those instruments powered on or off doesn't affect this problem..  However, I DID discover (after following the lead of a vague reference to this I found elsewhere) that if I disconnect my pc from the internet the code now stops in the normal 8 seconds rather than 80...  By the way, all the other pc's that run this code are ALSO connected to the internet so it can't be just that mine is connected to the internet also... 

 

Anyway, to summarize, the bottom line is VISA Find Resource holds my pc hostage for about 80 seconds when I try to shut down this large code on my pc (normal shutdown is about 8 seconds) if I am also connected to the internet but that problem goes away if I temporarily disconnect my network cable...  Any ideas why this code appears to be going on to search the network for something and also, any thoughts on how I might fix this problem???  

 

thanks..  bob...

0 Kudos
Message 1 of 8
(3,325 Views)

Could you provide the version of NI-VISA that you are using and the expression and mode inputs of the VISA Find Resources?

 

Since this is unique to one pc, you might also want to go into MAX and select NI-VISA under the 'Software' listing. In the right hand window, you will see under General Settings, 'Aliases'. See if you have any aliases for anything other than your serial ports.

0 Kudos
Message 2 of 8
(3,308 Views)

NI-VISA version is 4.2...

 

Expression input is     ASRL%d::INSTR

where %d gets filled by the decimal integers 1 - 8, one at a time...  At each of those 8 instances of the above expression, the code pauses for a good 10 seconds or so while it searches, I am assuming, for matching ports???

 

And the mode input is unwired which defaults to 0, canonical names only...

 

What I also see when I run NI MAX on my machine is one, a gpib card that I DO still have installed and the remnants of a remote interface that aren't even connected any longer, that remote interface being a CRIO-9012 compact RIO system I used temporarily a couple years ago...  My guess is that might be the culprit but so far I don't see how to remove or uninstall that device from my system...  Thoughts???  thanks.. bob..

0 Kudos
Message 3 of 8
(3,275 Views)
hmmm..  I just now did see how to delete the compact rio interface...  I did so and reran my code...  No help... So my problem was not the compact rio...  It's something else...  thoughts??? bob...
0 Kudos
Message 4 of 8
(3,274 Views)
Deleted it how? And did you check to see if the VISA aliases includes the cRIO? Removing a device does not necessarily remove an alias. One sure way is to delete visaconf.ini, restart MAX, and do a refresh.
0 Kudos
Message 5 of 8
(3,258 Views)

I don't know if this is what you meant by finding the place where the CompactRIO was being defined, but another explanation for this is that you have several systems in your NI-VISA Remote Systems list, such as CompactRIO systems or other network systems.

 

You get access to that list from MAX>>Software>>NI-VISA, VISA Options page>>General Setttings>>Remote (or from the visaconf.ini file already referred). If you see things checked in that list, that could explain the extra delay.

0 Kudos
Message 6 of 8
(3,249 Views)

Hmmm, tried to follow the paths you suggested but didn't find the same menus you described... 

 

What I can say that I suppose tells a lot is that if I shut down normally, as I said above it takes about 80 seconds to quit...  If I pull my internet connection and then shut down the code, it stops in about 8 seconds, just like it does on other machines without having to pull the internet connection...  And the delay clearly occurs in the VISA Find Resource...  So it's going out on the network to look for something...  Beats me...  

 

bob... 

0 Kudos
Message 7 of 8
(3,235 Views)

If you have NI-VISA 4.2, you should have a version of MAX that displays everything that JMota mentioned. When you expand the software listing in MAX and click on NI-VISA, what exactly do you see in the window to the right? The Remote listing is right below the Aliases listing where I asked you to look for orphan aliases. Did you try looking in the visaconf.ini file or deleting it?

0 Kudos
Message 8 of 8
(3,214 Views)