Data Acquisition Toolbox | ![]() ![]() |
Return device objects, channels, or lines from the data acquisition engine to the MATLAB workspace
Syntax
out = daqfind
out = daqfind('
PropertyName
',PropertyValue,...)
out = daqfind(S)
out = daqfind(obj,'
PropertyName
',PropertyValue,...)
Arguments
Description
returns all device objects that exist in the data acquisition engine. The output out = daqfind
out
is an array.
returns all device objects, channels, or lines that exist in the data acquisition engine and have the specified property names and property values. The property name/property value pairs can be specified as a cell array. out = daqfind('
PropertyName
',PropertyValue,...)
returns all device objects, channels, or lines that exist in the data acquisition and have the property names and property values specified by out = daqfind(S)
S
. S
is a structure with field names that are property names and field values that are property values.
returns all device object, channels, or lines listed by out = daqfind(obj,'
PropertyName
',PropertyValue,...)
obj
that have the specified property names and property values.
More About Finding Device Objects, Channels, or Lines
daqfind
is particularly useful in these circumstances:
Rules for Specifying Property Names and Property Values
daqfind
. However, in a single call to daqfind
, you can specify only device object properties or channel/line properties.
get
. For example, if get
returns the ChannelName
property value as Left
, you must specify Left
as the property value in daqfind
(case matters). However, case does not matter when you specify enumerated property values. For example, daqfind
will find a device object with a Running
property value of On
or on
.
Example
You can use daqfind
to return a cleared device object.
ai = analoginput('winsound'); ch = addchannel(ai,1:2); set(ch,{'ChannelName'},{'Joe';'Jack'}) clear ai ainew = daqfind;
To return the channel associated with the descriptive name Jack
:
To return the device object with a sampling rate of 8000 Hz and the descriptive name winsound0-AI
, you can pass a structure to daqfind
.
Functions
![]() | daqcallback | daqhelp | ![]() |