How do I display real-time data from my simulink simulation in appdesigner?
14 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Herman Galvis Santamaria
am 7 Okt. 2021
Beantwortet: Harikrishnan Balachandran Nair
am 20 Okt. 2021
I am trying to show data in app designer during the execution of the simulation in Simulink, I am using an Out block and the function get_param ('Model / Out1', 'RunTimeObject') to obtain that data, but when I run the program it does not show any value . I already initialized the model with load_system('Model') and even started the simulation from my app with set_param (gcs, SimulationCommand ',' Start ') and this part works very well. I programmed a button to show me the data in an EditField which is the part of the code that you see below. My question is, what am I missing, or what did I do wrong?. I really apreciatte your help
load_system('Simulink.slx')
find_system
set_param(gcs,'SimulationMode','external');
....
rto1 = get_param('Simulink/Out1','RuntimeObject');
app.CEditField.Value=rto1.InputPort(1).Data;
0 Kommentare
Antworten (1)
Harikrishnan Balachandran Nair
am 20 Okt. 2021
Hi,
You can refer to a similar question that has been answered here : https://www.mathworks.com/matlabcentral/answers/446302-how-do-i-update-a-gui-designed-in-app-designer-with-data-from-a-running-simulink-model
Hope this helps!
0 Kommentare
Siehe auch
Kategorien
Mehr zu Programmatic Model Editing 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!