| Data Acquisition Toolbox | Search  Help Desk |
| daqfind | Examples See Also |
Return device objects, channels, or lines from the data acquisition engine to the workspace.
Syntax
daqobjcell = daqfind
daqobjcell = daqfind('P1', V1, 'P2', V2,...)
daqobjcell = daqfind(obj, 'P1', V1, 'P2', V2,...)
Description
daqfind locates and returns Data Acquisition Toolbox device objects, channels, or lines. The items returned can be selected based on property values. This function is particularly useful if:
daqobjcell = daqfind returns any device objects that exist in the data acquisition engine. The objects are returned as a cell array to daqobjcell.
daqobjcell = daqfind('P1', V1, 'P2', V2,...) returns any device objects, channels, or lines that exist in the data acquisition engine having the specified property values.
daqobjcell = daqfind(obj, 'P1', V1, 'P2', V2,...) returns the device object, or any channels or lines contained by obj that have the specified property values.
Example
Sound Card
daqfind allows you to assign a MATLAB variable to a cleared device object, channel, or line.
ai = analoginput('winsound')
ch = addchannel(ai, 1:2)
set(ch, {'ChannelName'}, {'Joe'; 'Jack'})
clear ai
aicell = daqfind
ai_new = aicell{1}
You can find the channel that is assigned the descriptive name Jack.
out = daqfind(ai_new, 'ChannelName', 'Jack')
chan = out{1}
daqfind searches ai's channels for the specified property value and returns the result to out.
See Also
Functions
clear