MATLAB REAL-TIME WORKSHOP 7 - TARGET LANGUAGE COMPILER Guide de l'utilisateur Page 176

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 386
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 175
6 Program Architecture
6-14
The following diagram illustrates interrupt timing.
Figure 6-2: Task Timing
Thesampleintervalmustbelongenoughtoallowmodelcodeexecution
between task invocations.
In the figure above, the time between two adjacent vertical arrows is the
sample interval. The empty boxes in the upper diagram show an example of a
program that can complete one step within the interval and still allow time for
the background task. The gray box in the lower diagram indicates what
happens if the sample interval is too short. Another task invocation occurs
before the task is complete. Such timing results in an execution error.
Note also that, if the real-time program is designed to run forever (i.e., the final
time is 0 or infinite so the while loop never exits), then the shutdown code never
executes.
time
Time to execute
Time available to process background tasks
the model code
Sample interval is appropriate for this model code execution.
time
Time to execute the model code
Sample interval is too short for this model code execution.
Vue de la page 175
1 2 ... 171 172 173 174 175 176 177 178 179 180 181 ... 385 386

Commentaires sur ces manuels

Pas de commentaire