How to update app's text field continously using Simulink with Stateflow.

조회 수: 1 (최근 30일)
Damian Mikolajczak
Damian Mikolajczak 2021년 5월 17일
답변: Pavan Guntha 2021년 8월 19일
Hi,
I'm currently working on a project and came across 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
Pavan Guntha 2021년 8월 19일
Hi Damian,
I understand that the issue is with establishing proper data transfer between MATLAB App, Stateflow & Simulink.
1) You could have a look at this page which clearly illustrates how we can pass data from App designer to Simulink.
2) You could make use of events in Stateflow for state transitions which can be integrated with Floor buttons in MATLAB App through callbacks. You can have a look at the example linked below which clearly illustrates the data transfer between MATLAB App and Stateflow.
Hope this helps!

카테고리

Help CenterFile Exchange에서 Complex Logic에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by