Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

visa alias

I am currently working on an automated test procedure in LabWindows using some power supplies, oscope and a sensor. I have created a setup file with LabWindows distributions builder and I am importing a NI MAX .nce configurations file into the setup. The setup installs all of the necessary software (i.e NI MAX) and drivers needed to communicate with the instruments. However, the instruments alias has to be populated with a specific name for each instrument. I am wondering if there is any way to automatically populate NI MAX with the proper aliases for each instrument. I thought it could be a possible option in the NI MAX .nce configuration file that i've exported from my current machine's NI MAX configuration. 

0 Kudos
Message 1 of 10
(4,907 Views)

I recently had VISA Aliases as part of the MAX Configuration file (you *.nce file).  It is one of the options to include VISA settings when you export your configuration.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 10
(4,895 Views)

Ideally, I would like to make some type of .ini file for the user. Then, the user populates the .ini file, and when that .ini file is read from in my program, I would like my program to somehow populate NI MAX with the aliases from the .ini file (something to that effect). 

0 Kudos
Message 3 of 10
(4,754 Views)
The aliases are already stored in an ini file - visaconf.ini and it is exported.
0 Kudos
Message 4 of 10
(4,751 Views)

So can I modify the visaconf.ini file in a directory somewhere and then tell my program to read from it?

0 Kudos
Message 5 of 10
(4,748 Views)
If you export the nce with the VISA option and then import it, you don't need to edit it. Reading it is automatic when you use VISA. You would need to edit it if you wanted to change the aliases.
Message 6 of 10
(4,743 Views)

Right, so if NI MAX already has predefined aliases on a machine, and then I install my program on said machine, I would like to have the option of renaming the aliases with my program if there isn't a unique alias already assigned, or read the alias for the instrument if someone has already assigned a unique alias.

0 Kudos
Message 7 of 10
(4,739 Views)

@Zeusifer wrote:

Right, so if NI MAX already has predefined aliases on a machine, and then I install my program on said machine, I would like to have the option of renaming the aliases with my program if there isn't a unique alias already assigned, or read the alias for the instrument if someone has already assigned a unique alias.


You can have the MAX configuration load as part of the installation.  Just added the nce to the installer.  There is an option somewhere in the build spec for adding the configuration.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 8 of 10
(4,736 Views)
I believe that when you import the nce file, it will overwrite any existing alias for a specific resource name. I'm not 100% sure, though. It's something you can easily test locally.
0 Kudos
Message 9 of 10
(4,734 Views)

Yeah I think you are right. I may have misunderstood what was actually happening in the distribution setup when importing my .nce file into my distribution. I will test to see if the imported .nce is actually wiping out all of the aliases on the machine I am installing my program on. Thanks for the fast responses guys.

0 Kudos
Message 10 of 10
(4,731 Views)