From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How are all old serial port definitions cleared out?

How are old serial port definitions removed?  I have a computer that is used with a variety of NI serial port hardwaer as programs are developed for customers.  The serial port aliases (COM numbers) and ASRL numbers get really fouled up over time.  At this time there are no NI serial port hardware in the computer.  There's only COM1 and COM2.  (I disabled the parallel port in BIOS.)
 
The attached screen shot of MAX shows only ASRL 1 and 2 for COM1 and COM2.  However, the other screen shot shows that apparently COM3 through COM24 is still in the system.  Consequently, if I place a NI PCI485/8 card in the computer, then COM ports 25 through 32 will be used, and the ASRL numbers will not be what I would expect and they may not be sequential.
 
For reference, I've also attached the current visaconf.ini file.
 
Is there a formal procedure that is used to wipe out all old serial ports and start over?
 
I'm using LV v.8.2.1, MAX v.4.2.1.3001, NI Serial v.3.2.0 with Windows XP
0 Kudos
Message 1 of 11
(4,027 Views)

I've not had to do this myself but I suspect what you are looking for is in the Windows Registry.  Just be carefull not to nuke something you really need!

Look in    HKEY_LOCAL_MACHINE\System\CurrentControlSet\Enum\PCI\  or \ISA

 

0 Kudos
Message 2 of 11
(4,020 Views)
Actually, in my experience it's the operating system that seems to remember that these other interfaces were there. I have seen this when removing and replacing USB dongels. The only way that I have seen to clear it out is to remove the interface from the device manager before you remove the hardware. You can also try reassigning the port number in the device manage - sometimes that will work.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 3 of 11
(4,016 Views)
There is actually an option buried in MAX that lets you clear out the "old" assignments of serial ports.  I am at a computer without MAX at the moment, but I think you find this option in a menu when you are looking at the list of ports with MAX.  It says something like "remove unassigned ports".  It might take a right click to find this menu item, but it is in there, as I went through a similar problem recently where the NI USB-232 adapter refused to properly link to its driver.  The problem turned out to be elsewhere, but removing the assignments did work to get new hardware down from high port numbers to the low numbers again.
0 Kudos
Message 4 of 11
(4,008 Views)

Earlier I said that if an 8-port card is installed that COM25 through 32 would be used.  I intended to say that it's unknown what will happen.  In this case, I just installed an 8-port card and it was assigned COM7 through 14.  Please see the attached screen shot.

Apparently it starts at COM7 because earlier I had a 4-port card where it used COM3 through 6.

However, COM11 is associated with ASRL15.  Why is COM11 not associated with ASRL11?  This causes problems in the LabVIEW application.  How can I fix this?

An earlier reply mentions the Windows registry.  I'll look into this but I don't think I can tolerate having end-users modify the registry.

I've poked and proded around in MAX, NI-VISA and NI-SERIAL and cannot find the function similar to "remove unassigned ports."  This is an intriqueing function.  Please refind it when you get a chance.

How can I get the LabVIEW application to programatically determine the ASRL numbers?

0 Kudos
Message 5 of 11
(3,986 Views)
I'll admit that editing the Registry is a bit brute force and not for everyone.  You can write vi's to edit the registry.
0 Kudos
Message 6 of 11
(3,973 Views)
OK. I have accessed my computer with MAX 4.2.1 on it.  On the main window, look at the "Tools" menu.  A submenu will be "NI-Serial" and that will have the entry "Recover unused  COM Numbers".  A little bit different than my fuzzy memory, but there it is.  It will remove whatever it is that hangs around from having had a seial port connected once, but not right now.  This got me down from COM11 to COM3 as the next assigned COM port when I tried it.
Bart

0 Kudos
Message 7 of 11
(3,962 Views)
Excellent! That will be one to remember!

Mike..

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 8 of 11
(3,947 Views)

I posted a similar question a while ago & got the following response from NI, "that is not a supported feature of NI-Serial".

Here's the post:

 http://forums.ni.com/ni/board/message?board.id=140&message.id=22835#M22835

 

-Jerry

0 Kudos
Message 9 of 11
(3,937 Views)

I'm working on a procedure to use the Recover unused  COM Numbers function and I'm still working things out.  In the mean time I have a question.

What is the purpose of the C:\VXIPNP\WinNT\NIvisa\visaconf.ini file?  It seems that changes I make to this file does not make any difference in the operation of the serial ports.  Is this file used?  If it is used, how is it used?  What application creates the file and/or uses it?

Dave

0 Kudos
Message 10 of 11
(3,894 Views)