LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

ASRL versus COM display

I'm using VISA Read and Write to access my serial port.
I create a control for the resource name, but the drop down list only gives me the ASRL names. How do I change this to the COM port names?
Also - When this VI is loaded on a different PC than the one it was written on, the dropdown menu is inactive, and the ASRL can't be changed.
What am I missing?
0 Kudos
Message 1 of 9
(20,072 Views)
Hi,

The missing list on the second computer most likely has to do with NI-VISA not being installed on the new computer. The ASRL names are generated and controlled by the Ni-VISA programm. In order for VISA to be able to automatically detect and control the ports, they need to be named "ASRL1::INSTR" and so on. There is the possibility to create user-names under the property "System name". To do this I always edit the visaconf.ini file, editing the default "COM1" or "COM2" text to something more useful like "pH-Meter" or whatever is connected there. Once you open a reference to a particular port on the computer, you can use the property node to read this value and so search through all available ports. Included is an example VI.

Good luck

Sha
ne
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
0 Kudos
Message 2 of 9
(20,071 Views)
I just realised that my information on changing the port name Exmaple "pH-Meter" while perfectly feasible in the ini file, does not actually do anything in practice.

I just found something for a LabVIEW wish-list.

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
0 Kudos
Message 3 of 9
(20,071 Views)
1) You must install the VISA driver on the target computer.

2) The VISA aliases are not defined by the VISA driver but by the Measurement and Automation Explorer. MAX is installed with NI-DAQ. The standard COMx and LPTx aliases are used by default but you can define your own aliases (Menu of MAX --> Tools --> NI-VISA --> Alias editor).

3) If you don't want to install MAX you can :

a) Manually edit the [ALIASES] section of visaconf.ini in C:\VXIpnp\WinNT\NIvisa. The format to use is described in the file.

Example for COM1, COM2 and LPT1 :
[ALIASES]
Alias0="'COM1','ASRL1::INSTR'"
Alias1="'COM2','ASRL2::INSTR'"
Alias2="'LPT1','ASRL10::INSTR'"
NumAliases=3


b) Use attached VI that will edit this file. Beca
use it reads the path of the visaconf.ini file in the registry, its works only for Windows. I wrote it for W2K and the path to the key in the registry may be different for another version of Windows. Make a search for the key 579934db5cb83d11497d000450857669 in the registry and modify the path if needed.
You can use VISA Find Resource to list the existing resources and then programmaticaly define the Aliases input of the attached VI.
0 Kudos
Message 4 of 9
(20,071 Views)
Hi,

I don`t know what version of MAX or VISA you are using, but I don`t have the option of Tools-->NI-VISA-->Alias Editor available. I also don`t have an [ALIASES] section in my visaconf.ini file.

I have version 2.2 of MAX, and Ni-VISA version 2.1.6f2 installed.

I wanted to try out your VI to see if my version of NI-VISA supports this, but there is a vi missing (please try to save as llb).

Shane
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
0 Kudos
Message 5 of 9
(20,071 Views)
MAX 2.2 and NI-VISA 2.6.0. I'm using a french version of MAX so my translation may not be exact or this tool is not yet available with your older VISA driver.

The missing vi is "only" a message box with some more options than the standard LV dialog. It calls user32.dll and therefore works only with Windows. I didn't take notice of it when I sent the vi.
Sorry in advance for the french comments in the diagram !
0 Kudos
Message 6 of 9
(20,071 Views)
Sorry, I haven't had a chance to look at this again until now.
When I run your set_visa_aliases.vi, I get an error message:
"An error occured while trying to set the aliases for the serial ports. The application may not work properly.
"The error message from the operatingsystem is:
"Error 1 occured at Config Data Registry.vi(get data): invalid object 0.
"Possible reasons:
"Labview: An input parameter is invalid.
"or
"NI-488: Command requires GPIB Controller to be Controller in Charge."
0 Kudos
Message 7 of 9
(20,071 Views)
Same here.

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
0 Kudos
Message 8 of 9
(20,071 Views)

This is an old thread, but I'm having a similar issue.

 

My code all runs fine in labview, but when I build the application and run on another computer, my drop down box contains "ASRL##::INSTR" instead of "COM#". (and I cannot communicate with my device).

 

I've tried every manner of VISA and MAX driver/installation/option/etc that I've seen in related posts and the like, but to no avail. My problem now seems to be identifying exactly what's going wrong. *sigh* 

 

I tried to keep it short, so let me know what informatioin would be needed, and thanks in advance for any thoughts!

 

 

0 Kudos
Message 9 of 9
(17,620 Views)