Programming and Data Types | ![]() ![]() |
Creating Timer Callback Functions
Four of the timer object properties specify callback functions that the timer object executes:
As the value of these properties, you can specify:
'disp(''Hello World!'')'
@my_callback_fcn
'my_callback_fcn',...}
or {@my_callback_fcn,...}
When you set the value of these properties, you can specify arguments for the callback function using any of the following syntaxes.
The following diagram illustrates when the timer object executes the StartFcn
, StopFcn
, and TimerFcn
. The ErrorFcn
can occur at any time.
In this figure, the timer stops after two executions of the timer callback function (TimerFcn
):
![]() | Timer Object Execution Modes | Character Arrays (Strings) | ![]() |