No unconditional default transitions help

15 visualizaciones (últimos 30 días)
Alex
Alex el 3 de En. de 2025
Comentada: Alex el 23 de En. de 2025
Hello, I am running into an issue with the state below. I am a bit stuck, previously I had set the SFNoUnconditionalDefaultTransitionDiag parameter to be a warning but changed it to an error now. Now I am unsure on how going about fixing this error.
In a default transition, every path must lead to a substate and there must be one path that is not guarded by a condition or triggered by an event. Suggested Actions
- Terminate every path along the default transition in a substate.
- Ensure one default transition path is not guarded by a condition or triggered by an event.
  1 comentario
Hitesh
Hitesh el 3 de En. de 2025
Could you share the simulink file so that I reproduce this error and let you know root cause of it ?

Iniciar sesión para comentar.

Respuestas (1)

Hitesh
Hitesh el 4 de En. de 2025
Hi Alex,
You need to remove the condition of "!test" from the default transition. Ensure that the default transition does not have any conditions or event triggers. The default transition should be unconditional, it must automatically lead to a substate without any prerequisites.
For more information regarding the "Default Transition", kindly refer to the following MATLAB documentation:
  1 comentario
Alex
Alex el 23 de En. de 2025
I needed the !test condition to be met before sending the trigger.
I was able to get around this by doing the following:
  • Create a 'Task2' sub-state and added the send trigger1 there
  • Added !test as a condition to transition from Task1 to Task2 sub-state
  • Removed !test condition from going into Task1 sub-state

Iniciar sesión para comentar.

Categorías

Más información sobre Stateflow en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by