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

12 views (last 30 days)
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?

Answers (1)

Naresh
Naresh ungefär en timme ago
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

Categories

Find more on Stateflow in Help Center and File Exchange

Products


Release

R2024b

Community Treasure Hunt

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

Start Hunting!