Specify label to associate with instrument object
Tag to be a character vector
value that uniquely identifies an instrument object.
Tag is particularly useful when constructing
programs that would otherwise need to define the instrument object
as a global variable, or pass the object as an argument between callback
You can return the instrument object with the
instrfind function by specifying the
Any instrument object
The default value is an empty character vector.
Suppose you create a serial port object on a Windows® machine associated with the serial port COM1.
s = serial('COM1'); fopen(s);
You can assign
s a unique label using
s.Tag = 'MySerialObj'
You can access
s in the MATLAB® workspace
or in a file using the
instrfind function and
Tag property value.
s1 = instrfind('Tag','MySerialObj');