LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Within the Measurement & Automation Explorer I can create Visa Aliases for my GPIB instruments which I can use as the resource name to the VISA Open VI. eg using DMM1 instead of GPIB::9::INSTR.



Is there a way of generating these aliases programmatically, either in LabVIEW or CVI.
Regards
Ray Farmer
0 Kudos
Message 1 of 17
(6,069 Views)
I'm looking for StrToVisaIO.vi
Please let me know if you have it. Thanks
(Anthonyd1@yahoo.com)
0 Kudos
Message 3 of 17
(6,069 Views)
Thanks for the reply but I am not able to download the attachment. It might be corrupted. Do you have a link to it.
Regards
Ray Farmer
0 Kudos
Message 4 of 17
(6,069 Views)
I have managed to download the attachment. I think our network was playing up that day.

Had a look a page 27, but it doesn't answer my question.

But if you look pages 28/29, this StrToVisaIO.vi is actually the VISA Open.vi. This VI takes the string Resource Name and generates the Visa Session reference.

Regards
Regards
Ray Farmer
0 Kudos
Message 5 of 17
(6,069 Views)
Ray:

When you ask about 'programmatically' I assume you mean is there a function call to set an alias. The answer to this is no. We generally distinguish between configuration and programmatic actions, which is consistent with most customer needs.

If you feel that you have a need for this, please send me more information directly, regarding your intended use case. I can't guarantee we will add it, but I'd like to know more about your needs.

Dan Mondrik
Senior Software Engineer, VISA
National Instruments
0 Kudos
Message 6 of 17
(6,071 Views)
Dan, did NI ever add the capability to programmatically allow user to set VISA aliases rather then use MAX? I to would like the option to do this so that my guys don;t have to run 2 tools.
 
rjmiller
0 Kudos
Message 7 of 17
(5,976 Views)

VISA aliases are stored in the file \VXIpnp\WinNT\NIVisa\visaconf.ini. Since this is a text file, you could write a LabVIEW program to add the aliases. The configursation file VIs could be used.

I've never felt much need for this. When we build an identical tester, it's pretty simple to copy the visaconf.ini file from the master. I also encourage the people building the testers to use MAX to verify that all of the hardware and software is installed correctly.

Message 8 of 17
(5,971 Views)

OK thanks, are you saying that by simply editing the fileon-the-fly, that if I edit the file to edit or add an alias, the next time I performa VisaOpenDefaultRm() that it reads that file and picks up the new alias? Or, do I have to run MAX which then updates someting?

 

rjmiller

0 Kudos
Message 9 of 17
(5,966 Views)
I don't know about VisaOpenDefaultRm() but if I drop a VISA Resource Name on a LabVIEW front panel, the resources listed update as soon as I modify the visaconf.ini file.
0 Kudos
Message 10 of 17
(5,962 Views)