Time-Based Scheduling
Design models for algorithms that depend on time-based scheduling and for which you intend to generate code. Assess usage of continuous and discrete blocks. Use fixed-step solvers for models that run at one or more sample rates. Choose between single-tasking and multitasking execution modes. Identify and handle sample rate transitions within a model.
Topics
- Time-Based Scheduling and Code Generation
Consider continuous and discrete block usage, sample times, rate transitions for multirate models, discretization, and choosing between single-tasking mode and multitasking mode when designing models intended for code generation.
- Periodic and Aperiodic Function Interfaces
Generate callable entry-point functions for the algorithm represented by a top model.
- Rate Transitions and Data Transfers
Handle transitions between blocks with different aperiodic sample rates.
- Configure Time-Based Scheduling
Configure the solver type, solver, fixed-step size, periodic sample time constraints, and solver diagnostics for code generation.
- Execution of Code Generated from a Model
Execute code generated from single-tasking and multitasking models for rapid-prototyping and embedded system run-time environments.
- Tasking Modes and Execution Order
Example that shows task execution order for blocks in a model when configured for single-tasking versus multitasking execution.