Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

com ports renaming themselves

I had a problem about a month ago with NIMAX getting corrupted that required a repair to NIMAX to fix.  Since then, twice I have had a LabVIEW executable that should run for 96 hours at a time hang because one or more of the 4 serial ports I use to talk (VISA style) to various instruments has renamed itself and thus become unreachable to my program.  The COM ports are on an NI USB-RS232/4 box that seems to be fine except for this problem, and was fine for a couple years before.  The ports go back to their original names following a reboot of the Win 7 computer, but that doesn't help the bad data collected from the unreachable instrument during the long run.  The program wants a new reading about every 6 seconds, and all the messages are plenty short enough to fit the available time.  I don't want to write code to search for new ports and try to match the messages to the instruments when I see the error message about the unreachable port, I just want the COM ports to stay for example COM3 without randomly jumping to COM8.  Anybody seen a similar problem and know what to fix?

0 Kudos
Message 1 of 6
(4,264 Views)

a number of things could be goining on.

 

1)make sure the windows power management options for the USB Hub are set to prevent windows from shutting down power to the hub

2) protect your hub:  use a quality hub with external power not the cheapo ports that ship with your PC.  AND Don't let anyone go sticking their broken virus infested thumb drive, phone or wonder wigdet in your test set-up.

 

When you have stabilized the USB hub your Virtual COM Ports will behave themselves and stay where they belong.


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 6
(4,254 Views)

I certainly agree about having a stable computer, but it has seen the same users doing the same things both before and after the NIMAX corruption, and only after have the ports started wandering around.  Still could be virus behavior, and I will have to do a new sweep since the virus software has just gone out of date.  I was hoping that there was something about NIMAX configurations or anything else that might help lock the ports to their names.

0 Kudos
Message 3 of 6
(4,249 Views)

Hi,

 

That is one of the reasons I always use an alias for every port and instrument. If MAX crashes you only have to get the names back in. This is easy because it is a INI file which you can back-up and edit with a text editor.

This is also very helpful if you write an application that runs on a other computer.

 

Kees 

0 Kudos
Message 4 of 6
(4,230 Views)

I do use an INI file for the port asignments to the instruments.  The problem is that after a random period of time, for example during a 96 hour experiment, the ports move.  What was COM3 might suddenly become COM8.  There was no COM8 when the experiment started 27 hours ago.  The sudden remapping of the physical ports on the USB-RS232/4 box is what is bothering my program.  At program start instrument A is on COM3, but part way through the run instrument A is now on COM8, which did not exist moments before, without any change to the physical wiring.  This change in the port name throws off the VISA access to the instrument.  I want a way to stop the renaming.

0 Kudos
Message 5 of 6
(4,209 Views)

@bjlv wrote:

I do use an INI file for the port asignments to the instruments.  The problem is that after a random period of time, for example during a 96 hour experiment, the ports move.  What was COM3 might suddenly become COM8.  There was no COM8 when the experiment started 27 hours ago.  The sudden remapping of the physical ports on the USB-RS232/4 box is what is bothering my program.  At program start instrument A is on COM3, but part way through the run instrument A is now on COM8, which did not exist moments before, without any change to the physical wiring.  This change in the port name throws off the VISA access to the instrument.  I want a way to stop the renaming.


And again,  They don't rename themselves.  Plug-N-Pray devices may appear to move if the hub power cycles disconnecting them and re-finding the "New" device when the OS sees the reciently added device.  a good self powered hub that no-body messes with is the solution-  You can't fix plug-n-play.


"Should be" isn't "Is" -Jay
0 Kudos
Message 6 of 6
(4,205 Views)