LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

programmatically identify and select DAQ device

Hi all,
 
I'm using Labview 8.0 to control a system which contains a USB DAQ device (9215A BNC for info). I can control everthing fine and use the DAQ card, but the software I'm writing will ultimately be supplied (as an executable or the like) with the system for use on end user computers. Its possible that some of the end users may already have NI DAQ cards installed in their systems. How can I make sure my software addresses only the DAQ card inside my system? Is there a simple way of programmatically listing all of the devices attached to the computer and then identifying the one that I want?
 
If I name the device in NI MAX, for example, if I then plug it into a different computer, does it maintain that name? Or is that a local thing only?
 
Any help would be greatly appreciated.
 
Regards
 
Paul
0 Kudos
Message 1 of 8
(4,076 Views)

Hi Paul,

you can use a DAQmx property node to do that. see the attached file.

Mike

Message 2 of 8
(4,072 Views)
Thanks for the reply, that's very helpful.
 
It only gets me half way though... If my system is plugged into a computer with other existing devices, or other DAQ devices are added to the system, the list of devices would probably just be : dev0, dev1, dev2 etc etc... how do I know which device is the one in my system?
 
thanks again for the help
0 Kudos
Message 3 of 8
(4,068 Views)

Hi Paul,

i´m not sure which function you are searching for, but maybe this helps.

Mike

0 Kudos
Message 4 of 8
(4,061 Views)
Hi,
 
thanks for the second reply. What I basically wanted was some way of finding the "device name" of the DAQ device in my system when its connected to a computer with multiple other DAQ devices attached. Ultimately, I did something similar to what you sent in that second example (see attached) which scans through the serial numbers of the DAQ devices attached to the computer and compares them with the serial number (entered manually) of my device. It then returns the device name that matches, so I can pass that to whatever future daq commands need it!
 
Thanks again for the help
 
Regards
 
Paul
0 Kudos
Message 5 of 8
(4,057 Views)

Hi Mike

 

How about identifying and selecting non-NI devices such as serial to USB bridge devices?

I have seen how USB view that can identify USB devices whether they are converters or not. 

Can we do that in Labview too? I cannot find ways to do that. See USB device viewer.

 

 Clement

0 Kudos
Message 6 of 8
(3,871 Views)

Hi Clement,

you can use the Microsoft tool "devcon" to read USB devices. To list com ports you can use the build in function from LabVIEW.

 

Hope it helps.

Mike

0 Kudos
Message 7 of 8
(3,862 Views)

Hi Mike

Thank you very much. I am surprised that there is such a one like devcon.

I can use systemexecute .vi to run devcon syntaxs.

 

However I do not find any activex x to use because devcon itself is an exe.

 

Thanks alot

Clement

0 Kudos
Message 8 of 8
(3,852 Views)