Main Content

本页对应的英文页面已更新,但尚未翻译。 若要查看最新内容,请点击此处访问英文页面。

调度模型组件

创建导出函数、基于速率的模型和分区,以便为代码生成调度模型

调度模型组件进行仿真或与外部调度器集成需要将算法放在原子 SubsystemModel 模块中。然后,将执行速率指定为周期性(调度子系统)或非周期性(函数调用子系统)。

分区是作为原子任务独立执行的模型组件。在多任务模型中,分区是从模型组件创建的。使用分区,您可以分离模型中可在 Schedule Editor 工具中显式控制的各部分。

Schedule Editor 是一个调度工具,它表示模型中称为分区的组件、它们之间的数据连接以及这些分区的顺序。Schedule Editor 只能用于现有组件,如原子子系统、导出函数和模型模块。Schedule Editor 也是一个交互式工具,通过它可以轻松查看和编辑模型组件的调度情况。

模块

全部展开

Function-Call Subsystem其执行由外部函数调用输入控制的子系统
Function-Call Generator提供函数调用事件来控制子系统或模型的执行
Function-Call Split提供联接点以用于拆分函数调用信号线
Function-Call Feedback LatchBreak feedback loop involving data signals between function-call blocks
Trigger向子系统或模型添加触发器或函数端口
Subsystem对各模块进行分组以创建模型层次结构
Inport为子系统或外部输入创建输入端口

工具

全部展开

Schedule EditorView and edit the schedule of model components (partitions)

全部展开

simulink.schedule.OrderedScheduleCreates an OrderedSchedule object containing priority order of the partitions of a model

函数

全部展开

simulink.schedule.createScheduleCreate a new schedule using provided schedule and ordering

主题

导出函数模型

导出函数模型概述

导出函数模型概述和模型编译要求。

Create an Export-Function Model

First step for creating independent functions in the generated code.

Test Export-Function Model Simulation Using Input Matrix

Use an input matrix to specify and test function-call event scheduling.

Test Export-Function Model Simulation Using Function-Call Generators

Use multiple Function-Call Generator blocks to test function-call event scheduling.

Test Export-Function Model Simulation Using Stateflow Chart

Use a Stateflow chart to test function-call event scheduling.

Test Export-Function Model Simulation Using Schedule Editor

Use the Schedule Editor to test function-call event scheduling.

Generate Code for Export-Function Model

Generate code for functions that can be integrated with an external scheduler.

Generate Code for Export-Function Model with Rate-Based Model

Generate code from models with function-call and scheduled subsystems.

基于速率的模型

Rate-Based Models Overview

Specify scheduling of subsystem or model.

Create A Rate-Based Model

Set periodic rates for subsystems.

Test Rate-Based Model Simulation Using Function-Call Generators

Simulate rate-based model.

Generate Code from Rate-Based Model

Generate code from the rate-based model, not from the model test harness.

执行顺序

控制和显示执行顺序

确定任务中模块之间的执行顺序。

Sorting Rules for Explicitly Scheduled Model Components

Simulink® determines the execution order for model components (subsystems and referenced models).

使用 Schedule Editor 进行分区操作

Create Partitions

Learn the concept of partitions and how to create them from a model.

Schedule the Partitions

Learn about the order of the partitions and how to edit the schedule.

Generate Code from a Partitioned Model

Learn about the impact of partitioning and editing the schedule on code generation.

特色示例