MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Podręcznik Użytkownika Strona 664

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 759
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 663
14 Manage Ca llback Executio n
delete the timer before your GUI closes. To start a timer, call its st art
method. The tim er executes its StartF cn, begins counting, and executes its
first
TimerFcn callback when the period specified by the S tartDelay property
expires. To halt a timer, call its
stop method.
Caution Timers are independent objects that operate asynchronously, as
do GUIs. A timer callback can change or even delete data used by your GUI
code or code it calls. It can also fail t o execute due to timing out. If such
possibilities exist fo r your application, y ou r code must g uard against them.
For example, it can test whether a variable continues to exist, or place code
that can fail w ithin try-catch blocks
For an example of a GUI that uses a tim er, se e “Time Data Updates from a
GUI (GUIDE)” on page 10-105. For more information about setting up timers
and controlling their run-time characteristics, see “Using a MATLAB Timer
Object” and the
timer reference page.
14-12
Przeglądanie stron 663
1 2 ... 659 660 661 662 663 664 665 666 667 668 669 ... 758 759

Komentarze do niniejszej Instrukcji

Brak uwag