Why do I receive the warning unconditional transition shadows other transitions?
13 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
MathWorks Support Team
el 31 de Oct. de 2018
Respondida: MathWorks Support Team
el 25 de Abr. de 2019
Why do I receive the warning "unconditional transition shadows other transitions"?
I have multiple sub-charts within my Stateflow chart. I want them to execute concurrently. Therefore I have a default transition leading to each sub-chart.
Respuesta aceptada
MathWorks Support Team
el 26 de Abr. de 2019
This warning occurs when there are multiple unconditional transitions from the same group of outgoing transitions from a particular state or junction. This is a problem because one unconditional transition will have a higher order than the other thus preventing the latter unconditional transition from ever executing.
In the model all default transitions are technically unconditional transitions. They are also all outgoing transitions of the entire Stateflow Chart itself. The Stateflow Chart can be thought of as the highest level state. More information on transition shadowing can be found in the link below:
Therefore, in the model only one sub-chart executes while the others do not.
If you want each sub-chart to execute concurrently, parallel states should be used.
1) You should create a state for each of your sub-charts.
2) Move each sub-chart onto its respective state
3) Then change the state type to Parallel by right-clicking outside of the states and selecting:
Decomposition > Parallel (AND)
Each parallel state is allowed to have its own default transition. More information on Parallel States can be found in the link below:
Now all the sub-charts should execute during simulation. You can observe this by selecting:
Simulation > Stateflow Animation > Slow
and then run the simulation.
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Stateflow en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!