Schedule Editor
View and edit the schedule of model components (partitions)
Description
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.
More
Using the Schedule Editor
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 Schedule Editor in the Design section of the Modeling tab. 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.
Order
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
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.
Events
The Events panel allows you to manage events in the Schedule
Editor. The events in the Schedule Editor can bind with aperiodic partitions to schedule
their execution. You can create events in the Schedule Editor and use these events to send
from Stateflow® to schedule execution of an aperiodic partition. To send the events from the
Stateflow chart, use the send(eventName)
command.
In the Events panel, you can see the listeners and the broadcasters of the event. The icon denotes the listeners, and the icon denotes the broadcasters. When you bind the aperiodic partition with an event, the aperiodic partition executes when that event is sent. The broadcaster of the event shows you the path of the Stateflow chart that sends the event.
Click the icon to create an event in the Schedule Editor, and select a listener partition from the drop down. You can also bind an event by dragging and dropping the event over a valid aperiodic partition. When an event is bound to a partition, the event name appears on the left side of the partition and in, the Trigger column of the Order table.
Open the Schedule Editor
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.
Examples
Parameters
Partition Name
— Name of the partitions
character vector
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
discrete value | variable
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 partitions to execute
vector
Times at which the aperiodic partitions execute, specified as a vector of discrete values.
Connections
— Data connections between partitions
Auto
(default) | Delay
| Dependency
| Prevent Delays
| Allow Delays
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.
More About
Order
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.
Manage Partitions
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.
Property Inspector
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.
Arrange
The Arrange button organizes the partition graph.
Layout
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.
Events
From the Events panel, you can manage events in the Schedule Editor. In the Events panel, you can see the listeners and the broadcasters of the event. The icon denotes the listeners, and the icon denotes the broadcasters.
Version History
Introduced in R2019a
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)