MATLAB REAL-TIME WORKSHOP 7 - TARGET LANGUAGE COMPILER Guía de usuario Pagina 176

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 386
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 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.
Vista de pagina 175
1 2 ... 171 172 173 174 175 176 177 178 179 180 181 ... 385 386

Comentarios a estos manuales

Sin comentarios