Main Content

本页的翻译已过时。点击此处可查看最新英文版本。

基于时间的调度

求解器、采样率和转移、任务模式、实时执行

为以一个或多个采样率运行的模型使用固定步长或可变步长求解器。单任务和多任务执行模式仅对固定步长求解器可用。实时程序按照与实际时间同步的方式执行模型代码。

要生成实时执行的代码,需要识别并处理模型中的采样率转移。

主题

基于时间的调度和代码生成

在查看采样时间和任务模式注意事项后,生成满足实时执行要求的代码。

为模型入口函数配置 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.

S-Functions for Multirate Multitasking Environments

Explains how to handle rate-grouped tasks in multirate, port-based sample time S-functions.

Time-Based Scheduling Example Models

Models that show time-based scheduling scenarios.