09-03-2014 04:09 PM - edited 09-03-2014 04:16 PM
No. NI has been rather obtuse about it.
I suspect it's tied in to the PCI Plug and Play enumeration that the BIOS does, and that Windows then redoes at startup.
The only way I've ever overcome this is to uninstall everything on the PC PCIbus, reset the BIOS, and then selectively install the devices in the order I want them to be discovered and enumerated by the BIOS/Windows. Sometimes this isn't possible and you have to live with the problem. We work around it by having the application maintain it's own configuration table where we set the ASRL for the port and we set the ASRL value in the table at installation time. Some BIOS's may have an ability to reorder the PCI plug and play enumerations but I've never had very good luck with these - but you might want to see if you can do it for your situation. You'd want to move the Ni board around with regard to the other serial ports in the system to get the ASRL's you want. If your various targets have differing numbers of built in ports, then you might still be stuck, as the NI ports enumerate after the built in ports. You can sometimes disable a built in port to get it out of the PnP table but that doesn't always work.
Could NI have implemented a way to remap ASRL's? Sure they could have, it's their abstraction, not Windows' but they didn't and as far as I know they've never acknowledged an understanding of the issue much less offer a work around.
09-03-2014 04:34 PM - edited 09-03-2014 04:36 PM
The mapping of serial resources is part of the plug-n-play experience. NI VISA has no control over it serial device enumeration is guided by the specific driver and the base serial class driver.
Several registry entries could be modified to get the exact experience you want- you can even use the registry vis to modify them from LabVIEW
The HKEYS you will need to mess with are "serenum" and a search from regedit should identify how many instances there are. Some ports may be reserved by the BIOS- messing with those could be "BAD"
09-03-2014 06:08 PM