Schedule Editor - View and edit the schedule of model components (partitions) - MATLAB (original) (raw)

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:

Changes made in the Schedule Editor affect both, simulation and code generation.

Using the Schedule Editor

The Schedule Editor consists of two parts representing two different views of partitions in the model:

Changing one of the views impacts the other.

To use the Schedule Editor, select Schedule Editor in theDesign 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 selectingCtrl+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 selectShow 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 theUp 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:

You can put these types of constraints on connections:

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 Icon showing an event being heard denotes the listeners, and the icon Icon showing an event being broadcast 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 A 'plus' icon that creates an event 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

Examples

Parameters

expand all

Manage Partitions

Name of the partitions created. Double-click the name to edit and use the enter key to save the partition name.

Sample time at which the partitions execute. The sample time is a discrete value or a defined variable that contains a discrete value.

Property Inspector

Times at which the aperiodic partitions execute, specified as a vector of discrete values.

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

expand all

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.

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 Icon showing an event being heard denotes the listeners, and the icon Icon showing an event being broadcast denotes the broadcasters.

Version History

Introduced in R2019a