ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why don't I see the serial port names such as COMx? I have to use ASRLx::INSTR

I created an installer for a LabVIEW application and included the NI VISA drivers in it because my application uses serial ports.  However, on the target machine, I do not see the self populating list of serial devices.  I have to type in ASRL1::INSTR instead of COM1.
 
Why is this?  The target machine has NI VISA and the NI VISA Runtime Engine installed on it.


Message Edited by S G on 03-11-2008 06:35 PM

Message Edited by S G on 03-11-2008 06:36 PM
S G
Certified LabVIEW Architect, Certified TestStand Architect, Certified Professional Instructor
0 Kudos
Message 1 of 11
(6,277 Views)

It has to do with the alias name to COM1.  I can't remember exactly in which ini file it resides, but I seem to recall that you can change it within MAX.

I'll try to find the ini file.  Or where in MAX to change it.

Message 2 of 11
(6,269 Views)
I used to change the alias in the ini file, but that was many years ago. 😉
 
Open Measurement & Automation Explorer (MAX) and select your serial port.  The physical name is ASRL1::INSTR, but you can assign an alias COM1 as shown in the image below. 
 


Message Edited by JoeLabView on 03-11-2008 09:43 PM
Message 3 of 11
(6,268 Views)
Thanks.  However, why did I not need to do that on my development system?  My development system even finds new serial ports that I plug in and automatically names them.  For instance, when I plug in a USB to serial converter, it shows up on my application as COM3.

Message Edited by S G on 03-12-2008 01:08 PM
S G
Certified LabVIEW Architect, Certified TestStand Architect, Certified Professional Instructor
Message 4 of 11
(6,242 Views)

That's a good question...  I don't know the answer..

I did see that issue before which is where I modified the ini file.  But I think the first time I saw it was with the Developper Suite and LV6.1.  Plus I saw it again with CVI.  So, I don't know what is the common denominator..

Glad it helped,

RayR

0 Kudos
Message 5 of 11
(6,230 Views)

SG,

What is the version of LabVIEW and NI-VISA that you are using? If LabVIEW 8.x and the VISA that came with those, you can only select the VISA run-time but this should still work. You can optionally select to export your MAX configuration and this should also include the aliases (ComX).

With some older versions of NI-VISA, installing just the VISA run-time did not force VISA to assign the aliases to a com port. You had to include the visaconf.ini file from the development pc.

Message 6 of 11
(6,223 Views)
I have NI VISA version 4.2, and LabVIEW 8.5.
S G
Certified LabVIEW Architect, Certified TestStand Architect, Certified Professional Instructor
0 Kudos
Message 7 of 11
(6,219 Views)
Then I'm unsure what might be wrong. You can try adding the export MAXA option and see if that makes a difference. I recently created an installer for an 8.5 program and NI-VISA. On the vast majority of the pc's everything was flawless. On some though, I had problems with the com resources. It was a different symptom but it seems like it was related to a very old version of VISA that had been previously installed. We did the install on a new machine and it worked.
Message 8 of 11
(6,213 Views)

Dennis is right 🙂  Not that I would ever doubt him 😄

The newer version of LV do not have visaconf.ini, so please ignore some of the info from my original post. 

I did find an old version which contained the following:

[VISA-CONFIG]
MinAsyncCount = 512
SharedMemSize = 196608
MaxNumResources = 256
NumSystemSems = 512
NumProcessSems = 256
UnloadPassports = 0
ShowRegisteredDevOnly = 1

[ALIASES]
Alias0 = "'LPT1','ASRL10::INSTR'"
Alias1 = "'COM1','ASRL1::INSTR'"
NumAliases = 2

BTW, Dennis, do you know where that info is hidden with the newer version?  I can always do a search for COM1 as a text string..  This is just my personal curiosity.  The last time I modified the visaconf.ini file was for a CVI project back in 2004, which was for legacy code dating back to 2001. 

Message 9 of 11
(6,199 Views)

It's still in visaconf.in but the location of the file has moved. It's now in c:\Documents and Settings\All Users\Application Data\National Instruments\NIvisa.

When I had the recent problem with my installer, it turns out that the upgrade to the latest VISA did not remove the visconf from the c:\vxipnp\etc. folder. I could do some wmanual stuff and clean up the old folder and my app started to work.

Message 10 of 11
(6,192 Views)