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

1 Ansicht (letzte 30 Tage)
Randy82
Randy82 am 30 Mai 2011
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?

Antworten (2)

Randy82
Randy82 am 31 Mai 2011
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 am 8 Jun. 2011
Ok, it seems nobody has an idea ... :-|

Kategorien

Mehr zu Instrument Control Toolbox Supported Hardware finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by