LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

swap USB DAQ

Solved!
Go to solution

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?

0 Kudos
Message 1 of 5
(3,306 Views)
Solution
Accepted by topic author BeanFest

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. 

Example_VI_BD.png

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
Message 2 of 5
(3,291 Views)

Just looked at the article you posted and it has the same code.  Smiley Very Happy  Why does this not work for you?  If I'm not mistaken, the DevNames node returns devices that are actually plugged into your PC. 

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 3 of 5
(3,280 Views)
Solution
Accepted by topic author BeanFest

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:

Example_VI_BD.png

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
Message 4 of 5
(3,273 Views)

@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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 5
(3,266 Views)