cDAQ / NI-AnalogModules / list them and separate by type (input/output)

2 次查看(过去 30 天)
Hello!
I would like to program a little GUI, that shows me the Analog-Modules of a connected cDAQ from NationalInstruments. As my cDAQ is only supported by the session based interface, I have to use how described in the help:
d = daq.getDevices
Now I get the Modul-Names if I type:
modulnames = {d.Description}
But now the question: I have some input and output-Modules and only want to list e.g. the input-modules in a list.
How could I get a cell-array that only shows me the names of the input-Modules?

回答(2 个)

Randy82
Randy82 2011-5-31
Anyone has got an idea?
I type
names = {d.Description}
and get an cell in that I can find the strings 'National Instruments NI 9201' and 'National Instruments NI 9263' for example. The NI 9201 is an input module and the 9263 an output module.
So, I want to create in my GUI two popup-menus. On one popup-menu I only want to see the input-modules, on the other I just want to see the output-modules. Now, to see what are input-modules and what are output-modules, I could type
info = {d.Subsystems}
But then, I first get out
[1x1 daq.ni.AnalogInputInfo] and [1x1 daq.ni.AnalogOutputInfo]
In the workspace that is shown as another cell, but in each cell there is more than one information.
When I now type
info{1,1}.SubsystemType
I get the string 'AnalogInput' - but only for the first device. How could I get this string for all the devices in one step so that I can make a difference between input and output modules?

Randy82
Randy82 2011-6-8
Ok, it seems nobody has an idea ... :-|

类别

Help CenterFile Exchange 中查找有关 Instrument Control Toolbox Supported Hardware 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by