12-20-2016 03:43 AM - edited 12-20-2016 03:43 AM
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.
Solved! Go to Solution.
12-20-2016 05:57 AM
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.
12-20-2016 06:50 AM - edited 12-20-2016 06:52 AM
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.
12-26-2016 06:25 AM
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!
01-04-2017 03:33 PM
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.
01-11-2017 04:13 AM
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.
01-18-2017 07:10 AM
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.
01-18-2017 07:33 AM
My serial card is PCI, but I'll purchase a PCIe and try your elegant suggestion.
01-19-2017 05:26 AM
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.