Standalone Program Components
The core of a standalone program is the main loop. On each iteration,
the main loop executes a background or null task and checks for a
termination condition.
The main loop is periodically
interrupted by a timer. The Real-Time Workshop function rt_OneStep is
either installed as a timer interrupt service routine (ISR), or called
from a timer ISR at each clock step.
The execution driver, rt_OneStep, sequences
calls to the model_step functions.
The operation of rt_OneStep differs depending on
whether the generating model is single-rate or multirate. In a single-rate
model, rt_OneStep simply calls the model_step function.
In a multirate model, rt_OneStep prioritizes and
schedules execution of blocks according to the rates at which they
run.
 | Generating a Standalone Program | | Main Program |  |
Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
Get this Simulink Kit