LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial port agreement between MAX and Windows.

Solved!
Go to solution

I am using a laptop running Windows XP and LabView 8.5.  I have a variety of USB to serial port devices that I use from time to time.  In the past (from what I remember) the name (COM1, COM2, etc.) assigned by Windows and MAX agreed.  Recently however, MAX seems to think there are three serial ports on the computer but tags them with a little black 'x' saying that the device is in an "unknown state".  Using Windows' Control Panel I can see that no serial ports are listed in the system until I plug one of the converters in.  When the converter is plugged in Windows recognizes it automatically and says it is functioning normally.  It seems that MAX will not allow me to delete the serial ports it has listed because they were not added statically.

 

Is there a way to clear out MAX?  This has not caused any issue I haven't been able to work around yet, but it should be cleared  up.

 

Thanks.

0 Kudos
Message 1 of 14
(5,396 Views)

Hi CoreyNE,

 

Have you tried to right click on the COM ports to see if they can be deleted.  Also, have you tried to reboot the comptuer and allow Measurement and Automation Explorer to refresh the list? 

Caleb W

National Instruments

0 Kudos
Message 2 of 14
(5,351 Views)

Caleb,

 

I tried both of those with no luck.  The delete option is grayed out when I right click on the port.  Also, when I create a control for the "VISA Resource Name" (such as when I am using the VISA Write VI, the list of ports in the control does not match what MAX is listing.

 

Corey

0 Kudos
Message 3 of 14
(5,340 Views)

Hi,

 

Would you mind looking into HKEY_LOCAL_MACHINE»HARDWARE»DEVICEMAP»SERIALCOMM in your registry (do not change anything) to see what keys show up there.  You can open the registry editor by going to Start»Run and typing regedit.  

Caleb W

National Instruments

0 Kudos
Message 4 of 14
(5,336 Views)

In the folder, there are three categories: Name, Type and Data.  There are two entries (with no USB to serial ports connected to the computer).  The first entry reads: (Default) REG_SZ, (Value Not Set).  The second entry reads \Device\AgereModem5, REG_SZ, COM4.  (These are the readings under each category.)  In addition in front of each entry is a small icon with the letters "AB" in it.

 

When I connect a USB to serial device a third entry appears: \Device\Serial2, REG_SZ, COM9. 

Corey

0 Kudos
Message 5 of 14
(5,317 Views)

Hey Corey,

 

What are the COM ports that appear in MAX in an "unknown state" numbers as? (i.e. COM2. COM3, etc...)  You mentioned plugging in the USB-Serial adapter and the registry appears as COM9 correct?  When this occurred did MAX also find the new COM port without issues?  Also, you mentioned 3 COM ports showing in MAX in the unknown state but mentioned only two listings in the registry editor, were there no more entries there?  If you go to Windows Device Manager (right-click on My Computer, go to Manage, and select Device Manager in the left pane) can you disable/uninstall, with MAX closed, all COM ports that are present and then enable/install them, reboot your machine and then see if MAX still shows the issue?  Let me know the outcome of these steps so we can narrow down the reason you're seeing this.


Thanks

David Pratt
Group Manager for Application Engineering Specialists | Automated Test
NIC
0 Kudos
Message 6 of 14
(5,286 Views)

David,

 

1. MAX lists COM4, COM6 and COM9 with nothing plugged into my laptop.  MAX says COM4 & COM9 are in an unknown state.  COM6 is disabled and when I try to enable it in MAX, MAX says it cannot open a VISA session. 

 

2. When using the Windows Hardware Manager, no com ports are listed when no devices are plugged into the computer.  When I plug in a device, Windows sees it immediately.  There are 4 USB ports on the laptop and the com port number that Windows assigns depends on which port the device is plugged into.  In the upper right port, the device is called COM7 (and MAX does not list it).  When I plug the same device in the lower right port, Windows calls it COM9 (and the state of the device does not change in MAX).  I have done this with MAX closed and open and it happens the same way in both cases.  If I start a new VI and put in a "VISA Resource Name" control, the ports listed are COM4 and COM7 (if the device is plugged into the upper right USB port) or COM4 and COM9 (if the device is plugged into the lower right USB port).

 

3. I tried both disabling and uninstalling the device from the system and rebooting the computer with no change.

 

I hope I covered all of your questions.

 

Thanks,
Corey

0 Kudos
Message 7 of 14
(5,222 Views)

Hey Corey,

 

With the ports disabled or uninstalled from windows are you able to delete the ports in MAX?  Also, I'd like to know what NI drivers (if any) and software you have installed on your machine?

Message Edited by David P. on 01-05-2009 11:26 AM
David Pratt
Group Manager for Application Engineering Specialists | Automated Test
NIC
0 Kudos
Message 8 of 14
(5,215 Views)

The delete option in MAX is grayed out for all of the ports.

 

I have LabView 8.2 and 8.5 installed on the laptop.  (I had written some code in 8.2 a while ago and had to keep it; long story.)  The USB to serial devices come from two different manufacturers (Cables to Go & ATEN). 

 

I also have some PLC related software installed on the computer but it has been on there a while and has never caused me any problems (as far as I can tell).

 

Corey

0 Kudos
Message 9 of 14
(5,198 Views)

Hey Corey,

 

Thanks for being patient and answering all of the questions. I'd like for to try something an relay the results back to me.

1) Go here and download the newest version of NI-VISA software (4.4.1). Follow all of the instructions and installation procedure and restart your computer.

2) Go to this location on your hard drive "C:\Documents and Settings\All Users\Application Data\National Instruments\MAX" and rename the folder Data to Data2.

3) I'd like for you to shut your computer down, plug in all of the USB-Serial adapters you have and then boot your machine.

4) Once your computer is booted, open up MAX and see if the old behavior is still there or if there is different information present.

 Let me know what results from this process.

David Pratt
Group Manager for Application Engineering Specialists | Automated Test
NIC
0 Kudos
Message 10 of 14
(5,191 Views)