LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Order of USB devices

Hello,
I have connected two identical USB devices (OTDR's) to my PC . One for Single Mode optical fibers and One for Multi Mode optical fibers. I give then the aliases SM_OTDR and MM_OTDR.
In my applcation I refer to the alias for the suitable device. So far no problem.
But when I turn on my system and then switch on the OTDR's the aliases are applied in order the devices are switched on.
So the single mode gets the Alias MM_OTDR and visa versa.
 
How can I change this behave?
 
Thanks for sugestions, Huub
 
0 Kudos
Message 1 of 3
(2,734 Views)
Hello Huub,
 
This is a known problem with USB devices in general. Unfotunatly there is not a direct way of preventing the VISA aliases beeing assigned to the incorect interface other then switching them on in the right order. There is maybe a solution to this in LV though and that is checking the serialnumbers of your devices.
It depends a little on how the manufacturer has implemended their hardware but you should be able to identify the serial number of the USB device via a VISA property node. Just connect a property node to you VISA open and check if the serial number (property: USB Settings>>Serial Number) of the device matches the correct VISA alias. If not you can take actions in you prgram to get it to work correctly.
There is even a way to assign the correct allias to the correct USB device. Your VISA alias is stored in a ini file which can be found in:
 
C:\VXIPNP\WinNT\NIvisa\visaconf.ini
 
With the LabVIEW ini file functions you could change the aliases if needed before using them in your program. Off course this will add more code to your program and still the easiest workaround would be starting up your USB devices in the correct order.
 
Regards,
 
RikP - National Instruments Applications Engineering
Rik Prins, CLA, CLED
Software Development Engineer
0 Kudos
Message 2 of 3
(2,711 Views)

Thanks Rik,

I have already solved the problem in the software by looking for the identfiers of the instruments and swapping the Visa Resource Name if necessary.

Regards Huub

0 Kudos
Message 3 of 3
(2,684 Views)