Tag - Specify device object label

Description

Tag provides a means to identify device objects with a label. Using the daqfind function and the Tag value, you can identify and retrieve a device object that was cleared from the MATLAB workspace.

Characteristics

Usage

AI, AO, DIO, common to all channels and lines

Access

Read/write

Data type

String

Read-only when running

No

Values

The default value is an empty string.

Examples

Create the analog input object ai for a sound card and add two channels to it.

ai = analoginput('winsound');
addchannel(ai,1:2);

Assign ai a label using Tag.

set(ai,'Tag','Sound')

If ai is cleared from the workspace, you can use daqfind and the Tag value to identify and retrieve the device object.

clear ai
aicell = daqfind('Tag','Sound');
ai = aicell{1};

See Also

Functions

daqfind

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS