Simulink Initialization and Scheduling

Examples showing how to schedule the sequential execution of different subsystems
488 Downloads
Updated 13 Oct 2023

pure-simulink-initialization-and-scheduling

Examples showing how to schedule the sequential execution of different subsystems

View pure-simulink-initialization-and-scheduling on File Exchange

Open in MATLAB Online

SIMULINK® INITIALIZATION AND SEQUENTIAL BLOCK EXECUTION EXAMPLES:

A question often asked by advanced simulink users is how to execute some part of the model only once at the beginning of the simulation, and execute another part of the model only after the former is executed.

This is often motivated, for example, by the need to execute some diver blocks that perform some initialization function on the hardware, before executing other blocks that perform the main intended task.

A related question is how to make sure that some blocks are executed only sequentially, that is one after the other.

This file contains simple examples showing how to easily perform both tasks in a pure-simulink setting.

Note that some hints and examples on how to approach these problems are also given in the documentation (see below).

CONTENTS:

readme.md This file.

sim_init_example.slx Initialization example sim_seq_example.slx Sequential Exacution example sim_initseq_example.slx Combined Initialization and Sequential Execution example

license.txt License file. security.md Security statement.

OTHER APPROACHES DESCRIBED IN THE DOCUMENTATION:

This is a general starting point:

http://www.mathworks.com/help/stateflow/ug/scheduling-execution-of-simulink-subsystems.html

this is an alternating executing subsystem example:

http://www.mathworks.com/help/simulink/ug/triggered-and-enabled-subsystems.html#f4-84472

while this is a stateflow-based solution:

http://www.mathworks.com/help/stateflow/ug/schedule-multiple-subsystems-in-a-single-step.html

and this is a more general explanation of how to display and control the execution order, still based on stateflow:

http://www.mathworks.com/help/simulink/ug/controlling-and-displaying-the-sorted-order.html

Cite As

Giampiero Campa (2024). Simulink Initialization and Scheduling (https://github.com/giampy1969/pure-simulink-initialization-and-scheduling/releases/tag/v1.1.0.0), GitHub. Retrieved .

MATLAB Release Compatibility
Created with R2013a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Simulink in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.1.0.0

See release notes for this release on GitHub: https://github.com/giampy1969/pure-simulink-initialization-and-scheduling/releases/tag/v1.1.0.0

1.0.0.0

To view or report issues in this GitHub add-on, visit the GitHub Repository.
To view or report issues in this GitHub add-on, visit the GitHub Repository.