Stateflow: Flow chart with user input while running

5 vues (au cours des 30 derniers jours)
Hendrik Lorenz
Hendrik Lorenz le 7 Août 2018
Hi all, I have the following problem: I want to simulate a flow chart in Stateflow. Some transitions in this flow chart depend on user input, i.e. if the user answers a question with yes or no. How can I implement this user input in Simulink? I thought about using the function questdlg within my Matlab script to get the user input and hand it over to simulink by a constant block. However, this does not work, because some questions are just raised in a certain path within the flow diagram. I do not want to ask for all the answers to the questions beforehand but when the right step in the flow diagram is reached. Does somebody has an idea of how to do it?
Best regards

Réponse acceptée

Hendrik Lorenz
Hendrik Lorenz le 21 Août 2018
Found an answer to that question. The example "Modeling a Fitness Watcher" gave me a pretty good idea of how to do what I described here. Plus implementing a GUI with App Designer worked well.
https://de.mathworks.com/help/stateflow/examples/modeling-a-fitness-watcher.html

Plus de réponses (0)

Catégories

En savoir plus sur Modeling dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by