Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How to stop re-assigning serial port names?

Solved!
Go to solution

Hello,

 

I have a generic PCIe serial device with four ports. It's not an an NI device, but the ports appear in MAX. Does anyone know why changes to the NI setup (e.g. moving an NI card from one PCIe slot to another) will rename my serial ports? Is there a solution?

 

Thanks.

 

 

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

It is likely coming down to Windows assigning different COM ports when you move the card.  You can go into the Device Manager and set them to whatever you want if it really is an issue.  But in general, you really should not be moving cards between PCIe slots unless you actually have an issue.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 9
(5,369 Views)

If I set up the COM ports with the PXI chassis switched on, it will reassign the COM ports on a subsequent reboot if the chassis is switched off. This inevitably happens from time to time. I know I can change the port IDs in the Device Manager, but Windows randomly assigns the port numbers when it changes them. So each time this happens I have to go back to the hardware and figure out which physical port corresponds to which COM port number. This is very annoying so I'm trying to find a way around it. Since the COM ports appear in MAX, I wondered if there was an NI-related solution to the problem.

0 Kudos
Message 3 of 9
(5,363 Views)

As I think, you may find the PCIe device ID, UART port ID mapping to the current COM port in the windows registry database.

 

By query this database, you write a program to find the correct physical port.

 

Good Luck!

0 Kudos
Message 4 of 9
(5,307 Views)

Hmmm... This reminds me of something I found recently: possibly such a piece of software already exists. See here: http://www.uwe-sieber.de/comportman_e.html

I will try when I get a chance and report back.

 

0 Kudos
Message 5 of 9
(5,263 Views)

See also this topic:

http://forums.ni.com/t5/LabVIEW/How-to-find-COM-port-for-a-specific-USB-device/td-p/1029382

You can probably do something similiair for a PCiE card.

0 Kudos
Message 6 of 9
(5,239 Views)
Solution
Accepted by bobcampbell

This is happening because Windows partially uses the PCI bus IDs to uniquely identify a PCI device. The buses are being numbered differently depending on whether the PXI chassis is turned on. When using PXIe this could also change based on the arrangement of boards in the chassis.

 

As far as Windows can tell, it is a brand new board each time the bus number changes, so it assigns a new set of COM port numbers. 

 

You can most likely prevent this if you rearrange your cards so that the serial board has a lower PCI bus number than your MXI board, so that the bus assignment won't be impacted by the chassis state. This assumes both the MXI and serial boards are PCIe. If one is PCI, it might not be possible to rearrange them as desired. 

Message 7 of 9
(5,214 Views)

My serial card is PCI, but I'll purchase a PCIe and try your elegant suggestion.

0 Kudos
Message 8 of 9
(5,209 Views)

I placed a PCIe RS232 converter in the first PCIe slot and the assigned COM port numbers do indeed survive switching on and off of the PXI chassis. Thanks. This is definitely the easiest option.

0 Kudos
Message 9 of 9
(5,189 Views)