Programming |
Associating Commands with Timer Object Events
The timer object supports properties that let you specify the MATLAB commands that execute when a timer fires, and for other timer object events, such as starting, stopping, or when an error occurs. These are called callbacks. To associate MATLAB commands with a timer object event, set the value of the associated timer object callback property.
The following diagram shows when the events occur during execution of a timer object and give the names of the timer object properties associated with each event. For example, to associate MATLAB commands with a start event, assign a value to the StartFcn
callback property. Error callbacks can occur at any time.
Timer Object Events and Related Callback Function
Creating and Executing Callback Functions | Creating Callback Functions |
© 1994-2005 The MathWorks, Inc.