From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I read the active (plugged in) DAQs and then send that to the device name input on DAQ assist?

Solved!
Go to solution

I have a system property node for daqmx but it does not let me change it to read when i right click on it. I am trying to have my program detect the name of the daq that is plugged in to the PC and then send that to daq assistant so that it will run properly wiithout me manually having to change the device name every time i switch hardware.

0 Kudos
Message 1 of 10
(3,283 Views)

Are you using the System Device Names Property. It is read only.

This will return the names of all your DAQ devices.

 

DevNames.png

 

Device Names Property

Short Name: DevNames

Property of DAQmx System

Indicates the names of all devices installed in the system.

Remarks

The following table lists the characteristics of this property.

Permissions read only
Resettable no
Settable while task is running device-specific
Available in Run-Time Engine yes
Omar
0 Kudos
Message 2 of 10
(3,269 Views)

Does it read all registered names or only those that are active? In MAX i have several daqs listed only one is active and lit up the rest are grayed out.

0 Kudos
Message 3 of 10
(3,263 Views)

@labview12110 wrote:

Does it read all registered names or only those that are active? In MAX i have several daqs listed only one is active and lit up the rest are grayed out.


If you mean they are no longer part of the system but once were, then the answer is they will be listed using this property node.  The good news is you can get the properties of each hardware item and determine if it is in the system, or even if it is simulated.

0 Kudos
Message 4 of 10
(3,251 Views)

Yea see that isnt what i need and I tried using it to connect a name input to daq assist and it does not work. I dont need a list of my devices,  I need to know what device is currently plugged in so I can tell the daq assist that. 

0 Kudos
Message 5 of 10
(3,249 Views)

@labview12110 wrote:

Yea see that isnt what i need and I tried using it to connect a name input to daq assist and it does not work. I dont need a list of my devices,  I need to know what device is currently plugged in so I can tell the daq assist that. 


Again this is simple enough.  You have an array of devices, auto index them into a for loop looking at each one.  Then find the one that is not simulated, and is present in the system.  If that condition occurs then stop the for loop using the conditional terminal, and then wire that device to whatever function you want to be done to it.

0 Kudos
Message 6 of 10
(3,232 Views)
All that just to find what I have plugged in to the computer??? That's incredibly annoying. Lets hope I can follow all that.
0 Kudos
Message 7 of 10
(3,226 Views)

@labview12110 wrote:
All that just to find what I have plugged in to the computer??? That's incredibly annoying. Lets hope I can follow all that.

Well how would you do it in C?  DLL calls?  .Net assembly calls?  IRQ calls?  Calls into Windows Device Manager?  NI has implemented tons of useful functions and giving you the ability to do low level calls to hardware in the system.  Having the ability to do this easily is quite impressive.

0 Kudos
Message 8 of 10
(3,221 Views)
Im just frustrated that the only function I have is to get a list of things that I can't do anything with. MAX knows which is active can I call it up somehow?
0 Kudos
Message 9 of 10
(3,217 Views)
Solution
Accepted by topic author labview12110

@labview12110 wrote:
Im just frustrated that the only function I have is to get a list of things that I can't do anything with. MAX knows which is active can I call it up somehow?

You have do do programming.  That is what LabVIEW is.  MAX gives you all the tools to do everything you want and much more just program it to do what you want.

 

Attached is a VI that I think does what you want.  I looks at all of your devices and returns the first non simulated one.  Apparently this list already excludes devices not connected to the system.

Message 10 of 10
(3,212 Views)