MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Guide de l'utilisateur Page 664

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 759
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 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
Vue de la page 663
1 2 ... 659 660 661 662 663 664 665 666 667 668 669 ... 758 759

Commentaires sur ces manuels

Pas de commentaire