필터 지우기
필터 지우기

How can I display the results from simulink to the GUI ?

조회 수: 3 (최근 30일)
xuan hoa
xuan hoa 2021년 11월 8일
답변: Githin George 2023년 12월 13일
Hi, I'm currently trying to design an interface using the GUI and I'm trying to put the output from simulink into the edit box in the GUI.
In simulink I have a battery charger circuit and I use Display to output the percentage of battery capacity (SOC), and I added a To workspace block. So now how should I code so that the result is displayed in the edit box in the GUI, hope everyone can help me.

답변 (1개)

Githin George
Githin George 2023년 12월 13일
Hello Xuan,
It is my understanding that you would like to update a GUI with the output from a Simulink Model during model execution.
You can use various Simulink callbacks and events to sync the GUI with your model. For instance, you can register a listener function using “add_exec_event_listener” function for the ‘PostOutputs’ event of display block. This event is triggered at every time step of model execution. You can add the logic to update your GUI in the listener function.
For a more detailed explanation, you can refer to the following link.
I hope this helps.

카테고리

Help CenterFile Exchange에서 App Building에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by