Can states in Stateflow charts be listed in order of execution in a generated report by Simulink Report Generator?

1 回表示 (過去 30 日間)
I am generating a report for a model containing a Stateflow chart. The chart has several states (parallel and others).
In the report, however, they are not listed in execution order. Having them in execution order would make the report more clear.

採用された回答

MathWorks Support Team
MathWorks Support Team 2009 年 6 月 27 日
Simulink Report Generator does not currently support listing Stateflow charts in order of execution.
Report Generator is unable to parse a Stateflow Chart to determine the order in which its states are executed. Order in which states are executed is controlled by find methods in the Stateflow API.
For example, open your model and execute the following commands:
rt = sfroot
m = rt.find('-isa','Simulink.BlockDiagram')
chart = m.find('-isa','Stateflow.Chart')
states = chart(1).find('-isa','Stateflow.State')
the variable 'states' will contain information on all the states. If you then type:
states(1).Name
states(2).Name
<snip>
As seen in the output, the state order is the same as listed in the report. The example chart loop follows the order specified by the find methods.
For more information on the Stateflow API, see:
Overview of the Stateflow API
<http://www.mathworks.com/access/helpdesk/help/toolbox/stateflow/api/f13-9347.html>

その他の回答 (0 件)

タグ

タグが未入力です。

Community Treasure Hunt

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

Start Hunting!

Translated by