View and edit the schedule of model components (partitions)
The Schedule Editor is a scheduling tool that represents the components in the model known as partitions, the data connections between them, and the order of those partitions.
Partitions are the components of the model that execute independently as tasks. The data connections between the partitions show the flow of the data between those partitions. The scheduling of these partitions is based on the rates and the events in the model. This schedule is shown in the Order table in the Schedule Editor.
Using the Schedule Editor, you can:
Create partitions and specify their order.
Edit and analyze the schedule of the executable partitions without disturbing the structure of the model.
Visualize how Simulink® executes partitions.
Changes made in the Schedule Editor affect both, simulation and code generation.
The Schedule Editor consists of two parts representing two different views of partitions in the model:
A graph that shows the partitions and the data connections between them.
A table that shows the order in which the partitions execute.
Changing one of the views impacts the other.
To use the Schedule Editor, select View > Schedule Editor. If the model is already partitioned, you can open the Schedule Editor by clicking the badge, which appears above the blocks. To see the default partitions present in the model in the Schedule Editor, update the diagram by clicking the icon on the toolstrip or by selecting Ctrl+D. As you create partitions in the model and update the diagram, partitions appear in the Schedule Editor.
To check how the partitions map to the model, right-click the partitions and select Show Source. The Simulink model window appears with every block corresponding to the partition highlighted.
The Order shows the order in which the partitions execute. To change the order, you can drag and drop the partitions. You can also use the Up and Down arrows on the toolstrip. Partitions are sorted based on their rates. You can only reorder the partitions with the same rate. Clicking a partition in the Order, highlights the corresponding partition in the graph. On changing the order, the connections that are affected by this specified change get highlighted.
Connections between the partitions show data dependencies. You can right-click the connections between the partitions to change the constraints on data connections. The different types of connections illustrate how the partitions behave with each other.
The types of connections are:
Dependency — Indicates that the source always runs before the destination. The dependency connection is a solid line.
Delay — Indicates that the destination runs before the source. When the destination runs before the source, a scheduling delay is introduced. The delay connection is a dashed line.
You can put these types of constraints on connections:
Allow Delay — Inserts a delay when required. When you specify this constraint for a connection, Simulink inserts a delay for that connection only when necessary. The unlock icon on the connections signifies an allowed delay. When you select this constraint on a connection, Simulink prefers these connections to be turned into a delay if necessary over other connections.
This constraint is displayed as one of these options.
Prevent Delay — Prevents delay from being inserted in the connection. When you specify this constraint for a connection, Simulink ensures that the connection is a dependency. The lock icon on the connection indicates that the connection is locked as a dependency and is not changed to a delay.
Simulink: In the Modeling tab, expand the Design section and select Schedule Editor from System Design.
Simulink model: Click the badge on the partitioned blocks.
Partition Name— Name of the partitions
Name of the partitions created. Double-click the name to edit and use the enter key to save the partition name.
Sample Time— Sample time for partitions to execute
Sample time at which the partitions execute. The sample time is a discrete value or a defined variable that contains a discrete value.
Hit times— Times for aperiodic partitioned to execute
Times at which the aperiodic partitions execute, specified as a vector of discrete values.
Connections— Data connections between partitions
Dependency between the partitions is shown as a solid line. A delay between the partitions is shown as a dashed line. The arrow tail and head denote the source and destination, respectively.
Specify constraints on the connections by right-clicking the lines and selecting the constraint type.
By default, the Order table is expanded. Order shows the order of partition execution. Edit the order by dragging the partitions or using the Up and Down arrows on the toolstrip.
By default, the Manage Partitions panel is collapsed. Expand the panel to create partitions, edit names and/or sample times of the existing partitions, and remove existing partitions. Changes made in the Manage Partitions panel take effect after updating the diagram.
The Property Inspector shows information about the selected partition. It shows the rate at which the partition executes and the connections on that partition. Enter the Hit times when you select an aperiodic partition in the Property Inspector.
The Arrange button organizes the partition graph.
By default, the Order panel and the Property Inspector panel are expanded. From the Layout drop-down, select the preferred panels to be expanded as per preference. Clearing the panels collapses them.