LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to change "ASRL2:... " to "COM1"?

Dear All,
        I have used com port in my vi. And When I run it in edit mode, the selection of com displays "COM1,COM2,LTP1".
       But when I build it, and run it in another PC, it displays "ASRL2:...".
       How can I modify my vi to make it display COM1... in another PC?
       And If I only want to display all serial port such as COM1,COM2... ,and not display LTP1.
       I don't know how to modify it. Please give me some suggestion.
      Thank you very much!
 
 
 
Hugo
0 Kudos
Message 1 of 25
(7,759 Views)

Hi,

You need to assign the Alias of COM1 to "ASRL2..." and you can do this in MAX.

Regards

Ray Farmer

Regards
Ray Farmer
Message 2 of 25
(7,749 Views)
Thank you for your reply.
I want to run my program in a PC which has not installed LabVIEW. Surely MAX is also not installed in that PC.
So, Is there any other good method?
Thank you.
 
 
 
 
 
Hugo
0 Kudos
Message 3 of 25
(7,738 Views)
MAX settings are written to c:\VXIPNP\WinNT\NIVisa\visaconf.ini. You can make changes to this file manually, taking the corresponding file on the development PC as an example.
See also http://digital.ni.com/public.nsf/websearch/BF528312C9A5423A862565BC00731EC0?OpenDocument
Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
Message 4 of 25
(7,732 Views)
Thank you.
I have checked the file "visaconf.ini", it is different in my PC and in another PC that I have installed my program.
But how can I to build my vi to let it copy "visaconf.ini" from my PC to the destination PC automatically?
And how to delete the LPT port in order to display serial port only?
Thanks.
 
 
 
Hugo
0 Kudos
Message 5 of 25
(7,696 Views)

Hi,

Its a text file, use a text editor such as notepad.

regards

Ray Farmer

Regards
Ray Farmer
Message 6 of 25
(7,688 Views)
Nothing anymore. Smiley Very Happy

Message Edited by Nallez on 12-14-2006 07:58 AM

Message 7 of 25
(7,684 Views)

Here's a VI I use to do what you want. I don't even worry about aliases in MAX, I do them myself. This VI will only find serial ports, though. You would have to change it to find parallel ports or GPIB ports. It returns an array of clusters, each containing an alias and the actual VISA address. This way you can display the alias to the user and pass the actual address around in the program and you won't have to worry if aliases are set in MAX.

Message Edited by Marc A on 12-14-2006 09:14 AM

Download All
Message 8 of 25
(7,679 Views)

Hi Marc A,

Cant see you VI at present (no LabVIEW available on PC) but I guess you are using the ASRL resource name to send to the VISA open and using the Alias in some control the user can select?

 

Regards

Ray Farmer

Regards
Ray Farmer
Message 9 of 25
(7,668 Views)
Exactly. Then the user sees what you want them to, and you don't have to worry about VISA aliases in MAX.

Message Edited by Marc A on 12-14-2006 09:32 AM

Message 10 of 25
(7,666 Views)