Stateflow: Flow chart with user input while running

5 visualizzazioni (ultimi 30 giorni)
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

Risposta accettata

Hendrik Lorenz
Hendrik Lorenz il 21 Ago 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

Più risposte (0)

Categorie

Scopri di più su Modeling in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by