Discrete-Event Chart
R2026bDiscrete event chart
Libraries:
SimEvents
Description
The Discrete-Event Chart block is similar to a Stateflow® chart but is used for discrete events. The block requires a Stateflow license.
The distinguishing characteristic of the Discrete-Event Chart block is that it executes in an event-based rather than time-based fashion. The Discrete-Event Chart block provides these advantages for discrete-event modeling:
Precise timing — The time resolution for occurrence of events can be arbitrarily precise and is not limited by the sample time of the model.
Trigger on arrival — A Discrete-Event Chart block executes immediately on message arrival. It does not wait for the next sample time hit.
Variable execution order — A Discrete-Event Chart block does not have a fixed sorted execution order. The order of execution depends on the run-time conditions of the model.
Multiple executions per time step — A Discrete-Event Chart block can execute zero or multiple times in a single time step.
The Discrete Event Chart can be used in a similar fashion to the Stateflow Chart (Stateflow).
To access the chart properties, right-click the Discrete-Event Chart block, and then select Properties. For more information about the block properties, see Create Custom Queuing Systems Using Discrete-Event Stateflow Charts.
For information about SimEvents® common design patterns with Discrete-Event Chart block, see SimEvents Common Design Patterns.
Examples
Programmatic Use: Add Block
To add the block programmatically, use the add_block function with one of these library block paths as the source.
"sldelib/Discrete-Event Chart"
Example: add_block("sldelib/Discrete-Event Chart","myModel/myBlock",MakeNameUnique="on")
Version History
Introduced in R2016a




