Models run at one or more sample times. The flexibility offered for developing multirate models imposes challenges for generating code that can execute in real time in a multitasking environment. To make multirate models operate as expected in real time (that is, to give the right answers), you sometimes must modify a model or instruct the Simulink engine to modify the model for you.
Generate code that meets real-time execution requirements after reviewing sample time and tasking mode considerations.
Learn about generated C entry-point functions, configuration options, and how to interface with them.
Execute code generated from single-tasking and multitasking models for rapid-prototyping and embedded system run-time environments.
Use the base sample rate of a model to define the time interval during which blocks in the model execute.
Include blocks that use different sample rates, or use different sample rates for continuous and discrete parts of a model.
Handle transitions between blocks with different periodic sample rates.
Configure model configuration parameters that are relevant to time-based scheduling of generated code.
Design models that include discrete and continuous time blocks.
Improve performance of generated code by using real-time operating system (RTOS) task management mechanisms to eliminate redundant scheduling calls for multirate, multitasking models.
Models that show time-based scheduling scenarios.