
Paraller states in stateflow.
7 views (last 30 days)
Show older comments
Hello, I have a question about paraller states. I have a variable in first state, which is used in second state. At the start of the second state there is condition which using that variable. StateFlow constantly checking second state with its conditions or check it one time at the beginning ?
Thanks!
0 Comments
Accepted Answer
TAB
on 2 May 2012
In stateflow, all the parallel states are executed at every sample time in a sequence decided by their priority number.
In your case, your second state will be executed continuously at each sample time but, codition will be checked constantly or at one time depending on where you have placed that condition.
[EDITED 3 May, 2012]
Flow graph inside your state will execute only once when state is entered. As there is no "during statement" for state, nothing will execute after state entry.
To make your flow graph to be executed continuously inside the state, add inner boundry transition as shown here.

More Answers (1)
See Also
Categories
Find more on Simulink Functions in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!