04-25-2016 02:55 PM
We use USB-6289 DAQ devices on our production floor. Sometimes the operators move them from station to station as needed. The problem is that the device name changes when they do this ie(DEV1 to DEV2). I have looked at the Programmatically Finding Device Name of DAQ Device in System but this does not take into account that you could have a USB-6289 as dev1 and Dev2 but only Dev2 is currently installed.
Has anyone come across this issue before?
Solved! Go to Solution.
04-25-2016 03:43 PM
If you plug in the same device (serial#) into the same usb port, you will get the same name everytime. As soon as you change port or device, you will get a new name.
If your device is always a USB-6289, you could do something like this so that the name of the device doesn't matter. If you have multiple USB-6289 installed on one machine, it will choose the first one.
04-25-2016 04:03 PM
Just looked at the article you posted and it has the same code. Why does this not work for you? If I'm not mistaken, the DevNames node returns devices that are actually plugged into your PC.
04-25-2016 04:31 PM
Correction to my last statement: it returns devices plugged into your PC and simulated devices. If the device is missing, it is not returned. Having said that, here is a better approach if you have any simulated devices:
04-25-2016 04:53 PM
@mlansbergen wrote:We use USB-6289 DAQ devices on our production floor. Sometimes the operators move them from station to station as needed. The problem is that the device name changes when they do this ie(DEV1 to DEV2).
This is one of the reasons I avoid USB. I much prefer PCI(e) or PXI(e) whenever possible.