Solution
Windows 7 parallelizes the COM port enumeration process causing the ports of newly installed hardware to be enumerated in a random order with our driver. After the first time the hardware is enumerated, the COM numbers are saved in the Windows registry. If the NI-Serial driver is not uninstalled or if the hardware is not placed in different slots, the hardware will continue to have the same COM numbers assigned between reboots.
Upgrading to a later version of NI-Serial, performing a repair of NI-Serial, or uninstalling and reinstalling NI-Serial will cause the ports to re-enumerate. When this happens on Windows 7, the result will be that the ports enumerate out of order.
NiPortConfig.exe is a utility that allows you to manually assign a contiguous range of COM numbers to a board. It is located in the
NI-Serial Installation Directory, which is
C:\Program Files\National Instruments\NI-Serial on 32-bit operating systems and
C:\Program Files (x86)\National Instruments\NI-Serial on 64-bit operating systems. It is only included with the full version of the driver, it is not installed with the runtime.
To use the utility:
- Use the Select Serial Interface drop down box to select the hardware with the ports that are enumerated out of order.
- Use Select Starting COM Number drop down box to select the first COM number that should be used for this device.
- Be sure to use only COM numbers that are not already in use. The Select Starting COM Number drop down box will show if any ports are already used by other hardware on the system.
- Select Apply or OK to save the new COM numbers to the hardware.