03-18-2014 11:38 AM - edited 03-18-2014 11:38 AM
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.
Solved! Go to Solution.
03-18-2014 11:54 AM - edited 03-18-2014 11:55 AM
Are you using the System Device Names Property. It is read only.
This will return the names of all your DAQ devices.
Short Name: DevNames
Property of DAQmx System
Indicates the names of all devices installed in the system.
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 |
03-18-2014 11:56 AM
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.
03-18-2014 12:05 PM
@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.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
03-18-2014 12:07 PM
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.
03-18-2014 12:16 PM
@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.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
03-18-2014 12:19 PM
03-18-2014 12:22 PM
@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.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
03-18-2014 12:25 PM
03-18-2014 12:31 PM - edited 03-18-2014 12:31 PM
@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.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord