How can I trigger a transition depending on an input's rise in Stateflow?
9 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
MathWorks Support Team
am 7 Nov. 2014
Beantwortet: MathWorks Support Team
am 7 Nov. 2014
I would like to trigger a transition depending on an input's rise in Stateflow. When the input's value passes from 0 to 1, a specific transition should be executed.
However, when I define this input as rising edge input event, I notice that the whole chart behaves differently. The chart is only triggered on the input rising edge. I would like the Stateflow chart to be executed normally at every time step.
Akzeptierte Antwort
MathWorks Support Team
am 7 Nov. 2014
There is no direct solution to execute a transition at a rising edge of an input, without impacting the general execution of the Stateflow chart.
As a workaround you could try one of the following:
1) Implement the edge detection in Simulink with a "Detect Rise" block, and use the output of the "Detect Rise" as a regular Stateflow input.
2) Implement the edge detection inside the Stateflow chart with local variables.
3) Use another event input to trigger the Stateflow chart at different time steps. This event should not be reused in a transition. I should only make sure that the Stateflow chart executes at the correct rate.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Decision Logic finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!