Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

C# DI-DAQmx Devices Search

Solved!
Go to solution

I am trying to find a way to search for all of the NI-DAQmx Devices connected to my computer in C#.  I realize it will usually be Dev1.  However, I am using mulitple NI-USB6501's and my computer remembers which on is Dev1, Dev2,...  Is there a method that returns the names of the devics currently connected to the computer?  I am hoping there is a way to return an array of strings of all the devices so that I could then try to connect to each without asking the user which device he has connected.

 

Thanks for any help.

Andy

0 Kudos
Message 1 of 7
(5,335 Views)
I am a LabVIEW programmer, but will try my best to help. In the C reference help, search for List of System Properties and you will get the Device Names property. There is also the List of Device Properties in which Product Type property identifies the name of the device.
Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 2 of 7
(5,334 Views)
I am looking for something to use in the .Net NationalInstruments.DAQmx assembly.
0 Kudos
Message 3 of 7
(5,331 Views)

Oops how did I miss C#. Well, the APIs are the same. If you do a search for those properties in .NET's DAQmx assembly, you will be able to find it. Have a look around and post back.

Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 4 of 7
(5,329 Views)
For whatever reason, I can't create an instance of Device which has all the properties you are referring to.  When I try to create an instance of Device I get a complier error that says "The type 'NationalInstruments.DAQmx.Device' has no constructors defined".

0 Kudos
Message 5 of 7
(5,326 Views)
Solution
Accepted by topic author rutlean

This might help:

The document has been Archived -- no longer available.

Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 6 of 7
(5,323 Views)

Exactly what I needed. 

 

Thanks.

0 Kudos
Message 7 of 7
(5,319 Views)