How to determine a Stateflow sequence?

조회 수: 1 (최근 30일)
Olivier NEYRET
Olivier NEYRET 2021년 4월 27일
댓글: Olivier NEYRET 2021년 4월 27일
Hello,
I am working on Simulink using Stateflow and I have a request. I want to know if it is possible after the simulation of the model to know in which states and with which transitions the model have been runned. The goal is to know at the end of the simulation with transitions were used to reach the different states.

채택된 답변

Jonas
Jonas 2021년 4월 27일
편집: Jonas 2021년 4월 27일
In the Model Explorer, for your Stateflow chart, check 'Create output for monitoring: Child activity'. Simulink has now added another output port to your Stateflow chart. The data type will be an enumeration with your state names as values. You can add a Scope block and it will display the active state in time.
It is not possible to know which transition paths were used. You can for example have different transition paths between two states, but it will only display that 'a' transition from the one state to the other state has taken place.
I hope this at least may improve your troubleshooting of your Stateflow charts.
  댓글 수: 6
Olivier NEYRET
Olivier NEYRET 2021년 4월 27일
Oh ok, and you know the equivalent in C?
Olivier NEYRET
Olivier NEYRET 2021년 4월 27일
It's good i found it, it is "printf". Thanks a lot for your help

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Complex Logic에 대해 자세히 알아보기

제품


릴리스

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by