LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get "Browse" list of any DAQmx control in array form

When any DAQmx control is pulled down, it gives Browse option in the list as well along with a list. On clicking the Browse button same list is displayed in another dialog box. Is there any way to get this list in the form of an array or in any other form for further usage.
0 Kudos
Message 1 of 13
(5,016 Views)
I don't know what you actually mean in this post... but anyway time ago I wrote a vi that obtain daqmx devices information in an array 2D of strings.
See the attachement. Comments on the diagram are in italian but I think it's self-explaining.

bye,
manga
0 Kudos
Message 2 of 13
(5,011 Views)
I actually want to get an array containing list of all physical Channels of all devices installed on a system. Just to choose one Physical channel one can use DAQmx Physical channel control. And when this control is pulled down it gives complete list of all physical channels of all devices intalled on that system but this control selects only one channel. One way to get that array or list is to put a propery node of this control in a loop which points to one element of that list and keeps shifiting to next element on every iteration but unfortunately there is no such property node.
 
The example which u have attached with ur message actually uses DAQmx System property node which gives an array of all devices installed on that system, similary this propery node also gives certain other lists like all Tasks, global channels etc but no physical channels and neither I could find any such property.
 
I hope u've understood my problem so if u could help me out I'll be thankful to u.
0 Kudos
Message 3 of 13
(5,003 Views)
Now I think I got it. I had same problem.
To have a multichannel selection you can use a normal labview Tree Control. The difficult part is to fill this Tree with the right data, that is device/channel information.
In the example attached you'll see what I mean. Notice that Tree output is an array of strings (conversion to an array of channels is easy).
The drawback is that a Tree Control is not a pop-up control.

bye,
manga
0 Kudos
Message 4 of 13
(4,994 Views)
I forgot the attachement...
0 Kudos
Message 5 of 13
(4,995 Views)
Thanks Manga, your example works fine in case of getting list of devices their product type and serials as u have used DAQmx system property node. But how do we get list of all physical channels lets say Digital Out (as there is no property node giving list of all Physical channels of a system).
0 Kudos
Message 6 of 13
(4,985 Views)
I know there isn't such a property node (unfortunately it's not the only one is missing). The vi's I wrote are just a workaround.
By the way, try to see the diagram of "Daqmx Devices info". There is a vi named "Daqmx Create AI channel (sub)"; if you open its diagram you'll see a ring costant set to "analog input".
Maybe, using the other values ("analog output", "digital input", etc...) you will be able to obtain the number of physical channels available of any kind (not only AI channels). Next, there is a Tree control to populate....
I know it's not easy but I have no time to code it, sorry.

bye,
manga
0 Kudos
Message 7 of 13
(4,980 Views)
 
Hello All,
That property does exist with NI-DAQmx 8.0 🙂 .  Check out the attached program.
-Alan A.
Message 8 of 13
(4,962 Views)
Thanks Alan A,
 
I opened ur attached VI using LabView 7.1, but the new sub properties of Device property had broken output wires (as these properties donot exist in LabView 7.1
 
OK, I will try to get LabView 8.0.
 
Can u give me another soloution, and the problem is,
 
Lets imagine that the DAQmx Physical Channel Control is getting value from a configuration file ( .ini) but the value comes out to be invalid (does not exist in physical channels list) , than is there any property which intimates that an invalid value is given to that control. That value is shown in that control as grey text instead of black which means that its invalid, but is there any way that Labview tells this programatically.
0 Kudos
Message 9 of 13
(4,953 Views)
Anderomeda,
Alan A was talking about NiDAQmx8, that is a driver (and lot more) freely downloadable, not Labview8.
I guess you can download and install NiDAQmx8 remaining with your Labview version (if you want)

manga
Message 10 of 13
(4,948 Views)