LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

when is visaconf.ini created

Solved!
Go to solution

Hi,

 

I want to edit visaconf.ini to change the alias names, I was wondering if anyone knows when this file is first created on a new install of the labview and visa runtime. Is it created upon install or when the VI's that would call a visa serial port are opened or only when some one opens MAX.

 

Thank you

 

 

0 Kudos
Message 1 of 10
(4,054 Views)
did u seethis?
0 Kudos
Message 2 of 10
(4,048 Views)

Hi muks,

 

I have seen this post, it is one way of doing it but I would like to rename the aliases in the visaconf.ini file, I have worked out how to do this and have got it working on my development system, However I am wondering if the visaconf.ini file will be on any new installs I do of the .exe once it has been installed or if the users still have to open MAX to create that file. Essentially I want to make this step transparent to the end users, but only do it once for each PC instead of using the other method which I would have to implement into each program. 

 

Thank you

0 Kudos
Message 3 of 10
(4,041 Views)

When you create an installer for your app, you have the option to export your MAX hardware config. This would then be imported on the pc you run the installer on. The hardware config includes visaconf and the aliases you have defined. If the aliases you want to use are the defaults such as Com1, Coms, etc., I don't think you have to do anything. The aliases are created when you install NI-VISA and MAX. 

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

Hi,

 

I am not sure this will work as each PC the software is going on to has different serial port configurations to the others, I will look into it though thank you.

0 Kudos
Message 5 of 10
(4,030 Views)
You don't think what will not work? The import of the hardware config or the installation of NI-VISA run-time? What kind of aliases are you looking to modify? Do you want to change, for example, Com1 to something else?
0 Kudos
Message 6 of 10
(4,027 Views)

I dont think the import of the MAX settings will work, as all the setups are different for example my development PC has two serial ports COM1 is connected to device A and COM2 to device B, on other systems Device A is connected to COM4 and Device B is connected to COM1, This system has 4 serial ports. I think the MAX settings will only transfer to COM ports to the new machine? 

 

I would like to change the aliases to COM1, COM2 etc at the moment instead of the ASTRx::INSTR format. However I think in the future I would like to change them to other things such as Device A. This would be defined by the user

 

Thanks 

0 Kudos
Message 7 of 10
(4,017 Views)
Solution
Accepted by topic author Dowden1

What version of NI-VISA and LabVIEW are you using? As I mentioned, there is no need to do anything to change a default alias. Comx is automatically created and you should not be seeing ASRL.

 

I can understand the desire to change from Comx to Device x and for making this a user option, then you would have to edit the visaconf file or use MAX.

0 Kudos
Message 8 of 10
(4,011 Views)

Hi,

 

I am using labVIEW 8.2 and VISA 4.4 on my development system and the corresponding runtime engines for users.

 

I have tried it on about 5 machines and all of them came up with ASRLx:INSTR to begin with untill I opened MAX and manually entered the COMx aliases. The initial plan was to get the default COMx aliases but now seeing what can be achieved by editing the visaconf.ini file I think a much better option.

 

I dont want the user to know anything about it except that first time he runs it all the ports are COMx then after setting it all he sees are device x etc. I want this to be a permanent change and for the user not to use MAX or even know MAX exists.

 

I think I have created a basic program naming the ports to COMx but have hit two problems

1. I am assuming that the visaconf.ini file is in the same place for each machine, except the hard drive letter which I am finding. Not sure this is the best way to do it incase the file moves on some systems

2. The file is on my PC as I have used MAX and done a lot of development with VISA but I am not sure if it is created as soon as the VISA runtime engine is installed or not, I would test this on a new PC but I do not have access to one and all the other ones are in constant use for urgent testing.

 

 

The next step is to try and develop this to change the aliases to those specified by the user e.g device x.

 

Thank you

0 Kudos
Message 9 of 10
(3,994 Views)

Hi,

 

I looked into the version of VISA I was using and found I had an old version! updated to 4.4 and it now automatically names all the com ports to the default aliases (COMx).

 

Not really a problem but thanks to that little mistake I now have a very nice function to rename the com ports to the device x as requiered by the user!

 

Thanks for everyones help!

 

0 Kudos
Message 10 of 10
(3,974 Views)