Simple Stateflow state machine - input port to change the defaul transition

11 visualizaciones (últimos 30 días)
Jack Daniels
Jack Daniels el 17 de Sept. de 2025 a las 14:21
Respondida: Naresh el 12 de Oct. de 2025 a las 15:57
I have a simple state flow diagram; the toggle switch is linked to the constant value - I can do toggling on the switch and able to switch the constant value. Further I would like to use the toggle-switch to control stateflow state machine. As of now I have always enabled state-machine and toggle switch cannot control stateflow chart .
How do I connect the default transition in stateflow chart with "start" input port which represents input from toggle switch. Please can you advice?

Respuestas (1)

Naresh
Naresh el 12 de Oct. de 2025 a las 15:57
Hello Deniels,
I can say we can not add two default transition in the chart. But the solution to your problem is use "junction point" in the default transition which will work excatly as you required. here I am attaching the example which worked for me.
here the input "in" is the switch block simulated (see the other picture)
Thanks, Have a good day

Categorías

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

Productos


Versión

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by