Hi,
By default, Windows dynamically assigns COM port numbers to USB-to-Serial adapters, which is why you’re seeing the numbers shift. To fix this, you’ll want to manually assign a static COM port number to each device.
The recommended approach is to open Device Manager, locate the USB Serial Device under “Ports (COM & LPT),” go to Properties > Port Settings > Advanced, and then set a fixed COM port number. Once assigned, Windows will remember that mapping for the device, even after a reboot. If you’re deploying this across multiple machines, you can also script the configuration using PowerShell with Set-ItemProperty or use Group Policy Preferences to enforce consistent port assignments.
Best practice is to document which physical devices are mapped to which COM ports, so your production software always knows what to expect. Also, avoid assigning very high COM numbers, as some legacy applications may not recognize them properly.
If you find this answer helpful, kindly hit “accept answer”.
Jason