Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

read out name set in ni max of visa resource

Solved!
Go to solution

I change the name of my visa resources in NI max and I want to actually save these names as group name in a tdms file 

I could find intf inst name 

thank you very much for your help

 

regards

Pascal

 

 

0 Kudos
Message 1 of 6
(5,033 Views)
Solution
Accepted by PBAN

Hello PBAN,

 

You could use the NI System Confifuration API to accomplish this:

https://decibel.ni.com/content/docs/DOC-13216

 

By using this API you can easily create examples like the one in attachment.

But there is alot more to this API, then just this example (or renaming aliases).
The NI Example Finder should provide you with enough examples.

 

The attached Code is provided As Is. It has not been tested or validated as a product, for use in a deployed application or system, or for use in hazardous environments. You assume all risks for use of the Code and use of the Code is subject to the Sample Code License Terms which can be found at:

http://ni.com/samplecodelicense

 

Alternatively you could also read out the Aliases ini-file from your hard drive and programmatically change this:

http://digital.ni.com/public.nsf/allkb/F02B2BF8943A31D786257393005D16F1

 

If you plan on using the second approach, then please use the configuration file VIs that allow you to read/write .ini files and that are by default abailable in LabVIEW.

 

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
Message 2 of 6
(4,994 Views)

Thank you very much Therry

 

I will test the different approaches to see what works best for the several program's that I have to write

Just one small question I forgot to tell that i'm using labview 2012

and I was on able to open the findalias.vi that you attached

would it be possible to post it to 2012 version

thank you again for your help

Regards

Pascal

0 Kudos
Message 3 of 6
(4,960 Views)

Hello Pascal,

 

Here is the 2012 version of the VI.

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 4 of 6
(4,958 Views)

Now with attachment.

Do note that the sample code license mentioned above is still valid.

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 5 of 6
(4,939 Views)

Hi ThiCop

Can I know where is it been used? Can I use this .ini file to auto configure my VISAconfig.vi when I create executable ?? If yes, how can I do this?? 

Also When building Executable I am using some .txt and other files that I am including while creating .exe but how will the application access these included files at the exact time where I am needing these in my main application

 

Thanks and Regards

Baig

 

0 Kudos
Message 6 of 6
(2,328 Views)