11-07-2008 12:42 PM
I am using devices with a USB-232/4 and a USB-485/4 and LabVIEW. I can set things up and everything works fine. Then, the next time the computer reboots, for some reason the COM port assignments get changed. For instance, the 232 ports may be COM11, COM12, COM13, and COM 14, but after rebooting they become COM15-18. I have to go into my setup and change the COM port constants. A later reboot may put them back to the old values.
Is there a way to convince the system to put the ports at specific locations and leave them there?
Thanks!
11-09-2008 11:43 AM
I've had this problem myself, so I thought I'd do a little digging.
I'm not sure which VCP driver you're using, but I found this .PDF file online from a company called FTDI that seems to explain the problem and suggests a possible fix.:
ftp://ftp.efo.ru/pub/ftdichip/App/LocIDs.pdf
Here's a clip from the PDF:
A common problem occurs in a manufacturing environment when it is required to test
serial converter cables by installing them as COM ports. When serialized cables are
plugged in for testing, the system allocates a new COM port for every cable. If the system
limit of 256 COM ports is reached, and the only way to continue testing is to free up COM
ports by uninstalling then reinstalling.
The problem occurs because the serialized cables appear to the system as unique devices,
each device identified by its serial number, and the serial number is used by the VCP
driver when it creates a COM port. If the serial number was not used to create the COM
port, then it would be possible setup an environment where every cable installed as the
same COM port, and therefore only one COM port would be needed to test any number of
cables.
Here we describe how to configure the VCP driver to achieve this goal.
It then goes on to explain how you can allocate each COM Port number to a physical USB location.
However, it only mentions the specific files and Registry settings specific to FTDI products. But if you could contact your particular VCP vendor, they might point you to the specific files and Registry settings that you need to accomplish the same thing.
Hope this helps - or at least offers a clue for you.
11-10-2008 06:26 PM
Hoard--
I think Semper_discens present a good point that you may need to explore to prevent this from happening again. I was thinking this might be an issue due to Windows. I know the two USB RS232 devices you listed use the NI-Serial driver which assigns COM ports in a particular way, but it does not reassign them unless Windows makes the COM ports it was previously using unavailable. The first KnowledgeBase I have linked explains how the COM ports are assigned with National Instruments driver, NI-SERIAL. It explains that Windows defines which COM ports are free then NI-SERIAL associates the hardware with the free/available COM ports.
As I mentioned earlier, one major reason I can see for your COM ports changing can be due to Windows claiming previously used COM ports as "in use." To free these COM ports refer to the second KnowledgeBase I have linked.
KnowledgeBases:
Enumeration and Naming of NI-Serial Ports and Other PCI Devices
Changing to Available COM Ports in Windows 2000/XP with Serial Hardware
Cheers!
--
Tyler C
11-10-2008 07:13 PM
Hoard--
I just found another link while digging around in KnowledgeBases; might prove to be beneficial.
How are the COM Ports for My USB Serial Device Assigned?
Take care!
--
Tyler C
11-10-2008 08:39 PM
11-11-2008 09:10 PM
Under normal circumstances all serial port numbers should be retained for all National Instruments serial products. I am assuming that the USB-232/4 and USB-485/4 products that you mention are those sold by National Instruments, and the rest of this post is only relevent for National Instruments USB-232 and USB-485 interfaces.
My first recommendation is that you ensure that you are using the latest version of NI-Serial for Windows. The latest driver is currently NI-Serial 3.4, which includes a greatly improved USB driver over previous versions.
We do test our drivers to ensure that the numbers persist across reboots, and I do not know of any such issues with any recent releases of NI-Serial. Can you tell us the version of NI-Serial you are running, as well as your version of Windows?
Thanks,
Jason S.
National Instruments
11-12-2008 08:30 AM
LabVIEW 8.5.1
NI-Serial 3.4.0
Windows Vista
The USB devices are NI.
From reading this string of notes, it seems that for some reason when the system reboots it fails to recognize that the serial devices are the same one installed previously, so it assigns them new COM addresses. A later reboot will reassign to the originals addresses -- presumably by then recognized as unused.
11-18-2008 09:52 AM
Hello Hoard,
The NI Serial driver keeps track of com port settings by serial number. This information gets saved to the Windows registry. There are only a few reasons you should be getting new com ports assigned to your USB-232/4 or USB-485/4:
1. If the Serial Number reported by the NI Serial devices between plug-ins changed.
2. If more than one NI Serial device is used (if you plug in a USB-232/4 it will not automatically use the same ports assigned to another USB-232/4 that was previously unplugged).
3. If you used MAX to reclaim unused COM ports while teh NI Serial devices where unplugged from the computer.
One way that we can tell what happened is by having you check the Device Manger and post screen shots when the devices get reassigned com numbers again. In Device Manager check under Universal Serial Controllers to find two instances of USB Composite Device. Right click on each composite device, select properties, and take a screen shot of the Device Instance Path listed in the Details tab.
Also check these numbers when the com numbers show up correctly to make sure that the values of the serial number are not changing.
As you take the screen shots, please check if the numbers on the far right of the value field match the serial number on the box.
Thanks,
Steven T.