如何使用simulink与stateFlow持续更新应用程序的文本字段。万博1manbetx

1 view (last 30 days)
Damian Mikolajczak
Damian Mikolajczak 2021年5月17日
你好,
目前我从事一个项目,偶然a problem. The project involves an app which has a lift keyboard with numbers from 1 to 9 and a text box which I want to show the current floor. Clicking a button changes an input constant in Simulink model which then goes into a Stateflow model. The Stateflow model simulates the lift moving across the floors and updates the output "floor" and displays it in a display block. I would like to make that floor number to continously update in the text box of the app. I've searched for a solution for a while now and none worked so I hope someone could help. Thank you!

答案(1)

帕文·冈莎(Pavan Guntha)
嗨,达米安,
我知道问题是在MATLAB应用程序,StateFlow和Simulink之间建立适当的数据传输。万博1manbetx
1)您可以看一下 这个 页面清楚地说明了我们如何将数据从应用程序设计器传递到Simulink。万博1manbetx
2)您可以使用 事件 在状态流中,可以通过MATLAB应用中的地板按钮集成到状态过渡 回调 。您可以查看下面链接的示例,该示例清楚地说明了MATLAB应用程序和状态流之间的数据传输。
希望这可以帮助!

社区寻宝

在Matlab Central中找到宝藏,发现社区如何为您提供帮助!

开始狩猎!