LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Com Port Alias problems, LV is just displaying ASLR1 not "Com 1"

LabView doesn't give the names of the com ports such as Com1, Com2, instead it gives ASLR1 and ASLR10. Is there a way to change it so that the traditional names show up? I don't have this problem on my development machine, just the machines with the runtime environment.

Thanks

Cason Clagg
SwRI
LabView 7.1, Windows XP
0 Kudos
Message 1 of 6
(4,633 Views)
Com1, Com2, etc. are actually aliases for the actual VISA resource names ASRL1, ASLR2. When the full version of VISA is installed, MAX automatically creates thes aliases. The alias creation does not happen when you only install VISA run-time or the much smaller serial post VISA. There's a couple of things you can do. The aliases are in a file called visaconf.ini in the folder VXIpnp\WinNT\NIvisa. You can include the file from the development system and install it on the run-time pc's. You can install the full VISA. You can change your program to use the resource names ASRL1 instead of Com1. You can typecast the VISA resource name to a string and do a conversion - i.e. search array for ASRL1 and replace with Com1. You can pass a string to any of the VISA resource name inputs and it will work just fine.

I generally have GPIB as well as serial on all my systems so they always get the full VISA installation but when they don't, I install the development visaconf.ini to get the aliases. I prefer to use the aliases. They have saved me a lot of times. When com1 has died, all that I have had to do is change the aliases and rename com2 to com1. If the program requires more than one serial port, I add a USB<->Serial adapter and do the rename. In all situations, I can keep the production pc up and running without having to modify the program or having to do a motherboard swap to fix a lousy com port.
Message 2 of 6
(4,627 Views)
Problem solved. Thanks for the quick reply!

Cason Clagg
SwRI
LabView 7.1, Windows XP
0 Kudos
Message 3 of 6
(4,618 Views)
Hi everybody,
 
sorry for reviving this old thread... Smiley Wink
 
@Dennis: did I get that right, that this issue should be solved with having the right entries in the visaconfig.ini ? I my case, it's not Smiley Sad
I pasted the alias string into the visaconfig.ini and incremented the NumAliases... but the LabVIEW Applications still only find the ASRLx::INSTR...
Do I have to change the code also? I'd like to avoid that, because of "old code" that I would prefer not to touch....
BTW... the serial port did work on that computer with the exactly same application and driver versions, an noone's ever changed anything  Smiley Wink  .... is a Windows update a possible suspect?
 
Cheers
Oli
0 Kudos
Message 4 of 6
(4,367 Views)
It is an old thread and the location of the visaconf.ini has changed if you are running a LabVIEW 8.x app and/or a new version of NI-VISA. What do you see when you open MAX? What versions of NI-VISA and LabVIEW are you running?
Message 5 of 6
(4,349 Views)
Hi Dennis,
 
sorry, I forgot.... Smiley Happy
I'm using LabVIEW 8.2.1 and VISA  4.1, MAX shows the aliases, a VISA resource control does not show the aliases, only ASRLx::INSTR.
 
Thanks for your help!
Oli
0 Kudos
Message 6 of 6
(4,330 Views)