Filter löschen
Filter löschen

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

3 Ansichten (letzte 30 Tage)
xuan hoa
xuan hoa am 8 Nov. 2021
Beantwortet: Githin George am 13 Dez. 2023
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.

Antworten (1)

Githin George
Githin George am 13 Dez. 2023
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.

Kategorien

Mehr zu App Building finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by