Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
17
Добавлен:
09.02.2015
Размер:
324.1 Кб
Скачать

Instrfind will not find an object with a Name property value of

'myobject'. However, properties which have an enumerated list data type

will not be case sensitive when searching for property values. For

example, INSTRFIND will find an object with a Parity property value

of 'Even' or 'even'.

Example:

s1 = serial('COM1', 'Tag', 'Oscilloscope');

s2 = serial('COM2', 'Tag', 'FunctionGenerator');

set(s1, 'ObjectVisibility', 'off');

out1 = instrfind('Type', 'serial')

out2 = instrfindall('Type', 'serial');

See also serial/get, serial/instrfind.

Overloaded methods:

serial/instrfindall

instrument/instrfindall

Reference page in Help browser

doc instrfindall

<instrfind> - Find serial port objects with specified property values.

INSTRFIND Find serial port objects with specified property values.

OUT = INSTRFIND returns all serial port objects that exist in memory.

The serial port objects are returned as an array to OUT.

OUT = INSTRFIND('P1', V1, 'P2', V2,...) returns an array, OUT, of

serial port objects whose property names and property values match

those passed as param-value pairs, P1, V1, P2, V2,... The param-value

pairs can be specified as a cell array.

OUT = INSTRFIND(S) returns an array, OUT, of serial port objects whose

property values match those defined in structure S whose field names

are serial port object property names and the field values are the

requested property values.

OUT = INSTRFIND(OBJ, 'P1', V1, 'P2', V2,...) restricts the search for

matching param-value pairs to the serial port objects listed in OBJ.

OBJ can be an array of serial port objects.

Note that it is permissible to use param-value string pairs, structures,

and param-value cell array pairs in the same call to INSTRFIND.

When a property value is specified, it must use the same format as

GET returns. For example, if GET returns the Name as 'MyObject',

Instrfind will not find an object with a Name property value of

'myobject'. However, properties which have an enumerated list data type

will not be case sensitive when searching for property values. For

example, INSTRFIND will find an object with a Parity property value

of 'Even' or 'even'.

Example:

s1 = serial('COM1', 'Tag', 'Oscilloscope');

s2 = serial('COM2', 'Tag', 'FunctionGenerator');

out1 = instrfind('Type', 'serial')

out2 = instrfind('Tag', 'Oscilloscope')

out3 = instrfind({'Port', 'Tag'}, {'COM2', 'FunctionGenerator'})

See also serial/get.

Overloaded methods:

serial/instrfind

instrument/instrfind

icgroup/instrfind

Reference page in Help browser

doc instrfind

Timer support

<timer> - Construct timer object.

MATLAB Timer Object Properties and Methods.

Timer properties.

AveragePeriod - Average number of seconds between TimerFcn executions.

BusyMode - Action taken when TimerFcn executions are in progress.

ErrorFcn - Callback function executed when an error occurs.

ExecutionMode - Mode used to schedule timer events.

InstantPeriod - Elapsed time between the last two TimerFcn executions.

Name - Descriptive name of the timer object.

Period - Seconds between TimerFcn executions.

Running - Timer object running status.

StartDelay - Delay between START and the first scheduled TimerFcn execution.

StartFcn - Callback function executed when timer object starts.

StopFcn - Callback function executed after timer object stops.

Tag - Label for object.

TasksExecuted - Number of TimerFcn executions that have occurred.

TasksToExecute - Number of times to execute the TimerFcn callback.

TimerFcn - Callback function executed when a timer event occurs.

Type - Object type.

UserData - User data for timer object.

timer methods:

Timer object construction:

@timer/timer - Construct timer object.

Getting and setting parameters:

get - Get value of timer object property.

set - Set value of timer object property.

General:

delete - Remove timer object from memory.

display - Display method for timer objects.

inspect - Open the inspector and inspect timer object properties.

isvalid - True for valid timer objects.

length - Determine length of timer object array.

size - Determine size of timer object array.

timerfind - Find visible timer objects with specified property values.

timerfindall - Find all timer objects with specified property values.

Execution:

start - Start timer object running.

startat - Start timer object running at a specified time.

stop - Stop timer object running.

waitfor - Wait for timer object to stop running.

Reference page in Help browser

doc timer

<timerfindall> - Find all timer objects with specified property values.

TIMERFINDALL Find all timer objects with specified property values.

OUT = TIMERFINDALL returns all timer objects that exist in memory

regardless of the object's ObjectVisibility property value. The timer

objects are returned as an array to OUT.

OUT = TIMERFINDALL('P1', V1, 'P2', V2,...) returns an array, OUT, of

timer objects whose property names and property values match those

passed as param-value pairs, P1, V1, P2, V2,... The param-value pairs

can be specified as a cell array.

OUT = TIMERFINDALL(S) returns an array, OUT, of timer objects whose

property values match those defined in structure S whose field names

are timer object property names and the field values are the requested

property values.

OUT = TIMERFINDALL(OBJ, 'P1', V1, 'P2', V2,...) restricts the search for

matching param-value pairs to the timer objects listed in OBJ. OBJ can

be an array of timer objects.

Note that it is permissible to use param-value string pairs, structures,

and param-value cell array pairs in the same call to TIMERFINDALL.

When a property value is specified, it must use the same format as

GET returns. For example, if GET returns the Name as 'MyObject',

TIMERFINDALL will not find an object with a Name property value of

'myobject'. However, properties which have an enumerated list data type

will not be case sensitive when searching for property values. For

example, TIMERFINDALL will find an object with a Parity property value

of 'FixedRate' or 'fixedrate'.

Example:

t1 = timer('Tag', 'broadcastProgress', 'Period', 5);

t2 = timer('Tag', 'displayProgress');

out1 = timerfindall('Tag', 'displayProgress')

out2 = timerfindall({'Period', 'Tag'}, {5, 'broadcastProgress'})

See also timerfind, timer/get.

Overloaded methods:

timer/timerfindall

Reference page in Help browser

doc timerfindall

<timerfind> - Find visible timer objects with specified property values.

TIMERFIND Find visible timer objects with specified property values.

OUT = TIMERFIND returns all visible timer objects that exist in

memory. Visible timer object are timer objects that have the

OBJECTVISIBILITY parameter set to 'on'. The visible timer objects

are returned as an array to OUT.

OUT = TIMERFIND('P1', V1, 'P2', V2,...) returns an array, OUT, of

Соседние файлы в папке Библиотеки Matlab