How can I display the results from simulink to the GUI ?
3 ビュー (過去 30 日間)
古いコメントを表示
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.
0 件のコメント
回答 (1 件)
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.
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!