基于时间的调度
求解器、采样率和转移、任务模式、实时执行
为以一个或多个采样率运行的模型使用定步长或变步长求解器。单任务和多任务执行模式仅对定步长求解器可用。实时程序按照与实际时间同步的方式执行模型代码。
要生成实时执行的代码,需要识别并处理模型中的采样率转移。
主题
- 基于时间的调度和代码生成
在查看采样时间和任务模式注意事项后,生成满足实时执行要求的代码。
- 为模型入口函数配置生成的 C 函数接口
了解生成的 C 入口函数、配置选项以及如何与它们对接。
- 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.
- Modeling for Single-Tasking Execution
Use the base sample rate of a model to define the time interval during which blocks in the model execute.
- Modeling for Multitasking Execution
Include blocks that use different sample rates, or use different sample rates for continuous and discrete parts of a model.
- 处理速率转换
处理具有不同周期性采样率的模块之间的转换。
- Configure Time-Based Scheduling
Configure model configuration parameters that are relevant to time-based scheduling of generated code.
- 优化时间计数器的内存使用量
优化代码生成器为经过时间计数器分配的内存。
- Time-Based Scheduling Example Models
Models that show time-based scheduling scenarios.