We are about to use a number of USB-6501 devices in our test system. I need a reliable way of identifying which is which.
In the past we had a system with two of these. We just pulled a spare line High in one, Low in the other. My Initialisation software, in LabVIEW, worked out which was which from this. Now we are looking at using four at once, so we'd need two lines. Perhaps we may have more in the future. Obviously with this method we would end up using more and more DIO lines for identifying instead of doing I/O.
Unfortunately I don't have access to one of these at the moment, and we need to design the interface to it before ordering more. If I had one I'd experiment and find out.
My first question is - can I programmatically query its serial number? This would give me a means of identifying which is which. However, each of our multiple test sites would then have a unique set of serial numbers, so we'd have to manage the differences between them, e.g. a file could contain each site's serial numbers.
Is there a cleverer way of doing this? I was wondering whether I could give each device an alias name through MAX, then access them using this name? My only concern is with the fact that it's USB - could these names vanish if a device is unplugged and plugged into a different USB port. I don't want to rely on anything that could become broken. If this is possible, then what is the alias name attached to? The device's serial number or the USB location information?
Many thanks for any contributions. I'm not being lazy, I'd experiment and find out for myself if I had one to play with!